Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ def _login_url(self):

def interactive_login(self):
"""Send the login url to which a user should receive the token."""
response = None
try:
params = {
"appKey": self.apiKey,
Expand All @@ -210,7 +211,10 @@ def interactive_login(self):
response['result']['isInvestorClient'])
return response
except Exception as e:
return response['description']
if response and 'description' in response:
return response['description']
else:
return str(e)

def get_order_book(self, clientID=None):
"""Request Order book gives states of all the orders placed by an user"""
Expand Down