List trades
Get a list of all trades, optionally filtered by party/market/order
Query Parameters
Restrict trades to those that occurred on the given markets.
Restrict trades to those that were caused by the given orders.
Restrict trades to those that were caused by orders placed by the given parties.
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.
Timestamp in Unix nanoseconds indicating the start of the date range.
Timestamp in Unix nanoseconds indicating the end of the date range.
- 200
- 500
- default
A successful response.
Schema
- Array [
- ]
trades object
Page of trades data and corresponding page information.
edges object[]
Page of trades and their corresponding cursors.
Cursor that can be used to fetch further pages.
node object
Data associated with a trade that has been executed.
Possible values: [SIDE_UNSPECIFIED
, SIDE_BUY
, SIDE_SELL
]
Default value: SIDE_UNSPECIFIED
Direction of the aggressive party e.g. SIDE_BUY or SIDE_SELL.
Price for the trade using asset decimals, as opposed to market decimals used in the price field. This is only used in trade events for position updates.
Identifier of the order from the buy side.
Unique party ID for the buyer.
Auction batch number that the buy side order was placed in.
buyerFee object
Fee amount charged to the buyer party for the trade.
Fee amount paid for maintaining the Vega infrastructure. This field is an unsigned integer scaled using the asset's decimal places.
Discount on infrastructure fee for eligible referrer.
Discount on infrastructure fee based on the taker volume.
Fee amount paid to market makers. This field is an unsigned integer scaled to the asset's decimal places.
Discount on liquidity fee for eligible referrer.
Discount on liquidity fee basedo on taker volume.
Fee amount paid to the non-aggressive party of the trade. This field is an unsigned integer scaled to the asset's decimal places.
Referrer discounts. Discount on maker fee for eligible referrer.
Volume discounts. Discount on maker fee based on the taker volume.
Unique ID for the trade.
Market ID on which the trade occurred.
Price for the trade, the price is an integer, for example 123456
is a correctly
formatted price of 1.23456
assuming market configured to 5 decimal places.
Identifier of the order from the sell side.
Unique party ID for the seller.
Auction batch number that the sell side order was placed in.
sellerFee object
Fee amount charged to the seller party for the trade.
Fee amount paid for maintaining the Vega infrastructure. This field is an unsigned integer scaled using the asset's decimal places.
Discount on infrastructure fee for eligible referrer.
Discount on infrastructure fee based on the taker volume.
Fee amount paid to market makers. This field is an unsigned integer scaled to the asset's decimal places.
Discount on liquidity fee for eligible referrer.
Discount on liquidity fee basedo on taker volume.
Fee amount paid to the non-aggressive party of the trade. This field is an unsigned integer scaled to the asset's decimal places.
Referrer discounts. Discount on maker fee for eligible referrer.
Volume discounts. Discount on maker fee based on the taker volume.
Size filled for the trade.
Timestamp in Unix nanoseconds for when the trade occurred.
Possible values: [TYPE_UNSPECIFIED
, TYPE_DEFAULT
, TYPE_NETWORK_CLOSE_OUT_GOOD
, TYPE_NETWORK_CLOSE_OUT_BAD
]
Default value: TYPE_UNSPECIFIED
Type for the trade.
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.
{
"trades": {
"edges": [
{
"cursor": "string",
"node": {
"aggressor": "SIDE_UNSPECIFIED",
"assetPrice": "string",
"buyOrder": "string",
"buyer": "string",
"buyerAuctionBatch": "string",
"buyerFee": {
"infrastructureFee": "string",
"infrastructureFeeReferrerDiscount": "string",
"infrastructureFeeVolumeDiscount": "string",
"liquidityFee": "string",
"liquidityFeeReferrerDiscount": "string",
"liquidityFeeVolumeDiscount": "string",
"makerFee": "string",
"makerFeeReferrerDiscount": "string",
"makerFeeVolumeDiscount": "string"
},
"id": "string",
"marketId": "string",
"price": "string",
"sellOrder": "string",
"seller": "string",
"sellerAuctionBatch": "string",
"sellerFee": {
"infrastructureFee": "string",
"infrastructureFeeReferrerDiscount": "string",
"infrastructureFeeVolumeDiscount": "string",
"liquidityFee": "string",
"liquidityFeeReferrerDiscount": "string",
"liquidityFeeVolumeDiscount": "string",
"makerFee": "string",
"makerFeeReferrerDiscount": "string",
"makerFeeVolumeDiscount": "string"
},
"size": "string",
"timestamp": "string",
"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"
}