bmino / binance-triangle-arbitrage

Detect in-market cryptocurrency arbitrage
MIT License
1.07k stars 337 forks source link

How can I set triangular trades? #145

Closed songyu-123 closed 3 years ago

songyu-123 commented 3 years ago

Hey, thank you for your kindness. When I run this program, I got an error called "Error: No triangular trades were identified". So I guess that's because I did a wrong identification on the whitelist. So, what is a legal identification of a whitelist? Can you give me some examples? "SCANNING": { "DEPTH": 50, "WHITELIST": ["FILBNB","FILUSDT"] }, That's illegal, right?

bmino commented 3 years ago

Yup, you'll need more assets in your whitelist. At least 3 haha to make a triangle

A triangular trade is defined as three assets A, B, and C where you can:

1) Trade A for B 2) Trade B for C 3) Trade C for A

With only 2 assets in your whitelist, this is impossible

songyu-123 commented 3 years ago

Thank you for your reply. I would like to ask you a few more questions:

  1. When I select "Linear" in EXECUTION.STRATEGY, there is no need to set a whitelist. When I select "parallel" in EXECUTION.STRATEGY, I need to set a whitelist. What is the principle? And is the content of the whitelist similar to a trading pair like "BNBUSDT" or a cryptocurrency like "BNB"?
  2. Why the robot did not make a deal when I clearly saw an arbitrage opportunity on HUD? What should I prepare in advance for my account assets?
  3. Does the estimated profit include spreads?
  4. Since the order cannot be 100% synchronized, what the robot do if one of the steps in the A-B-C chain cannot be traded?
bmino commented 3 years ago

Take a read through the configuration readme for more info.

1) Linear vs. parallel is explained in the extended documentation. The whitelist should include individual assets like "BNB" and "USDT". 2) My guess is that your age threshold was not satisfied so the robot appropriately did not make any trades. 3) The estimated profit uses math directly from the order book so spreads are accounted for. 4) I'm not sure what you mean by synchronized?

songyu-123 commented 3 years ago

Hey, Bmino. Thank you for your response again. I'm still having trouble with real-time trading. So can you do me a favor? 20210411223438 config.json.txt As you can see, I set the config file like this, and the bot ran very well. You can see on the screen there are some arbitrage opportunities, right? However, I can't see any orders made by the bot. So, could you tell me what's wrong with my config file and what may cause this question? By the way, what is the real meaning of "AGE"? I can't get the point.

bmino commented 3 years ago

Great, thanks for posting the HUD. As I suspected, your ages are huge. Read the config readme for more details, but the age values are how old each piece of data is. You wouldn't want to trade with data that is 4 second old right? And probably not with data that is even 200ms old

bmino commented 3 years ago

Looks like most of those entries are 168 seconds old! Since the value is given in milliseconds

songyu-123 commented 3 years ago

Thank you for your help, again. I adjusted the parameter like this: "THRESHOLD": { "PROFIT": 0.1, "AGE": 250 } And I saw the HUD like this: 微信图片_20210412125813 From my point, it would trade BUSD-ANT-BTC. However, it still didn't trade. So, what's the problem for now?

bmino commented 3 years ago

You are correct. What version of the app are you using? The most recent version displays Age in milliseconds, but your HUD appears to be displaying Age in seconds

bmino commented 3 years ago

I suspect you have an older version of the app, and you have specified an age threshold of 250 ms, but the HUD is showing 168 seconds so no trade was sent (correctly)

songyu-123 commented 3 years ago

Thanks for replying. I'm going to update the app version and run it again. I'll tell you if it makes orders. Thank you. My Email:zzh65895761@gmail.com Keep connecting :)

bmino commented 3 years ago

go ahead and open up a new issue if you experience more problems, gonna close this due to inactivity