Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmark and Test for Run Time on Exchanges Other than Binance #18

Open
ruidazeng opened this issue Oct 8, 2024 · 21 comments
Open

Benchmark and Test for Run Time on Exchanges Other than Binance #18

ruidazeng opened this issue Oct 8, 2024 · 21 comments

Comments

@ruidazeng
Copy link
Contributor

ruidazeng commented Oct 8, 2024

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?

@Herklos
Copy link
Member

Herklos commented Oct 8, 2024

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.

@ruidazeng
Copy link
Contributor Author

Which exchange did you use that took 1 hour on your computer?

@PWShawn
Copy link

PWShawn commented Oct 8, 2024

kraken has been running on my computer for 6 hrs with no result.

@Herklos
Copy link
Member

Herklos commented Oct 9, 2024

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).

@Herklos
Copy link
Member

Herklos commented Oct 26, 2024

@ruidazeng, do you have any benchmarks after the new changes?

@ruidazeng
Copy link
Contributor Author

@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.

@ruidazeng
Copy link
Contributor Author

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

@Herklos
Copy link
Member

Herklos commented Oct 26, 2024

@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!

@Herklos
Copy link
Member

Herklos commented Oct 26, 2024

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

@ruidazeng
Copy link
Contributor Author

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?

@Herklos
Copy link
Member

Herklos commented Oct 27, 2024

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

@ruidazeng
Copy link
Contributor Author

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

@ruidazeng
Copy link
Contributor Author

@Herklos I might need a new approach. I ran for 120 hours on my machine and did not finish all the supported exchanges.

@ruidazeng
Copy link
Contributor Author

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)...

@RGermain97
Copy link

RGermain97 commented Dec 22, 2024

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:

  1. buy ATOM with USDT at 0.15446
  2. sell ATOM for BTC at 0.00007
  3. buy TRX with BTC at 390625.00000
  4. sell TRX for ETH at 0.00007
  5. buy LTC with ETH at 32.90556
  6. sell LTC for EUR at 96.58000
  7. buy ADA with EUR at 1.16863
  8. sell ADA for USDC at 0.89230
  9. buy DYDX with USDC at 1.13507
  10. sell DYDX for USDT at 1.44300

@RGermain97
Copy link

@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:

  1. buy TRX with KCS at 45.76240
  2. sell TRX for USDC at 0.24456

New 10.87529% kucoin opportunity:

  1. buy TRX with KCS at 45.76240
  2. sell TRX for USDC at 0.24456
  3. buy GMT with USDC at 7.62777
  4. sell GMT for USDT at 0.13370
  5. buy KAI with USDT at 362.31884
  6. sell KAI for BTC at 0.00000
  7. buy GMT with USDC at 7.62777
  8. sell GMT for USDT at 0.13370
  9. buy KAI with USDT at 362.31884
  10. sell KAI for BTC at 0.00000
  11. buy XDC with BTC at 1315789.47368
  12. sell XDC for ETH at 0.00002
  13. buy NEO with ETH at 235.62677
  14. buy XDC with BTC at 1315789.47368
  15. sell XDC for ETH at 0.00002
  16. buy NEO with ETH at 235.62677
  17. sell NEO for KCS at 1.27100
  18. sell NEO for KCS at 1.27100

@ruidazeng
Copy link
Contributor Author

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:

  1. buy TRX with KCS at 45.76240
  2. sell TRX for USDC at 0.24456

New 10.87529% kucoin opportunity:

  1. buy TRX with KCS at 45.76240
  2. sell TRX for USDC at 0.24456
  3. buy GMT with USDC at 7.62777
  4. sell GMT for USDT at 0.13370
  5. buy KAI with USDT at 362.31884
  6. sell KAI for BTC at 0.00000
  7. buy GMT with USDC at 7.62777
  8. sell GMT for USDT at 0.13370
  9. buy KAI with USDT at 362.31884
  10. sell KAI for BTC at 0.00000
  11. buy XDC with BTC at 1315789.47368
  12. sell XDC for ETH at 0.00002
  13. buy NEO with ETH at 235.62677
  14. buy XDC with BTC at 1315789.47368
  15. sell XDC for ETH at 0.00002
  16. buy NEO with ETH at 235.62677
  17. sell NEO for KCS at 1.27100
  18. sell NEO for KCS at 1.27100

I am looking into this.

@ruidazeng
Copy link
Contributor Author

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:

  1. buy ATOM with USDT at 0.15446
  2. sell ATOM for BTC at 0.00007
  3. buy TRX with BTC at 390625.00000
  4. sell TRX for ETH at 0.00007
  5. buy LTC with ETH at 32.90556
  6. sell LTC for EUR at 96.58000
  7. buy ADA with EUR at 1.16863
  8. sell ADA for USDC at 0.89230
  9. buy DYDX with USDC at 1.13507
  10. 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.

@RGermain97
Copy link

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:

  1. buy ATOM with USDT at 0.15446
  2. sell ATOM for BTC at 0.00007
  3. buy TRX with BTC at 390625.00000
  4. sell TRX for ETH at 0.00007
  5. buy LTC with ETH at 32.90556
  6. sell LTC for EUR at 96.58000
  7. buy ADA with EUR at 1.16863
  8. sell ADA for USDC at 0.89230
  9. buy DYDX with USDC at 1.13507
  10. 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.

Ah yes, my apologies for the confusion.

@ruidazeng
Copy link
Contributor Author

@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:

  1. buy TRX with KCS at 45.76240
  2. sell TRX for USDC at 0.24456

New 10.87529% kucoin opportunity:

  1. buy TRX with KCS at 45.76240
  2. sell TRX for USDC at 0.24456
  3. buy GMT with USDC at 7.62777
  4. sell GMT for USDT at 0.13370
  5. buy KAI with USDT at 362.31884
  6. sell KAI for BTC at 0.00000
  7. buy GMT with USDC at 7.62777
  8. sell GMT for USDT at 0.13370
  9. buy KAI with USDT at 362.31884
  10. sell KAI for BTC at 0.00000
  11. buy XDC with BTC at 1315789.47368
  12. sell XDC for ETH at 0.00002
  13. buy NEO with ETH at 235.62677
  14. buy XDC with BTC at 1315789.47368
  15. sell XDC for ETH at 0.00002
  16. buy NEO with ETH at 235.62677
  17. sell NEO for KCS at 1.27100
  18. 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.

@ruidazeng
Copy link
Contributor Author

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:

  1. buy ATOM with USDT at 0.15446
  2. sell ATOM for BTC at 0.00007
  3. buy TRX with BTC at 390625.00000
  4. sell TRX for ETH at 0.00007
  5. buy LTC with ETH at 32.90556
  6. sell LTC for EUR at 96.58000
  7. buy ADA with EUR at 1.16863
  8. sell ADA for USDC at 0.89230
  9. buy DYDX with USDC at 1.13507
  10. 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.

Ah yes, my apologies for the confusion.

Great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants