You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
from huobi . connection . restapi_sync_client import RestApiSyncClient
from huobi . constant import *
from huobi . utils import *
from huobi . model . trade import *
'''
https://huobiapi.github.io/docs/spot/v1/cn/#b9af010185
批量撤销指定订单
API Key 权限:交易
限频值( NEW) : 50次/2s
此接口同时为多个订单( 基于id) 发送取消请求, 建议通过order-ids来撤单, 比client-order-ids更快更稳定。
请求参数:
order-ids 订单编号列表( order-ids和client-order-ids必须且只能选一个填写, 不超过50张订单) , 建议通过order-ids来撤单, 比client-order-ids更快更稳定
client-order-ids 用户自编订单号列表( order-ids和client-order-ids必须且只能选一个填写, 不超过50张订单) , 必须已有该订单存在, 否则下次下单时不允许用此值
'''
class PostBatchCancelOrderService :
def __init__ ( self , params ) :
self . params = params
def request ( self , * * kwargs ) :
channel = " /v1/order/orders/batchcancel "
def parse ( dict_data ) :
data = dict_data . get ( " data " , { } )
return default_parse_fill_directly ( data , BatchCancelResult )
return RestApiSyncClient ( * * kwargs ) . request_process ( HttpMethod . POST_SIGN , channel , self . params , parse )