Skip to content

Update Status

First, you need login.

Update Status

In order to use functions, like 1) list_trades 2) cancel_order 3) update_order, we have to call update_status first.

In

api.update_status()
api.list_trades()

Get trade list

Out

[
    Trade(
        contract=Contract(security_type=<SecurityType.Future: 'FUT'>, exchange=<Exchange.TAIFEX: 'TAIFEX'>, code='TXFA1'), 
        order=Order(action=<Action.Buy: 'Buy'>, price=13770.0, quantity=1, id='63f8f2c9', seqno='896206', ordno='ky007', account=Account(account_type=<AccountType.Future: 'F'>, person_id='PAPIUSER06', broker_id='F002000', account_id='9102620', signed=True), price_type=<StockPriceType.LMT: 'LMT'>, order_type=<FuturesOrderType.ROD: 'ROD'>, octype=<FuturesOCType.New: 'New'>), 
        status=OrderStatus(id='63f8f2c9', status=<Status.Cancelled: 'Cancelled'>, status_code='0000', order_datetime=datetime.datetime(2020, 12, 2, 11, 1, 48), modified_price=13770.0, cancel_quantity=1, deals=[])
    ), 
    Trade(
        contract=Contract(security_type=<SecurityType.Future: 'FUT'>, exchange=<Exchange.TAIFEX: 'TAIFEX'>, code='TXFA1'), 
        order=Order(action=<Action.Buy: 'Buy'>, price=13770.0, quantity=1, id='7808d809', seqno='896208', ordno='ky008', account=Account(account_type=<AccountType.Future: 'F'>, person_id='PAPIUSER06', broker_id='F002000', account_id='9102620', signed=True), price_type=<StockPriceType.LMT: 'LMT'>, order_type=<FuturesOrderType.ROD: 'ROD'>, octype=<FuturesOCType.New: 'New'>), 
        status=OrderStatus(id='7808d809', status=<Status.Cancelled: 'Cancelled'>, status_code='0000', order_datetime=datetime.datetime(2020, 12, 2, 11, 2, 17), modified_price=13770.0, cancel_quantity=1, deals=[])
    )
]