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.

33 lines
799 B

This file contains ambiguous Unicode characters!

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.model.trade.batch_create_order import BatchCreateOrder
from huobi.utils import *
'''
https://huobiapi.github.io/docs/spot/v1/cn/#fd6ce2a756
批量下单
API Key 权限:交易
限频值NEW50次/2s
一个批量最多10张订单
'''
class PostBatchCreateOrderService:
def __init__(self, params):
self.params = params
def request(self, **kwargs):
channel = "/v1/order/batch-orders"
def parse(dict_data):
data = dict_data.get("data", [])
return default_parse_list_dict(data, BatchCreateOrder, [])
return RestApiSyncClient(**kwargs).request_process_post_batch(HttpMethod.POST_SIGN, channel, self.params, parse)