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

#url = "https://fapi.binance.com/fapi/v1/klines"
#get obtiene datos de los contratos de la línea k
url = "https://fapi.binance.com/fapi/v3/klines"
#get obtiene datos de la línea k
params = {
"symbol": Symbol,
"interval": str(timeperiod) + "m",
"limit": 1000
} #ema_timeperiod_2 * 2
response = requests.get(url, params=params)
data = response.json()

Ejecutar V1 para obtener los datos del contrato no tiene problemas, ejecutar V3 para obtener los datos en efectivo es un error, el mismo código, ejecutar en VScode no tiene problemas, puede obtener los datos de V3 ◦
Información errónea Traceback (most recent call last): "File"<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)
No puedo hacerlo, gracias.

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)