Skip to content

Commit 8049c70

Browse files
authored
Merge pull request #40 from tigerfintech/fix_order_status
fix order status; downgrade pandas version
2 parents 2e54d48 + 9ffbf94 commit 8049c70

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
simplejson==3.17.3
22
delorean==1.0.0
3-
pandas==1.3.0
3+
pandas==1.1.5
44
python-dateutil==2.8.2
55
pytz==2021.1
66
pyasn1==0.4.8

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
setup(
1515
name='tigeropen',
16-
version='2.0.0',
16+
version='2.0.1',
1717
description='TigerBrokers Open API',
1818
packages=find_packages(exclude=[]),
1919
author='TigerBrokers',

tigeropen/examples/trade_client_demo.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,14 @@ def trade_apis():
9191
# 或者本地构造订单对象
9292
# order = limit_order(account=account, contract=contract, action='BUY', quantity=100, limit_price=5.0)
9393
openapi_client.place_order(order)
94-
order_id = order.order_id # you can operate order via id too
9594

96-
new_order = openapi_client.get_order(order_id=order.order_id)
95+
new_order = openapi_client.get_order(id=order.id)
9796
assert order.order_id == new_order.order_id
9897
openapi_client.modify_order(new_order, quantity=150)
99-
new_order = openapi_client.get_order(order_id=order_id)
98+
new_order = openapi_client.get_order(id=order.id)
10099
assert new_order.quantity == 150
101-
openapi_client.cancel_order(order_id=order_id)
102-
new_order = openapi_client.get_order(order_id=order_id)
100+
openapi_client.cancel_order(id=order.id)
101+
new_order = openapi_client.get_order(id=order.id)
103102
assert new_order.status == OrderStatus.CANCELLED or new_order.status == OrderStatus.PENDING_CANCEL
104103

105104
# 预览订单 (下单前后保证金要求, 佣金等预览)

tigeropen/trade/response/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
CONTRACT_FIELDS = set(['symbol', 'market', 'multiplier', 'sec_type', 'currency', 'local_symbol', 'origin_symbol',
99
'expiry', 'strike', 'right', 'contract_id', 'exchange', 'name', 'short_margin', 'short_fee_rate',
1010
'shortable', 'long_initial_margin', 'long_maintenance_margin', 'contract_month', 'identifier',
11-
'primary_exchange', 'min_tick', 'trading_class', 'status', 'continuous', 'trade',
11+
'primary_exchange', 'min_tick', 'trading_class', 'continuous', 'trade',
1212
'last_trading_date', 'first_notice_date', 'last_bidding_close_time'])
1313

0 commit comments

Comments
 (0)