tigerfintech / openapi-python-sdk

Python SDK for Tiger Open API
https://quant.itiger.com/#openapi
76 stars 15 forks source link

TypeError: %d format: a number is required, not NoneType #12

Closed mymusise closed 5 years ago

mymusise commented 5 years ago

If I want to print an order

orders = trade_client.get_orders()
print(orders[0])

Then I will get an exception:

~/venv/lib/python3.6/site-packages/tigeropen/trade/domain/contract.py in __repr__(self)
     27                 return self.origin_symbol
     28             else:
---> 29                 return '%s/%s/%s/%d' % (self.symbol, self.sec_type, self.currency, self.contract_id)
     30         else:
     31             return '%d' % (self.contract_id,)

TypeError: %d format: a number is required, not NoneType
amoygao commented 5 years ago

fixed is new version 1.1.0