Wednesday, 26 February 2014

How to Bitfinex Leverage 101 with @ActualAdviceBTC :

How to Bitfinex Leverage 101 with 

A lot of people interested in margin trading avoid diving in due to the learning curve. This is a very plain and simple guide to get them started. Yes I know it looks like college notes, I'm an economist not a blogger.


There are 5 currencies (BTC, LTC, USD) + DRK (which does not have margin trading yet) + TH1 and 3 types of exchanges on
  1. Exchange (self-explanatory)
  2. Trading (leverage trading)
  3. Liquidity Swaps (loaning out your currency to leverage traders)
I will mostly be talking about the Trading, since thats what most people care about. I also include at the end of this post my 3x2 chart, which is designed for larger screens, as well as the script (for the mod to work properly you must be logged out of bitcoinwisdom). It looks like this:

Margin Trading:

Margin trading is basically a way of multiplying your gains and losses in a trade.


Getting Started:

1 First things first. Make an account at (you can use this code: vI9xewnNTj for a 10% discount). You can now fill out step 2 on the sign up page or use for the discount instead.

2 Go to Account Settings ( and make it look like this:

Why? You want USD fees for default if you want to do any accounting. There is basically no advantage to choosing exchange or deposit other than to parental block yourself from trading margin. Bitfinex now has 3.3:1 margin. The margin limit now includes your BTC balance. This basically means that you can only go 3.3:1 if your "base" (i.e. the collateral you are using to fund the margin trade)

3   Go to manage wallets tab:

Basically, this separates your funds in each exchange type so you can't do "clever" things like close into your own buy or withdraw all you money before a margin call etc. Just click the numbers to do a "move all" transfer value. Might as well move them all to trading. Definitely one of the more cumbersome aspects of finex.

*** There is a technique I call the "finex shuffle" where you can siphon small amounts of your margin at a time from trading to exchange (while on full leverage), make a trade, and filter it back to rinse and repeat and build a different margin currency in your trading wallet. This is risky and leaves your margin requirement vulnerable, but could be useful.

4 Don't forget the right tab, its important.


Put in however much you want to use as collateral for leverage (yes, btc, ltc, usd, doesn't matter which currency). 

*** since the recent changes to the leverage system, there is almost no advantage to having your collateral in anything other than USD.

5   Ok, now that you transferred $ from exchange to trading, lets make a trade. Pick the "margin trade" tab at the top, and choose btcusd or ltcbtc or ltcusd.

So as you can see, I have 5$ my my trading account, which gives a tradable balance of 12.5$. Unfortunately, on bitfinex you have to get the order size close to max leverage yourself (theres an estimate under order type options). You can long or short 2.5 from here. I just went long on 1:1 leverage as an example (I bought 5$ on margin for 0.0086):



Base price: Price you traded at

Liquidation: If price hits this level you will get margin called

P/L: How many $$$ you made/lost on this position

P/L%: How much % your position moved (times the 2.5 leverage)

Swap: The interest accrued (the rate is % per day, but charged in hourly increments) on your margin loan -- warning -- sometimes long rates can reach 0.7%!! So don't just leave them open for days!

Close: If you're done with your position you can close with a market order. you will be paid in USD

Claim: If you'd rather get paid in crypto, you may need to trim down the order size by closing most but not all of the position.

*** Instead of clicking close for a market order, you can set a margin sell limit of the same amount at desired price. They will cancel out and you will receive your P/L.


Rescaling etc. tips -- on the to-do list.

This displays the total orderbook, which has a much wider span than what you find on bitcoinwisdom. =========================================================================

Order Types:

I see lots of questions about the fancy order types on bitfinex. They're very simple but I see how people can get confused.

Limit: Buying or selling at limit means you go on the orderbook accepting only a trade at that price.

Fill or Kill: Basically a limit order but won't leave a straggler if you order too much at that price.

Market: Buy/Sell immediately at the current best offer.

Stop: If your long drops/short rises to this number, the position will liquidate. This is probably obvious, but you buy a stop to cancel out a short and sell a stop to cancel out a long. 
       For example, I short 1 btc at 500$ and set a stop at $510. This means that price can go down without triggering anything, but will automatically close if bids (in the case of shorts) or asks (in the case of longs) get taken past the stop.

*** Careful with stop orders. Believe it or not, a large enough amount of traders like to place stops around the same price, so if an ambitious whale senses this, he may will try to trigger a squeeze! The daily squeezing made them take 4:1 off the exchange, this is why we can't have nice things. In fact, avoid stop losses altogether, they are terrible for something this volatile. If you really have to, trailing stop is better.

*** Occasionally people come along who think its a good idea to set a stop above the current price for longs. I guess the reasoning is that, if BTC is 500$, and you set the stop long at 800$, you will catch the rocket to 1k even if you're not around. Don't do this, its retarded.

Trailing Stop: This one is generally a better alternative to Stops, at least for crypto, but most people don't use it because they don't know how it works. Basically, it will liquidate your position whenever it decreases by the specified amount.

*** For example, I long 1 BTC at $500 and it starts rallying...almost too quickly. I set a Trailing Stop of $10 (Yes, actually type 10$ into the entry. No, you are not selling your btc for 10$ in doing so. Yes, I'm sure). Price rockets to 600$ before dumping begins. As soon as asks drop below 590$, a market order closing your position will be triggered. The stop essentially "trails" you, that is, at 520, liquidation trails to 510, and at 560, liquidation is 550 etc.

Hidden Order: This accomplishes the same goal as iceberg orders, which allows big players to place massive positions on the orderbook without spooking the market (or buying on a drop without revealing support). There is nothing to distinguish hidden orders from normal orders in your "active positions" tab, so make sure you don't mix up which is which. There used to be API glitches that revealed these orders, but they are gone. You can watch out for these orders if they're heading the books by "pinging", i.e. making 0.001 trades at market to see if they get taken at prices different from what is offered. There are some other gimmicks you can use, but they are complicated and I will add them to the to-do list.

OCO Order: This is a more recent addition the bitfinex armoury, and most people find it very confusing. No, its not some special way to play marketmaker and collect all the pivots. Basically, an OCO order will execute at two different prices depending on which price gets activated first.

*** For example, BTC is 500$ and I'm looking to sell because I think prices will fall. I'm hoping someone will panic buy it up to 550$ first, but want to sell it for at least 480$ if worst comes to worst. So what I would do is set an OCO order of 550$ and 480$. If price hits 550$, I will sell and the order at 480$ will cancel. The one advantage of using this order type instead of combining a limit with a stoploss is that one cancels the other, ie. only one of the orders will execute. This means that if price hits 550$, it won't sell and then go short when it later drops to 480$.

Hide Order: Basically makes your order invisible on the orderbook for a fee. This is not as useful as it sounds (bots will notice your hidden after they ping it with a few pennies), unless you are trying to margin call everyone into your orders and don't want to give away the game.


Total Return Swaps:

This section talks about funds that are used to make leveraged positions. Lately, swaps have gotten very popular on bitfinex, with the sum of USD swap loaned out reaching over 25 million USD, and rates briefly hitting 1% (per day! roughly 30% a month if someone is silly enough to keep it that long).

You can bid/offer liquidity in the Total Return Swap tab.

It is important that you get good rates for your loans, as a lot of good leverage opportunities take place during high volume periods when funds are scarce. Under "swaps used in a margin position" in the liquidity tab you can see what rates you have. You can cancel these positions at any time. Yes they take a while to reappear, no your position is not threatened.

You might also be interested in loaning out your USD. It makes little sense to loan out BTC, since the rates are so low. This can be very lucrative if you want to profit off the high rates without being exposed to BTC price movements.

1 Go to manage wallets and move your funds to the "Deposits" tab.

2 Click unfilled swap demand/offers subtab.

3 You enter the number of periods in days, choose the % rate per day and enter the dollar amount you want to loan out and click offer swap.

Flash Return RateThis is a dynamic rate that usually reflects the rate you get when you take a leveraged position without reserving funds. If you are the borrower and funds are scarce, you will likely receive swaps with a much higher interest rate than what you could get at market.

AutorenewThe autorenew tab reinvests your interest earnings into loaning more swaps. This method allows you to earn compound, rather than additive interest on your principal. Be warned though that this means any USD you move to that account with immediately get sucked into the loan ecosystem.

There are a few features I would like to discuss that are not well-known:

>You can close you swaps over and over until the market gives you a better rate under the "swaps used in a margin position" tab. It will execute a new market order for the next available liquidity from the supply side. Use your own discretion. From the picture below, if you cancel your loan to get a better rate, you will automatically take the one at 0.4199%, and if you have Autorenew activated, you will automatically loan out at 0.3%.

>Swaps are calculated by the hour. This means that when you close swaps, you have to pay at least for an hour. This means that you would pay 2 hours worth of interest for a 1hr 1 min to 1hr 59 min loan.

>You can't close swaps that you loan out until they expire or the borrower closes them or get margin called.

>You can check swap rates and sums historical data at this site:
or simply by going to:
or for real-time alerts, you can idle in


on freenode

>The space of time between closing your position and opening a new one actually makes your margin naked. Thats right, there is nothing backing it for several minutes. There isn't really a feasible way to take advantage of this unless you spend thousands of BTC, and in which case, bitfinex would probably halt the engine and reverse the trades like they did before.


  1. Good article - thanks. I just wanted to add that if you are interested in investment in the swap market ( currently called margin funding), you should check out
    It will do all investment work for you automatically with minimal funds idle time.


  2. UP BTC Application will begin from 24th June 2016, Check UP BTC 2016 Application Form.
    Download UPBTC 2016-17 Notification.