ores.marketdata.curve_publish_operations
Table of Contents
A publish is a request, not a save. The trader who owns the curve asks for the candidate set to become the curve the desk prices from, a person holding the permission the kind names decides it, and only an approved request publishes.
The ask is the generic approval operation,
inbox.v1.ops.raise_approval, raised with the kind marketdata.curve_publish.
This operation is the other half: it refuses to publish unless it is given the
approved request of that kind, and it publishes when it is. The publish it
applies is curve_republish_service::republish(), the write
marketdata.v1.ops.republish_curve already triggers; the difference is that
this operation carries the decision.
A request names the curve, the as-of and the party it authorises in its own detail table – ores.marketdata.curve_publish – which the raise writes and the publish reads. The trade that was missing is therefore closed: the publish compares the subject it is about with the subject the request holds, and refuses a different configuration, as-of or party with the words that name both. The apply stamps the same row with the publisher and the instant, so a request publishes once.
1. Includes
#include <chrono> #include <optional> #include <string>
2. Messages
2.1. publish_curve_request
The publish of an approved candidate set, or the refusal that states which decision it waits on.
/** * @brief Publishes a bootstrapped curve's output under the approval that * permits it. * * The call is the second half of a decision: the person asking raised an * approval request of the kind marketdata.curve_publish, somebody else * decided it, and this names the approved request. A call that names no * approved request publishes nothing, and the answer states the kind the * request must be of. A call whose curve, as-of or party is not the subject the * request names publishes nothing either, and the answer names both subjects. * The request publishes once: a request that already moved the set is refused, * and the answer says who applied it and when. */
2.1.1. bootstrap_config_id
/** * @brief The bootstrap configuration whose output is published. */
2.1.2. as_of
/** * @brief The snapshot whose market observations the bootstrap reads. */
2.1.3. approval_request_id
/** * @brief The approved request that permits this publish, or empty. * * Empty is the ask: the request is raised for the curve configuration and the * as-of this call names, and nothing is published. Naming an approved request * applies it, and the configuration and as-of must be the ones that request was * raised for. */
2.1.4. reason
/** * @brief Why the publish was asked for, which the decider reads. * * Required when the call raises a request, and ignored when it applies one. */
2.2. publish_curve_response
2.2.1. success
/** * @brief Whether the published set moved. */
2.2.2. message
/** * @brief Why the publish did not happen, or empty when it did. */
2.2.3. approval_request_id
/** * @brief The request the answer is about, as it was named or as it stands. */
2.2.4. state_code
/** * @brief The state the request was in, so a caller reads waiting or refused * rather than guessing. */
2.2.5. published_at
/** * @brief The instant the published set moved, when this call moved it. * * Absent when the call raised a request or was refused, because neither moved * anything. The instant is the publication record's, not the caller's clock. */
2.2.6. published_by
/** * @brief The account that applied the request, when this call applied it. * * Empty when the call raised a request or was refused. */
3. See also
- ores.marketdata.operations — where republish_curve, the write this operation gates, is declared.
- Decide a publish — the decision this operation waits on.