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

Method create_order_request

python/ccxt/hashkey.py:2550–2557  ·  view source on GitHub ↗
(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={})

Source from the content-addressed store, hash-verified

2548 return self.parse_order(response, market)
2549
2550 def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}) -> dict:
2551 market = self.market(symbol)
2552 if market['spot']:
2553 return self.create_spot_order_request(symbol, type, side, amount, price, params)
2554 elif market['swap']:
2555 return self.create_swap_order_request(symbol, type, side, amount, price, params)
2556 else:
2557 raise NotSupported(self.id + ' ' + 'createOrderRequest() is not supported for ' + market['type'] + ' type of markets')
2558
2559 def create_spot_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}) -> dict:
2560 """

Callers 1

create_ordersMethod · 0.95

Calls 4

NotSupportedClass · 0.90
marketMethod · 0.45

Tested by

no test coverage detected