bmino / binance-triangle-arbitrage

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

looks good so far #110

Closed d4op closed 4 years ago

d4op commented 4 years ago

123

hey I looked into your project, looks rly good. i just ask myself why on dry run all trades are negative profits ? I mean why it selects these pairs if the profit will be negative ? (lose) and why the trade looks like this -> BTC-XMR-ETH isnt the strategy like BTC-XMR-BTC? the base asset will be the end asset ?

d4op commented 4 years ago

123 example of another project.

bmino commented 4 years ago

i just ask myself why on dry run all trades are negative profits ?

The HUD is showing the top profitable opportunities even if none are above your thresholds. Arbitrage in an efficient market shouldn't technically exist. Fear not, the bot will not execute any of these positions unless you lower your PROFIT_THRESHOLD to be lower.

isnt the strategy like BTC-XMR-BTC? the base asset will be the end asset ?

Yup, a core concept of arbitrage is that you end up with the same commodity you started with. In the "Trade column" you are shown the three symbols involved. In the "BTC-XMR-ETH" example, BTC is converted to XMR, then to ETH, then back to BTC. So you could conceptualize it as "BTC-XMR-ETH-BTC" if you prefer?

d4op commented 4 years ago

so it does 3 trades and the last is back to the base asset right ? than all is fine. the profit_threshold should be the profit in % and than the trade gets executed right ?

d4op commented 4 years ago

maybe look at this project: https://github.com/karthik947/BinanceTriangularArbitrage_v2

the output is mostly positiv. your bot only shows me negativ not one positiv profit. i don't get it why it shows trades if the profit is negativ, shouldn't it search for profit trades ?

d4op commented 4 years ago

can we have a talk on telegram or discord ?

bmino commented 4 years ago

Lol it shows the most profitable positions currently known. If there aren't any positions with a calculated profit above 0%, you won't see any in the HUD

d4op commented 4 years ago

why are they in hud if profit negativ ??? Bildschirmfoto 2020-08-24 um 18 40 00

bmino commented 4 years ago

Let's assume you have a collection of numbers: [-1, -5, -2, -8, -4] Now show the "three highest numbers" and you will get: [-1, -2, -4]

The HUD shows positions sorted by calculated profit

d4op commented 4 years ago

Lol it shows the most profitable positions currently known. If there aren't any positions with a calculated profit above 0%, you won't see any in the HUD

yeah but you wrote "If there aren't any positions with a calculated profit above 0%, you won't see any in the HUD" negativ means to me below 0% and you wrote I won't see any in the HUD ^^

bmino commented 4 years ago

Okay, let's try this. Does this description make sense?

The HUD is repainted after each calculation cycle to show snapshots of currently detected arbitrage opportunities. It shows X known positions (configured by HUD.ARB_COUNT) and is sorted by calculated profit.

The HUD is intended to show the positions the bot is aware of. The decision to execute a position is calculated based on other user specified parameters such as age threshold, profit threshold, etc.

revinco commented 4 years ago

i just ask myself why on dry run all trades are negative profits ?

The HUD is showing the top profitable opportunities even if none are above your thresholds. Arbitrage in an efficient market shouldn't technically exist. Fear not, the bot will not execute any of these positions unless you lower your PROFIT_THRESHOLD to be lower.

isnt the strategy like BTC-XMR-BTC? the base asset will be the end asset ?

Yup, a core concept of arbitrage is that you end up with the same commodity you started with. In the "Trade column" you are shown the three symbols involved. In the "BTC-XMR-ETH" example, BTC is converted to XMR, then to ETH, then back to BTC. So you could conceptualize it as "BTC-XMR-ETH-BTC" if you prefer?

Nice work, so this just monitors correct? You would need to register with Binance for the API and secret key for it to execute?

bmino commented 4 years ago

@revinco definitely, you can run the bot without API keys and it will just monitor. To execute positions you need to provide:

KEYS.API KEYS.SECRET Set TRADING.ENABLED to true

d4op commented 4 years ago

did someone got positiv profit here ? for me nvm which settings I try, even fee 0% I only get negativ profits.

bmino commented 4 years ago

Yeah I see positive profits displayed in the HUD. Not all the time because it's not than common of an occurrence. The example displayed in the readme shows such an occasion too.

To increase your chances to see these, you can decrease CALCULATION_COOLDOWN which will mean more calculation cycles happen per second and therefore more updates to the HUD per second. If a position with positive profit exists for a brief couple ms, you are more likely to be doing a computation at the same time