kylerberry / JACT

Just Another Crypto Trader. (gdax crypto trading bot)
3 stars 0 forks source link

SHORT signal + feed-placed order may cause a double sell #28

Closed kylerberry closed 6 years ago

kylerberry commented 6 years ago

If a SHORT signal is triggered, the feed doneHandler will catch any filled or canceled orders. If canceled or filled partially, it will immediately place another sell order in an attempt to fill completely.

If the feed is still attempting to place orders and another SHORT signal gets triggered. It's possible that the feed-placed order and the SHORT signal triggered order get filled simultaneously. This causes the bot to sell double the position it should have, essentially selling assets that didn't belong to it.

rules: