Type/to search
0
Follow
1
Followers
requests.get(url, params=params) Problem
Help
Created 2023-04-28 09:06:19  
 3
 1176

#url = "https://fapi.binance.com/fapi/v1/klines"
#get Daten über die k-Linien-Kontrakte
url = "https://fapi.binance.com/fapi/v3/klines"
#get erhält K-Line-Daten
params = {
"symbol": Symbol,
"interval": str(timeperiod) + "m",
"limit": 1000
} #ema_timeperiod_2 * 2
response = requests.get(url, params=params)
data = response.json()

Die Ausführung von V1 erhielt die Vertragsdaten ohne Probleme, die Ausführung von V3 erhielt die Echtzeitdaten fehl, der gleiche Code, der in VScode ohne Probleme ausgeführt wurde, erhielt die V3-Daten.
Fehlermeldung Traceback (most recent call last): Datei "<string>", line 1249, in init_ctx File "<string>", line 367, in <module> File "<string>", line 345, in listen_agg_trade requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Ich habe keine Ahnung, was ich tun soll.

Related Recommendations
Comment
All comments (3)

    明白了 多个f。。。。。。。。。。

    3 years ago

    是的梦总,我的意思是 用/api/v3/klines 就是url = "https://fapi.binance.com/fapi/v3/klines" 这个url 取现货数据的时候出错。我是两个get 一个取现货一个取期货

    3 years ago

    币安期货fapi里面都没有/fapi/v3/klines这个接口。
    现货里面才有v3/klines这个接口。

    3 years ago
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)