Private channels
my-trades, my-orders, executions, my-balance, my-working-capital.
Authenticate first. subscribe and unsubscribe allow 50 messages per second (limits).
| Channel | Subscribe name | Filter by symbol | Sample |
|---|---|---|---|
| Your fills | my-trades | Optional | get-my-trades |
| Your orders | my-orders | Optional | get-my-orders |
| Orders + fills | executions | No | get-executions |
| Balances | my-balance | No | get-my-balance |
| Working capital | my-working-capital | No | get-my-working-capital |
To unsubscribe, send the same message with "event": "unsubscribe". If you subscribed with a symbol, unsubscribe with that same symbol.
my-trades
New trades executed on your orders.
{
"event": "subscribe",
"subscription": { "name": "my-trades" }
}Only one symbol:
{
"event": "subscribe",
"symbol": "B2M/EUR",
"subscription": { "name": "my-trades" }
}Message
{
"event": "my-trades",
"symbol": "B2M/EUR",
"data": {
"id": "9adb20ae-f673-49a4-b232-75442e3af617",
"userId": "7bd4cc22-7682-4e45-85b3-29386b979d75",
"timestamp": 1665997927993,
"datetime": "2022-10-17T09:12:07.993Z",
"symbol": "B2M/EUR",
"order": "69d3df53-9248-430c-9850-d72ff1f0befa",
"side": "sell",
"price": 0.014,
"amount": 100,
"cost": 1.4,
"fee": {
"cost": 0.00224,
"currency": "EUR",
"rate": 0.16
},
"isMaker": true,
"clientOrderId": "MY-CLIENT-ORDER-ID"
}
}my-orders
A message every time one of your orders changes. Subscribe with or without symbol, as for my-trades.
{
"event": "subscribe",
"subscription": { "name": "my-orders" }
}Message
{
"event": "my-orders",
"symbol": "B2M/EUR",
"data": {
"id": "51002851-2f76-4c10-9b4c-bcc131f27b1d",
"userId": "7bd4cc22-7682-4e45-85b3-29386b979d75",
"timestamp": 1666006194005,
"datetime": "2022-10-17T11:29:54.005Z",
"side": "buy",
"symbol": "B2M/EUR",
"price": 1,
"stopPrice": 0,
"amount": 1000,
"filled": 10,
"remainingAmount": 990,
"dustAmount": 0,
"status": "cancelled",
"type": "limit",
"cost": 0,
"cancelationReason": "The buy price can not be greater or equal than the best ask price",
"feeAmount": 23.324123,
"feeCurrency": "B2M"
}
}executions
my-orders and my-trades events on a single subscription.
{
"event": "subscribe",
"subscription": { "name": "executions" }
}Messages for a market order that opens, fills, and closes:
{
"event": "my-orders",
"symbol": "B2M/EUR",
"data": {
"id": "51002851-2f76-4c10-9b4c-bcc131f27b1d",
"timestamp": 1666006194005,
"datetime": "2022-10-17T09:12:07.844Z",
"side": "buy",
"symbol": "B2M/EUR",
"price": 1.4,
"stopPrice": 0,
"amount": 1000,
"filled": 0,
"remainingAmount": 1000,
"dustAmount": 0,
"status": "open",
"type": "market",
"cost": 0,
"feeAmount": 0,
"feeCurrency": null
}
}{
"event": "my-trades",
"symbol": "B2M/EUR",
"data": {
"id": "9adb20ae-f673-49a4-b232-75442e3af617",
"timestamp": 1665997927993,
"datetime": "2022-10-17T09:12:07.993Z",
"symbol": "B2M/EUR",
"order": "51002851-2f76-4c10-9b4c-bcc131f27b1d",
"side": "sell",
"price": 0.014,
"amount": 100,
"cost": 1.4,
"fee": {
"cost": 0.00224,
"currency": "EUR",
"rate": 0.16
},
"isMaker": true
}
}{
"event": "my-orders",
"symbol": "B2M/EUR",
"data": {
"id": "51002851-2f76-4c10-9b4c-bcc131f27b1d",
"timestamp": 1666006194005,
"datetime": "2022-10-17T09:12:07.993Z",
"side": "buy",
"symbol": "B2M/EUR",
"price": 1,
"stopPrice": 0,
"amount": 1000,
"filled": 100,
"remainingAmount": 900,
"dustAmount": 0,
"status": "filled",
"type": "market",
"cost": 0,
"feeAmount": 1.3265322,
"feeCurrency": "B2M"
}
}my-balance
A message every time the balance of one of your currencies changes.
{
"event": "subscribe",
"subscription": { "name": "my-balance" }
}Message
{
"event": "my-balance",
"data": {
"userId": "7bd4cc22-7682-4e45-85b3-29386b979d75",
"balance": [
{ "currency": "B2M", "balance": 1000, "blockedBalance": 1000 },
{ "currency": "EUR", "balance": 100, "blockedBalance": 200 }
]
}
}my-working-capital
A message every time one of your working capital limits changes.
{
"event": "subscribe",
"subscription": { "name": "my-working-capital" }
}Message
{
"event": "my-working-capital",
"data": {
"userId": "7bd4cc22-7682-4e45-85b3-29386b979d75",
"workingCapital": [
{
"currency": "B2M",
"type": "deposit",
"limit": 5000,
"used": 2500,
"remaining": 2500,
"refillThreshold": 2500
}
]
}
}