Trades Channel
This article explains the subscription and server messages produced in the Trades channel.
Subscription Messages
Subscription messages have the following formats:
{
"action": "subscribe",
"book": "btc_mxn",
"type": "trades"
}
{
"action": "subscribe",
"response": "ok",
"time": 1455831538845,
"type": "trades"
}
Server JSON Messages
The server's returned payload contains an array with one or more trades of the following form:
Field Name | Description | Type | Units |
---|---|---|---|
a | The amount | String | Major |
i | A number that uniquely identifies the transaction. | Number | - |
mo | Maker Order ID | String | - |
r | The rate | String | Minor |
t | Taker side. Possible values: - 0 indicates buy - 1 indicates sell | Number | - |
to | Taker Order ID | String | - |
v | The value | String | Minor |
x | Creation timestamp | Number | Milliseconds |
Example of Server Messages
Messages on the Trades channel look like this:
{
"type": "trades",
"book": "btc_mxn",
"payload": [
{
"i": 77777,
"a": "0.0035",
"r": "7190",
"v": "25.16",
"mo": "laasdqw1ywYgfYI2",
"to": "asADW123wedwqeYk",
"t": 0,
"x": 1675555546102
}
],
"sent": 1675555546102
}
Updated 3 months ago