4 ms·
I hacked together my own scripted system that would arbitrage cryptocurrency across exchanges. It worked (for the most part), but it's been abandoned now. The
by headmelted 9y ago
I hacked together my own scripted system that would arbitrage cryptocurrency across exchanges.
It worked (for the most part), but it's been abandoned now. The best way I can think of to describe why is to say that while the low hanging fruit exists, there's far too little juice in it for it to be worth the squeeze.
Others have explained that the problem they've encountered is counter-party risk in that some exchanges may not allow you to withdraw, or the prices may be skewed because they're charging absurd withdrawal fees.
None of this was a problem for me - I found the exchange APIs almost universally hold that information somewhere if you hunt around enough for it, so I was able to account for this when scoring opportunities.
My reasoning was that from a birds-eye view it looked like the price differences were allowing for trades that would have a 1-2% difference. I reasoned that if I were to withdraw directly to the wallet of another exchange I could have a turnaround time on some currencies of less than five minutes start to finish - even 0.1% every hour would be an incredible rate of return when extrapolated to a yearly ROI.
In reality, while currencies did (and do!) trade with that difference frequently between exchanges, the volumes are tiny. Despite having funds to spend, there weren't any big-money buyers at the destination exchange, and within a couple of dollars (literally a couple of dollars) the bids at the destination exchange were back below the price of the source exchange, and I'd be in the red on the transaction.
Add in the fees, and there was vanishingly little profit to be made while taking bet-the-farm risks that whoever runs the exchange isn't going to elope with your bitcoins.
It was a good learning experience, though - so I'm ultimately glad I took a run at it.
- Blackthorn 9y agoI considered doing something like this when I saw how wide the differences between exchanges could be, but the problem I ran into was that the fees for trading on most exchanges are insane. Which is probably why those huge difference exist.
- simonhughes22 9y agoI spent the last few months trying to build an arbitrage bot and ran into exactly the same issues. If there's a big price differences there's always a reason, either deposits or withdrawals are temporarily offline, or the fee for transferring or depositing is too high, or for some very small coins it can takes ages to transfer (one transfer took 6 hours, another took a whole week!). Otherwise the volume is so low that you basically lose any edge crossing the spread and trying to find enough volume to close out the transaction. I had a small number of trades that made a few pennies, but also a lot more that just sat there and didn't execute at the expected price (based on the bid and ask when my bot found the trade) forcing me to sell for a less optimal price and end up with a loss. I am still sure there's money to be made with this but it takes a lot of work and you would have to search across a lot of coins and a lot of exchanges to find a viable option. Most people, including some very smart people I've talked to, just assume it's pretty easy to do this but if it was everyone would be doing it. Maybe it was 3-4 years ago when crypto was much smaller and less well known, but nowadays most opportunities are exploited as soon as they exist, I suspect a lot of time by the exchanges themselves.
- headmelted 9y agoThat reminds me! At least one exchange that I know of was front-running me. I'm not saying which exchange it was as I don't want to get trouble for outing them - but it was definitely going on. I tested this by putting in orders at times of low activity (i.e. nothing for minutes, then I'd place an order, and the best offers would be taken up by a "bid" that came in ahead of me. This could happen in theory but when it's happening as the order is received there's no realistic chance of it being anything else).
- 1_player 9y ago> for some very small coins it can takes ages to transfer Why do you need to transfer between exchange? Writing an arbitraging bot is in my bucket list of projects I'll one day work on, and to avoid trasfer times, which are ridiculous with some cryptocurrencies, the plan is to keep a balance of both sides on both exchanges. Example: if you're arbitraging ETH/USD between exchanges A and B, you have an ETH balance on A, and a USD balance on B, and you concurrently buy/sell on both. Then you have the problem of managing dozens of balances across as many exchanges, which is left as an exercise for the reader :)
- fedecaccia 9y agoThat's the point, you can't have so many balances in so many exchanges, because, in that case, each return is going to be very small. Just to take profit on an ETH USD arbitrage, you have to have 25% of your capital in ETH and 25% USD in exchange A, and 25% ETH and 25% USD in exchange B. So, when you take advantage of the opportunity to buy ETH at low price on exchange A and to sell on exchange B, you are only earning an arbitrage profit on a 25% of your capital. And that profit become less and less if you divide your capital into more coins and more exchanges.
- trophycase 9y agoThis is why you don't withdraw. Just arbitrage back the other direction. My arbitrage script was weighted to favor rebalancing my portfolio.
- fedecaccia 9y agoAre you talking about pair trading? How do you do it, since you can't go short in crypto? (At least not if you are not using bitfinex)
- 1_player 9y agoYou short by selling. See my sibling comment: https://news.ycombinator.com/item?id=16931793 https://news.ycombinator.com/item?id=16931793
- fedecaccia 9y agoYes I have answered on that link. I think in that case is unrealizable.
- evbots 9y agoYeah, I tried doing this as well. But you're right, the spread on the arbitrage pretty much vanishes as soon as you try to do any kind of significant volume. I suspect my trading pair was "too" liquid. This could possibly be a viable option for coins that don't see a lot of volume. Or, maybe for a short period after a new coin is added to an exchange and there's a period of high volatility.
- koliber 9y agoYou discovered a few important market dynamics! First is that the spot price is only one of the variables to take into consideration when trading. Market depth and liquidity are two others. If someone says they will pay you $3 for an apple, you don't run out and buy 100 tons of apples. You first need to see how much they will pay for the second apple, the third apple, a ton of apples, 10 tons of apples, etc.