* @method * @name gate#createOrderWs * @see https://www.gate.io/docs/developers/apiv4/ws/en/#order-place * @see https://www.gate.io/docs/developers/futures/ws/en/#order-place * @description Create an order on the exchange * @param {string} symbol Unified CCXT market symbol
(symbol, type, side, amount, price = undefined, params = {})
| 163 | * @returns {object|undefined} [An order structure]{@link https://docs.ccxt.com/?id=order-structure} |
| 164 | */ |
| 165 | async createOrderWs(symbol, type, side, amount, price = undefined, params = {}) { |
| 166 | await this.loadMarkets(); |
| 167 | const market = this.market(symbol); |
| 168 | symbol = market['symbol']; |
| 169 | const messageType = this.getTypeByMarket(market); |
| 170 | const channel = messageType + '.order_place'; |
| 171 | const url = this.getUrlByMarket(market); |
| 172 | params['textIsRequired'] = true; |
| 173 | const request = this.createOrderRequest(symbol, type, side, amount, price, params); |
| 174 | await this.authenticate(url, messageType); |
| 175 | const rawOrder = await this.requestPrivate(url, request, channel); |
| 176 | const order = this.parseOrder(rawOrder, market); |
| 177 | return order; |
| 178 | } |
| 179 | /** |
| 180 | * @method |
| 181 | * @name gate#createOrdersWs |
nothing calls this directly
no test coverage detected