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