fetch the trading fees for a market https://docs.pacifica.fi/api-documentation/api/rest-api/account/get-account-info :param str symbol: unified market symbol :param dict [params]: extra parameters specific to the exchange API endpoint :param str [params.acc
(self, symbol: str, params={})
| 2469 | return {'info': response} |
| 2470 | |
| 2471 | def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface: |
| 2472 | """ |
| 2473 | fetch the trading fees for a market |
| 2474 | |
| 2475 | https://docs.pacifica.fi/api-documentation/api/rest-api/account/get-account-info |
| 2476 | |
| 2477 | :param str symbol: unified market symbol |
| 2478 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 2479 | :param str [params.account]: will default to walletAddress if not provided |
| 2480 | :returns dict: a `fee structure <https://docs.ccxt.com/?id=fee-structure>` |
| 2481 | """ |
| 2482 | self.load_markets() |
| 2483 | userAddress = None |
| 2484 | userAddress, params = self.handle_origin_and_single_address('fetchTradingFee', params) |
| 2485 | market = self.market(symbol) |
| 2486 | request = { |
| 2487 | 'account': userAddress, |
| 2488 | } |
| 2489 | response = self.publicGetAccount(self.extend(request, params)) |
| 2490 | # { |
| 2491 | # "success": True, |
| 2492 | # "data": { |
| 2493 | # "balance": "2000.000000", |
| 2494 | # "fee_level": 0, |
| 2495 | # "maker_fee": "0.00015", |
| 2496 | # "taker_fee": "0.0004", |
| 2497 | # "account_equity": "2150.250000", |
| 2498 | # "available_to_spend": "1800.750000", |
| 2499 | # "available_to_withdraw": "1500.850000", |
| 2500 | # "pending_balance": "0.000000", |
| 2501 | # "total_margin_used": "349.500000", |
| 2502 | # "cross_mmr": "420.690000", |
| 2503 | # "positions_count": 2, |
| 2504 | # "orders_count": 3, |
| 2505 | # "stop_orders_count": 1, |
| 2506 | # "updated_at": 1716200000000, |
| 2507 | # "use_ltp_for_stop_orders": False |
| 2508 | # }, |
| 2509 | # "error": null, |
| 2510 | # "code": null |
| 2511 | # } |
| 2512 | data = self.safe_dict(response, 'data', {}) |
| 2513 | return self.parse_trading_fee(data, market) |
| 2514 | |
| 2515 | def parse_trading_fee(self, fee: dict, market: Market = None) -> TradingFeeInterface: |
| 2516 | # |
nothing calls this directly
no test coverage detected