Skip to content

Commit

Permalink
[Mod] change vt_positionid format
Browse files Browse the repository at this point in the history
  • Loading branch information
vnpy committed Jul 21, 2019
1 parent 6a54b5a commit ebc5e79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@

vn.py是一套基于Python的开源量化交易系统开发框架,于2015年1月正式发布,在开源社区5年持续不断的贡献下一步步成长为全功能量化交易平台,目前国内外金融机构用户已经超过300家,包括:私募基金、证券自营和资管、期货资管和子公司、高校研究机构、自营交易公司、交易所、Token Fund等。

使用vn.py的过程中有任何疑问,请前往[**官方社区论坛**](https://www.vnpy.com/forum/)的【提问求助】板块寻求帮助,也欢迎在【经验分享】板块分享你的使用心得!
使用过程中有任何疑问,请查看[**vn.py项目文档**](https://www.vnpy.com/docs/cn/index.html),如果无法解决请前往[**官方社区论坛**](https://www.vnpy.com/forum/)的【提问求助】板块寻求帮助,也欢迎在【经验分享】板块分享你的使用心得!

官方微信公众号:**vnpy-community**,接下来将在公众号中陆续上线各种关于vn.py的使用教程,欢迎关注。

2.0版本基于Python 3.7全新重构开发,如需Python 2上的版本请点击:[长期支持版本v1.9.2 LTS](https://github.com/vnpy/vnpy/tree/v1.9.2-LTS)

Expand Down
2 changes: 1 addition & 1 deletion vnpy/trader/object.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class PositionData(BaseData):
def __post_init__(self):
""""""
self.vt_symbol = f"{self.symbol}.{self.exchange.value}"
self.vt_positionid = f"{self.vt_symbol}.{self.direction}"
self.vt_positionid = f"{self.vt_symbol}.{self.direction.value}"


@dataclass
Expand Down

0 comments on commit ebc5e79

Please sign in to comment.