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

Method create_order

python/ccxt/async_support/hyperliquid.py:1939–1964  ·  view source on GitHub ↗

create a trade order https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#place-an-order :param str symbol: unified symbol of the market to create an order in :param str type: 'market' or 'limit' :param str side: 'buy' or 'se

(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={})

Source from the content-addressed store, hash-verified

1937 return response
1938
1939 async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
1940 """
1941 create a trade order
1942
1943 https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#place-an-order
1944
1945 :param str symbol: unified symbol of the market to create an order in
1946 :param str type: 'market' or 'limit'
1947 :param str side: 'buy' or 'sell'
1948 :param float amount: how much of currency you want to trade in units of base currency
1949 :param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1950 :param dict [params]: extra parameters specific to the exchange API endpoint
1951 :param str [params.timeInForce]: 'Gtc', 'Ioc', 'Alo'
1952 :param bool [params.postOnly]: True or False whether the order is post-only
1953 :param bool [params.reduceOnly]: True or False whether the order is reduce-only
1954 :param float [params.triggerPrice]: The price at which a trigger order is triggered at
1955 :param str [params.clientOrderId]: client order id,(optional 128 bit hex string e.g. 0x1234567890abcdef1234567890abcdef)
1956 :param str [params.slippage]: the slippage for market order
1957 :param str [params.vaultAddress]: the vault address for order
1958 :param str [params.subAccountAddress]: sub account user address
1959 :returns dict: an `order structure <https://docs.ccxt.com/?id=order-structure>`
1960 """
1961 await self.load_markets()
1962 order, globalParams = self.parse_create_edit_order_args(None, symbol, type, side, amount, price, params)
1963 orders = await self.create_orders([order], globalParams)
1964 return orders[0]
1965
1966 async def create_twap_order(self, symbol: str, side: OrderSide, amount: float, duration: float, params={}) -> Order:
1967 """

Callers

nothing calls this directly

Calls 3

create_ordersMethod · 0.95
load_marketsMethod · 0.45

Tested by

no test coverage detected