Account
All account updates (orders, fills, balance, positions) are published in the "account" channel. To subscribe to the account channel, subscribe to "account@<your_profile_id>"
Example snapshot data
{'account_equity': 9881314.182111563,
'account_leverage': 0.007502797566563902,
'account_margin': 133.2836173611406,
'balance_operations': [{'amount': -741.7029193548386,
'id': 42495,
'ops_type': 'funding_pnl',
'profile_id': 6,
'timestamp': 5955736869168},
{'amount': -741.3926466101694,
'id': 42361,
'ops_type': 'funding_pnl',
'profile_id': 6,
'timestamp': 5952136870725}],
'cum_unrealized_pnl': 13342.5,
'fills': [{'fee': -14.1855,
'id': 46755,
'is_maker': False,
'liquidation': False,
'market_id': 'BTC-USD',
'order_id': 21368,
'price': 20265,
'profile_id': 6,
'side': 'long',
'size': 1,
'timestamp': 1665313199,
'trade_id': 46753},
{'fee': -14.1855,
'id': 46752,
'is_maker': False,
'liquidation': False,
'market_id': 'BTC-USD',
'order_id': 21367,
'price': 20265,
'profile_id': 6,
'side': 'long',
'size': 1,
'timestamp': 1665313156,
'trade_id': 46750},
{'fee': -14.1855,
'id': 46749,
'is_maker': False,
'liquidation': False,
'market_id': 'BTC-USD',
'order_id': 21366,
'price': 20265,
'profile_id': 6,
'side': 'long',
'size': 1,
'timestamp': 1665312659,
'trade_id': 46747}],
'health': 1,
'id': 6,
'orders': [{'created_at': 1665313396,
'id': 21370,
'initial_size': 1,
'last_action': 'limit',
'market_id': 'BTC-USD',
'price': 29000,
'profile_id': 6,
'reason': '',
'remaining_size': 1,
'side': 'short',
'status': 'open',
'total_filled_size': 0,
'type': 'limit',
'client_order_id':'abcde1234'}],
'positions': [{'avg_entry_price': 20265,
'fair_price': 24712.5,
'id': 'pos-BTC-USD-tr-6',
'liquidation_price': 39349.51456310679,
'margin': 74137.5,
'market_id': 'BTC-USD',
'notional': 74137.5,
'profile_id': 6,
'side': 'long',
'size': 3,
'unrealized_pnl': 13342.5}],
'profile_type': '',
'status': 'active',
'tier': 0,
'total_notional': 74137.5,
'total_order_margin': 58000,
'total_position_margin': 74137.5,
'wallet': '0x8481cb01Ec35d43C116C3c272Fb026e6dD465e08',
'wallet_balance': 9867971.682111563,
'withdrawalable_balance': 9735834.182111563}
Updates will only send updated information about the account. Empty fields mean that no changes were made.
Example update data
{'account_equity': '26820.952219892065306000000000000000016',
'account_leverage': '1.3525752889971775133317720783652753444',
'account_margin': '0.73933037823086146159511310818418713301',
'balance': '26643.630243400202738188065099457504522',
'cum_trading_volume': '183118.0707',
'cum_unrealized_pnl': '177.32197649186256781193490054249549363',
'health': '0.73933037823086146159511310818418713301',
'id': 1168,
'last_liq_check': 0,
'last_update': 1677222830871586,
'leverage': {'BTC-USD': '20', 'ETH-USD': '1', 'SOL-USD': '1'},
'fills': [{'fee': -14.1855,
'id': 46755,
'isMaker': False,
'liquidation': False,
'market_id': 'BTC-USD',
'order_id': 21368,
'price': 20265,
'profile_id': 6,
'side': 'long',
'size': 1,
'timestamp': 1665313199,
'trade_id': 46753}],
'orders': [{'created_at': 1665313396,
'id': 21370,
'initial_size': 1,
'type': 'limit',
'market_id': 'BTC-USD',
'price': 29000,
'profile_id': 6,
'reason': '',
'remaining_size': 1,
'side': 'short',
'status': 'open',
'total_filled_size': 0,
'type': 'limit'},
{'created_at': 1665313320,
'id': 21369,
'initial_size': 1,
'type': 'limit',
'marketID': 'BTC-USD',
'price': 29000,
'profile_id': 6,
'reason': '',
'remaining_size': 1,
'side': 'short',
'status': 'open',
'total_filled_size': 0,
'type': 'limit'}],
'positions': [{'avg_entr_price': 20265,
'fair_price': 24712.5,
'id': 'pos-BTC-USD-tr-6',
'liquidation_price': 39349.51456310679,
'margin': 74137.5,
'market_id': 'BTC-USD',
'notional': 74137.5,
'profile_id': 6,
'side': 'long',
'size': 3,
'unrealized_pnl': 13342.5}],
'profile_type': 'trader',
'status': 'active',
'total_notional': '36277.3572',
'total_order_margin': '0.00',
'total_position_margin': '1813.867860',
'wallet': '0x8481cb01ec35d43c116c3c272fb026e6dd465e08',
'withdrawable_balance': '24829.762383400202738188065099457504522'}
Last updated