Giter VIP home page Giter VIP logo

bitbotfactory / mikalendingbot Goto Github PK

View Code? Open in Web Editor NEW
1.1K 122.0 345.0 727 KB

Automated lending on Cryptocurrency exchanges Poloniex and Bitfinex

Home Page: http://poloniexlendingbot.readthedocs.io/en/latest/index.html

License: MIT License

Python 80.49% HTML 8.41% JavaScript 10.59% Shell 0.20% Dockerfile 0.31%
poloniex bot bitcoin lending poloniex-lending-bot bitfinex lending-strategies

mikalendingbot's People

Contributors

alexeremeenkov avatar bgits avatar cfatduck avatar chriscrutt avatar ckcollab avatar evanito avatar gitter-badger avatar grenade avatar jzfgo avatar kryogenic avatar laxdog avatar m-igashi avatar mahiso avatar mauricioparedes avatar mchl18 avatar mikadily avatar orteko avatar oviniciusfeitosa avatar pedrofaraco avatar prfiredragon avatar racydex avatar rnevet avatar robvanuden avatar samdoidge avatar tisdall avatar tom111 avatar turcane avatar utdrmac avatar vansonlin avatar yura-pakhuchiy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mikalendingbot's Issues

What is gapbottom / gaptop

I don't understand what the depth of lendbook (in percent of lendable balance) means. I have gapbottom set to 20, gaptop to 200. And the bot is placing strange offers like:

2016-04-04 10:00:39 Placing 0.00180554 ETH at 0.0275% for 2 days... Loan order placed.
2016-04-04 10:00:39 Placing 0.00180554 ETH at 0.0276% for 2 days... Loan order placed.
2016-04-04 10:00:39 Placing 0.00541664 ETH at 0.0277% for 2 days... Loan order placed.

I think it would be better to spread the offers more.

Error in module cancelAndLoanAll

Actually I get the following errors:

Traceback (most recent call last): File "C:\poloniexlendingbot-master\lendingbot.py", line 459, in <module> cancelAndLoanAll() 
File "C:\poloniexlendingbot-master\lendingbot.py", line 319, in cancelAndLoanAll loans = bot.returnLoanOrders(activeCur, loanOrdersRequestLimit[activeCur] ) 
File "C:\poloniexlendingbot-master\poloniex.py", line 161, in returnLoanOrders return self.api_queryereturnLoanOrders'Xcurrency":currency,
File "C:\poloniexlendingbot-master\poloniex.py", line 45, in api_query ret = urllib2.urlopen(urllib2.Request(reqUr1)) 
File "C:\Python27\lib\urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) 
File "C:\Python27\lib\urllib2.py", line 437, in open response = meth(req, response) 
File "C:\Python27\lib\urllib2.py", line 550, in http_response 'http', request, response, code, msg, hdrs) 
File "C:\Python27\lib\urllib2.py", line 475, in error return self._call_chain(*args) 
File "C:\Python27\lib\urllib2.py", line 409, in _call_chain result = func(*args) 
File "C:\Python27\lib\urllib2.py", line 558, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) 
HTTPError: HTTP Error 521: Origin Down 

And i'm not sure if I should worry about or what have I config wrong.

Change default action when maxactive amount =0

When individual coins are specified and maxactive amount=0 and there is already an open loan for that coin, the bot removes the loan. It would be best to ignore that coin in all respects if maxactive=0. In other words, please don't remove open loans for coins where maxactive=0

autorenew crashes

