Recent Trades

Trade feed for a currency pair.

The trade channel generates a trade event when orders are matched in the book. Multiple trades may be batched in a single message but that does not mean that these trades resulted from a single taker order.

When subscribing, the pair should be set in alphanumeric format only. Do not use separators between the base and quote asset. The correct format for NIZA/USDT to be set in a channel name is NIZAUSDT.

Subscribe with Pusher

var channel = pusher.subscribe("trade.{pair}");

Subscribe Request Payload

{
   "event": "pusher:subscribe",
   "data": {
       "channel": "trade.{pair}"
   }
}

Examples

Pusher
var channel = pusher.subscribe("trade.NIZAUSDT");
WebSocket API in Javascript
const message = {
        event: "pusher:subscribe",
        data: {
            channel: "trade.NIZAUSDT"
        }
    };
socket.send(JSON.stringify(message));

Payload

Name
Type
Description

channel

string

The name of the channel

type

string

Type of event notification

data

array

The payload of trade data

data.ord_type

string

Possible values: [limit, market] The order type of the taker order.

data.price

decimal

Average price of the trade.

data.qty

decimal

Size of the trade.

data.side

string

The side of the taker order.

data.symbol

string

Example: "NIZA/USD" The symbol of the currency pair.

data.timestamp

string

Format: RFC3339. The book order update timestamp.

data.trade_id

integer

Trade identifier is a sequence number, unique per book

Example of the Payload

{
   "channel": "trade",
   "type": "update",
   "data": [
       {
           "ord_type": "limit",
           "price": "100.00000000",
           "qty": "100.00000000",
           "side": "sell",
           "symbol": "NIZA\/USDT",
           "timestamp": "2024-09-18 23:31:27.572200",
           "trade_id": 78236
       }
   ]
}

Last updated