* @method * @name cryptocom#fetchTradingFee * @description fetch the trading fees for a market * @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-instrument-fee-rate * @param {string} symbol unified market symbol * @param {object} [params] ext
(symbol: string, params = {})
| 3414 | * @returns {object} a [fee structure]{@link https://docs.ccxt.com/?id=fee-structure} |
| 3415 | */ |
| 3416 | async fetchTradingFee (symbol: string, params = {}): Promise<TradingFeeInterface> { |
| 3417 | await this.loadMarkets (); |
| 3418 | const market = this.market (symbol); |
| 3419 | const request: Dict = { |
| 3420 | 'instrument_name': market['id'], |
| 3421 | }; |
| 3422 | const response = await this.v1PrivatePostPrivateGetInstrumentFeeRate (this.extend (request, params)); |
| 3423 | // |
| 3424 | // { |
| 3425 | // "id": 1, |
| 3426 | // "code": 0, |
| 3427 | // "method": "private/staking/unstake", |
| 3428 | // "result": { |
| 3429 | // "staking_id": "1", |
| 3430 | // "instrument_name": "SOL.staked", |
| 3431 | // "status": "NEW", |
| 3432 | // "quantity": "1", |
| 3433 | // "underlying_inst_name": "SOL", |
| 3434 | // "reason": "NO_ERROR" |
| 3435 | // } |
| 3436 | // } |
| 3437 | // |
| 3438 | const data = this.safeDict (response, 'result', {}); |
| 3439 | return this.parseTradingFee (data as Dict, market); |
| 3440 | } |
| 3441 | |
| 3442 | /** |
| 3443 | * @method |
nothing calls this directly
no test coverage detected