###前提・実現したいこと
python3.6でシステムを作っています。
https://github.com/toshima/binance
https://www.binance.com/restapipub.html
上記のライブラリとapiを用いて、binanceという仮想通貨取引所の仮想通貨の売り価格と買い価格を取得したいのですが、出会ったことのないエラーが出てきており大変困惑しています。
どのようにすればエラーが解決できるでしょうか。
ご教授ください。
###エラーコード
C:\Users\hatanaka\AppData\Local\Programs\Python\Python36-32\python.exe C:/ethrum/binanceordertest.py Traceback (most recent call last): File "C:\Users\hatanaka\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 544, in urlopen body=body, headers=headers) File "C:\Users\hatanaka\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 341, in _make_request self._validate_conn(conn) File "C:\Users\hatanaka\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 762, in _validate_conn conn.connect() File "C:\Users\hatanaka\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\packages\urllib3\connection.py", line 238, in connect ssl_version=resolved_ssl_version) File "C:\Users\hatanaka\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\packages\urllib3\util\ssl_.py", line 265, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "C:\Users\hatanaka\AppData\Local\Programs\Python\Python36-32\lib\ssl.py", line 407, in wrap_socket _context=self, _session=session) File "C:\Users\hatanaka\AppData\Local\Programs\Python\Python36-32\lib\ssl.py", line 814, in __init__ self.do_handshake() File "C:\Users\hatanaka\AppData\Local\Programs\Python\Python36-32\lib\ssl.py", line 1068, in do_handshake self._sslobj.do_handshake() File "C:\Users\hatanaka\AppData\Local\Programs\Python\Python36-32\lib\ssl.py", line 689, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\hatanaka\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\adapters.py", line 370, in send timeout=timeout File "C:\Users\hatanaka\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 574, in urlopen raise SSLError(e) requests.packages.urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:/ethrum/binanceordertest.py", line 9, in <module> s1 = binance.tickers() File "C:\ethrum\binance.py", line 45, in tickers data = request("GET", "/api/v1/ticker/allBookTickers") File "C:\ethrum\binance.py", line 230, in request resp = requests.request(method, ENDPOINT + path, params=params) File "C:\Users\hatanaka\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\api.py", line 50, in request response = session.request(method=method, url=url, **kwargs) File "C:\Users\hatanaka\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\sessions.py", line 464, in request resp = self.send(prep, **send_kwargs) File "C:\Users\hatanaka\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\sessions.py", line 576, in send r = adapter.send(request, **kwargs) File "C:\Users\hatanaka\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\adapters.py", line 431, in send raise SSLError(e, request=request) requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777) Process finished with exit code 1
###該当のソースコード
# -*- coding: utf-8 -*- from pprint import pprint # 表示用(jsonをきれいに表示してくれる) import binance if __name__ == '__main__': s1 = binance.tickers() pprint(s1)
###補足情報(言語/FW/ツール等のバージョンなど)
OSはwindows10,PyCharmを使って作っています。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/01/12 11:46
2018/01/23 11:51