List stop orders
Get a list of stop orders that match the given filters
Query Parameters
- 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
- 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.
Number of records to be returned that sort greater than row identified by cursor supplied in 'after'.
If paging forwards, the cursor string for the last row of the previous page.
Number of records to be returned that sort less than row identified by cursor supplied in 'before'.
If paging forwards, the cursor string for the first row of the previous page.
Whether to order the results with the newest records first. If not set, the default value is true.
Possible values: [STATUS_UNSPECIFIED
, STATUS_PENDING
, STATUS_CANCELLED
, STATUS_STOPPED
, STATUS_TRIGGERED
, STATUS_EXPIRED
, STATUS_REJECTED
]
Restrict orders to those with the given statuses.
Possible values: [EXPIRY_STRATEGY_UNSPECIFIED
, EXPIRY_STRATEGY_CANCELS
, EXPIRY_STRATEGY_SUBMIT
]
Restrict orders to those with the given expiry strategies.
Timestamp in Unix nanoseconds indicating the start of the date range.
Timestamp in Unix nanoseconds indicating the end of the date range.
Restrict orders to those placed by the given party IDs.
Restrict orders to those placed on the given market IDs.
Live stop orders only.
- 200
- 500
- default
A successful response.
Schema
- Array [
- ]
orders object
Page of stop orders data and corresponding page information.
edges object[]
Page of stop orders and their corresponding cursors.
Cursor that can be used to fetch further pages.
node object
Data associated with an order submitted to a Vega node.
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.
pageInfo object
Page information that is used for fetching further pages.
End cursor.
Indicator if there is a next page.
Indicator if there is a previous page.
Start cursor.
{
"orders": {
"edges": [
{
"cursor": "string",
"node": {
"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"
}
}
}
],
"pageInfo": {
"endCursor": "string",
"hasNextPage": true,
"hasPreviousPage": true,
"startCursor": "string"
}
}
}
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"
}