* @method * @name woo#fetchOrder * @see https://developer.woox.io/api-reference/endpoint/trading/get_order * @see https://developer.woox.io/api-reference/endpoint/trading/get_algo_order * @description fetches information on an order made by the user * @param {string} id the
(id: string, symbol: Str = undefined, params = {})
| 1641 | * @returns {object} An [order structure]{@link https://docs.ccxt.com/?id=order-structure} |
| 1642 | */ |
| 1643 | async fetchOrder (id: string, symbol: Str = undefined, params = {}) { |
| 1644 | await this.loadMarkets (); |
| 1645 | let market: Market = undefined; |
| 1646 | if (symbol !== undefined) { |
| 1647 | market = this.market (symbol); |
| 1648 | } |
| 1649 | const trigger = this.safeBool2 (params, 'stop', 'trigger'); |
| 1650 | params = this.omit (params, [ 'stop', 'trigger' ]); |
| 1651 | const request: Dict = {}; |
| 1652 | const clientOrderId = this.safeString2 (params, 'clOrdID', 'clientOrderId'); |
| 1653 | let response: NullableDict = undefined; |
| 1654 | if (trigger) { |
| 1655 | if (clientOrderId !== undefined) { |
| 1656 | request['clientAlgoOrderId'] = id; |
| 1657 | } else { |
| 1658 | request['algoOrderId'] = id; |
| 1659 | } |
| 1660 | response = await this.v3PrivateGetTradeAlgoOrder (this.extend (request, params)); |
| 1661 | // |
| 1662 | // { |
| 1663 | // "success": true, |
| 1664 | // "data": { |
| 1665 | // "algoOrderId": 10399260, |
| 1666 | // "clientAlgoOrderId": 0, |
| 1667 | // "rootAlgoOrderId": 10399260, |
| 1668 | // "parentAlgoOrderId": 0, |
| 1669 | // "symbol": "SPOT_LTC_USDT", |
| 1670 | // "algoOrderTag": "default", |
| 1671 | // "algoType": "TAKE_PROFIT", |
| 1672 | // "side": "BUY", |
| 1673 | // "quantity": 0.1, |
| 1674 | // "isTriggered": false, |
| 1675 | // "triggerPrice": 65, |
| 1676 | // "triggerStatus": "USELESS", |
| 1677 | // "type": "LIMIT", |
| 1678 | // "rootAlgoStatus": "NEW", |
| 1679 | // "algoStatus": "NEW", |
| 1680 | // "triggerPriceType": "MARKET_PRICE", |
| 1681 | // "price": 60, |
| 1682 | // "triggerTime": "0", |
| 1683 | // "totalExecutedQuantity": 0, |
| 1684 | // "visibleQuantity": 0.1, |
| 1685 | // "averageExecutedPrice": 0, |
| 1686 | // "totalFee": 0, |
| 1687 | // "feeAsset": "", |
| 1688 | // "totalRebate": 0, |
| 1689 | // "rebateAsset": "", |
| 1690 | // "reduceOnly": false, |
| 1691 | // "createdTime": "1752049747.732", |
| 1692 | // "updatedTime": "1752049747.732", |
| 1693 | // "positionSide": "BOTH" |
| 1694 | // }, |
| 1695 | // "timestamp": 1752049767550 |
| 1696 | // } |
| 1697 | // |
| 1698 | } else { |
| 1699 | if (clientOrderId !== undefined) { |
| 1700 | request['clientOrderId'] = clientOrderId; |
nothing calls this directly
no test coverage detected