2 Star 1 Fork 1

云金杞/ibapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
commission_report.py 991 Bytes
一键复制 编辑 原始数据 按行查看 历史
云金杞 提交于 2021-12-26 12:15 . 更新commission的注释
"""
Copyright (C) 2019 Interactive Brokers LLC. All rights reserved. This code is subject to the terms
and conditions of the IB API Non-Commercial License or the IB API Commercial License, as applicable.
"""
from ibapi.object_implem import Object
from ibapi import utils
class CommissionReport(Object):
def __init__(self):
# 产生佣金的订单执行的id
self.execId = ""
# 佣金
self.commission = 0.
# 佣金的货币
self.currency = ""
# 实现的盈亏
self.realizedPNL = 0.
# 订单产生的收入
self.yield_ = 0.
# 收入产生的日期
self.yieldRedemptionDate = 0 # YYYYMMDD format
def __str__(self):
return "ExecId: %s, Commission: %f, Currency: %s, RealizedPnL: %s, Yield: %s, YieldRedemptionDate: %d" % (self.execId, self.commission,
self.currency, utils.floatToStr(self.realizedPNL), utils.floatToStr(self.yield_), self.yieldRedemptionDate)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/yunjinqi/ibapi.git
[email protected]:yunjinqi/ibapi.git
yunjinqi
ibapi
ibapi
master

搜索帮助