文档
测试

6)查询委托是否可撤销

POST

说明 / 示例

# 6)查询委托是否可撤销 can_cancel_order() 用法: can_cancel_order(orderId, accountID, strAccountType) 释义: 查询委托是否可撤销。 参数: orderId,string,委托号。 accountID:string,资金账号。 strAccountType:string,账号类型,可选值: ‘FUTURE’:期货 ‘STOCK’:股票 ‘CREDIT’:信用 ‘HUGANGTONG’:沪港通 ‘SHENGANGTONG’:深港通 ‘STOCK_OPTION’:期权 返回: bool,是否可撤,返回值含义: True:可撤销 False:不可撤销 示例: ```py def init(ContextInfo): ContextInfo.accid = '6000000248' def handlebar(ContextInfo): orderid = get_last_order_id(ContextInfo.accid,'stock','order') print(orderid) can_cancel = can_cancel_order(orderid,ContextInfo.accid,'stock') print('是否可撤:', can_cancel) ```