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}

Last updated