Hello, I need some help regarding the client.create_order() function. I have been working on a system that takes a given allocated stash of quote currency, and then proceeds to automatically trade with it. While this is trivial to do on the Binance exchange page, where you can just chose to write into the quote field instead of the base field, surprisingly it can’t be easily achieved in the API version of the function.
An example: If I take 20€ to the BTCEUR exchange, I can’t seem to tell the create_order function to use these up completely and get whatever amount of Bitcoin I can have with it (…before hitting the limit order price limit of course). Instead, the best thing to do is to divide this 20€ budget by the price to get the quantity. However, the price in a limit order refers to the maximum allowed price, hence, it will actually always be lower, and so the avgBuyPrice * quantity will be less than the budget I allocated and part of the money unspent.
All this wouldn’t be an issue, if the quoteOrderQty could be used for limit operations, but when I try that I receive “APIError(code=-1104) Not all sent parameters were read;”
The documentation also says the quoteOrderQty is for MARKET orders for some reason.
So, what can I do to circumvent this needless API limitation? Since Binance doesn’t have it on its webpage, it has to be possible. Do I just spam orders with “while budget>0.01” for example?