2016-03-04 18:39:36 Clearing AutoRenew...(Please Wait)
Processing AutoRenew - 223 of 1815 loansTraceback (most recent call last):
File "lendingbot.py", line 237, in
setAutoRenew(0);
File "lendingbot.py", line 227, in setAutoRenew
bot.toggleAutoRenew(int(item["id"]))
File "/Users/leotreasure/poloniex/poloniexlendingbot/poloniex.py", line 160, in toggleAutoRenew
return self.api_query('toggleAutoRenew',{"orderNumber":orderNumber})
File "/Users/leotreasure/poloniex/poloniexlendingbot/poloniex.py", line 53, in api_query
ret = urllib2.urlopen(urllib2.Request('https://poloniex.com/tradingApi', post_data, headers))
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1240, in https_open
context=self._context)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1197, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error EOF occurred in violation of protocol (_ssl.c:590)>

Summary output truncated.

Sorry, I don't know where else to ask questions.

I have multiple altcoins that the lending bot is controlling. I really like the output where it summarizes the coins lended. However, it truncates the output and looks like this

Lended: [0.726 BTC @ 0.1067%] [34.605 DASH @ 0.1724%] [45007.238 DOGE @ 0.0099%] [1.000 ETH @ 0....

I would love to see all the coins lent out. This gives me a great summary to figure out my progress without having to manually add all the coins or stop lending just so I can get a count of current coins.
Is there an easy way to do that now?

Error "Provided"

I keep getting the following error with auto-renew on:

2016-03-20 19:05:53 Welcome to Poloniex Lending Bot
2016-03-20 19:05:53 Clearing AutoRenew...(Please Wait)
Traceback (most recent call last):
File "lendingbot.py", line 246, in
setAutoRenew(0);
File "lendingbot.py", line 223, in setAutoRenew
loansCount = len(cryptoLended["provided"])
KeyError: 'provided'

If I set autorenew to 0, I instead get this error in the log:

2016-03-20 19:08:24 Welcome to Poloniex Lending Bot
2016-03-20 19:08:24 ERROR: 'provided'
2016-03-20 19:08:54 ERROR: 'provided'
2016-03-20 19:09:24 ERROR: 'provided'
2016-03-20 19:09:54 ERROR: 'provided'

[Q] Is this a long term support project?

Hello there,

Some questions in mind about this repository and I am hoping @Mikadily is able to answer them for me.

Current Questions:

  • Is this still maintained?
  • Is there a plan for over time?
  • Any features/thoughts that might be implemented?

Next to it I gave this peace of software a good test run and I am really liking it so far Hopefully this project will be maintained and yes I am able to give feedback and beta test if needed/desired. Most of these projects get abandoned pretty quick which is quite saddening/annoying for most of the time.

And yes I am willing to support this project with some of the profits over time.

Yours Faithfully,
RDash

Bot is not working sometimes

From time to time I have the following effect with the bot:

  • I start the bot
  • the bot does his job like expect: cancels orders and places new ones.
  • the bot goes on running, but is not carrying out any action. No output, no error is showing up.
  • Having a look at poloniex lending area, I can see the the BTC Lending Balances is growing up slowly, which means that the bot
    as a matter of fact is not placing any offers.

I tested the bot under windows 7 on a private computer and under debian unix on a virutal server. Both installations shows the same effect from time to time.

Below you can see my config. There are still some DASH and STR loans open. With coinconfig = ["BTC:0.03:1","DASH:0.0:0","STR:0.0:0"] the bot should at least log "maxactive amount for ' + activeCur + ' set to 0, won't lend.'" every minute, but it doesn't

Kind Regards from Germany
Andreas


[BOT]
#sleep between iterations, time in seconds
sleeptime = 60
#minimum daily lend rate in percent
mindailyrate = 0.055
#max rate. 2% is good choice because it's default at margin trader interface. 5% is max to be accepted by the exchange
maxdailyrate = 2
#The number of offers to split the available balance uniformly across the [gaptop, gapbottom] range.
spreadlend = 3
#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 = 15
gaptop = 100
#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.06
#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.03:1","DASH:0.0:0","STR:0.0:0"]
#this option creates a json log file instead of console output which includes the most recent status
#uncomment both jsonfile and jsonlogsize to enable
#jsonfile = botlog.json
#limits the amount of log lines to save
#jsonlogsize = 200
#enables a webserver for the www folder, in order to easily use the lendingbot.html with the json log
#startWebServer = true

[Suggestion] "Inactive" mode

I am planning on having multiple scripts running on a single machine.

In order to do this, I need to have each script check every 60 seconds to see if it can submit a lend order, causing a lot of overhead (probably actually not that much individually, but on a large scale it is likely to cause significant usage.)

I propose a feature that adds an "inactive" mode where, when the script sees that you have no coins ready to lend, increases the time delay between updates. Make this delay configurable and have it change back to the normal delay (60 seconds by default) once it detects that you are ready to loan again, and it will work seamlessly with less resource usage.

Unkown error

Today poloniex is under heavy loads, so errors occur and the script exits with "unknown error".

  • ERROR: HTTP Error 502: Bad Gateway
  • ERROR: HTTP Error 504: Gateway Time-out
  • unknown error

Can you catch the error, so the script would not exit?

BTC Estimated Earnings not updating

Running on a Linux VPS with webserver active.

Only get an initial snapshot of estimated earnings when starting the bot. Status 'Lended' updates fine but everything below that is static. Reversed ordered Log updates fine. Only lending BTC.

SyntaxError: Missing parentheses in call to 'print'

Hello,

I'm running Python 3.4.3 with your script but for some reason it returns a syntax error. I follow the instruction for downloading and running the script (Ubuntu). What could be the reason ?

Thank you,

vivx@vivx-SATELLITE-C670-11X:~/Python/poloniex/poloniexlendingbot$ python lendingbot.py
  File "lendingbot.py", line 55
    print 'Edit default.cfg file with your api key and secret values'
                                                                    ^
SyntaxError: Missing parentheses in call to 'print'

Feature Request - Only Loan out if current rate is better than existing

Hi,

Really enjoy using the bot. The one issue i have is whether to keep the auto renew on or off.

Say the best loan rate is currently 0.1% and i have the following loans -

1 BTC - 0.2%
2 BTC - 0.05%

I want to keep the 0.2% with auto-renew on and remove auto renew on the 0.05% loan so i can get it loaned out at a better rate.

Is this possible?

Thanks!

R

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.

lending-rate-error

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"]

Disable a coin

hi.

I have btc and eth in lending. I want to stop lending btc but if I remove from the custom list, it continue to lend with default setting. how can I disable a coin without disturbing operation for 2 days?

Feature Request: xx_daythreshold

I find it useful, when there is more then only one treshold as for 60 days.
15, 30, 60 days would be fine.
Maybe, to be more flexible, you could use somethink like
daytreshold[15] = x
daytreshold[30] = y
daytreshold[60] = z
daytreshold[...] = ...
so any treshold can be used.

ERROR: 'provided'

I don't know what happened, it says Welcome to Poloniex Lending Bot then the next line it says ERROR: 'provided'

What is Effective Interest Rate?

What is difference between Effective Interest Rate and Average Loan Interest Rate? In case everything all is lend effective rate is always lower than average. Can I get formulas how they are calculated?

[Suggestion] Don't cancel loans that can't be replaced

Sometimes, loans get partially filled and leave something like .0009 leftover, then the bot comes and cancels it.

Since the balance isn't over .001, the bot can't replace the loan, wasting time and money.

Solution: Don't cancel loans under .001

Default config

Hi.

I have lot of problem with the script. first the float/decimal comparaison.
second, it always try to lend at 1.99% when the current market is 0.18%

my config is :

sleep between iterations, time in seconds

sleeptime = 300

minimum daily lend rate in percent

mindailyrate = 0.4

max rate. 2% is good choice because it's default at margin trader interface. 5% is max to be accepted by the exchange

maxdailyrate = 2

The number of offers to split the available balance uniformly across the [gaptop, gapbottom] range.

spreadlend = 3

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 = 100

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

[Suggestion] Include unlended coins in real "Average Lending Rate"

Is it possible to have the "Average Lending Rate" calculation updated to show the real average?
Currently the average is only taking into consideration the active loans, and the funds waiting in open loan offers are excluded from the equation.

The correct way to calculate the average lending rate would be considering the total amount of coins available for lending (including those in the open loan offers).
Example: if one loan is active for 1 BTC at 0.1%, and 9 BTC waiting in open loan offers, currently the bot shows the average is 0.1%, when in fact the effective/real average is 0.01%.

python 3 error

Does not work on python3.
Need some fixes print is now print("something")
also other stuff like:

File "lendingbot.py", line 151
print loanOffers.get('error')
^
SyntaxError: invalid syntax

[Suggestion] Add argument to use custom cfg file

I would like to run multiple accounts using only one downloaded set of code, right now I need to copy lendingbot.py and change the cfg file manually.

How about an argument to allow the use of multiple cfg files?

EDIT: Along with this functionality, I am implementing the ability to run the script without a config file at all through arguments.

Maximum call rate

Hi,

Poloniex is limited to 180 calls per minute. Are there any other calls to Poloniex placed (not counting cancelling calls) like checking other peoples' loan rates?

Max loan value is used frequently when splitting up offers

Hi,

First of all, I would like to thank you for the project. I've been using it for a while and it works great!

There's an issue I've started encountering in the past month or two.

It looks like this:
2016-05-07 11:58:42 Placing 0.09630356 BTC at 1.9999% for 60 days... Loan order placed.
2016-05-07 11:58:41 Placing 0.09630357 BTC at 0.0378% for 2 days... Loan order placed.
2016-05-07 11:58:40 Placing 0.09630357 BTC at 0.037% for 2 days... Loan order placed.
2016-05-07 11:58:38 Canceling all BTC orders... Loan offer canceled.
2016-05-07 11:58:36 Canceling all BTC orders... Loan offer canceled.
2016-05-07 11:58:36 Canceling all BTC orders... Loan offer canceled.
2016-05-07 11:57:38 Placing 0.07337413 BTC at 0.0405% for 2 days... Loan order placed.
2016-05-07 11:57:37 Placing 0.07337414 BTC at 0.0379% for 2 days... Loan order placed.
2016-05-07 11:57:36 Placing 0.07337414 BTC at 0.0372% for 2 days... Loan order placed.

The offers are split into three parts, but the last one is using the max value for no apparent reason.
As you can see it is not constant, but it happens frequently.

Did anyone observe a similar behavior?

Feature Request: Enddate for lending

Hi, can you please implement a enddate for lending?
The bot should automatic decrease the lendingtime till the specific date is reached ( - 2 days min lending time)
So, for example, I can have on 01.05.2016 all coins available.

thx

Error

Error: 'provided
error
'

Program crash unable to start

When value of mindailyrate is change to 0.001 as doge rate is too LOW now please fix my half a million doge sitting idle

Feature Request - Leave coins in 'My Balance' if min lend rate not reached

Rather than have our coins siting in the lending ledger at the max rate, leave them in 'My Balance' section. This would deflate the ledger, and lower the server hit on poloniex adding and removing coins ever XX seconds. Deflating the lending ledger could entice margin traders to borrow at higher rates instead of waiting for everything to continue getting lower and lower.

At the moment I have coins being added and removed every 60 seconds at .19%

Instead the lendingbot could wait until a users minimum lending rate is reached and then the coins would be added to the lending ledger. A % threshold could be added to catch an uptrend.

10% threshold example at 0.1% min lend rate:

when lending rate reaches 0.09% lending bot will start adding coins to be lent out at .1% and up.

Show estimated earning rates on html page

I tried submitting a pull request for this but couldn't get the github commandline client working. Anyway, you can view my implementation here: http://fornax96.me/lendingbot.html. Feel free to use. It currently only shows BTC rates, but I guess you could add a loop to support others too.

I also modified the lendingbot.py script to show one more decimal so it's more accurate.

cancel auto-renew loans

Hi, great bot!
If it possible to cancel auto loans using your bot, if not, how hard is it to modify it?

feature request minRate no lending

"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."

Will you implement that feature. Not lending if is lower than minRate...

instant canceling order

hi, thanks for your works since today lendingbot spam new and instant cancel order, can you tell me why he did this?

default.cfg:

[BOT]

sleep between

iterations, time in seconds

sleeptime = 60

minimum daily lend rate in percent

mindailyrate = 0.1

max rate. 2% is good choice because it's default at margin trader interface. 5% is max to be accepted by the exchange

maxdailyrate = 1

The number of offers to split the available balance uniformly across the [gaptop, gapbottom] range.

spreadlend = 3

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 = 10
gaptop = 100

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

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.18:1","ETH:0.03:5"]

2016-03-14 15:36:47 Canceling all ETH orders... Loan offer canceled.
2016-03-14 15:36:49 Placing 100.00171818 ETH at 0.9999% for 2 days... Loan order placed.
2016-03-14 15:37:50 Canceling all ETH orders... Loan offer canceled.
2016-03-14 15:37:51 Placing 100.00171818 ETH at 0.9999% for 2 days... Loan order placed.
2016-03-14 15:38:53 Canceling all ETH orders... Loan offer canceled.
2016-03-14 15:38:55 Placing 100.00171818 ETH at 0.9999% for 2 days... Loan order placed.
2016-03-14 15:39:56 Canceling all ETH orders... Loan offer canceled.
2016-03-14 15:39:57 Placing 100.00171818 ETH at 0.9999% for 2 days... Loan order placed.
2016-03-14 15:40:58 Canceling all ETH orders... Loan offer canceled.
2016-03-14 15:41:00 Placing 100.00171818 ETH at 0.9999% for 2 days... Loan order placed.
2016-03-14 15:42:02 Canceling all ETH orders... Loan offer canceled.
2016-03-14 15:42:03 Placing 100.00171818 ETH at 0.9999% for 2 days... Loan order placed.
2016-03-14 15:43:05 Canceling all ETH orders... Loan offer canceled.
2016-03-14 15:43:07 Placing 100.00171818 ETH at 0.9999% for 2 days... Loan order placed.
2016-03-14 15:44:08 Canceling all ETH orders... Loan offer canceled.
2016-03-14 15:44:09 Placing 100.00171818 ETH at 0.9999% for 2 days... Loan order placed.
2016-03-14 15:45:11 Canceling all ETH orders... Loan offer canceled.
2016-03-14 15:45:13 Placing 100.00171818 ETH at 0.9999% for 2 days... Loan order placed.
2016-03-14 15:46:14 Canceling all ETH orders... Loan offer canceled.
2016-03-14 15:46:15 Placing 100.00171818 ETH at 0.9999% for 2 days... Loan order placed.
2016-03-14 15:47:17 Canceling all ETH orders... Loan offer canceled.
2016-03-14 15:47:18 Placing 100.00171818 ETH at 0.9999% for 2 days... Loan order placed.
2016-03-14 15:48:20 Canceling all ETH orders... Loan offer canceled.
2016-03-14 15:48:22 Placing 100.00171818 ETH at 0.9999% for 2 days... Loan order placed.
2016-03-14 15:49:23 Canceling all ETH orders... Loan offer canceled.
2016-03-14 15:49:25 Placing 100.00171818 ETH at 0.9999% for 2 days... Loan order placed.
2016-03-14 15:50:26 Canceling all ETH orders... Loan offer canceled.
2016-03-14 15:50:28 Placing 100.00171818 ETH at 0.9999% for 2 days... Loan order placed.

API request fails with ERROR: 'provided'

Hey guys,

I am using ubuntu 14.04.
Anyone would know how to help me with this error? It just keeps repeating the same message over and over since some days already. Before that is was working nicely.

luli@luli:~/poloniexlendingbot$ python lendingbot.py
Obtaining settings from config file.
Welcome to Poloniex Lending Bot
2016-06-07 23:45:40 ERROR: 'provided'
Traceback (most recent call last):
File "lendingbot.py", line 457, in
refreshTotalLended()
File "lendingbot.py", line 230, in refreshTotalLended
for item in cryptoLended["provided"]:
KeyError: 'provided'

Any ideas will be much appreciated!
Thanks

autorenew takes too long when exiting

Could be due to the huge number of tiny loans that need to renew, but it takes too long so I ctrl-c.

2016-02-19 16:05:39 AutoRenew loans... (Please Wait)
Lended: [xx.xxx BTC]

^CTraceback (most recent call last):
File "lendingbot.py", line 248, in
i = setAutoRenew(1);
File "lendingbot.py", line 214, in setAutoRenew
bot.toggleAutoRenew(int(item["id"]))
File "/Users/leotreasure/poloniex/poloniexlendingbot/poloniex.py", line 160, in toggleAutoRenew
return self.api_query('toggleAutoRenew',{"orderNumber":orderNumber})
File "/Users/leotreasure/poloniex/poloniexlendingbot/poloniex.py", line 53, in api_query
ret = urllib2.urlopen(urllib2.Request('https://poloniex.com/tradingApi', post_data, headers))
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1240, in https_open
context=self._context)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1194, in do_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1057, in request
self._send_request(method, url, body, headers)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1097, in _send_request
self.endheaders(body)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1053, in endheaders
self._send_output(message_body)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 897, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 859, in send
self.connect()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1278, in connect
server_hostname=server_hostname)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 352, in wrap_socket
_context=self)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 579, in init
self.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 808, in do_handshake
self._sslobj.do_handshake()
KeyboardInterrupt

