Skip to main content
Version: testnet (v0.73)

Observe orders

Subscribe to a stream of orders

Query Parameters
    marketIds string[]

    Restrict orders to those placed on the given markets.

    partyIds string[]

    Restrict orders to those placed on the by the given parties.

    excludeLiquidity boolean

    Whether liquidity orders should be excluded from the stream. If not set, liquidity orders will be included.

Responses

A successful response.(streaming responses)


Schema
    error object
    code int32
    details object[]
  • Array [
  • @type string

    A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in path/google.protobuf.Duration). The name should be in a canonical form (e.g., leading "." is not accepted).

    In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme http, https, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:

    • If no scheme is provided, https is assumed.
    • An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
    • Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)

    Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.

    Schemes other than http, https (or the empty scheme) might be used with implementation specific semantics.

  • ]
  • message string
    result object

    Response that is received from an orders subscription.

    snapshot object

    An 'initial image' snapshot containing current live orders.

    lastPage boolean

    Indicator if the last page is reached or not.

    orders object[]

    List of order data parts.

  • Array [
  • batchId uint64

    Batch ID for the order, used internally for orders submitted during auctions to keep track of the auction batch this order falls under. Required for fees calculation.

    createdAt int64

    Timestamp for when the order was created at, in nanoseconds.

    expiresAt int64

    Timestamp in Unix nanoseconds for when the order will expire.

    icebergOrder object
    minimumVisibleSize uint64

    If the visible size of the order falls below this value, it will be replenished back to the peak size using the reserved amount.

    peakSize uint64

    Size of the order that will be made visible if the iceberg order is replenished after trading.

    reservedRemaining uint64

    Size of the order that is reserved and used to restore the iceberg's peak when it is refreshed.

    id string

    Unique ID generated for the order.

    liquidityProvisionId string

    Set if the order was created as part of a liquidity provision, will be empty if not.

    marketId string

    Market ID for the order.

    partyId string

    Party ID for the order.

    peggedOrder object

    Pegged order details, used only if the order represents a pegged order.

    offset string

    Offset from the price reference.

    reference Pegged reference defines which price point a pegged order is linked to - meaning the price for a pegged order is calculated from the value of the reference price point

    Possible values: [PEGGED_REFERENCE_UNSPECIFIED, PEGGED_REFERENCE_MID, PEGGED_REFERENCE_BEST_BID, PEGGED_REFERENCE_BEST_ASK]

    Default value: PEGGED_REFERENCE_UNSPECIFIED

    Price point the order is linked to.

    postOnly boolean

    Only valid for Limit orders. Cannot be True at the same time as Reduce-Only.

    price string

    Price for the order, the price is an integer, for example 123456 is a correctly formatted price of 1.23456 assuming market configured to 5 decimal places.

    reason OrderError codes are returned in the Order.reason field - If there is an issue with an order during its life-cycle, it will be marked with `status.ORDER_STATUS_REJECTED`

    Possible values: [ORDER_ERROR_UNSPECIFIED, ORDER_ERROR_INVALID_MARKET_ID, ORDER_ERROR_INVALID_ORDER_ID, ORDER_ERROR_OUT_OF_SEQUENCE, ORDER_ERROR_INVALID_REMAINING_SIZE, ORDER_ERROR_TIME_FAILURE, ORDER_ERROR_REMOVAL_FAILURE, ORDER_ERROR_INVALID_EXPIRATION_DATETIME, ORDER_ERROR_INVALID_ORDER_REFERENCE, ORDER_ERROR_EDIT_NOT_ALLOWED, ORDER_ERROR_AMEND_FAILURE, ORDER_ERROR_NOT_FOUND, ORDER_ERROR_INVALID_PARTY_ID, ORDER_ERROR_MARKET_CLOSED, ORDER_ERROR_MARGIN_CHECK_FAILED, ORDER_ERROR_MISSING_GENERAL_ACCOUNT, ORDER_ERROR_INTERNAL_ERROR, ORDER_ERROR_INVALID_SIZE, ORDER_ERROR_INVALID_PERSISTENCE, ORDER_ERROR_INVALID_TYPE, ORDER_ERROR_SELF_TRADING, ORDER_ERROR_INSUFFICIENT_FUNDS_TO_PAY_FEES, ORDER_ERROR_INCORRECT_MARKET_TYPE, ORDER_ERROR_INVALID_TIME_IN_FORCE, ORDER_ERROR_CANNOT_SEND_GFN_ORDER_DURING_AN_AUCTION, ORDER_ERROR_CANNOT_SEND_GFA_ORDER_DURING_CONTINUOUS_TRADING, ORDER_ERROR_CANNOT_AMEND_TO_GTT_WITHOUT_EXPIRYAT, ORDER_ERROR_EXPIRYAT_BEFORE_CREATEDAT, ORDER_ERROR_CANNOT_HAVE_GTC_AND_EXPIRYAT, ORDER_ERROR_CANNOT_AMEND_TO_FOK_OR_IOC, ORDER_ERROR_CANNOT_AMEND_TO_GFA_OR_GFN, ORDER_ERROR_CANNOT_AMEND_FROM_GFA_OR_GFN, ORDER_ERROR_CANNOT_SEND_IOC_ORDER_DURING_AUCTION, ORDER_ERROR_CANNOT_SEND_FOK_ORDER_DURING_AUCTION, ORDER_ERROR_MUST_BE_LIMIT_ORDER, ORDER_ERROR_MUST_BE_GTT_OR_GTC, ORDER_ERROR_WITHOUT_REFERENCE_PRICE, ORDER_ERROR_BUY_CANNOT_REFERENCE_BEST_ASK_PRICE, ORDER_ERROR_OFFSET_MUST_BE_GREATER_OR_EQUAL_TO_ZERO, ORDER_ERROR_SELL_CANNOT_REFERENCE_BEST_BID_PRICE, ORDER_ERROR_OFFSET_MUST_BE_GREATER_THAN_ZERO, ORDER_ERROR_INSUFFICIENT_ASSET_BALANCE, ORDER_ERROR_CANNOT_AMEND_PEGGED_ORDER_DETAILS_ON_NON_PEGGED_ORDER, ORDER_ERROR_UNABLE_TO_REPRICE_PEGGED_ORDER, ORDER_ERROR_UNABLE_TO_AMEND_PRICE_ON_PEGGED_ORDER, ORDER_ERROR_NON_PERSISTENT_ORDER_OUT_OF_PRICE_BOUNDS, ORDER_ERROR_TOO_MANY_PEGGED_ORDERS, ORDER_ERROR_POST_ONLY_ORDER_WOULD_TRADE, ORDER_ERROR_REDUCE_ONLY_ORDER_WOULD_NOT_REDUCE_POSITION]

    Default value: ORDER_ERROR_UNSPECIFIED

    Futher details for why an order with status STATUS_REJECTED was rejected.

    reduceOnly boolean

    Only valid for Non-Persistent orders. Cannot be True at the same time as Post-Only. If set, order will only be executed if the outcome of the trade moves the trader's position closer to 0.

    reference string

    Reference given for the order.

    remaining uint64

    Size remaining, when this reaches 0 then the order is fully filled and status becomes STATUS_FILLED.

    side Side relates to the direction of an order, to Buy, or Sell

    Possible values: [SIDE_UNSPECIFIED, SIDE_BUY, SIDE_SELL]

    Default value: SIDE_UNSPECIFIED

    Side for the order, e.g. SIDE_BUY or SIDE_SELL.

    size uint64

    Size for the order, for example, in a futures market the size equals the number of contracts.

    status Status values for an order

    Possible values: [STATUS_UNSPECIFIED, STATUS_ACTIVE, STATUS_EXPIRED, STATUS_CANCELLED, STATUS_STOPPED, STATUS_FILLED, STATUS_REJECTED, STATUS_PARTIALLY_FILLED, STATUS_PARKED]

    Default value: STATUS_UNSPECIFIED

    Current status of the order.

    timeInForce Time in force indicates how long an order will remain active before it is executed or expires. - See OrderTimeInForce

    Possible values: [TIME_IN_FORCE_UNSPECIFIED, TIME_IN_FORCE_GTC, TIME_IN_FORCE_GTT, TIME_IN_FORCE_IOC, TIME_IN_FORCE_FOK, TIME_IN_FORCE_GFA, TIME_IN_FORCE_GFN]

    Default value: TIME_IN_FORCE_UNSPECIFIED

    • TIME_IN_FORCE_UNSPECIFIED: Default value for TimeInForce, can be valid for an amend
    • TIME_IN_FORCE_GTC: Good until cancelled, the order trades any amount and as much as possible and remains on the book until it either trades completely or is cancelled
    • TIME_IN_FORCE_GTT: Good until specified time, this order type trades any amount and as much as possible and remains on the book until it either trades completely, is cancelled, or expires at a set time NOTE: this may in future be multiple types or have sub types for orders that provide different ways of specifying expiry
    • TIME_IN_FORCE_IOC: Immediate or cancel, the order trades any amount and as much as possible but does not remain on the book (whether it trades or not)
    • TIME_IN_FORCE_FOK: Fill or kill, the order either trades completely i.e. remainingSize == 0 after adding, or not at all, and does not remain on the book if it doesn't trade
    • TIME_IN_FORCE_GFA: Good for auction, this order is only accepted during an auction period
    • TIME_IN_FORCE_GFN: Good for normal, this order is only accepted during normal trading (that can be continuous trading or frequent batched auctions)
    type Type values for an order

    Possible values: [TYPE_UNSPECIFIED, TYPE_LIMIT, TYPE_MARKET, TYPE_NETWORK]

    Default value: TYPE_UNSPECIFIED

    Type for the order.

    updatedAt int64

    Timestamp in Unix nanoseconds for when the order was last updated.

    version uint64

    Version for the order, initial value is version 1 and is incremented after each successful amend.

  • ]
  • updates object

    List of order updates in the last block.

    orders object[]

    List of orders data.

  • Array [
  • batchId uint64

    Batch ID for the order, used internally for orders submitted during auctions to keep track of the auction batch this order falls under. Required for fees calculation.

    createdAt int64

    Timestamp for when the order was created at, in nanoseconds.

    expiresAt int64

    Timestamp in Unix nanoseconds for when the order will expire.

    icebergOrder object
    minimumVisibleSize uint64

    If the visible size of the order falls below this value, it will be replenished back to the peak size using the reserved amount.

    peakSize uint64

    Size of the order that will be made visible if the iceberg order is replenished after trading.

    reservedRemaining uint64

    Size of the order that is reserved and used to restore the iceberg's peak when it is refreshed.

    id string

    Unique ID generated for the order.

    liquidityProvisionId string

    Set if the order was created as part of a liquidity provision, will be empty if not.

    marketId string

    Market ID for the order.

    partyId string

    Party ID for the order.

    peggedOrder object

    Pegged order details, used only if the order represents a pegged order.

    offset string

    Offset from the price reference.

    reference Pegged reference defines which price point a pegged order is linked to - meaning the price for a pegged order is calculated from the value of the reference price point

    Possible values: [PEGGED_REFERENCE_UNSPECIFIED, PEGGED_REFERENCE_MID, PEGGED_REFERENCE_BEST_BID, PEGGED_REFERENCE_BEST_ASK]

    Default value: PEGGED_REFERENCE_UNSPECIFIED

    Price point the order is linked to.

    postOnly boolean

    Only valid for Limit orders. Cannot be True at the same time as Reduce-Only.

    price string

    Price for the order, the price is an integer, for example 123456 is a correctly formatted price of 1.23456 assuming market configured to 5 decimal places.

    reason OrderError codes are returned in the Order.reason field - If there is an issue with an order during its life-cycle, it will be marked with `status.ORDER_STATUS_REJECTED`

    Possible values: [ORDER_ERROR_UNSPECIFIED, ORDER_ERROR_INVALID_MARKET_ID, ORDER_ERROR_INVALID_ORDER_ID, ORDER_ERROR_OUT_OF_SEQUENCE, ORDER_ERROR_INVALID_REMAINING_SIZE, ORDER_ERROR_TIME_FAILURE, ORDER_ERROR_REMOVAL_FAILURE, ORDER_ERROR_INVALID_EXPIRATION_DATETIME, ORDER_ERROR_INVALID_ORDER_REFERENCE, ORDER_ERROR_EDIT_NOT_ALLOWED, ORDER_ERROR_AMEND_FAILURE, ORDER_ERROR_NOT_FOUND, ORDER_ERROR_INVALID_PARTY_ID, ORDER_ERROR_MARKET_CLOSED, ORDER_ERROR_MARGIN_CHECK_FAILED, ORDER_ERROR_MISSING_GENERAL_ACCOUNT, ORDER_ERROR_INTERNAL_ERROR, ORDER_ERROR_INVALID_SIZE, ORDER_ERROR_INVALID_PERSISTENCE, ORDER_ERROR_INVALID_TYPE, ORDER_ERROR_SELF_TRADING, ORDER_ERROR_INSUFFICIENT_FUNDS_TO_PAY_FEES, ORDER_ERROR_INCORRECT_MARKET_TYPE, ORDER_ERROR_INVALID_TIME_IN_FORCE, ORDER_ERROR_CANNOT_SEND_GFN_ORDER_DURING_AN_AUCTION, ORDER_ERROR_CANNOT_SEND_GFA_ORDER_DURING_CONTINUOUS_TRADING, ORDER_ERROR_CANNOT_AMEND_TO_GTT_WITHOUT_EXPIRYAT, ORDER_ERROR_EXPIRYAT_BEFORE_CREATEDAT, ORDER_ERROR_CANNOT_HAVE_GTC_AND_EXPIRYAT, ORDER_ERROR_CANNOT_AMEND_TO_FOK_OR_IOC, ORDER_ERROR_CANNOT_AMEND_TO_GFA_OR_GFN, ORDER_ERROR_CANNOT_AMEND_FROM_GFA_OR_GFN, ORDER_ERROR_CANNOT_SEND_IOC_ORDER_DURING_AUCTION, ORDER_ERROR_CANNOT_SEND_FOK_ORDER_DURING_AUCTION, ORDER_ERROR_MUST_BE_LIMIT_ORDER, ORDER_ERROR_MUST_BE_GTT_OR_GTC, ORDER_ERROR_WITHOUT_REFERENCE_PRICE, ORDER_ERROR_BUY_CANNOT_REFERENCE_BEST_ASK_PRICE, ORDER_ERROR_OFFSET_MUST_BE_GREATER_OR_EQUAL_TO_ZERO, ORDER_ERROR_SELL_CANNOT_REFERENCE_BEST_BID_PRICE, ORDER_ERROR_OFFSET_MUST_BE_GREATER_THAN_ZERO, ORDER_ERROR_INSUFFICIENT_ASSET_BALANCE, ORDER_ERROR_CANNOT_AMEND_PEGGED_ORDER_DETAILS_ON_NON_PEGGED_ORDER, ORDER_ERROR_UNABLE_TO_REPRICE_PEGGED_ORDER, ORDER_ERROR_UNABLE_TO_AMEND_PRICE_ON_PEGGED_ORDER, ORDER_ERROR_NON_PERSISTENT_ORDER_OUT_OF_PRICE_BOUNDS, ORDER_ERROR_TOO_MANY_PEGGED_ORDERS, ORDER_ERROR_POST_ONLY_ORDER_WOULD_TRADE, ORDER_ERROR_REDUCE_ONLY_ORDER_WOULD_NOT_REDUCE_POSITION]

    Default value: ORDER_ERROR_UNSPECIFIED

    Futher details for why an order with status STATUS_REJECTED was rejected.

    reduceOnly boolean

    Only valid for Non-Persistent orders. Cannot be True at the same time as Post-Only. If set, order will only be executed if the outcome of the trade moves the trader's position closer to 0.

    reference string

    Reference given for the order.

    remaining uint64

    Size remaining, when this reaches 0 then the order is fully filled and status becomes STATUS_FILLED.

    side Side relates to the direction of an order, to Buy, or Sell

    Possible values: [SIDE_UNSPECIFIED, SIDE_BUY, SIDE_SELL]

    Default value: SIDE_UNSPECIFIED

    Side for the order, e.g. SIDE_BUY or SIDE_SELL.

    size uint64

    Size for the order, for example, in a futures market the size equals the number of contracts.

    status Status values for an order

    Possible values: [STATUS_UNSPECIFIED, STATUS_ACTIVE, STATUS_EXPIRED, STATUS_CANCELLED, STATUS_STOPPED, STATUS_FILLED, STATUS_REJECTED, STATUS_PARTIALLY_FILLED, STATUS_PARKED]

    Default value: STATUS_UNSPECIFIED

    Current status of the order.

    timeInForce Time in force indicates how long an order will remain active before it is executed or expires. - See OrderTimeInForce

    Possible values: [TIME_IN_FORCE_UNSPECIFIED, TIME_IN_FORCE_GTC, TIME_IN_FORCE_GTT, TIME_IN_FORCE_IOC, TIME_IN_FORCE_FOK, TIME_IN_FORCE_GFA, TIME_IN_FORCE_GFN]

    Default value: TIME_IN_FORCE_UNSPECIFIED

    • TIME_IN_FORCE_UNSPECIFIED: Default value for TimeInForce, can be valid for an amend
    • TIME_IN_FORCE_GTC: Good until cancelled, the order trades any amount and as much as possible and remains on the book until it either trades completely or is cancelled
    • TIME_IN_FORCE_GTT: Good until specified time, this order type trades any amount and as much as possible and remains on the book until it either trades completely, is cancelled, or expires at a set time NOTE: this may in future be multiple types or have sub types for orders that provide different ways of specifying expiry
    • TIME_IN_FORCE_IOC: Immediate or cancel, the order trades any amount and as much as possible but does not remain on the book (whether it trades or not)
    • TIME_IN_FORCE_FOK: Fill or kill, the order either trades completely i.e. remainingSize == 0 after adding, or not at all, and does not remain on the book if it doesn't trade
    • TIME_IN_FORCE_GFA: Good for auction, this order is only accepted during an auction period
    • TIME_IN_FORCE_GFN: Good for normal, this order is only accepted during normal trading (that can be continuous trading or frequent batched auctions)
    type Type values for an order

    Possible values: [TYPE_UNSPECIFIED, TYPE_LIMIT, TYPE_MARKET, TYPE_NETWORK]

    Default value: TYPE_UNSPECIFIED

    Type for the order.

    updatedAt int64

    Timestamp in Unix nanoseconds for when the order was last updated.

    version uint64

    Version for the order, initial value is version 1 and is incremented after each successful amend.

  • ]
Loading...