{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/moment/main/json-schema/moment-post-order-request-schema.json", "title": "Order Request", "description": "Each order has a unique identifier generated by Moment. The ID will be returned when an order is placed and can be used to check the status of the order via the `GET /v1/trading/order/{id}/` endpoint. Updates on open orders at Moment will also be sent over the real-time API, which is the recommended method of maintaining order state.", "x-generated": "2026-10-14", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/moment-account-management-api-openapi.yml#/components/schemas/PostOrderRequest", "type": "object", "properties": { "instrument_id": { "$ref": "#/$defs/InstrumentID" }, "client_order_id": { "$ref": "#/$defs/ClientOrderID" }, "amount": { "$ref": "#/$defs/OrderSize" }, "side": { "$ref": "#/$defs/OrderSide" }, "type": { "$ref": "#/$defs/OrderType" }, "limit_price": { "$ref": "#/$defs/NullDecimal", "description": "The Percentage Price is represented as a percentage of par. For a typical $1,000 par value bond, a percentage price of $90 values the bond at $900. This is a clean price, which does not include accrued interest.", "minimum": 0, "x-go-type-skip-optional-pointer": true }, "annotation": { "type": "string", "title": "annotation", "description": "Custom, arbitrary, client-provided metadata." }, "booking_instructions": { "type": "object", "title": "booking_instructions", "description": "Client-provided information to configure trade booking for the order, as a map from string to string. Passing a multi-layer JSON map or something other than \"string\":\"string\" key-value pairs will result in an error. The specific contents of this field should be determined in conjunction with the back-office integration.", "additionalProperties": { "type": "string" } }, "extended_hours": { "type": "boolean", "default": false, "description": "(default) false. If true, eligible for execution outside regular trading hours. In live mode, trading hours are from 9:30 am to 4:00 pm ET. Extended hours are from 7:30 am to 5:30 pm ET. For paper trading, normal trading hours are from 9:30 am to 4:00 pm ET. Extended hours are from 1:00 am to 11:00 pm ET." }, "rfq": { "$ref": "#/$defs/OrderRFQ" }, "booking_type": { "$ref": "#/$defs/BookingType" }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Metadata is an arbitrary key-value store for client-provided data associated with the order.", "x-go-type-skip-optional-pointer": true }, "review_required": { "type": "boolean", "default": false, "description": "Flag to indicate if the order requires manual review before execution.", "x-go-type-skip-optional-pointer": true }, "review_reason": { "type": "string", "description": "Reason for why the order requires review. Only applicable when review_required is true.", "x-go-type-skip-optional-pointer": true } }, "required": [ "instrument_id", "amount", "side", "type", "client_order_id", "booking_instructions", "extended_hours" ], "$defs": { "BookingType": { "type": "string", "description": "The booking type for the account.", "enum": [ "cash", "margin" ] }, "ClientOrderID": { "type": "string", "title": "Client Order ID", "description": "Client-provided unique ID for the order; for example, to cross-reference with an internal system. Must be unique within the trading day, otherwise duplicate orders will be rejected during pre-trade checks." }, "Decimal": { "type": "number", "format": "double", "x-go-type": "decimal.Decimal", "x-go-type-import": { "path": "github.com/shopspring/decimal", "name": "decimal" } }, "InstrumentID": { "type": "string", "title": "Instrument ID", "description": "Instrument ISIN" }, "NullDecimal": { "type": "number", "format": "double", "x-go-type": "decimal.NullDecimal", "x-go-type-skip-optional-pointer": true, "x-go-type-import": { "path": "github.com/shopspring/decimal", "name": "decimal" } }, "OrderRFQ": { "type": "object", "title": "Order Request RFQ", "description": "Required for orders of type `rfq_response`, specifies the RFQ that the order is being placed against.", "required": [ "id", "contra_quote_id" ], "properties": { "id": { "type": "string", "description": "The ID of the RFQ that led to the order request." }, "contra_quote_id": { "type": "string", "title": "Contra Quote ID", "description": "The ID of the quote that is being traded against." } } }, "OrderSide": { "type": "string", "enum": [ "buy", "sell" ], "title": "OrderSide", "description": "Represents which side this order is on:\n\n- buy\n- sell" }, "OrderSize": { "type": "object", "title": "Size", "description": "The size of an order, with a specified `type` indicating how the size is represented. Par sizes represent the size of the order in face value; most corporate bonds have a face value of $1000, so an order with par $3000 would represent an order for 3 bonds. Notional sizes represent the size of the order in current dollar value, so an order with notional $3000 would represent an order to buy or sell $3000 worth of the bond at the current market prices. Currently, only par sizes are supported.", "properties": { "value": { "$ref": "#/$defs/Decimal" }, "type": { "type": "string", "enum": [ "par" ], "default": "par" } }, "required": [ "value", "type" ] }, "OrderType": { "type": "string", "enum": [ "limit", "market", "rfq_response" ], "default": "limit", "description": "Represents the types of orders Moment currently supports.\n\n- limit\n- market\n- rfq_response" } } }