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

Get stop order

GET 

/api/v2/stoporder/:orderId

Get a stop order by its ID. A stop order's ID will be the SHA3-256 hash of the signature that the order was submitted with. A stop order's ID is likely to be different from the ID of the order that will be submitted when the stop is triggered.

Request

Path Parameters

    orderId stringrequired

    Order ID to retrieve order information for.

Responses

A successful response.

Schema
    order object

    Order details, if one was found.

    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.

    rejectionReason An optional reason for why a stop order was rejected

    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]

    Default value: REJECTION_REASON_UNSPECIFIED

    sizeOverrideSetting Size override setting

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

    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

    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

    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

    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

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

    Default value: TYPE_UNSPECIFIED

    Type of the order.

Loading...