<p>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.</p>

<p>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.</p>

CC BY-SA 3.0
2018-03-01T21:08:06.590Z
2018-03-01T21:08:06.590Z
Jeff Lew
<p>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: <a href="https://docs.bitfinex.com/v1/reference#rest-auth-new-order" rel="nofollow noreferrer">https://docs.bitfinex.com/v1/reference#rest-auth-new-order</a></p>

<p>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. </p>

<p>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.</p>

<p>Thanks :)</p>

<exchange-order><bitfinex>
Bitfinex - Market order that uses all available
Mr Guest
# Bitfinex - Market order that uses all available

(Asked by: username_0 on 2017-09-04)

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 :)

**Tags:** exchange-order, bitfinex


---

## 1 answers

### Answer by username_1 on 2018-03-01. Score: 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.


---

