List orders
Get a list of orders that match the given filters
Query Parameters
- STATUS_UNSPECIFIED: Default value, always invalid
- STATUS_ACTIVE: Used for active unfilled or partially filled orders
- STATUS_EXPIRED: Used for expired GTT orders
- STATUS_CANCELLED: Used for orders cancelled by the party that created the order
- STATUS_STOPPED: Used for unfilled FOK or IOC orders, and for orders that were stopped by the network
- STATUS_FILLED: Used for closed fully filled orders
- STATUS_REJECTED: Used for orders when not enough collateral was available to fill the margin requirements
- STATUS_PARTIALLY_FILLED: Used for closed partially filled IOC orders
- STATUS_PARKED: Order has been removed from the order book and has been parked, this applies to pegged orders and liquidity orders (orders created from a liquidity provision shape)
- TYPE_UNSPECIFIED: Default value, always invalid
- TYPE_LIMIT: Used for Limit orders
- TYPE_MARKET: Used for Market orders
- TYPE_NETWORK: Used for orders where the initiating party is the network (with distressed parties)
- TIME_IN_FORCE_UNSPECIFIED: Default value for TimeInForce, can be valid for an amend
- TIME_IN_FORCE_GTC: Good until cancelled, the order trades any amount and as much as possible and remains on the book until it either trades completely or is cancelled
- TIME_IN_FORCE_GTT: Good until specified time, this order type trades any amount and as much as possible and remains on the book until it either trades completely, is cancelled, or expires at a set time NOTE: this may in future be multiple types or have sub types for orders that provide different ways of specifying expiry
- TIME_IN_FORCE_IOC: Immediate or cancel, the order trades any amount and as much as possible but does not remain on the book (whether it trades or not)
- TIME_IN_FORCE_FOK: Fill or kill, the order either trades completely i.e. remainingSize == 0 after adding, or not at all, and does not remain on the book if it doesn't trade
- TIME_IN_FORCE_GFA: Good for auction, this order is only accepted during an auction period
- TIME_IN_FORCE_GFN: Good for normal, this order is only accepted during normal trading (that can be continuous trading or frequent batched auctions)
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_ACTIVE
, STATUS_EXPIRED
, STATUS_CANCELLED
, STATUS_STOPPED
, STATUS_FILLED
, STATUS_REJECTED
, STATUS_PARTIALLY_FILLED
, STATUS_PARKED
]
Restrict orders to those with the given statuses.
Possible values: [TYPE_UNSPECIFIED
, TYPE_LIMIT
, TYPE_MARKET
, TYPE_NETWORK
]
Restrict orders to those with the given types.
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
]
Restrict orders to those with the given Time In Force.
Indicator if liquidity provisions should be included or not in the list.
Restrict orders to those placed by the given party IDs.
Restrict orders to those placed on the given market IDs.
Restrict orders to those with the given reference.
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 that are live. If not set, it is treated as being false.
- 200
- 500
- default
A successful response.
Schema
orders object
{
"orders": {
"edges": [
{
"cursor": "string",
"node": {
"batchId": "string",
"createdAt": "string",
"expiresAt": "string",
"icebergOrder": {
"minimumVisibleSize": "string",
"peakSize": "string",
"reservedRemaining": "string"
},
"id": "string",
"liquidityProvisionId": "string",
"marketId": "string",
"partyId": "string",
"peggedOrder": {
"offset": "string",
"reference": "PEGGED_REFERENCE_UNSPECIFIED"
},
"postOnly": true,
"price": "string",
"reason": "ORDER_ERROR_UNSPECIFIED",
"reduceOnly": true,
"reference": "string",
"remaining": "string",
"side": "SIDE_UNSPECIFIED",
"size": "string",
"status": "STATUS_UNSPECIFIED",
"timeInForce": "TIME_IN_FORCE_UNSPECIFIED",
"type": "TYPE_UNSPECIFIED",
"updatedAt": "string",
"version": "string"
}
}
],
"pageInfo": {
"endCursor": "string",
"hasNextPage": true,
"hasPreviousPage": true,
"startCursor": "string"
}
}
}
An internal server error
Schema
details object[]
{
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
}
An unexpected error response.
Schema
details object[]
{
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
}
GET /api/v2/orders
Request
Request
curl -L -X GET 'https://vega-data.nodes.guru:3008/api/v2/orders' \
-H 'Accept: application/json'
curl -L -X GET 'https://vega-data.nodes.guru:3008/api/v2/orders' \
-H 'Accept: application/json'
curl -L -X GET 'https://vega-data.nodes.guru:3008/api/v2/orders' \
-H 'Accept: application/json'
curl -L -X GET 'https://vega-data.nodes.guru:3008/api/v2/orders' \
-H 'Accept: application/json'