File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -102,13 +102,15 @@ def get_adapter_class(self):
102102 return BinanceCCXTAdapter
103103
104104 async def get_account_id (self , ** kwargs : dict ) -> str :
105- raw_balance = await self .connector .client .fetch_balance ()
106105 try :
107- return raw_balance [ccxt_constants .CCXT_INFO ]["uid" ]
108- except KeyError :
109106 if self .exchange_manager .is_future :
110- raise NotImplementedError ("get_account_id is not implemented on binance futures account" )
111- # should not happen in spot
107+ raw_binance_balance = await self .connector .client .fapiPrivateV3GetBalance ()
108+ return raw_binance_balance [0 ]["accountAlias" ]
109+ else :
110+ raw_balance = await self .connector .client .fetch_balance ()
111+ return raw_balance [ccxt_constants .CCXT_INFO ]["uid" ]
112+ except (KeyError , IndexError ):
113+ # should not happen
112114 raise
113115
114116 def _infer_account_types (self , exchange_manager ):
You can’t perform that action at this time.
0 commit comments