vn.py官网
你的开源社区量化交易平台
Member
avatar
加入于:
帖子: 84
声望: 1

下面这个class TradeData(BaseData)里面的volume是成功交易的手数吗?

class TradeData(BaseData):
"""
Trade data contains information of a fill of an order. One order
can have several trade fills.
"""

symbol: str
exchange: Exchange
orderid: str
tradeid: str
direction: Direction = None

offset: Offset = Offset.NONE
price: float = 0
volume: float = 0
datetime: datetime = None

def __post_init__(self):
    """"""
    self.vt_symbol = f"{self.symbol}.{self.exchange.value}"
    self.vt_orderid = f"{self.gateway_name}.{self.orderid}"
    self.vt_tradeid = f"{self.gateway_name}.{self.tradeid}"
Member
avatar
加入于:
帖子: 2788
声望: 189

是的

© 2015-2019 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号-3

沪公网安备 31011502017034号