I created an arb trading bot & failed. Here is my experience.

fire2029

Well-Known Member
Joined
Oct 16, 2019
Messages
217
Reaction score
79
Do local crypto arbitrage opportunities exist?
I have been monitoring local BTC, ETH and XRP arbitrage opportunities between Luno and VALR over the last two weeks. I did this by checking their order book every hour (How? Luno and VALR both supply an API, which allowed me to programmatically query their order book and retrieve the min ask price and max bid price on both books).

Ok. So this is what I found.
1 They exist, but arbitrage opportunities are few and far between.
2 They only exist for a short time.
3 If they do exist, they are most common between 2-4am (SA time) and during more volatile periods.
4 Top arb opportunities ranged anywhere 2-5%; but as mentioned only occur three to four times a day. If they do occur, they are there for a second or two.

I put a super simple arb monitor here.

Was I able to take advantage of it?
Simple answer. No.
Here is what I did to try and take advantage of pricing inefficiencies between the two exchanges in order to make a profit. After fees.

1. I deposited R10 000 into both Luno and VALR. I then bought R2500 worth of BTC on both exchanges.
Why? Having enough cash and BTC on both exchange would allow me to instantly buy and sell. (Compare this to other arb strategies, which would buy BTC on one exchange and then send it to another. HOWEVER, this method would simply not be fast enough given the time it takes to transfer).

2. next step, using Luno and VALR API, I queried their order book every minute.
3. If an arbitrage opportunity was big enough ( greater than 0.3%) I put in a market order to buy on one exchange and at the same time I put in a sell market order to sell on another exchange.

My practical findings.

In theory - local arbitrage opportunities between luno and valr exist. However, taking advantage of these in practice is much more difficult. From my side, whilst some arb trades were profitable, there were numerous scenarios where the ask or bid price which I queried (as per step 2) was already filled by the time I placed the market order (step 3). We are talking less than a second here. In some cases, I received a very different price by the time I placed the order.

