* @method * @name woo#fetchTradingFees * @description fetch the trading fees for multiple markets * @see https://developer.woox.io/api-reference/endpoint/account/get_account_info * @param {object} [params] extra parameters specific to the exchange API endpoint * @returns {ob
(params = {})
| 888 | * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/?id=fee-structure} indexed by market symbols |
| 889 | */ |
| 890 | async fetchTradingFees (params = {}): Promise<TradingFees> { |
| 891 | await this.loadMarkets (); |
| 892 | const response = await this.v3PrivateGetAccountInfo (params); |
| 893 | // |
| 894 | // { |
| 895 | // "success": true, |
| 896 | // "data": { |
| 897 | // "applicationId": "251bf5c4-f3c8-4544-bb8b-80001007c3c0", |
| 898 | // "account": "carlos_jose_lima@yahoo.com", |
| 899 | // "alias": "carlos_jose_lima@yahoo.com", |
| 900 | // "otpauth": true, |
| 901 | // "accountMode": "FUTURES", |
| 902 | // "positionMode": "ONE_WAY", |
| 903 | // "leverage": 0, |
| 904 | // "makerFeeRate": 0, |
| 905 | // "takerFeeRate": 0, |
| 906 | // "marginRatio": "10", |
| 907 | // "openMarginRatio": "10", |
| 908 | // "initialMarginRatio": "10", |
| 909 | // "maintenanceMarginRatio": "0.03", |
| 910 | // "totalCollateral": "165.55629469", |
| 911 | // "freeCollateral": "165.55629469", |
| 912 | // "totalAccountValue": "167.32418611", |
| 913 | // "totalTradingValue": "167.32418611", |
| 914 | // "totalVaultValue": "0", |
| 915 | // "totalStakingValue": "0", |
| 916 | // "totalLaunchpadValue": "0", |
| 917 | // "totalEarnValue": "0", |
| 918 | // "referrerID": null, |
| 919 | // "accountType": "Main" |
| 920 | // }, |
| 921 | // "timestamp": 1752062807915 |
| 922 | // } |
| 923 | // |
| 924 | const data = this.safeDict (response, 'data', {}); |
| 925 | const maker = this.safeString (data, 'makerFeeRate'); |
| 926 | const taker = this.safeString (data, 'takerFeeRate'); |
| 927 | const result: Dict = {}; |
| 928 | const symbols = this.symbols; |
| 929 | if (symbols === undefined) { |
| 930 | return result; |
| 931 | } |
| 932 | for (let i = 0; i < symbols.length; i++) { |
| 933 | const symbol = symbols[i]; |
| 934 | result[symbol] = { |
| 935 | 'info': response, |
| 936 | 'symbol': symbol, |
| 937 | 'maker': this.parseNumber (Precise.stringDiv (maker, '10000')), |
| 938 | 'taker': this.parseNumber (Precise.stringDiv (taker, '10000')), |
| 939 | 'percentage': true, |
| 940 | 'tierBased': true, |
| 941 | }; |
| 942 | } |
| 943 | return result; |
| 944 | } |
| 945 | |
| 946 | /** |
| 947 | * @method |
no test coverage detected