Triangular-Arbitrage
Triangular-Arbitrage copied to clipboard
Benchmark and Test for Run Time on Exchanges Other than Binance
I am using the triangular arbitrage opportunity detection code, and I wanted to know if it has been benchmarked and tested for run time performance on exchanges other than Binance (or BinanceUS). Currently, I am running the code on KuCoin and Coinbase, but no opportunities are being returned from these exchanges. The process seems to be stuck at "scanning" indefinitely.
Is there any known issue or limitation with these exchanges? Are there any specific configurations or modifications required to ensure it runs correctly on non-Binance exchanges?
You can check historical detections on https://www.octobot.cloud/tools/triangular-arbitrage-crypto, https://x.com/OctoArbitrage and https://t.me/octobotarbitrage.
It can take a lot of time (up to 1 hour on my computer), it depends on how many pairs are available on the exchange you select.
Which exchange did you use that took 1 hour on your computer?
kraken has been running on my computer for 6 hrs with no result.
Which exchange did you use that took 1 hour on your computer?
Binance & Kucoin & OKX & Crypto.com takes around 1 hour on my computer. Bitget is faster (few minutes).
@ruidazeng, do you have any benchmarks after the new changes?
@ruidazeng, do you have any benchmarks after the new changes?
Let me work on it for a bit, I will make a benchmark branch. The thing is the benchmark times are so dependent on the actual exchanges and how many data points we are obtaining (as opposed to our algorithms), I am wondering if there's a way to check how much data is being fed to us by the exchange and compare them to the runtime.
Never mind just realize I don't have the perms to make a benchmark branch. Would you be able to make a benchmark branch so I can send some pull request to it. @Herklos
@ruidazeng, do you have any benchmarks after the new changes?
Let me work on it for a bit, I will make a benchmark branch. The thing is the benchmark times are so dependent on the actual exchanges and how many data points we are obtaining (as opposed to our algorithms), I am wondering if there's a way to check how much data is being fed to us by the exchange and compare them to the runtime.
No problem, thanks!
Never mind just realize I don't have the perms to make a benchmark branch. Would you be able to make a benchmark branch so I can send some pull request to it. @Herklos
I have just created it
Never mind just realize I don't have the perms to make a benchmark branch. Would you be able to make a benchmark branch so I can send some pull request to it. @Herklos
I have just created it
Do you have a list of exchanges you want to benchmark? Do you have data on the top 10 or top 15 most popular exchanges on Octobot via the ccxt library?
Never mind just realize I don't have the perms to make a benchmark branch. Would you be able to make a benchmark branch so I can send some pull request to it. @Herklos
I have just created it
Do you have a list of exchanges you want to benchmark? Do you have data on the top 10 or top 15 most popular exchanges on Octobot via the ccxt library?
You can find here our supported exchanges list: https://www.octobot.cloud/en/guides/exchanges
Never mind just realize I don't have the perms to make a benchmark branch. Would you be able to make a benchmark branch so I can send some pull request to it. @Herklos
I have just created it
Do you have a list of exchanges you want to benchmark? Do you have data on the top 10 or top 15 most popular exchanges on Octobot via the ccxt library?
You can find here our supported exchanges list: https://www.octobot.cloud/en/guides/exchanges
I will focus on the partner exchanges
@Herklos I might need a new approach. I ran for 120 hours on my machine and did not finish all the supported exchanges.
These are my results after 120 hours:
Scanning exchanges...
Starting detection for Binance (binanceus)...
-------------------------------------------
New 4.51882% Binance opportunity:
-------------------------------------------
Starting detection for OKX (okx)...
-------------------------------------------
New 26.43352% OKX opportunity:
-------------------------------------------
Starting detection for Kucoin (kucoin)...
-------------------------------------------
New 13.641% Kucoin opportunity:
-------------------------------------------
Starting detection for Bybit (bybit)...
An error occurred with Bybit: bybit GET https://api.bybit.com/v5/market/instruments-info?category=option&baseCoin=BTC 403 Forbidden <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>403 ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
The Amazon CloudFront distribution is configured to block access from your country.
We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront)
Request ID: reMEvhwhCnXoEV9gKTIovhXuZHqNRcWMCt2iRlG1hqWEHduR9zR0sQ==
</PRE>
<ADDRESS>
</ADDRESS>
</BODY></HTML>
Starting detection for Crypto.com (cryptocom)...
-------------------------------------------
New 9.75882% Crypto.com opportunity:
-------------------------------------------
Starting detection for HTX (huobi)...
-------------------------------------------
New 14.2615% HTX opportunity:
-------------------------------------------
Starting detection for Bitget (bitget)...
-------------------------------------------
New 21.71864% Bitget opportunity:
-------------------------------------------
Starting detection for BingX (bingx)...
An error occurred with BingX: None cannot be a node
Starting detection for MEXC (mexc)...
-------------------------------------------
New 3.30981% MEXC opportunity:
-------------------------------------------
Starting detection for CoinEx (coinex)...
An error occurred with CoinEx: None cannot be a node
Starting detection for BitMart (bitmart)...
-------------------------------------------
New 12.8493% BitMart opportunity:
-------------------------------------------
Starting detection for HollaEx (hollaex)...
No opportunity detected for HollaEx
Starting detection for Phemex (phemex)...
An error occurred with Phemex: None cannot be a node
Starting detection for GateIO (gate)...
Hi just a concern, the exchange rate for atom/usdt is not 0.15446, its 6.45 at the current rate. The rest of the rates seem to be accurate.
New 65.5134% bitget opportunity:
- buy ATOM with USDT at 0.15446
- sell ATOM for BTC at 0.00007
- buy TRX with BTC at 390625.00000
- sell TRX for ETH at 0.00007
- buy LTC with ETH at 32.90556
- sell LTC for EUR at 96.58000
- buy ADA with EUR at 1.16863
- sell ADA for USDC at 0.89230
- buy DYDX with USDC at 1.13507
- sell DYDX for USDT at 1.44300
@ruidazeng I've also noticed this weird occurrence with the output, where it will print repetitive steps after a while.
New 10.87529% kucoin opportunity:
- buy TRX with KCS at 45.76240
- sell TRX for USDC at 0.24456
New 10.87529% kucoin opportunity:
- buy TRX with KCS at 45.76240
- sell TRX for USDC at 0.24456
- buy GMT with USDC at 7.62777
- sell GMT for USDT at 0.13370
- buy KAI with USDT at 362.31884
- sell KAI for BTC at 0.00000
- buy GMT with USDC at 7.62777
- sell GMT for USDT at 0.13370
- buy KAI with USDT at 362.31884
- sell KAI for BTC at 0.00000
- buy XDC with BTC at 1315789.47368
- sell XDC for ETH at 0.00002
- buy NEO with ETH at 235.62677
- buy XDC with BTC at 1315789.47368
- sell XDC for ETH at 0.00002
- buy NEO with ETH at 235.62677
- sell NEO for KCS at 1.27100
- sell NEO for KCS at 1.27100
I'm looking into this
@ruidazeng I've also noticed this weird occurrence with the output, where it will print repetitive steps after a while.
New 10.87529% kucoin opportunity:
- buy TRX with KCS at 45.76240
- sell TRX for USDC at 0.24456
New 10.87529% kucoin opportunity:
- buy TRX with KCS at 45.76240
- sell TRX for USDC at 0.24456
- buy GMT with USDC at 7.62777
- sell GMT for USDT at 0.13370
- buy KAI with USDT at 362.31884
- sell KAI for BTC at 0.00000
- buy GMT with USDC at 7.62777
- sell GMT for USDT at 0.13370
- buy KAI with USDT at 362.31884
- sell KAI for BTC at 0.00000
- buy XDC with BTC at 1315789.47368
- sell XDC for ETH at 0.00002
- buy NEO with ETH at 235.62677
- buy XDC with BTC at 1315789.47368
- sell XDC for ETH at 0.00002
- buy NEO with ETH at 235.62677
- sell NEO for KCS at 1.27100
- sell NEO for KCS at 1.27100
I am looking into this.
Hi just a concern, the exchange rate for atom/usdt is not 0.15446, its 6.45 at the current rate. The rest of the rates seem to be accurate.
New 65.5134% bitget opportunity:
- buy ATOM with USDT at 0.15446
- sell ATOM for BTC at 0.00007
- buy TRX with BTC at 390625.00000
- sell TRX for ETH at 0.00007
- buy LTC with ETH at 32.90556
- sell LTC for EUR at 96.58000
- buy ADA with EUR at 1.16863
- sell ADA for USDC at 0.89230
- buy DYDX with USDC at 1.13507
- sell DYDX for USDT at 1.44300
Can you double check the direction of the exchange rate on your end? Since 1/0.15446 = 6.45 and 1/6.45 = 0.15466.
It is strange that the rest of the rates are accurate.
Hi just a concern, the exchange rate for atom/usdt is not 0.15446, its 6.45 at the current rate. The rest of the rates seem to be accurate. New 65.5134% bitget opportunity:
- buy ATOM with USDT at 0.15446
- sell ATOM for BTC at 0.00007
- buy TRX with BTC at 390625.00000
- sell TRX for ETH at 0.00007
- buy LTC with ETH at 32.90556
- sell LTC for EUR at 96.58000
- buy ADA with EUR at 1.16863
- sell ADA for USDC at 0.89230
- buy DYDX with USDC at 1.13507
- sell DYDX for USDT at 1.44300
Can you double check the direction of the exchange rate on your end? Since
1/0.15446 = 6.45and1/6.45 = 0.15466.It is strange that the rest of the rates are accurate.
Ah yes, my apologies for the confusion.
@ruidazeng I've also noticed this weird occurrence with the output, where it will print repetitive steps after a while.
New 10.87529% kucoin opportunity:
- buy TRX with KCS at 45.76240
- sell TRX for USDC at 0.24456
New 10.87529% kucoin opportunity:
- buy TRX with KCS at 45.76240
- sell TRX for USDC at 0.24456
- buy GMT with USDC at 7.62777
- sell GMT for USDT at 0.13370
- buy KAI with USDT at 362.31884
- sell KAI for BTC at 0.00000
- buy GMT with USDC at 7.62777
- sell GMT for USDT at 0.13370
- buy KAI with USDT at 362.31884
- sell KAI for BTC at 0.00000
- buy XDC with BTC at 1315789.47368
- sell XDC for ETH at 0.00002
- buy NEO with ETH at 235.62677
- buy XDC with BTC at 1315789.47368
- sell XDC for ETH at 0.00002
- buy NEO with ETH at 235.62677
- sell NEO for KCS at 1.27100
- sell NEO for KCS at 1.27100
Can you make a new issue for this? I am not able to reproduce this error on kucoin (as of now). We might need to triage this. But I do see that it seems like 7-10 are steps that has repeated in your output.
Hi just a concern, the exchange rate for atom/usdt is not 0.15446, its 6.45 at the current rate. The rest of the rates seem to be accurate. New 65.5134% bitget opportunity:
- buy ATOM with USDT at 0.15446
- sell ATOM for BTC at 0.00007
- buy TRX with BTC at 390625.00000
- sell TRX for ETH at 0.00007
- buy LTC with ETH at 32.90556
- sell LTC for EUR at 96.58000
- buy ADA with EUR at 1.16863
- sell ADA for USDC at 0.89230
- buy DYDX with USDC at 1.13507
- sell DYDX for USDT at 1.44300
Can you double check the direction of the exchange rate on your end? Since
1/0.15446 = 6.45and1/6.45 = 0.15466. It is strange that the rest of the rates are accurate.Ah yes, my apologies for the confusion.
Great.