Messages
{
"id": 42,
"jsonrpc": "2.0",
"method": "private/subscribe",
"params": {
"channels": [
"user.changes.BTC-PERPETUAL.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
}
],
"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
user.changes.(instrument_name).(interval)
User change stream (orders, trades, and related updates) for a specific instrument.
This channel provides a consolidated private update stream for your account for the given instrument. Use it when you want a single feed instead of subscribing to orders and trades separately.
WSS
user.changes.(instrument_name).(interval)
Messages
{
"id": 42,
"jsonrpc": "2.0",
"method": "private/subscribe",
"params": {
"channels": [
"user.changes.BTC-PERPETUAL.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
}
],
"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
}
]
}
}Subscription Request
type:object
Client sends subscription request to subscribe to notification channel. Please refer to Notification page for more information.
Subscription Notification Data
type:object
Server sends subscription notification data
Was this page helpful?
⌘I