Get stop order
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.
Path Parameters
Order ID to retrieve order information for.
- 200
- 500
- default
A successful response.
Schema
order object
Order details, if one was found.
stopOrder object
Creation time of the stop order.
Optional expiry timestamp.
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 of the market the stop order is submitted to.
ID of the order created once the trigger is hit.
ID of the party that submitted this stop order.
Fixed price at which the order will be submitted.
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
]
Default value: REJECTION_REASON_UNSPECIFIED
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.
Possible values: [TRIGGER_DIRECTION_UNSPECIFIED
, TRIGGER_DIRECTION_RISES_ABOVE
, TRIGGER_DIRECTION_FALLS_BELOW
]
Default value: TRIGGER_DIRECTION_UNSPECIFIED
Trigger direction for this stop order.
Last update of this stop order.
submission object
A command that submits an order to the Vega network for a given market.
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.
Minimum allowed remaining size of the order before it is replenished back to its peak size.
Size of the order that is made visible and can be traded with during the execution of a single order.
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 from the price reference.
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.
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 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.
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.
Arbitrary optional reference for the order, to be used as a human-readable non-unique identifier for the order.
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 for the order, for example, in a futures market the size equals the number of units.
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..
Possible values: [TYPE_UNSPECIFIED
, TYPE_LIMIT
, TYPE_MARKET
, TYPE_NETWORK
]
Default value: TYPE_UNSPECIFIED
Type of the order.
{
"order": {
"stopOrder": {
"createdAt": "string",
"expiresAt": "string",
"expiryStrategy": "EXPIRY_STRATEGY_UNSPECIFIED",
"id": "string",
"marketId": "string",
"ocoLinkId": "string",
"orderId": "string",
"partyId": "string",
"price": "string",
"rejectionReason": "REJECTION_REASON_UNSPECIFIED",
"status": "STATUS_UNSPECIFIED",
"trailingPercentOffset": "string",
"triggerDirection": "TRIGGER_DIRECTION_UNSPECIFIED",
"updatedAt": "string"
},
"submission": {
"expiresAt": "string",
"icebergOpts": {
"minimumVisibleSize": "string",
"peakSize": "string"
},
"marketId": "string",
"peggedOrder": {
"offset": "string",
"reference": "PEGGED_REFERENCE_UNSPECIFIED"
},
"postOnly": true,
"price": "string",
"reduceOnly": true,
"reference": "string",
"side": "SIDE_UNSPECIFIED",
"size": "string",
"timeInForce": "TIME_IN_FORCE_UNSPECIFIED",
"type": "TYPE_UNSPECIFIED"
}
}
}
An internal server error
Schema
- Array [
- 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.)
- ]
details object[]
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:
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.
{
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
}
An unexpected error response.
Schema
- Array [
- 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.)
- ]
details object[]
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:
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.
{
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
}