{
"jsonrpc": "2.0",
"method": "public/subscribe",
"id": 42,
"params": {
"channels": [
"user.trades.(kind).(currency).100ms"
]
}
}{
"data": [
{
"trade_seq": 74405,
"trade_id": "48079262",
"timestamp": 1590484255886,
"tick_direction": 2,
"state": "filled",
"reduce_only": false,
"price": 8947,
"post_only": false,
"order_type": "limit",
"order_id": "4008978075",
"matching_id": null,
"mark_price": 8970.03,
"liquidity": "T",
"instrument_name": "BTC-25SEP20",
"index_price": 8953.53,
"fee_currency": "BTC",
"fee": 0.00049961,
"direction": "sell",
"amount": 8940
}
]
}user.trades.(kind).(currency).(interval)
User trade notifications across all instruments for a given kind and currency.
Receive a consolidated stream of your private trades across all instruments matching the specified kind and currency. The interval controls aggregation frequency.
{
"jsonrpc": "2.0",
"method": "public/subscribe",
"id": 42,
"params": {
"channels": [
"user.trades.(kind).(currency).100ms"
]
}
}{
"data": [
{
"trade_seq": 74405,
"trade_id": "48079262",
"timestamp": 1590484255886,
"tick_direction": 2,
"state": "filled",
"reduce_only": false,
"price": 8947,
"post_only": false,
"order_type": "limit",
"order_id": "4008978075",
"matching_id": null,
"mark_price": 8970.03,
"liquidity": "T",
"instrument_name": "BTC-25SEP20",
"index_price": 8953.53,
"fee_currency": "BTC",
"fee": 0.00049961,
"direction": "sell",
"amount": 8940
}
]
}Instrument kind
Allowed values: future, option, spot, future_combo, option_combo
future, option, spot, future_combo, option_comboCurrency code or any for all
Allowed values: BTC, ETH, USDC, USDT, EURR, any
BTC, ETH, USDC, USDT, EURR, anyFrequency of notifications. Events will be aggregated over this interval. The value raw means no aggregation will be applied (Please note that raw interval is only available to authorized users)
Allowed values: raw, 100ms, agg2
raw, 100ms, agg2Client sends subscription request to subscribe to notification channel. Please refer to Notification page for more information.
Server sends subscription notification data
Unique (per currency) trade identifier
The sequence number of the trade within instrument
Unique instrument identifier
The timestamp of the trade (milliseconds since the UNIX epoch)
Order type: "limit, "market", or "liquidation"
limit, market, liquidationAdvanced type of user order: "usd" or "implv" (only for options; omitted if not applicable)
usd, implvId of the user order (maker or taker), i.e. subscriber's order id that took part in the trade
Always null
Direction: buy, or sell
buy, sellDirection of the "tick" (0 = Plus Tick, 1 = Zero-Plus Tick, 2 = Minus Tick, 3 = Zero-Minus Tick).
0, 1, 2, 3Index Price at the moment of trade
Price in base currency
Trade amount. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin.
Trade size in contract units (optional, may be absent in historical trades)
Option implied volatility for the price (Option only)
Underlying price for implied volatility calculations (Options only)
Optional field (only for trades caused by liquidation): "M" when maker side of trade was under liquidation, "T" when taker side was under liquidation, "MT" when both sides of trade were under liquidation
M, T, MTDescribes what was role of users order: "M" when it was maker order, "T" when it was taker order
M, TUser's fee in units of the specified fee_currency
Currency, i.e "BTC", "ETH", "USDC"
BTC, ETH, USDC, USDT, EURRUser defined label (presented only when previously set for order by user)
Order state: "open", "filled", "rejected", "cancelled", "untriggered" or "archive" (if order was archived)
open, filled, rejected, cancelled, untriggered, archiveBlock trade id - when trade was part of a block trade
ID of the Block RFQ - when trade was part of the Block RFQ
ID of the Block RFQ quote - when trade was part of the Block RFQ
true if user order is reduce-only
true if user order is post-only
true if user order is MMP
true if user order is marked by the platform as a risk reducing order (can apply only to orders placed by PM users)
true if user order was created with API
Profit and loss in base currency.
Mark Price at the moment of trade
Optional field containing leg trades if trade is a combo trade (present when querying for only combo trades and in combo_trades events)
Optional field containing combo instrument name if the trade is a combo trade
Optional field containing combo trade identifier if the trade is a combo trade
QuoteSet of the user order (optional, present only for orders placed with private/mass_quote)
QuoteID of the user order (optional, present only for orders placed with private/mass_quote)
List of allocations for Block RFQ pre-allocation. Each allocation specifies user_id, amount, and fee for the allocated part of the trade. For broker client allocations, a client_info object will be included.
User ID to which part of the trade is allocated. For brokers the User ID is obstructed.
Amount allocated to this user.
Fee for the allocated part of the trade.
Optional client allocation info for brokers.
ID of a client; available to broker. Represents a group of users under a common name.
ID assigned to a single user in a client; available to broker.
Name of the linked user within the client; available to broker.
Was this page helpful?