1.USDT永续合约查询活动委托:
logging.info(test.get_order_search('BITUSDT','d265a3ea-d5a3-4d17-865b-6863bfc13003'))
# 返回
{'ret_code': 0, 'ret_msg': 'OK', 'ext_code': '', 'ext_info': '', 'result': {'order_id': 'd265a3ea-d5a3-4d17-865b-6863bfc13003', 'user_id': 3506111, 'symbol': 'BITUSDT', 'side': 'Buy', 'order_type': 'Limit', 'price': 2.401, 'qty': 1, 'time_in_force': 'GoodTillCancel', 'order_status': 'New', 'last_exec_price': 0, 'cum_exec_qty': 0, 'cum_exec_value': 0, 'cum_exec_fee': 0, 'order_link_id': '', 'reduce_only': False, 'close_on_trigger': False, 'created_time': '2021-11-23T08:47:36Z', 'updated_time': '2021-11-23T08:47:36Z', 'take_profit': 0, 'stop_loss': 0, 'tp_trigger_by': 'UNKNOWN', 'sl_trigger_by': 'UNKNOWN'}, 'time_now': '1637671600.703104', 'rate_limit_status': 559, 'rate_limit_reset_ms': 1637671600700, 'rate_limit': 600}
2反向永续拿合约查询活动委托:
logging.info(test.get_order_search('BITUSD','a297af93-df29-4dc3-afb0-c3c88d2cc50d'))
# 返回:
{'ret_code': 0, 'ret_msg': 'OK', 'ext_code': '', 'ext_info': '', 'result': {'user_id': 3506111, 'position_idx': 0, 'symbol': 'BITUSD', 'side': 'Sell', 'order_type': 'Limit', 'price': '2.701', 'qty': 1, 'time_in_force': 'GoodTillCancel', 'order_status': 'New', 'ext_fields': {'o_req_num': 176119245}, 'last_exec_time': '1637657622.900386', 'leaves_qty': 1, 'leaves_value': '0.37023324', 'cum_exec_qty': 0, 'cum_exec_value': None, 'cum_exec_fee': None, 'reject_reason': 'EC_NoError', 'cancel_type': 'UNKNOWN', 'order_link_id': '', 'created_at': '2021-11-23T08:53:42.900243271Z', 'updated_at': '2021-11-23T08:53:42.900386Z', 'order_id': 'a297af93-df29-4dc3-afb0-c3c88d2cc50d', 'take_profit': '0.000', 'stop_loss': '0.000', 'tp_trigger_by': 'UNKNOWN', 'sl_trigger_by': 'UNKNOWN'}, 'time_now': '1637671459.174447', 'rate_limit_status': 599, 'rate_limit_reset_ms': 1637671459170, 'rate_limit': 600}
3.现货查询活动委托:
logging.info(test.get_order_search('bitusdt','1031234017554391808'))
# 返回:
{'ret_code': 0, 'ret_msg': '', 'ext_code': None, 'ext_info': None, 'result': {'accountId': '4063428', 'exchangeId': '301', 'symbol': 'BITUSDT', 'symbolName': 'BITUSDT', 'orderLinkId': '1637668674590267', 'orderId': '1031234017554391808', 'price': '2.701', 'origQty': '3.71', 'executedQty': '0', 'cummulativeQuoteQty': '0', 'avgPrice': '0', 'status': 'NEW', 'timeInForce': 'GTC', 'type': 'LIMIT', 'side': 'SELL', 'stopPrice': '0.0', 'icebergQty': '0.0', 'time': '1637668674593', 'updateTime': '1637668674600', 'isWorking': True}}