File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Trading/Exchange/coinbase Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -253,7 +253,14 @@ async def _ensure_auth(self):
253253 await self ._unauth_ensure_exchange_init ()
254254 # replace self.exchange_manager.exchange.get_balance by get_open_orders
255255 # to mitigate coinbase balance cache side effect
256- await self .exchange_manager .exchange .get_open_orders (symbol = "BTC/USDC" )
256+ if self .client .markets :
257+ # fetch orders for any available symbol to ensure authentication is working
258+ first_symbol = next (iter (self .client .markets .keys ()))
259+ await self .exchange_manager .exchange .get_open_orders (symbol = first_symbol )
260+ else :
261+ self .logger .error (
262+ f"Unexpected: No [{ self .exchange_manager .exchange_name } ] markets loaded. Impossible to check authentication."
263+ )
257264 except (
258265 octobot_trading .errors .AuthenticationError ,
259266 octobot_trading .errors .ExchangeProxyError ,
You can’t perform that action at this time.
0 commit comments