* @method * @name gate#closePosition * @description closes open positions for a market * @see https://www.gate.com/docs/developers/apiv4/en/#place-futures-order * @see https://www.gate.com/docs/developers/apiv4/en/#place-futures-order-2 * @see https://www.gate.com/docs/devel
(symbol, side = undefined, params = {})
| 8076 | * @returns {object[]} [A list of position structures]{@link https://docs.ccxt.com/?id=position-structure} |
| 8077 | */ |
| 8078 | async closePosition(symbol, side = undefined, params = {}) { |
| 8079 | const request = { |
| 8080 | 'close': true, |
| 8081 | }; |
| 8082 | params = this.extend(request, params); |
| 8083 | if (side === undefined) { |
| 8084 | side = ''; // side is not used but needs to be present, otherwise crashes in php |
| 8085 | } |
| 8086 | return await this.createOrder(symbol, 'market', side, 0, undefined, params); |
| 8087 | } |
| 8088 | /** |
| 8089 | * @method |
| 8090 | * @name gate#fetchLeverage |
nothing calls this directly
no test coverage detected