Skip to main content
Version: pre-release (v0.78)

List stop orders

GET 

/api/v2/stoporders

Get a list of stop orders that match the given filters

Request

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.

    filter.liveOnly boolean

    Live stop orders only.

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 (string)

    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 (string)
    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 (string)
    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.

    rejectionReason An optional reason for why a stop order was rejected (string)

    Possible values: [REJECTION_REASON_UNSPECIFIED, REJECTION_REASON_TRADING_NOT_ALLOWED, REJECTION_REASON_EXPIRY_IN_THE_PAST, REJECTION_REASON_MUST_BE_REDUCE_ONLY, REJECTION_REASON_MAX_STOP_ORDERS_PER_PARTY_REACHED, REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_WITHOUT_A_POSITION, REJECTION_REASON_STOP_ORDER_NOT_CLOSING_THE_POSITION, REJECTION_REASON_STOP_ORDER_LINKED_PERCENTAGE_INVALID, REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_DURING_OPENING_AUCTION, REJECTION_REASON_STOP_ORDER_CANNOT_MATCH_OCO_EXPIRY_TIMES, REJECTION_REASON_STOP_ORDER_SIZE_OVERRIDE_UNSUPPORTED_FOR_SPOT]

    Default value: REJECTION_REASON_UNSPECIFIED

    sizeOverrideSetting Size override setting (string)

    Possible values: [SIZE_OVERRIDE_SETTING_UNSPECIFIED, SIZE_OVERRIDE_SETTING_NONE, SIZE_OVERRIDE_SETTING_POSITION]

    Default value: SIZE_OVERRIDE_SETTING_UNSPECIFIED

    sizeOverrideValue object
    percentage Scaling percentage of the current position’s size (string)
    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 (string)

    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% (string)
    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 (string)

    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

    A command that submits an order to the Vega network for a given market.

    expiresAt int64

    Timestamp, in Unix nanoseconds, for when the order will expire. Can only be set when the order's time-in-force is GTT.

    icebergOpts object

    Iceberg order details. If set, the order will exist on the order book in chunks.

    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 to submit the order to.

    peggedOrder object

    Pegged order details. If set, the order's price will be offset from a particular reference price of the order book at all times.

    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 (string)

    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

    If set, the order will only be executed if it would not trade on entry to the order book. Only valid for limit orders.

    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

    If set, the order will only be executed if the outcome of the trade moves the trader's position closer to 0. Only valid for non-persistent orders.

    reference string

    Arbitrary optional reference for the order, to be used as a human-readable non-unique identifier for the order.

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

    Possible values: [SIDE_UNSPECIFIED, SIDE_BUY, SIDE_SELL]

    Default value: SIDE_UNSPECIFIED

    Which side of the order book the order is for, e.g. buy or sell.

    size uint64

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

    timeInForce Time In Force for an order (string)

    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..

    type Type values for an order (string)

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

    Default value: TYPE_UNSPECIFIED

    Type of the order.

  • ]
  • 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...