Skip to main content
Version: mainnet (v0.72)

List stop orders

Get a list of stop orders that match the given filters

Query Parameters
    pagination.first int32

    Number of records to be returned that sort greater than row identified by cursor supplied in 'after'.

    pagination.after string

    If paging forwards, the cursor string for the last row of the previous page.

    pagination.last int32

    Number of records to be returned that sort less than row identified by cursor supplied in 'before'.

    pagination.before string

    If paging forwards, the cursor string for the first row of the previous page.

    pagination.newestFirst boolean

    Whether to order the results with the newest records first. If not set, the default value is true.

    filter.statuses string[]

    Possible values: [STATUS_UNSPECIFIED, STATUS_PENDING, STATUS_CANCELLED, STATUS_STOPPED, STATUS_TRIGGERED, STATUS_EXPIRED, STATUS_REJECTED]

    Restrict orders to those with the given statuses.

    • STATUS_UNSPECIFIED: Never valid
    • STATUS_PENDING: Pending to be executed once the trigger is breached
    • STATUS_CANCELLED: Cancelled by the user
    • STATUS_STOPPED: Stopped by the network, e.g: OCO on the other side has been triggered
    • STATUS_TRIGGERED: Stop order has been triggered and generated an order
    • STATUS_EXPIRED: Stop order has expired
    • STATUS_REJECTED: Stop order was rejected at submission
    filter.expiryStrategies string[]

    Possible values: [EXPIRY_STRATEGY_UNSPECIFIED, EXPIRY_STRATEGY_CANCELS, EXPIRY_STRATEGY_SUBMIT]

    Restrict orders to those with the given expiry strategies.

    • EXPIRY_STRATEGY_UNSPECIFIED: Never valid
    • EXPIRY_STRATEGY_CANCELS: Stop order should be cancelled if the expiry time is reached.
    • EXPIRY_STRATEGY_SUBMIT: Order should be submitted if the expiry time is reached.
    filter.dateRange.startTimestamp int64

    Timestamp in Unix nanoseconds indicating the start of the date range.

    filter.dateRange.endTimestamp int64

    Timestamp in Unix nanoseconds indicating the end of the date range.

    filter.partyIds string[]

    Restrict orders to those placed by the given party IDs.

    filter.marketIds string[]

    Restrict orders to those placed on the given market IDs.

Responses

A successful response.


Schema
    orders object

    Page of stop orders data and corresponding page information.

    edges object[]

    Page of stop orders and their corresponding cursors.

  • Array [
  • cursor string

    Cursor that can be used to fetch further pages.

    node object

    Data associated with an order submitted to a Vega node.

    stopOrder object
    createdAt int64

    Creation time of the stop order.

    expiresAt int64

    Optional expiry timestamp.

    expiryStrategy StopOrderExpiryStrategy

    Possible values: [EXPIRY_STRATEGY_UNSPECIFIED, EXPIRY_STRATEGY_CANCELS, EXPIRY_STRATEGY_SUBMIT]

    Default value: EXPIRY_STRATEGY_UNSPECIFIED

    Strategy to adopt if the expiry time is reached.

    id ID of this stop order also the ID of the associated order if it is ever triggered
    marketId string

    ID of the market the stop order is submitted to.

    ocoLinkId The ID of the 'other' part of the OCO if 2 stop orders were submitted at once
    orderId string

    ID of the order created once the trigger is hit.

    partyId string

    ID of the party that submitted this stop order.

    price string

    Fixed price at which the order will be submitted.

    status - STATUS_UNSPECIFIED: Never valid - STATUS_PENDING: Pending to be executed once the trigger is breached - STATUS_CANCELLED: Cancelled by the user - STATUS_STOPPED: Stopped by the network, e.g: OCO on the other side has been triggered - STATUS_TRIGGERED: Stop order has been triggered and generated an order - STATUS_EXPIRED: Stop order has expired - STATUS_REJECTED: Stop order was rejected at submission

    Possible values: [STATUS_UNSPECIFIED, STATUS_PENDING, STATUS_CANCELLED, STATUS_STOPPED, STATUS_TRIGGERED, STATUS_EXPIRED, STATUS_REJECTED]

    Default value: STATUS_UNSPECIFIED

    Status of the stop order.

    trailingPercentOffset Trailing percentage at which the order will be submitted. This should be expressed as a decimal value between 0 and 1, e.g. 0.01 for 1%
    triggerDirection - TRIGGER_DIRECTION_UNSPECIFIED: Never valid - TRIGGER_DIRECTION_RISES_ABOVE: Stop order is triggered once the price rises above a certain level - TRIGGER_DIRECTION_FALLS_BELOW: Stop order is triggered once the price falls below a certain level

    Possible values: [TRIGGER_DIRECTION_UNSPECIFIED, TRIGGER_DIRECTION_RISES_ABOVE, TRIGGER_DIRECTION_FALLS_BELOW]

    Default value: TRIGGER_DIRECTION_UNSPECIFIED

    Trigger direction for this stop order.

    updatedAt int64

    Last update of this stop order.

    submission object
    expiresAt int64

    Timestamp in Unix nanoseconds for when the order will expire, required field only for Order.TimeInForce.TIME_IN_FORCE_GTT`.

    icebergOpts object

    Parameters used to specify an iceberg order.

    minimumVisibleSize uint64

    Minimum allowed remaining size of the order before it is replenished back to its peak size.

    peakSize uint64

    Size of the order that is made visible and can be traded with during the execution of a single order.

    marketId string

    Market ID for the order, required field.

    peggedOrder object

    Used to specify the details for 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, required field for limit orders, however it is not required for market orders. This field is an unsigned integer scaled to the market's decimal places.

    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, this is typically used to retrieve an order submitted through consensus, currently set internally by the node to return a unique reference ID for the order submission.

    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, required field.

    size uint64

    Size for the order, for example, in a futures market the size equals the number of units, cannot be negative.

    timeInForce Time In Force for an order

    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 indicates how long an order will remain active before it is executed or expires, required field.

    type Type values for an order

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

    Default value: TYPE_UNSPECIFIED

    Type for the order, required field - See Order.Type.

  • ]
  • pageInfo object

    Page information that is used for fetching further pages.

    endCursor string

    End cursor.

    hasNextPage boolean

    Indicator if there is a next page.

    hasPreviousPage boolean

    Indicator if there is a previous page.

    startCursor string

    Start cursor.

Loading...