From 37ae0134b064da53191f3d6b45d52efa294c5533 Mon Sep 17 00:00:00 2001 From: msincenselee Date: Wed, 11 Aug 2021 09:25:29 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E5=B8=81=E5=AE=89=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=B5=81=E9=87=8F=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnpy/data/binance/binance_future_data.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vnpy/data/binance/binance_future_data.py b/vnpy/data/binance/binance_future_data.py index f37aa7f7..f6c7f8ef 100644 --- a/vnpy/data/binance/binance_future_data.py +++ b/vnpy/data/binance/binance_future_data.py @@ -4,6 +4,7 @@ import os import json from typing import Dict, List, Any from datetime import datetime, timedelta +from time import sleep from vnpy.api.rest.rest_client import RestClient from vnpy.trader.object import ( Interval, @@ -150,6 +151,9 @@ class BinanceFutureData(RestClient): start_dt = end + TIMEDELTA_MAP[req.interval] * req.interval_num start_time = int(datetime.timestamp(start_dt)) + # 等待0.1秒 + sleep(0.1) + return bars def get_fund_rate(self, symbol=""):