pybit
pybit copied to clipboard
connection refused
I'm running your example, and got time out on ssl or refused. And I found that even if I use: import requests h = { "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36", } r = requests.get('https://api-testnet.bybit.com/spot/quote/v1/kline?symbol=ETHUSDT&interval=5m', headers=h)
I still got refused.
while if I use: import urllib.request
req = urllib.request.Request(web, headers=headers_) data = urllib.request.urlopen(req).read().decode("utf-8",'ignore') print(data)
I could get the result. We know that the kline is unauthorized url. So I wonder if requests library is treated as ROBOT ?
Please show the full traceroute including the error.