fluidex/dingir-exchange

New API endpoint: batchOrders

Closed this issue · 0 comments

lispc commented

Add a new API:

request:

struct BatchOrderRequest {
  market: string, cannot be empty.
  reset: bool, default false. when it is true, cancel all my orders on this market before putting new orders
  orders: List. When len(orders) > MAX_BATCH_ORDER_NUM, return error. we can just hardcode MAX_BATCH_ORDER_NUM to 40 now.
}

return

struct BatchOrderResponse {
  status: string or enum or errcode? indicate error if any
  order_ids: List<Number>. len(order_ids) may be smaller than len(req.orders). When we fail to process an order in the orders request, we return err and the order ids of success orders.
}

Ref: 'Place Multiple Orders ' in https://binance-docs.github.io/apidocs/futures/en/#new-order-trade