From fa30e8a99b245e1f0b11d77ccd7e79045abe3d8d Mon Sep 17 00:00:00 2001 From: 1122455801 Date: Thu, 6 Jun 2019 11:49:56 +0800 Subject: [PATCH] Update tiger_gateway.py --- vnpy/gateway/tiger/tiger_gateway.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/vnpy/gateway/tiger/tiger_gateway.py b/vnpy/gateway/tiger/tiger_gateway.py index 3f044607..c7796782 100644 --- a/vnpy/gateway/tiger/tiger_gateway.py +++ b/vnpy/gateway/tiger/tiger_gateway.py @@ -75,17 +75,6 @@ STATUS_TIGER2VT = { OrderStatus.EXPIRED: Status.NOTTRADED } -PUSH_STATUS_TIGER2VT = { - "Invalid": Status.REJECTED, - "Initial": Status.SUBMITTING, - "PendingCancel": Status.CANCELLED, - "Cancelled": Status.CANCELLED, - "Submitted": Status.SUBMITTING, - "PendingSubmit": Status.SUBMITTING, - "Filled": Status.ALLTRADED, - "Inactive": Status.REJECTED -} - class TigerGateway(BaseGateway): """""" @@ -303,7 +292,7 @@ class TigerGateway(BaseGateway): """""" data = dict(data) symbol, exchange = convert_symbol_tiger2vt(data["origin_symbol"]) - status = PUSH_STATUS_TIGER2VT[data["status"]] + status = STATUS_TIGER2VT[data["status"]] order = OrderData( symbol=symbol, @@ -319,6 +308,7 @@ class TigerGateway(BaseGateway): data["order_time"] / 1000).strftime("%H:%M:%S"), gateway_name=self.gateway_name, ) + self.ID_TIGER2VT[str(data["order_id"])] = order.orderid self.on_order(order) if status == Status.ALLTRADED: