Arbitrage in Bitfinex
Our goal, simply, is to take advantage of different exchange rate between each coin in Bitfinex.
Arbitrage, huh?
Currency arbitrage is the practice of taking advantage of price differences between markets. These price differences emerge because certain exchanges are more liquid than others.
For example, there is always a different change rate between each cryptocurrency change to Bitcoin or USD (see figure 1). What you need to do, is calculating if it is profitable when you buy LTC with USD
, and sell LTC to BTC
, and buy ETH with BTC
and sell ETH back to USD
and if it’s profitable, good for you.
figure 1
So what is the strategy here?
Using your luminous eyes to read every single data (which either red or green) into your brain,
and let your gifted brain work as fast as it could be,
then try to figure out what might be profitable.
Then use the mouse you just bought or the trackpad on your laptop,
click click click click, and literate it all at once.
Kidding, let the code do the work!
I wrote it in nodejs, including both part of finding the most profitable trading
and automated trading if a single arbitrage’s profit margin is higher than a threshold.
And this is how it looks like.
The profit margin of different combination.
So what does the picture above actually mean?
Take the row start with “0.6895” as an example,
it means that if you buy NEO with USD
and sell it back to BTC
and buy ETP with BTC
and sell it back to USD
, you have a 0.6895% profit, say if you start with $50
you’ll get $50.34475
ideally(without the fees in Bitfinex, buy and sell all at correct pirce), after doing four steps above.
It should be noted that this code is only a proof of concept, it’s still far from make sustainable profit from it,
things like the fee is too high for most of the users and the trading speed is too slow to get the correct price, will lead to an unexpected result.
There will be a breaking change in bitfinex-api-node v2.0, if the code failed to work correctly, that might be a reason. Any pull request is welcome!
Cheers!
Coins mentioned in post:
Congratulations @ju5td0m7m1nd! You received a personal award!
Click here to view your Board
Do not miss the last post from @steemitboard:
Congratulations @ju5td0m7m1nd! You received a personal award!
You can view your badges on your Steem Board and compare to others on the Steem Ranking
Vote for @Steemitboard as a witness to get one more award and increased upvotes!