Post
Topic
Board Project Development
Re: Qt Bitcoin Trader - Dedicated rule configuration thread
by
Squeaker
on 10/01/2014, 15:17:52 UTC
From looking over my fork of the code, when there are orders waiting to be submitted, those get priority over other API calls, so you could continue to send trade orders in while the balances and prices haven't been updated. (this seemed more of an issue on polled exchanges like BTCe. I didn't notice it happening on MtGox, which I am assuming is because of MtGox's streaming socket taking a more active role in keeping API clients current. I don't do much trading on MtGox, however, with only a balance of 0.4 BTC there, for testing purposes, so perhaps that has something to do with it too.)

I had to make some changes to disable the USD/BTC price boxes whenever a trade was sent in, and all rules would fail (except for enable/disable rules and cancel order actions) until the client received an updated balance from the exchange (even if the actual balance hadn't changed yet, the exchange at least confirmed that the numbers were still good)

I also had to implement my own delay between executing a trading rule, allowing the client time to update the exchange info, as the built in safe-mode delay I could never get to function properly.

Unfortunately, these changes would not be compatable with the existing code now as I have changed too much code to make merging the patch possible, but this should give ideas of where the problem lies, and a possible solution to deal with it, for someone else who is actively contributing to the main branch.

=squeak=