create a trailing order by providing the symbol, type, side, amount, price and trailingPercent :param str symbol: unified symbol of the market to create an order in :param str type: 'market' or 'limit' :param str side: 'buy' or 'sell' :param float amount: how
(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, trailingPercent: Num = None, trailingTriggerPrice: Num = None, params={})
| 4894 | return await self.create_order(symbol, 'market', 'buy', cost, None, params) |
| 4895 | |
| 4896 | async def create_trailing_percent_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, trailingPercent: Num = None, trailingTriggerPrice: Num = None, params={}) -> Order: |
| 4897 | """ |
| 4898 | create a trailing order by providing the symbol, type, side, amount, price and trailingPercent |
| 4899 | :param str symbol: unified symbol of the market to create an order in |
| 4900 | :param str type: 'market' or 'limit' |
| 4901 | :param str side: 'buy' or 'sell' |
| 4902 | :param float amount: how much you want to trade in units of the base currency, or number of contracts |
| 4903 | :param float [price]: the price for the order to be filled at, in units of the quote currency, ignored in market orders |
| 4904 | :param float trailingPercent: the percent to trail away from the current market price |
| 4905 | :param float trailingTriggerPrice: the price to activate a trailing order, default uses the price argument |
| 4906 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 4907 | :returns dict: an `order structure <https://docs.ccxt.com/?id=order-structure>` |
| 4908 | """ |
| 4909 | if trailingPercent is None: |
| 4910 | raise ArgumentsRequired(self.id + ' createTrailingPercentOrder() requires a trailingPercent argument') |
| 4911 | if trailingTriggerPrice is None: |
| 4912 | raise ArgumentsRequired(self.id + ' createTrailingPercentOrder() requires a trailingTriggerPrice argument') |
| 4913 | params['trailingPercent'] = trailingPercent |
| 4914 | params['trailingTriggerPrice'] = trailingTriggerPrice |
| 4915 | return await self.create_order(symbol, type, side, amount, price, params) |
| 4916 | |
| 4917 | async def create_spot_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}): |
| 4918 | """ |
nothing calls this directly
no test coverage detected