Getting Started with Margin Trading on Bitmex

First of all, Bitmex is a P2P trading platform that offers its customers an opportunity to buy leveraged contracts. Bitmex is the highest volumed margin trading platform for cryptocurrencies.

Bitmex Logo

All contracts on Bitmex are settled in Bitcoin (XBT), which means that balance on Bitmex is in Bitcoin as well rather than in fiat currencies.

In this article, I explain what is margin trading - its benefit and downside, as well as long and short contracts. All examples are simplified and do not contain different parameters like maintenance margin for calculations. This is just to give you a basic understanding of margin trading principles.

What is margin trading?

Margin trading is a style of trading where trades are made by using borrowed funds. Margin trading enables a trader to trade in greater volume than the user’s funds.

Let’s say inexperienced trader Steve has some information, a feeling, a hunch about Litecoin’s price movement, but Steve only has $1000 in his trading account. Margin trading gives Steve a possibility to increase the volume of the trade. The times Steve increases the volume is called leverage.

As an abstract example, let’s assume that 1 contract of trading pair XBTUSD is worth $1 (that is true for all Bitmex XBTUSD contracts). Now Steve could buy up to 1,000 contracts with his funds, but Steve thinks this is not enough, Steve always wants more. He finds a great trading platform called Bitmex.

Bitmex UI

Now Steve makes his analysis and decides to invest all his funds (which by the way is never a good idea) with 5x leverage, so he receives 1,000 x 5 = 5,000 contracts. Steve bought his contracts when Bitcoin’s price was $10,000 so he receives a position that is worth 0.5 BTC.

Let's assume that Steve is lucky or super smart and Bitcoin’s price moves up to $15,000. Steve sells his contracts and makes a profit as if he had invested $5,000 dollars without margin trading.

If Steve used spot trading instead of margin trading his profits per $1,000 dollars would have been $1,000 * ($15,000 - $10,000) / $10,000 = $500. The same rule applies for the whole position in case of margin trading, so Steve actually made $5,000 * ($15,000 - $10,000) / $10,000 = $2,500 and this is reason margin trading is useful.

The downside of margin trading

Some of you might be thinking to themselves - it’s a great way to make lots of money. Answer to that is controversial, it’s "yes" if you have an excellent understanding of the market (even then there is a great amount of risk involved) or your luck is just utmost (then go ahead and buy a lottery ticket).

Let us continue with Steve’s example.

By now you may or may not be familiar with the term - liquidation. A liquidation price is a price that in Steve’s case Bitcoin’s price must always be greater than to keep his position alive. If the price of Bitcoin falls underneath the liquidation price the whole position is lost.

Pros and Cons

For long contracts liquidation price is always a bit higher than bankruptcy price and for short contracts a bit lower than bankruptcy price. This ensures that you cannot go bankrupt. The most important rule in margin trading: never get liquidated.

Calculating bankruptcy price is rather easy and most of us assume at first that for long contracts it would be: bankruptcy = entry - entry / leverage, while idea behind it is correct Bitmex actually calculates it like this: bankruptcy = entry - (entry / leverage) * (leverage/(leverage + 1). That means while you get profits for 5x leverage your bankruptcy price is actually higher than it should be.

Now, remember Steve bought XBTUSD contracts with 5x leverage @$10,000. In case Steve did not get lucky and price did not go up, instead started falling, Steve is in big, big trouble. Steve’s bankruptcy price is $10,000 - ($10,000 / 5) * 5 / 6 = $8,333.

Steve's liquidation price is even higher around $8,372 (all about liquidation and liquidation price is explained in the liquidation article). Steve slipped and let his position get liquidated, now Steve is sad and has no funds.

The loss of pain is always greater than the joy of victory.

Moreover, while the price is falling Steve’s funds are going down as well. Let’s say that Bitcoin’s price falls to $9,250 now Steve has lost a lot of his funds. By that time Steve has lost $5,000 * ($10,000 - $9,000) / $10,000 = $500. As you can see while the big rise in the price can make you a great profit, a small drop can make you a rather big loss. Margin trading is like a two-edged sword.

So you are familiar with the basic mechanism of margin trading, now let’s discuss contracts.

Contracts

For each margin trading market, there are 2 types of contracts - long and short. If you go long it means you predict a rise in the price and if you go short you predict a drop.

Long contracts are pretty straightforward, if one goes long in the cryptocurrency market he actually buys and owns that currency. In Steve’s case, he went long with 5,000 contracts on the XBTUSD market @$10,000. Steve owns 5,000 / 10,000 = ₿0.5. He, of course, has to return the borrowed amount of $4,000.

You might ask yourself how can you earn when the price drops. The solution is really clever - you do not own that currency yet, but owe it to somebody. Let’s imagine that Steve went short instead of long.

So Steve bought 5,000 XBTUSD short contracts @$10,000, which makes a position of ₿0.5. On the settlement, Steve has to return ₿0.5 on the settlement price. So if price drops to $9,000, Steve has made a profit of ($10,000 - $9,000) * ₿0.5 = $500. It means as if somebody gives him ₿0.5 on the entry price and he has to only return ₿0.5 on the settlement price.

If you want more information about different contracts - futures, perpetual, etc. check out the Bitmex contracts tutorial.