Closed leifjones closed 2 years ago
I have got to acknowledge that, so far, this doesn't actually address handling of the error that arose. Rather, it breaks up code so that a "failure to open an order" error doesn't get logged when it was more of a "failure to close a position."
Actually identifying the precise location and cause of the error (cannot find a property of an undefined variable) may require some debugging. I have done some initial exploration of how to enable sandbox mode for an exchange on a separate branch but haven't yet made substantial progress on it.
I've updated the PR to include null checks. Now the output when trying to sell a token that isn't held is:
error:exchanges|BinanceUS/[STUB] - IOTA ticker balance missing (may be 0).
error:trading|BinanceUS/[STUB] - Failed to close IOTA/USD position.
error:trading|BinanceUS/[STUB] - Failed to create sell order on IOTA/USD.
If these changes aren't deemed worthwhile, it's fine. Honestly, I'm taking it as a way to familiarize myself with the code and get more confident with using TAP in action.
Thanks for the update.
Let me test this once I've some free time and I'll merge this into master if you're done with this PR.
🙏
@thibaultyou yep, I'm done with the changes I was planning
Just tested it, it's good for me. I'll merge it now to master and update the Docker image once I'm logged on a non-ARM architecture.
Thank you for your contribution 🙏 .
The Docker image has been updated.
This seeks to address an issue with error logging. There are also some increases tests and some proposed tests as a conversation piece.
I was seeing messages like the following when there is a sell signal for a token that isn't yet held in a BinanceUS account:
As one of the first users of this with BinanceUS - in case this would be a question, I can confirm that I was able to do manually triggered buy and sell signals:
===============
Notably, there are a number of
todo
ed tests: