cryptoeax / arbbot

Arbitrator, a bitcoin/altcoin arbitrage trading bot
https://gitter.im/cryptoeax-arbbot/Lobby
GNU General Public License v3.0
198 stars 78 forks source link

Rebalance is not occurring #112

Closed claytondukes closed 6 years ago

claytondukes commented 6 years ago

I'm not sure why, but so far, it seems every couple of days, I have to manually re-balance.

My Poloniex funds have gone down all day (about 14 hours now) with .0595 remaining.

chart

I do see this in the logs:

1516312124.289506   cb  30  arbbot  21:48:43: balance(BTC)
1516312126.757738   cb  30  arbbot  21:48:46:  BLEUTRADE: 0.19646984 BTC (0 usages)
1516312126.789472   cb  30  arbbot  21:48:46:   POLONIEX: 0.00555349 BTC (0 usages)
1516312126.789472   cb  30  arbbot  21:48:46:       TOTAL: 0.20202333 BTC
1516312126.789472   cb  30  arbbot  21:48:46:     AVERAGE: 0.10101167 BTC
1516312126.789472   cb  30  arbbot  21:48:46: XFER THRES.: 0.15 BTC
1516312126.789472   cb  30  arbbot  21:48:46: BLEUTRADE diff 0.09545817 BTC below xfer threshold!
1516312126.789472   cb  30  arbbot  21:48:46: POLONIEX diff -0.09545818 BTC below xfer threshold!
1516312126.789472   cb  30  arbbot  21:48:46: No exchange in need or available to give

Perhaps this is some setting I'm just not aware of or maybe a bug?

cryptoeax commented 6 years ago

You need to set btc-xfer-safety-factor to 1.

claytondukes commented 6 years ago

Ok, I think I get it, so where it says XFER THRES.: 0.15 BTC, it's because my config has btc-xfer-safety-factor = 1.5, is that correct?

Thus, when it says POLONIEX diff -0.09545818 BTC below xfer threshold!, the bot says I have not met the 0.15 BTC threshold so it won't balance the two exchanges. Correct?

So, in my config:

; The bot has a safety factor for being more conservative by default about
; transfering BTC versus other assets.  The bot tries to not lose more than
; 1% of an altcoin during transfer, but we are more conservative by a factor
; of btc-xfer-safety-factor.  For example if you adjust this value to 2,
; the bot tries to not lose more than 0.5% of our BTC during transfer, and
; help accumulate profits faster.
btc-xfer-safety-factor = 1.5

You're saying that if I set this to btc-xfer-safety-factor = 1, then it means that the bot will not apply this "additional" safety factoring, meaning it will consider 1% loss as acceptable?

cryptoeax commented 6 years ago

Ok, I think I get it, so where it says XFER THRES.: 0.15 BTC, it's because my config has btc-xfer-safety-factor = 1.5, is that correct?

Thus, when it says POLONIEX diff -0.09545818 BTC below xfer threshold!, the bot says I have not met the 0.15 BTC threshold so it won't balance the two exchanges. Correct?

So, in my config:

; The bot has a safety factor for being more conservative by default about ; transfering BTC versus other assets. The bot tries to not lose more than ; 1% of an altcoin during transfer, but we are more conservative by a factor ; of btc-xfer-safety-factor. For example if you adjust this value to 2, ; the bot tries to not lose more than 0.5% of our BTC during transfer, and ; help accumulate profits faster. btc-xfer-safety-factor = 1.5

You're saying that if I set this to btc-xfer-safety-factor = 1, then it means that the bot will not apply this "additional" safety factoring, meaning it will consider 1% loss as acceptable?

Yes to all of your questions above. :-) This optimization is useful for bots that are running with higher BTC balances where the bot can afford to rebalance BTC less frequently. Bots such as yours can't afford that since they run out of BTC balance.