create a list of trade orders https://www.gate.com/docs/developers/apiv4/en/#batch-place-orders https://www.gate.com/docs/developers/apiv4/en/#place-batch-futures-orders :param Array orders: list of orders to create, each object should contain the parameters requir
(self, orders: List[OrderRequest], params={})
| 4247 | return ordersRequests |
| 4248 | |
| 4249 | async def create_orders(self, orders: List[OrderRequest], params={}): |
| 4250 | """ |
| 4251 | create a list of trade orders |
| 4252 | |
| 4253 | https://www.gate.com/docs/developers/apiv4/en/#batch-place-orders |
| 4254 | https://www.gate.com/docs/developers/apiv4/en/#place-batch-futures-orders |
| 4255 | |
| 4256 | :param Array orders: list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params |
| 4257 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 4258 | :returns dict: an `order structure <https://docs.ccxt.com/?id=order-structure>` |
| 4259 | """ |
| 4260 | await self.load_markets() |
| 4261 | await self.load_unified_status() |
| 4262 | ordersRequests = self.create_orders_request(orders, params) |
| 4263 | firstOrder = orders[0] |
| 4264 | market = self.market(firstOrder['symbol']) |
| 4265 | response = None |
| 4266 | if market['spot']: |
| 4267 | response = await self.privateSpotPostBatchOrders(ordersRequests) |
| 4268 | elif market['swap']: |
| 4269 | response = await self.privateFuturesPostSettleBatchOrders(ordersRequests) |
| 4270 | return self.parse_orders(response) |
| 4271 | |
| 4272 | def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}): |
| 4273 | market = self.market(symbol) |
nothing calls this directly
no test coverage detected