RetributionByRevenue / ETH-USD-Bitmex-Trading-Bot-Preconfigured-Python-Environment-

Beginner friendly Bitmex trading bot that exclusively trades ETH/USD. Lots of comments and is structured in a manner that is easy to follow and understand.
20 stars 6 forks source link

SSL error #1

Open venkiiee opened 4 years ago

venkiiee commented 4 years ago

Dear creator,

Here is my bad handshake error:

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.bitmex.com', port=443): Max retries exceeded with url: /app/trade/ETHUSD (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))

How to fix this ? It is caused by bitmex_cli api calls ?

nobelda commented 4 years ago

I have same issue, the issue was caused from making response : response = http.request('GET', 'https://www.bitmex.com/app/trade/ETHUSD')

please help

RetributionByRevenue commented 4 years ago

sorry i didn't see the issue until now. i don't know why i never got any notifications. Anyways, i noticed that the newer versions of anaconda python deprecated and no not install the needed packages within the environment.

i plan on upgrading my code soon, in the mean time here is a solution. without urllib3

import urllib3
from bs4 import BeautifulSoup
import requests
response = requests.get('https://api.kraken.com/0/public/OHLC?pair=ETHUSD&interval=1')
html = response.content
soup = BeautifulSoup(html, "html.parser")
eth_string=str(soup)  
RetributionByRevenue commented 4 years ago

I attempted to answer you problem on the github ticket last month, do you still need help? -- Sent from my Android phone with GMX Mail. Please excuse my brevity.On 2020-05-14, 7:42 AM venkiiee notifications@github.com wrote:

Dear creator, Here is my bad handshake error: urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.bitmex.com', port=443): Max retries exceeded with url: /app/trade/ETHUSD (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])"))) How to fix this ? It is caused by bitmex_cli api calls ?

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe. [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/RetributionByRevenue/ETH-USD-Bitmex-Trading-Bot-Preconfigured-Python-Environment-/issues/1", "url": "https://github.com/RetributionByRevenue/ETH-USD-Bitmex-Trading-Bot-Preconfigured-Python-Environment-/issues/1", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]