add comment

This commit is contained in:
msincenselee 2015-11-20 15:26:15 +08:00
parent bdd35fb9d5
commit 4cbc660b62
3 changed files with 8 additions and 7 deletions

1
.gitignore vendored
View File

@ -73,3 +73,4 @@ vn.trader/CTP_connect.json
*.vt *.vt
vn.trader/CTP_connect.json vn.trader/CTP_connect.json
vn.trader/CTP_connect.json vn.trader/CTP_connect.json
*.vt

Binary file not shown.

View File

@ -662,14 +662,14 @@ class CtpTdApi(TdApi):
account.vtAccountID = '.'.join([self.gatewayName, account.accountID]) account.vtAccountID = '.'.join([self.gatewayName, account.accountID])
# 数值相关 # 数值相关
account.preBalance = data['PreBalance'] account.preBalance = data['PreBalance'] # 上次结算准备金
account.available = data['Available'] account.available = data['Available'] # 可用资金
account.commission = data['Commission'] account.commission = data['Commission'] # 手续费
account.margin = data['CurrMargin'] account.margin = data['CurrMargin'] # 当前保证金总额
account.closeProfit = data['CloseProfit'] account.closeProfit = data['CloseProfit'] # 平仓盈亏
account.positionProfit = data['PositionProfit'] account.positionProfit = data['PositionProfit'] #持仓盈亏
# 这里的balance和快期中的账户不确定是否一样需要测试 # 结算准备金。这里的balance和快期中的账户不确定是否一样需要测试
account.balance = (data['PreBalance'] - data['PreCredit'] - data['PreMortgage'] + account.balance = (data['PreBalance'] - data['PreCredit'] - data['PreMortgage'] +
data['Mortgage'] - data['Withdraw'] + data['Deposit'] + data['Mortgage'] - data['Withdraw'] + data['Deposit'] +
data['CloseProfit'] + data['PositionProfit'] + data['CashIn'] - data['CloseProfit'] + data['PositionProfit'] + data['CashIn'] -