MCPcopy Create free account
hub / github.com/ccxt/ccxt / create_orders

Method create_orders

python/ccxt/async_support/gate.py:4249–4270  ·  view source on GitHub ↗

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={})

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 7

load_unified_statusMethod · 0.95
create_orders_requestMethod · 0.95
parse_ordersMethod · 0.80
load_marketsMethod · 0.45
marketMethod · 0.45

Tested by

no test coverage detected