Upload backend/services/futures_market_connector.py with huggingface_hub
Browse files162 unmodified lines163164165166167168169170171172173174162 unmodified linesbase = normalize_base(symbol)gran = KUCOIN_GRANULARITY.get(interval, 60)safe_limit = max(10, min(limit, 500))now = int(time.time())start = now - safe_limit * gran * 60body = await _get_json(f"{KUCOIN_FUTURES_BASE}/api/v1/kline/query",params={"symbol": contract, "granularity": gran, "from": start, "to": now},)if body.get("code") != "200000":raise RuntimeError(f"KuCoin futures kline error: {body.get('msg') or body.get('code')}")162 unmodified lines163164165166167168169170171172173174162 unmodified linesbase = normalize_base(symbol)gran = KUCOIN_GRANULARITY.get(interval, 60)safe_limit = max(10, min(limit, 500))now_ms = int(time.time() * 1000)start_ms = now_ms - safe_limit * gran * 60 * 1000body = await _get_json(f"{KUCOIN_FUTURES_BASE}/api/v1/kline/query",params={"symbol": contract, "granularity": gran, "from": start_ms, "to": now_ms},)if body.get("code") != "200000":raise RuntimeError(f"KuCoin futures kline error: {body.get('msg') or body.get('code')}")
backend/services/futures_market_connector.py+3-3