Requests.get ((url, params=params) is a problem

Author: lzhqlj, Created: 2023-04-28 09:06:19, Updated:

#url = “https://fapi.binance.com/fapi/v1/klinesOh, my God. #get the data of the k-line contract url = What?https://fapi.binance.com/fapi/v3/klinesOh, my God. #get to get the k-line data

params = { “symbol”: Symbol, “interval”: str(timeperiod) + “m”, “limit”: 1000
} #ema_timeperiod_2 * 2 response = requests.get(url, params=params) data = response.json()

Execution of V1 to get contract data is fine, execution of V3 to get spot data is wrong, same code, execution in vscode is fine, get V3 data. Error message Trackback (most recent call last): File , line 1249, ininit_ctxThe following is a list of the most common types of error codes in JSON. I'm sorry, I didn't do it. Thank you very much.


More

lzhqljClearly, there are multiple f's.

lzhqljYeah, I mean, I'm using /api/v3/klines, which is the url = "https://fapi.binance.com/fapi/v3/klines" The url was wrong when I got the spot data.

The Little DreamThere is no /fapi/v3/klines interface in fapi. The only interface available is v3/klines.