python-bittrex
python-bittrex copied to clipboard
Market Buy Workarounds: Limit buy with high price, only option?
My apologies for posting another issue, but was hoping someone might have a better solution.
Right now I can only use V1.1 and emulate a market buy, by placing a limit order with the price higher than the ask.
Obviously this is a horrible way of doing it, any other work arounds would be greatly appreciated.
Thanks
Why is this horrible? The matching engine should give you the best price it can. I'm not sure if there are other options.
Because if I want to use my entire BTC balance for the order, well I can't, at least without placing multiple orders, and having to do other calculations and im forced to request my free BTC balance after the first order, which adds a few seconds, and that type of delay can cause me big problems.
Either that or make the price only slightly bigger than the best ask (to maximize the order quantity without it getting rejected for insufficient balance), but then I risk not having my entire order filled.
Hope that makes sense, my thoughts are a bit scrambled right now.
The only workaround is to place an order that matches the top ASK or hike it slightly. Since the quotes are up to 8 decimals you can increase the price by some infinitesimal amount. The reason you might be requesting your balance multiple times is that you are not factoring the fees in your target quantity. Look at this issue, the calculation function will be useful for you https://github.com/ericsomdahl/python-bittrex/issues/107.
I can write a workaround method and push it to some experimental branch but I reckon it defeats the idea of native bindings.