0

When calling the New Order Rest API (V1) to do a Buy order I get an error saying that I have insufficient funds. This is due to the fact that the price has changed off the original calculation. When doing a Sell one can set the use_all_available which will "post an order that will use all of your available balance." See: https://docs.bitfinex.com/v1/reference#rest-auth-new-order

I'm looking for equivalent functionality which will: Take all the balance you have in a given Symbol (i.e. LTC) and buy as much as you can with it.

Does anyone know if there is something like this or if there's a work around? My current work around is to recalculate amount again.

Thanks :)

1 Answer 1

1

This is a shortcoming of the Bitfinex API. For example, say you have 0.5 BTC and you'd like to buy as much ETH as you can with it, you need to calculate how much ETH it might work out to and then pray the order book doesn't change between the time of your calculation and the time of the order. The feature to use all available funds isn't a good solution. Imagine you have 1 BTC but only want to use 0.5 BTC to buy ETH.

Instead, Bitfinex needs to change their system to allow the user to specify the amount of the currency they are using to market buy with. Or, reverse the tickers so that ETHBTC becomes BTCETH when trying to market sell BTC for ETH.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.