MikaLendingBot: SSL: CERTIFICATE_VERIFY_FAILED
Hello,
I must be overlooking something obvious !
I used notepad++ to edit default.cfg
I copy pasted apikey and secret from Poloniex, I get the following messages:
Thanks
cmd output —
Obtaining settings from config file.
Welcome to Poloniex Lending Bot
2016-08-01 17:04:14 ERROR: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>
Traceback (most recent call last):
File "R:\poloniexlendingbot-master\lendingbot.py", line 460, in <module>
refreshTotalLended()
File "R:\poloniexlendingbot-master\lendingbot.py", line 223, in refreshTotalLended
cryptoLended = bot.returnActiveLoans()
File "R:\poloniexlendingbot-master\poloniex.py", line 101, in returnActiveLoans
return self.api_query('returnActiveLoans')
File "R:\poloniexlendingbot-master\poloniex.py", line 58, in api_query
ret = urllib2.urlopen(urllib2.Request('https://poloniex.com/tradingApi', post_data, headers))
File "C:\Program\Python27\lib\urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "C:\Program\Python27\lib\urllib2.py", line 431, in open
response = self._open(req, data)
File "C:\Program\Python27\lib\urllib2.py", line 449, in _open
'_open', req)
File "C:\Program\Python27\lib\urllib2.py", line 409, in _call_chain
result = func(_args)
File "C:\Program\Python27\lib\urllib2.py", line 1240, in https_open
context=self._context)
File "C:\Program\Python27\lib\urllib2.py", line 1197, in do_open
raise URLError(err)
URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>
2016-08-01 17:05:14 ERROR: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>
Traceback (most recent call last):
File "R:\poloniexlendingbot-master\lendingbot.py", line 460, in <module>
refreshTotalLended()
File "R:\poloniexlendingbot-master\lendingbot.py", line 223, in refreshTotalLended
cryptoLended = bot.returnActiveLoans()
File "R:\poloniexlendingbot-master\poloniex.py", line 101, in returnActiveLoans
return self.api_query('returnActiveLoans')
File "R:\poloniexlendingbot-master\poloniex.py", line 58, in api_query
ret = urllib2.urlopen(urllib2.Request('https://poloniex.com/tradingApi', post_data, headers))
File "C:\Program\Python27\lib\urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "C:\Program\Python27\lib\urllib2.py", line 431, in open
response = self._open(req, data)
File "C:\Program\Python27\lib\urllib2.py", line 449, in _open
'_open', req)
File "C:\Program\Python27\lib\urllib2.py", line 409, in _call_chain
result = func(_args)
File "C:\Program\Python27\lib\urllib2.py", line 1240, in https_open
context=self._context)
File "C:\Program\Python27\lib\urllib2.py", line 1197, in do_open
raise URLError(err)
URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>
2016-08-01 17:06:14 ERROR: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>
Traceback (most recent call last):
File "R:\poloniexlendingbot-master\lendingbot.py", line 460, in <module>
refreshTotalLended()
File "R:\poloniexlendingbot-master\lendingbot.py", line 223, in refreshTotalLended
cryptoLended = bot.returnActiveLoans()
File "R:\poloniexlendingbot-master\poloniex.py", line 101, in returnActiveLoans
return self.api_query('returnActiveLoans')
File "R:\poloniexlendingbot-master\poloniex.py", line 58, in api_query
ret = urllib2.urlopen(urllib2.Request('https://poloniex.com/tradingApi', post_data, headers))
File "C:\Program\Python27\lib\urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "C:\Program\Python27\lib\urllib2.py", line 431, in open
response = self._open(req, data)
File "C:\Program\Python27\lib\urllib2.py", line 449, in _open
'_open', req)
File "C:\Program\Python27\lib\urllib2.py", line 409, in _call_chain
result = func(*args)
File "C:\Program\Python27\lib\urllib2.py", line 1240, in https_open
context=self._context)
File "C:\Program\Python27\lib\urllib2.py", line 1197, in do_open
raise URLError(err)
URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>
2016-08-01 17:07:04 bye
[API]
apikey = myapikey
secret = thesecret
[BOT]
# sleep between active iterations, time in seconds (1-3600)
sleeptimeactive = 60
# sleep between inactive iterations, time in seconds (1-3600)
# set to same as sleeptimeactive to disable
sleeptimeinactive = 300
# minimum daily lend rate in percent (0.00003-0.05)
mindailyrate = 0.04
# max rate. 2% is good choice because it's default at margin trader interface.
#5% is max to be accepted by the exchange (0.00003-0.05)
maxdailyrate = 2
# The number of offers to split the available balance across the [gaptop, gapbottom] range. (1-20)
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 = 200
# 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 (0.00003-0.05)
sixtydaythreshold = 0.2
# Minimum loan size the minimum size of offers to make, bigger values prevent the bot from loaning small available amounts but reduce loans fragmentation
minloansize = 0.001
# AutoRenew - if set to 1 the bot will set the AutoRenew flag for the loans when you stop it (Ctrl+C) and clear the AutoRenew flag when on started
autorenew = 0
# custom config per coin, useful when closing positions etc.
# syntax: ["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","CLAM:0.6:1"]
# 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 = www/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
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 18 (1 by maintainers)
Hi, I know it’s out-dated issue. I have same problem and here’s how i fix it.
python 2.7.14 window server 2016
poloniex use globalsign for ssl certificate. so I copy and paste globalsign’s root certificate into python’s cacert.pem file.
here’s link for globalsign
and here’s python script to check where your cacert.pem file is.
from requests.utils import DEFAULT_CA_BUNDLE_PATH; print(DEFAULT_CA_BUNDLE_PATH)
@Evanito I would not add this, bypassing ssl certificate should only be done by someone understanding the risks. The ssl fail is a local configuration issue, not a Bot issue -> no code change.