From 85603bb369356d90eeeda339acf1f8a1b3bdff4e Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Tue, 13 Aug 2019 09:14:17 +0800 Subject: [PATCH] [Fix] bug in xtp_gateway direction map --- vnpy/gateway/xtp/xtp_gateway.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vnpy/gateway/xtp/xtp_gateway.py b/vnpy/gateway/xtp/xtp_gateway.py index 5e97fad7..9baa1cda 100644 --- a/vnpy/gateway/xtp/xtp_gateway.py +++ b/vnpy/gateway/xtp/xtp_gateway.py @@ -87,8 +87,8 @@ DIRECTION_VT2XTP = { (Direction.SHORT, Offset.CLOSE): XTP_SIDE_REPAY_MARGIN, (Direction.SHORT, Offset.OPEN): XTP_SIDE_SHORT_SELL, (Direction.LONG, Offset.CLOSE): XTP_SIDE_REPAY_STOCK, - (Direction.SHORT, Offset.NONE): XTP_SIDE_BUY, - (Direction.LONG, Offset.NONE): XTP_SIDE_SELL, + (Direction.SHORT, Offset.NONE): XTP_SIDE_SELL, + (Direction.LONG, Offset.NONE): XTP_SIDE_BUY, } DIRECTION_XTP2VT = {v: k for k, v in DIRECTION_VT2XTP.items()}