Skip to content

Commit

Permalink
♻️
Browse files Browse the repository at this point in the history
  • Loading branch information
mraniki committed Jun 28, 2024
1 parent 6481b67 commit 2437eeb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cefi/handler/capitalcom.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,14 @@ def _build_client(self):
api_key=self.api_key,
)
logger.debug("Client: {}", self.client)
if self.client.accounts_data():
return self.client
else:
logger.warning("No valid capital.com client. Verify settings.")
self.client = None
except Exception as e:
logger.error("{} Error {}", self.name, e)
self.client = None
return e

async def get_quote(self, instrument):
Expand Down

0 comments on commit 2437eeb

Please sign in to comment.