Observe trades
Subscribe to a stream of trades, optionally filtered by party/market
Query Parameters
marketIds string[]
Restrict the trades streamed to those made on the given markets.
partyIds string[]
Restrict the trades streamed to those made by the given parties.
Responses
- 200
- 500
- default
A successful response.(streaming responses)
application/json
Schema
Example (from schema)
Schema
error object
result object
{
"error": {
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
},
"result": {
"trades": [
{
"aggressor": "SIDE_UNSPECIFIED",
"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"
}
]
}
}
An internal server error
application/json
Schema
Example (from schema)
Schema
code int32
details object[]
message string
{
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
}
An unexpected error response.
application/json
Schema
Example (from schema)
Schema
code int32
details object[]
message string
{
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
}
GET /api/v2/stream/trades
Request
Request
curl / cURL
curl -L -X GET 'https://api.n00.testnet.vega.rocks/api/v2/stream/trades' \
-H 'Accept: application/json'
python / requests
curl -L -X GET 'https://api.n00.testnet.vega.rocks/api/v2/stream/trades' \
-H 'Accept: application/json'
go / native
curl -L -X GET 'https://api.n00.testnet.vega.rocks/api/v2/stream/trades' \
-H 'Accept: application/json'
nodejs / axios
curl -L -X GET 'https://api.n00.testnet.vega.rocks/api/v2/stream/trades' \
-H 'Accept: application/json'