From a5f9171713cdbe05ee30925a63aac2061a8ac80a Mon Sep 17 00:00:00 2001 From: nanoric Date: Tue, 26 Feb 2019 09:12:38 -0400 Subject: [PATCH] [Fix] Fixed an type annotation error: type of OrderRequest.price_type should be PriceType but not string. --- vnpy/trader/object.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vnpy/trader/object.py b/vnpy/trader/object.py index ab3ef5d7..f9b2e1b8 100644 --- a/vnpy/trader/object.py +++ b/vnpy/trader/object.py @@ -6,7 +6,7 @@ from dataclasses import dataclass from datetime import datetime from logging import INFO -from .constant import Direction, Exchange, Interval, Offset, Status, Product, OptionType +from .constant import Direction, Exchange, Interval, Offset, Status, Product, OptionType, PriceType ACTIVE_STATUSES = set([Status.SUBMITTING, Status.NOTTRADED, Status.PARTTRADED]) @@ -265,7 +265,7 @@ class OrderRequest: symbol: str exchange: Exchange direction: Direction - price_type: str + price_type: PriceType volume: float price: float = 0 offset: Offset = Offset.NONE