{
"id": 42,
"jsonrpc": "2.0",
"method": "private/subscribe",
"params": {
"channels": [
"user.changes.future.USDC.100ms"
]
}
}{
"data": {
"instrument_name": "BTC-PERPETUAL",
"orders": [
{
"amount": 10,
"api": false,
"average_price": 17391,
"creation_timestamp": 1605780344032,
"direction": "sell",
"filled_amount": 10,
"instrument_name": "BTC-PERPETUAL",
"is_liquidation": false,
"is_rebalance": false,
"label": "",
"last_update_timestamp": 1605780344032,
"max_show": 10,
"order_id": "3398016",
"order_state": "filled",
"order_type": "market",
"post_only": false,
"price": 15665.5,
"reduce_only": false,
"replaced": false,
"time_in_force": "good_til_cancelled",
"web": true
}
],
"positions": [
{
"average_price": 15000,
"delta": 10.646886321,
"direction": "buy",
"floating_profit_loss": 0.906961435,
"index_price": 17501.88,
"initial_margin": 0.319750953,
"instrument_name": "BTC-PERPETUAL",
"interest_value": 1.7362511643080387,
"kind": "future",
"leverage": 33,
"maintenance_margin": 0.234575865,
"mark_price": 17391,
"realized_funding": 0.01235663,
"realized_profit_loss": 0.012454598,
"settlement_price": 16025.83,
"size": 185160,
"size_currency": 10.646886321,
"total_profit_loss": 1.69711368,
"user_id": 1234
}
],
"trades": [
{
"amount": 10,
"direction": "sell",
"fee": 1.6e-7,
"fee_currency": "BTC",
"index_price": 17501.88,
"instrument_name": "BTC-PERPETUAL",
"liquidity": "T",
"mark_price": 17391,
"matching_id": null,
"order_id": "3398016",
"order_type": "market",
"post_only": false,
"price": 17391,
"profit_loss": 0.00004898,
"reduce_only": false,
"state": "filled",
"tick_direction": 1,
"timestamp": 1605780344032,
"trade_id": "1430914",
"trade_seq": 866638
}
]
}
}user.changes.(kind).(currency).(interval)
User change stream (orders, trades, and related updates) across all instruments for a given kind and currency.
This channel provides a consolidated private update stream for your account across all matching instruments. Use it when you want a single feed instead of subscribing to orders and trades separately.
{
"id": 42,
"jsonrpc": "2.0",
"method": "private/subscribe",
"params": {
"channels": [
"user.changes.future.USDC.100ms"
]
}
}{
"data": {
"instrument_name": "BTC-PERPETUAL",
"orders": [
{
"amount": 10,
"api": false,
"average_price": 17391,
"creation_timestamp": 1605780344032,
"direction": "sell",
"filled_amount": 10,
"instrument_name": "BTC-PERPETUAL",
"is_liquidation": false,
"is_rebalance": false,
"label": "",
"last_update_timestamp": 1605780344032,
"max_show": 10,
"order_id": "3398016",
"order_state": "filled",
"order_type": "market",
"post_only": false,
"price": 15665.5,
"reduce_only": false,
"replaced": false,
"time_in_force": "good_til_cancelled",
"web": true
}
],
"positions": [
{
"average_price": 15000,
"delta": 10.646886321,
"direction": "buy",
"floating_profit_loss": 0.906961435,
"index_price": 17501.88,
"initial_margin": 0.319750953,
"instrument_name": "BTC-PERPETUAL",
"interest_value": 1.7362511643080387,
"kind": "future",
"leverage": 33,
"maintenance_margin": 0.234575865,
"mark_price": 17391,
"realized_funding": 0.01235663,
"realized_profit_loss": 0.012454598,
"settlement_price": 16025.83,
"size": 185160,
"size_currency": 10.646886321,
"total_profit_loss": 1.69711368,
"user_id": 1234
}
],
"trades": [
{
"amount": 10,
"direction": "sell",
"fee": 1.6e-7,
"fee_currency": "BTC",
"index_price": 17501.88,
"instrument_name": "BTC-PERPETUAL",
"liquidity": "T",
"mark_price": 17391,
"matching_id": null,
"order_id": "3398016",
"order_type": "market",
"post_only": false,
"price": 17391,
"profit_loss": 0.00004898,
"reduce_only": false,
"state": "filled",
"tick_direction": 1,
"timestamp": 1605780344032,
"trade_id": "1430914",
"trade_seq": 866638
}
]
}
}Currency code or any for all
Allowed values: BTC, ETH, USDC, USDT, EURR, any
BTC, ETH, EURR, USDC, USDT, anyFrequency of notifications. Events will be aggregated over this interval. The value raw selects the finest granularity - events are aggregated over a 1 millisecond interval (Please note that raw interval is only available to authorized users)
Allowed values: raw, 100ms, agg2
100ms, agg2, rawInstrument kind
Allowed values: future, option, spot, future_combo, option_combo
future, future_combo, option, option_combo, spotClient sends subscription request to subscribe to notification channel. Please refer to Notification page for more information.
Server sends subscription notification data
Was this page helpful?