#url = “https://fapi.binance.com/fapi/v1/klines”
#get k 라인 계약 데이터
url = “https://fapi.binance.com/fapi/v3/klines”
#get k라인 실시간 데이터
params = {
“symbol”: Symbol,
“interval”: str(timeperiod) + “m”,
“limit”: 1000
} #ema_timeperiod_2 * 2
response = requests.get(url, params=params)
data = response.json()
V1을 실행하면 계약 데이터를 얻을 수 있고, V3을 실행하면 현금 데이터를 얻을 수 있습니다. 같은 코드, vscode에서 실행하면 V3 데이터를 얻을 수 있습니다. 오류 트레이스백 (most recent call last): 파일 “”, line 1249, in init_ctx File “”, line 367, in File “”, line 345, in listen_agg_trade requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0) : : : : :