ActionConfirmOrder.confirm_order does not return interpretable error message
See original GitHub issueWhen the order confirmation fails (can be due to eg. tick size being wrong, connection with exchange down, maintenance window etc) the order confirmation fails scilently and returns none.
Changing the code below in action_confirm_order.py will instead return the error message in a dictionary (making it possible for example to get the correct tick size, if that’s the cause of the error)
<original>
try:
response_raw = session.send(prepped, verify=False)
response_raw.raise_for_status()
response_dict = response_raw.json()
except Exception as e:
logger.fatal(response_raw)
logger.fatal(e)
return None
</original>
<modified>
try:
response_raw = session.send(prepped, verify=False)
response_dict = response_raw.json()
response_raw.raise_for_status()
except Exception as e:
logger.fatal(response_raw)
logger.fatal(e)
return response_dict
</modified>
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, contributions are welcome.
You can make a PR with your code update.
Otherwise will see that later this month.
Closing this issue since it is discussed in #54.