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

Method create_orders

python/ccxt/gate.py:4248–4269  ·  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

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