Trades subscription
REQUEST wss://ws-mdpro.bitvavo.com/v2 trades
Subscribes to events that return data when a trade is made.
Request
- Schema
- Example (body)
Body
- Array [
- ]
Set to subscribe to start or to unsubscribe to stop the subscription.
Possible values: [subscribe, unsubscribe]
channels object[]required
The events you want to subscribe to.
The channel to which you want to subscribe.
tradesThe markets for which you want stream the data.
["BTC-EUR"]{
"action": "subscribe",
"channels": [
{
"name": "trades",
"markets": [
"BTC-EUR"
]
}
]
}
Response
- Trades confirmation
- Trades event
- Schema
- Example (body)
Schema
The returned event.
subscribedsubscriptions object
The object with all currently active subscriptions.
The markets for which to stream trades.
["BTC-EUR"]{
"event": "subscribed",
"subscriptions": {
"trades": [
"BTC-EUR"
]
}
}
- Schema
- Example (body)
Schema
The returned event.
tradeThe unique identifier of a trade.
391f4d94-485f-4fb0-b11f-39da1cfcfc2dThe amount of base currency exchanged in the trade.
0.00096361The price in quote currency for which the trade was made.
9311.2The Unix timestamp in milliseconds of when the trade was made.
1566817150381The market in which the trade occurred.
BTC-EURIndicates if the taker made the order to buy or sell an asset.
Possible values: [sell, buy]
The Unix timestamp in nanoseconds of when the trade was made.
1752139200000000000{
"event": "trade",
"id": "391f4d94-485f-4fb0-b11f-39da1cfcfc2d",
"amount": "0.00096361",
"price": "9311.2",
"timestamp": 1566817150381,
"market": "BTC-EUR",
"side": "sell",
"timestampNs": 1752139200000000000
}