tiagosiebler / TriangularArbitrage

Detect triangular arbitrage opportunities within Binance price tickers
545 stars 171 forks source link

Is tradeInfo object correct? #52

Open georgezouq opened 6 years ago

georgezouq commented 6 years ago

I check the structure of candidate object's attribute a, b and c. There's a tradeInfo object content side, symbol, quantity.

screen shot 2018-06-30 at 12 37 25 pm

I print it in TradeCore and I find

screen shot 2018-06-30 at 12 25 31 pm

the side sames incorrect, If I trade by this, In the first, I sell bnb buy eth, then buy qlc sell bnb and then sell qlc buy eth, eventually, I use 2 time bnb, get 2 time eth(ignore quantity). I think after arbitrage, all trade done. I use 1 bnb should get maybe 1.1 bnb, that 0.1 bnb is profit. But trade by this, its not balance. Or each arbitrage candidate not alone?

tiagosiebler commented 5 years ago

You're correct, if I remember right I noticed this too in an internal branch of this experiment. Each step is a transaction, if you're going to BNB via BNBETH, you'd be buying BNB using ETH. PRs for enhancements & fixes are most welcome if you wish to work on it.