[Del] remove query tick history function
This commit is contained in:
parent
9932045b59
commit
e1c824307e
@ -34,6 +34,7 @@ from vnpy.trader.object import (
|
||||
OrderRequest,
|
||||
CancelRequest,
|
||||
SubscribeRequest,
|
||||
HistoryRequest
|
||||
)
|
||||
|
||||
REST_HOST = "https://www.bitmex.com/api/v1"
|
||||
@ -124,6 +125,10 @@ class BitmexGateway(BaseGateway):
|
||||
""""""
|
||||
pass
|
||||
|
||||
def query_history(self, req: HistoryRequest):
|
||||
""""""
|
||||
return self.rest_api.query_history(req)
|
||||
|
||||
def close(self):
|
||||
""""""
|
||||
self.rest_api.stop()
|
||||
@ -279,6 +284,10 @@ class BitmexRestApi(RestClient):
|
||||
on_error=self.on_cancel_order_error,
|
||||
)
|
||||
|
||||
def query_history(self, req: HistoryRequest):
|
||||
""""""
|
||||
pass
|
||||
|
||||
def on_send_order_failed(self, status_code: str, request: Request):
|
||||
"""
|
||||
Callback when sending order failed on server.
|
||||
@ -615,6 +624,7 @@ class BitmexWebsocketApi(WebsocketClient):
|
||||
size=d["lotSize"],
|
||||
stop_supported=True,
|
||||
net_position=True,
|
||||
bar_history=True,
|
||||
gateway_name=self.gateway_name,
|
||||
)
|
||||
|
||||
|
@ -22,7 +22,13 @@ from .event import (
|
||||
EVENT_LOG
|
||||
)
|
||||
from .gateway import BaseGateway
|
||||
from .object import CancelRequest, LogData, OrderRequest, SubscribeRequest
|
||||
from .object import (
|
||||
CancelRequest,
|
||||
LogData,
|
||||
OrderRequest,
|
||||
SubscribeRequest,
|
||||
HistoryRequest
|
||||
)
|
||||
from .setting import SETTINGS
|
||||
from .utility import get_folder_path
|
||||
|
||||
@ -174,6 +180,16 @@ class MainEngine:
|
||||
if gateway:
|
||||
gateway.cancel_order(req)
|
||||
|
||||
def query_history(self, req: HistoryRequest, gateway_name: str):
|
||||
"""
|
||||
Send cancel order request to a specific gateway.
|
||||
"""
|
||||
gateway = self.get_gateway(gateway_name)
|
||||
if gateway:
|
||||
return gateway.query_history(req)
|
||||
else:
|
||||
return None
|
||||
|
||||
def close(self):
|
||||
"""
|
||||
Make sure every gateway and app is closed properly before
|
||||
|
@ -224,18 +224,12 @@ class BaseGateway(ABC):
|
||||
"""
|
||||
pass
|
||||
|
||||
def query_bar_history(self, req: HistoryRequest):
|
||||
def query_history(self, req: HistoryRequest):
|
||||
"""
|
||||
Query bar history data.
|
||||
"""
|
||||
pass
|
||||
|
||||
def query_tick_history(self, req: HistoryRequest):
|
||||
"""
|
||||
Query tick history data.
|
||||
"""
|
||||
pass
|
||||
|
||||
def get_default_setting(self):
|
||||
"""
|
||||
Return default setting dict.
|
||||
|
Loading…
Reference in New Issue
Block a user