更新交易日格式
This commit is contained in:
parent
7b1549a55e
commit
78852a0c52
@ -1158,6 +1158,8 @@ class CtpTdApi(TdApi):
|
|||||||
account.closeProfit = data['CloseProfit']
|
account.closeProfit = data['CloseProfit']
|
||||||
account.positionProfit = data['PositionProfit']
|
account.positionProfit = data['PositionProfit']
|
||||||
account.tradingDay = str(data['TradingDay'])
|
account.tradingDay = str(data['TradingDay'])
|
||||||
|
if '-' not in account.tradingDay and len(account.tradingDay)== 8:
|
||||||
|
account.tradingDay = account.tradingDay[0:4] + '-' + account.tradingDay[4:6] + '-' + account.tradingDay[6:8]
|
||||||
# 这里的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'] +
|
||||||
|
Loading…
Reference in New Issue
Block a user