Lending rate error
Bot keeps on lending my ETH at 4.99%, but the gap top and gap bottom is set from 1% to 30% Lending btc works - ok. I hope this can be easily solved.

I have the following config active:
[BOT]
#sleep between iterations, time in seconds
sleeptime = 10
#minimum daily lend rate in percent
mindailyrate = 0.05
#max rate. 2% is good choice because it's default at margin trader interface. 5% is max to be accepted by the exchange
maxdailyrate = 5
#The number of offers to split the available balance uniformly across the [gaptop, gapbottom] range.
spreadlend = 10
#The depth of lendbook (in percent of lendable balance) to move through before placing the first (gapbottom) and last (gaptop) offer.
#if gapbottom is set to 0, the first offer will be at the lowest possible rate. However some low value is recommended (say 10%) to skip dust offers
gapbottom = 1
gaptop = 30
#Daily lend rate threshold after which we offer lends for 60 days as opposed to 2. If set to 0 all offers will be placed for a 2 day period
sixtydaythreshold = 0.5
# AutoRenew - if set to 1 the bot will toggle the AutoRenew flag for the loans when you stop it (Ctrl+C) and clear the AutoRenew flag when started
autorenew = 0
#custom config per coin, useful when closing positions etc.
#syntax: [COIN:mindailyrate:maxactiveamount, ... COIN:mindailyrate:maxactiveamount]
#if maxactive amount is 0 - stop lending this coin. in the future you'll be able to limit amount to be lent.
#coinconfig = ["BTC:0.05:1"]
mindailyrate = 0.05 means you won't lend for less then 0.05% ~ 0.0499% that you are getting for ETH. Use the coinconfig option to create different configs for BTC and ETH.
I understand how to use mindailyrate, the bot offers loans at 4.99%, which is not normal - check the screenshot and my configuration. And it should also split the total amount of my ETH ~126 to 10 loans, but it offers only one.
Sorry about that, didn't notice the open loan... that is weird. Confirmed on my account as well.
This is still the result of the calculated loan rate being lower then the minDailyRate, the fallback is to create loans with maxDailyRate which is 5% (maybe it shouldn't). To solve this you have two options:
- reduce minDailyRate.
- use the "coinconfig", just uncomment and add the ETH config: coinconfig = ["BTC:0.09:5","ETH:0.03:5"]
According to my configuration it should place loans from 0.05% to 5% i do not see why it should start with the full amount at 4.99%
In case the going rates are lower than minRate I agree that it shouldn't loan at all, right now the behavior is to create a loan at maxRate.
The order book is out of bounds of your minlendingrate. I assume at the time of writing the range you could see the order book was something 0.0367-0.4555%, therefore bot assumes there's nothing to compete against, and go straight to the max. It will correct it self once it can see more orders. It's the correct behavior, it's the way I intended it to be. And I know it confuses many people. Maybe a warning message in the logs would help.
Oh. Now I noticed, on the Poloniex website you can 'Load more' Loans. Before you couldn't. The bot only sees top-20 (or something) lowest loans. Will see how we can improve it.
It's not in the API for returnLoanOrders, but the website is using a limit parameter to limit the amount of records. https://poloniex.com/public?command=returnLoanOrders¤cy=ETH&limit=5 will return only 5. So using a high number 99999 will return all of them.
On the other side it will make the bot work slower? ;)
@Mikadily, API call returnLoanOrders accepts parameter limit (which is not documented).
Setting the limitto a high value (e.g. 1000), will give you the entire lend-book.
@rnevet personally I'm happy with how it is at the moment. Maybe it could be a config option - select your limit. And a warning when it happens, to inform the confused user.
@dutu thanks. It's new to me.
@Mikadily I'm also content with they way it's working. I'm not sure in what improvement would come from increasing the amount of offers retrieved from the server. Spreading offers in higher rates? For me it would be a disadvantage as I'm running it on my Android phone and this will increase my data usage.
I would consider that if the offers are lower than minDailyRate the new offer created would be at minDailyRate and not at maxDailyRate? just a thought. So for example in this case the offer created would be at 0.05%.
@rreceptai What did you actually expect?
@rnevet
I would consider that if the offers are lower than minDailyRate the new offer created would be at minDailyRate and not at maxDailyRate? just a thought. So for example in this case the offer created would be at 0.05%. Maybe only offer a 1/3 of the available amount.
No. Imagine a legitimate loan book: 0.01% 0.02% 0.03%
Just 3 loan offers on the book and my mindailyrate at 0.05%. I don't want my order set at 0.05%. I want it at max percentage once the other offers are depleted.
I see, it's a different case if the entire book is under the minDailyRate - which explains the logic.
If the book is full but rates are constantly under 0.05% - making a maxDailyRate in this scenario - will just cancel and renew it endlessly - only problem is we don't know the book is full.
Apologies, this should have gone under the other issue, I'm moving it now.
Thank you for explaining, Mikadily and thanks for a great bot.
One more question: So the gapbottom and gaptop is the percentage amount of that snapshot of first loan offers(without loading the whole supply(load more)) right?
The "load more" on the web page works in a different way, The page actually loads all offers using a limit of 99999, initially displays only 50 and the "load more" display +100 more offers.
The bot doesn't supply a limit param - I'm not sure on what base does the server decide how many offers to return.
The gaptop/gapbottom works relative to the snapshot of returned offers from the server.
@Mikadily The default behavior (lending at max rate) is confusing. It makes more sense that if order book contains offers below my min lending offer, then the bot should simply place offers between my min and max offers. Then, there is still a chance they get picked up at that rate if someone comes along and vacuums current offerings. Now, if someone does that, and other bots place new offers again below my min rate I will never place offers at my min bid, and my funds will never be borrowed.
I think most bot users want their funds borrowed, even if that means at their min offer rates.
@pmknutsen the bot's purpose is to maximize the profits. Read my previous comment. The difference between lending rates in that case is massive 0.05% to 2% (or whatever your max) and it actually happened to me. Where as in your example it will be a 0.1-0.2% (rough guess).
But actually what you're asking is fairly easy to implement as a feature. How should I call configuration option?
I think this is a very rare scenario (when the order book is empty), the actual situation with ETH is the orderbook is full but just not seen by the bot completely - otherwise it would set the offer to minDailyRate and not maxDailyRate. Should be solved using the limit parameter - IMO.