At this stage, I can conclude that the market is pretty efficient. My own quickly put together trading bot is not fast nor smart enough to take advantage of these opportunities that sometimes exist. Opportunities that do arise dissipate quickly. Thus time between querying the order book and placing the trade must be very small.(I used both exchanges' API; which means I was able to put in a market order as soon as I had info on their book (less than a second) and yet there were still numerous instances where the trade turned out unprofitable).

These were my findings.I would love to hear from others who have tried something similar?
 
Curious why you arbd between two local exchanges rather than one local and another international?
 
Curious why you arbd between two local exchanges rather than one local and another international?

Primary reason. FX.
1. Costly.
Converting ZAR to USD/EUR/CHF is expensive.
2. Currency risk. You run the additional risk of the exchange rate moving whilst you have your money on the offshore exchange, which can also wipe out any arb opportunity.

So I wanted to check whether opportunities exist locally before heading into the offshore arb space. You are right the offshore vs local arb pricing differences - whilst no longer +8% - are still relatively big.
 
Thanks for the write up! Do you think it’s likely that there are just other bots succeeding in doing the same thing, because of a quicker script / faster internet connection?
 
Thanks for the write up! Do you think it’s likely that there are just other bots succeeding in doing the same thing, because of a quicker script / faster internet connection?
I think so. There are certainly ways of speeding up the requests to Luno/VALR. By eg using websockets. I did not explore it using websocket, but used their RESTful API service instead.
 
I really wouldn’t think there would be exploitable arb opportunities for the small players given the sophistication of the competition.
 
Would you consider trying to arb between AltCoinTrader and Luno/Valr?

ACT has much smaller volumes, so the order may sit a little longer. It might also make sense to not gun for the very best order (which will be taken quickly) but for the 2nd or 3rd best option. Or is it literally only arb opportunity and its gone in a second?
 
Would you consider trying to arb between AltCoinTrader and Luno/Valr?

ACT has much smaller volumes, so the order may sit a little longer. It might also make sense to not gun for the very best order (which will be taken quickly) but for the 2nd or 3rd best option. Or is it literally only arb opportunity and its gone in a second?
If the 2nd and 3rd options are still profitable, do you think you would get it, or do you think someone with better infrastructure would get it first? I would bet on the latter.
 
Would you consider trying to arb between AltCoinTrader and Luno/Valr?

ACT has much smaller volumes, so the order may sit a little longer. It might also make sense to not gun for the very best order (which will be taken quickly) but for the 2nd or 3rd best option. Or is it literally only arb opportunity and its gone in a second?
I was literally just looking at pure arb opportunities. So submitting a buy and sell order that match instantly.

Thanks for suggesting Altcoin. I might look into this.*

* Update: Does not look like Altcoin offers any programmatic access to its exchange? So will not be an option for me.
 
Do local crypto arbitrage opportunities exist?
I have been monitoring local BTC, ETH and XRP arbitrage opportunities between Luno and VALR over the last two weeks. I did this by checking their order book every hour (How? Luno and VALR both supply an API, which allowed me to programmatically query their order book and retrieve the min ask price and max bid price on both books).

Ok. So this is what I found.
1 They exist, but arbitrage opportunities are few and far between.
2 They only exist for a short time.
3 If they do exist, they are most common between 2-4am (SA time) and during more volatile periods.
4 Top arb opportunities ranged anywhere 2-5%; but as mentioned only occur three to four times a day. If they do occur, they are there for a second or two.

I put a super simple arb monitor here.

Was I able to take advantage of it? Simple answer. No.
Here is what I did to try and take advantage of pricing inefficiencies between the two exchanges in order to make a profit. After fees.

1. I deposited R10 000 into both Luno and VALR. I then bought R2500 worth of BTC on both exchanges.
Why? Having enough cash and BTC on both exchange would allow me to instantly buy and sell. (Compare this to other arb strategies, which would buy BTC on one exchange and then send it to another. HOWEVER, this method would simply not be fast enough given the time it takes to transfer).

2. next step, using Luno and VALR API, I queried their order book every minute.
3. If an arbitrage opportunity was big enough ( greater than 0.3%) I put in a market order to buy on one exchange and at the same time I put in a sell market order to sell on another exchange.

My practical findings.
In theory - local arbitrage opportunities between luno and valr exist. However, taking advantage of these in practice is much more difficult. From my side, whilst some arb trades were profitable, there were numerous scenarios where the ask or bid price which I queried (as per step 2) was already filled by the time I placed the market order (step 3). We are talking less than a second here. In some cases, I received a very different price by the time I placed the order.

At this stage, I can conclude that the market is pretty efficient. My own quickly put together trading bot is not fast nor smart enough to take advantage of these opportunities that sometimes exist. Opportunities that do arise dissipate quickly. Thus time between querying the order book and placing the trade must be very small.(I used both exchanges' API; which means I was able to put in a market order as soon as I had info on their book (less than a second) and yet there were still numerous instances where the trade turned out unprofitable).

These were my findings.I would love to hear from others who have tried something similar?

hi

i have collected a huge amount of ARB data , would you be interested in doing something together ? or atleast have a chat to establish of what i found and the opportunities
 

Attachments

  • Screenshot 2022-02-08 at 11.04.53.png
    Screenshot 2022-02-08 at 11.04.53.png
    348.2 KB · Views: 57
hi

i have collected a huge amount of ARB data , would you be interested in doing something together ? or atleast have a chat to establish of what i found and the opportunities
Hi Faheem. Do you perhaps have more data on the gap between luno and valr. Would like to have a chat with you.
 
Hi. When are the time stamps on your data taken btw? When you receive it? When you scrape it? Or if it is an exchange side time stamp do you know what the time stamp is? Thanks.
 
Hi. When are the time stamps on your data taken btw? When you receive it? When you scrape it? Or if it is an exchange side time stamp do you know what the time stamp is? Thanks.
every 10 minute intervals for the last year
 

Attachments

  • Screenshot 2022-04-08 at 19.30.25.png
    Screenshot 2022-04-08 at 19.30.25.png
    586.9 KB · Views: 31
every 10 minute intervals for the last year
Ah ok. So things that look like imbalances with this type of data are very unlikely to be “realizable” arbitrage opportunities - rather post-hoc artifacts of how the data is presented.
 
Top
Sign up to the MyBroadband newsletter
X