{
"jsonrpc": "2.0",
"method": "public/subscribe",
"id": 42,
"params": {
"channels": [
"user.changes.(kind).(currency).100ms"
]
}
}{
"data": {
"trades": [
{
"trade_seq": 866638,
"trade_id": "1430914",
"timestamp": 1605780344032,
"tick_direction": 1,
"state": "filled",
"reduce_only": false,
"profit_loss": 0.00004898,
"price": 17391,
"post_only": false,
"order_type": "market",
"order_id": "3398016",
"matching_id": null,
"mark_price": 17391,
"liquidity": "T",
"instrument_name": "BTC-PERPETUAL",
"index_price": 17501.88,
"fee_currency": "BTC",
"fee": 1.6e-7,
"direction": "sell",
"amount": 10
}
],
"positions": [
{
"total_profit_loss": 1.69711368,
"size_currency": 10.646886321,
"size": 185160,
"settlement_price": 16025.83,
"realized_profit_loss": 0.012454598,
"realized_funding": 0.01235663,
"mark_price": 17391,
"maintenance_margin": 0.234575865,
"leverage": 33,
"kind": "future",
"interest_value": 1.7362511643080387,
"instrument_name": "BTC-PERPETUAL",
"initial_margin": 0.319750953,
"index_price": 17501.88,
"floating_profit_loss": 0.906961435,
"direction": "buy",
"delta": 10.646886321,
"average_price": 15000
}
],
"orders": [
{
"web": true,
"time_in_force": "good_til_cancelled",
"replaced": false,
"reduce_only": false,
"price": 15665.5,
"post_only": false,
"order_type": "market",
"order_state": "filled",
"order_id": "3398016",
"max_show": 10,
"last_update_timestamp": 1605780344032,
"label": "",
"is_rebalance": false,
"is_liquidation": false,
"instrument_name": "BTC-PERPETUAL",
"filled_amount": 10,
"direction": "sell",
"creation_timestamp": 1605780344032,
"average_price": 17391,
"api": false,
"amount": 10
}
],
"instrument_name": "BTC-PERPETUAL"
}
}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.
{
"jsonrpc": "2.0",
"method": "public/subscribe",
"id": 42,
"params": {
"channels": [
"user.changes.(kind).(currency).100ms"
]
}
}{
"data": {
"trades": [
{
"trade_seq": 866638,
"trade_id": "1430914",
"timestamp": 1605780344032,
"tick_direction": 1,
"state": "filled",
"reduce_only": false,
"profit_loss": 0.00004898,
"price": 17391,
"post_only": false,
"order_type": "market",
"order_id": "3398016",
"matching_id": null,
"mark_price": 17391,
"liquidity": "T",
"instrument_name": "BTC-PERPETUAL",
"index_price": 17501.88,
"fee_currency": "BTC",
"fee": 1.6e-7,
"direction": "sell",
"amount": 10
}
],
"positions": [
{
"total_profit_loss": 1.69711368,
"size_currency": 10.646886321,
"size": 185160,
"settlement_price": 16025.83,
"realized_profit_loss": 0.012454598,
"realized_funding": 0.01235663,
"mark_price": 17391,
"maintenance_margin": 0.234575865,
"leverage": 33,
"kind": "future",
"interest_value": 1.7362511643080387,
"instrument_name": "BTC-PERPETUAL",
"initial_margin": 0.319750953,
"index_price": 17501.88,
"floating_profit_loss": 0.906961435,
"direction": "buy",
"delta": 10.646886321,
"average_price": 15000
}
],
"orders": [
{
"web": true,
"time_in_force": "good_til_cancelled",
"replaced": false,
"reduce_only": false,
"price": 15665.5,
"post_only": false,
"order_type": "market",
"order_state": "filled",
"order_id": "3398016",
"max_show": 10,
"last_update_timestamp": 1605780344032,
"label": "",
"is_rebalance": false,
"is_liquidation": false,
"instrument_name": "BTC-PERPETUAL",
"filled_amount": 10,
"direction": "sell",
"creation_timestamp": 1605780344032,
"average_price": 17391,
"api": false,
"amount": 10
}
],
"instrument_name": "BTC-PERPETUAL"
}
}Instrument kind
Allowed values: future, option, spot, future_combo, option_combo
Currency code or any for all
Allowed values: BTC, ETH, USDC, USDT, EURR, any
Frequency 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
Client 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?