create a trade order https://testnet.aftermath.finance/docs/#/CCXT/build_create_orders https://testnet.aftermath.finance/docs/#/CCXT/submit_create_orders :param str symbol: unified symbol of the market to create an order in :param str type: 'market' or 'lim
(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={})
| 800 | return order |
| 801 | |
| 802 | def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}): |
| 803 | """ |
| 804 | create a trade order |
| 805 | |
| 806 | https://testnet.aftermath.finance/docs/#/CCXT/build_create_orders |
| 807 | https://testnet.aftermath.finance/docs/#/CCXT/submit_create_orders |
| 808 | |
| 809 | :param str symbol: unified symbol of the market to create an order in |
| 810 | :param str type: 'market' or 'limit' |
| 811 | :param str side: 'buy' or 'sell' |
| 812 | :param float amount: how much of currency you want to trade in units of base currency |
| 813 | :param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| 814 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 815 | :param bool [params.reduceOnly]: True or False whether the order is reduce-only |
| 816 | :param Account [params.account]: account id to use, required |
| 817 | :returns dict: an `order structure <https://docs.ccxt.com/?id=order-structure>` |
| 818 | """ |
| 819 | self.load_markets() |
| 820 | account = None |
| 821 | account, params = self.handle_option_and_params(params, 'createOrder', 'account') |
| 822 | order = self.parse_create_edit_order_args(None, symbol, type, side, amount, price, params) |
| 823 | accountObj = {'account': account} |
| 824 | orders = self.create_orders([order], accountObj) |
| 825 | return orders[0] |
| 826 | |
| 827 | def create_orders(self, orders: List[OrderRequest], params={}) -> List[Order]: |
| 828 | """ |
nothing calls this directly
no test coverage detected