[update] 币安数据下载流量控制
This commit is contained in:
parent
ab8b9bef24
commit
37ae0134b0
@ -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=""):
|
||||
|
Loading…
Reference in New Issue
Block a user