BitBotFactory / MikaLendingBot

Automated lending on Cryptocurrency exchanges Poloniex and Bitfinex
http://poloniexlendingbot.readthedocs.io/en/latest/index.html
MIT License
1.11k stars 344 forks source link

Bitfinex max daily lend rate #538

Closed chriscrutt closed 7 years ago

chriscrutt commented 7 years ago

I had previously said in an issue that Bitfinex has no daily lend rate cap. As I explored the bot and put in an arbitrarily large percent as the max daily lend rate (like 10000000) the Bitfinex API sent back that their max daily lend rate is 7%.

I know right now we have it set that 5% is the max rate, which is true for Poloniex, but not Bitfinex.

This is what I changed in my modules/Lending.py (seemed to do the trick):

min_daily_rate = Decimal(Config.get("BOT", "mindailyrate", None, 0.003, 7)) / 100
max_daily_rate = Decimal(Config.get("BOT", "maxdailyrate", None, 0.003, 7)) / 100

Would there be a way, like what you did here:

if exchange == 'BITFINEX':
    xdays = str(Config.get("BOT", "xdays", None, 2, 30))
else:
    xdays = str(Config.get("BOT", "xdays", None, 2, 60))

To do this?:

if exchange == 'BITFINEX':
    min_daily_rate = Decimal(Config.get("BOT", "mindailyrate", None, 0.003, 7)) / 100
else:
    min_daily_rate = Decimal(Config.get("BOT", "mindailyrate", None, 0.003, 5)) / 100

if exchange == 'BITFINEX':
    max_daily_rate = Decimal(Config.get("BOT", "maxdailyrate", None, 0.003, 7)) / 100    
else:
    max_daily_rate = Decimal(Config.get("BOT", "maxdailyrate", None, 0.003, 5)) / 100

The funny part is, is when I check the Bitfinex margin funding book I see there are rates over 1000% daily. My funding period ends in a day and I will attempt to lend for an arbitrarily large rate through the Bitfinex GUI. Tell ya then!

laxdog commented 7 years ago

If it turns out it can be whatever you want, then yea. Raise a PR.

It probably does need a cap on it, why did you choose 7?

chriscrutt commented 7 years ago

maybe there was something hidden in the coding I didn't see, but it told me that 7 was the max according to the Bitfinex API, here let me try to replicate what I did.... I'll see if I can show you.

(just realized that my lending period is up in 24 more hours so we'll have to wait until then)

chriscrutt commented 7 years ago
screen shot 2017-09-27 at 12 14 04 am screen shot 2017-09-27 at 12 14 04 am

sorry I guess 7% is the max for Bitfinex

chriscrutt commented 7 years ago

PR #547