-
Notifications
You must be signed in to change notification settings - Fork 169
Description
错误信息如下:
F:>ipython
Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 7.16.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import ctpwrapper.ApiStructure as apidata
In [2]: orderdata=apidata.InputOrderField()
TypeError Traceback (most recent call last)
in
----> 1 orderdata=apidata.InputOrderField()
d:\miniconda3\lib\site-packages\ctpwrapper\ApiStructure.py in init(self, BrokerID, InvestorID, InstrumentID, OrderRef, UserID, OrderPriceType, Direction, CombOffsetFlag, CombHedgeFlag, LimitPrice, VolumeTotalOriginal, TimeCondition, GTDDate, VolumeCondition, MinVolume, ContingentCondition, StopPrice, ForceCloseReason, IsAutoSuspend, BusinessUnit, RequestID, UserForceClose, IsSwapOrder, ExchangeID, InvestUnitID, AccountID, CurrencyID, ClientID, IPAddress, MacAddress)
1626 self.OrderRef = self._to_bytes(OrderRef)
1627 self.UserID = self._to_bytes(UserID)
-> 1628 self.OrderPriceType = self._to_bytes(OrderPriceType)
1629 self.Direction = self._to_bytes(Direction)
1630 self.CombOffsetFlag = self._to_bytes(CombOffsetFlag)
TypeError: one character bytes, bytearray or integer expected