Check whether a market is active before trading #51
Labels
No labels
blocked
breaking
bug
dependencies
duplicate
enhancement
good first issue
help wanted
question
tech debt
testing
wontfix
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference
scion/arbitrader#51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I ran into a situation today where BCH/USD was temporarily halted on an exchange and the bot wanted to trade it. It obviously couldn't, but kept trying and throwing exceptions for a few minutes. It would be nicer if it checked first and didn't treat it like an error.
This is made more complicated because I can't find any method in XChange to ask an
Exchangewhether a particular market is active or not. We may just have to rely on catching the exception and reversing the first trade if it succeeded. That's not a great solution because this situation pretty much only happens in times of very high volatility and even the few milliseconds between opening a trade, realizing it needs to be reversed and reversing it could result in losses.