mindailyrate not respected

It seems that in some corner cases (I have just observed it the first time after running for a few days) the mindailyrate is not respected. Is this known?

2016-02-16 11:32:55 Using custom mindailyrate 0.04500% for ETH
2016-02-16 11:32:56 Placing 0.48084665 ETH at 0.04491% for 2 days... Loan order placed.
2016-02-16 11:32:57 [...]
2016-02-16 11:34:00 Canceling all ETH orders... Loan offer canceled.
2016-02-16 11:34:01 Canceling all DOGE orders... Loan offer canceled.
2016-02-16 11:35:05 Using custom mindailyrate 0.04500% for ETH
2016-02-16 11:35:05 Placing 0.48084665 ETH at 0.04491% for 2 days... Loan order placed.

Feature Request downtime clock

Adding a downtime clock to show how long your coins have not been lent out. DD:HH:MM:SS

Other exchanges may have better rates when Poloniex lending rates are below a certain percentage. By comparing the downtime we can calculate which exchange to keep our coins on.

[Suggestion] Show BTC/hr on altcoins

Basically, now that we have <altcoin> per day shown in the html file, we should go to Poloniex, get current exchange rate for the altcoin, and show how much BTC per hour/day we are getting.

We may be able to do this by:

  • Getting ticker rates from poloniex.py, passing them to botlog.json, and then reading them in the .html
  • Find a way (using WAMP APIs) to read ticker data straight from the poloniex API server (not probable)
  • AngularJS in the html file?

ERROR: 'provided'

The bot was working fine for me, but I just started reciveing the following error during updates:
ERROR: 'provided'

I did a fresh install of Ubuntu 14.04 and still had the same issue. Did the API get updated? or could it be an update within Ubuntu?

Also, is there any more info I can provide?

RESOLVED: I tracked it down to issues with my API keys. I believe there is security mechanisms in place with the APIs that detect changes in IPs, etc. I got a new key for each system and it works fine.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.