https://docs.upbit.com/kr/reference/available-order-information https://global-docs.upbit.com/reference/available-order-information fetch the trading fees for a market :param str symbol: unified market symbol :param dict [params]: extra parameters specific
(self, symbol: str, params={})
| 951 | return self.parse_trades(response, market, since, limit) |
| 952 | |
| 953 | def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface: |
| 954 | """ |
| 955 | |
| 956 | https://docs.upbit.com/kr/reference/available-order-information |
| 957 | https://global-docs.upbit.com/reference/available-order-information |
| 958 | |
| 959 | fetch the trading fees for a market |
| 960 | :param str symbol: unified market symbol |
| 961 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 962 | :returns dict: a `fee structure <https://docs.ccxt.com/?id=fee-structure>` |
| 963 | """ |
| 964 | self.load_markets() |
| 965 | market = self.market(symbol) |
| 966 | request = { |
| 967 | 'market': market['id'], |
| 968 | } |
| 969 | response = self.privateGetOrdersChance(self.extend(request, params)) |
| 970 | # |
| 971 | # { |
| 972 | # "bid_fee": "0.0005", |
| 973 | # "ask_fee": "0.0005", |
| 974 | # "maker_bid_fee": "0.0005", |
| 975 | # "maker_ask_fee": "0.0005", |
| 976 | # "market": { |
| 977 | # "id": "KRW-BTC", |
| 978 | # "name": "BTC/KRW", |
| 979 | # "order_types": ["limit"], |
| 980 | # "order_sides": ["ask", "bid"], |
| 981 | # "bid": {"currency": "KRW", "price_unit": null, "min_total": 5000}, |
| 982 | # "ask": {"currency": "BTC", "price_unit": null, "min_total": 5000}, |
| 983 | # "max_total": "1000000000.0", |
| 984 | # "state": "active" |
| 985 | # }, |
| 986 | # "bid_account": { |
| 987 | # "currency": "KRW", |
| 988 | # "balance": "0.34202415", |
| 989 | # "locked": "4999.99999922", |
| 990 | # "avg_buy_price": "0", |
| 991 | # "avg_buy_price_modified": True, |
| 992 | # "unit_currency": "KRW" |
| 993 | # }, |
| 994 | # "ask_account": { |
| 995 | # "currency": "BTC", |
| 996 | # "balance": "0.00048", |
| 997 | # "locked": "0.0", |
| 998 | # "avg_buy_price": "20870000", |
| 999 | # "avg_buy_price_modified": False, |
| 1000 | # "unit_currency": "KRW" |
| 1001 | # } |
| 1002 | # } |
| 1003 | # |
| 1004 | askFee = self.safe_string(response, 'ask_fee') |
| 1005 | bidFee = self.safe_string(response, 'bid_fee') |
| 1006 | taker = Precise.string_max(askFee, bidFee) |
| 1007 | makerAskFee = self.safe_string(response, 'maker_ask_fee') |
| 1008 | makerBidFee = self.safe_string(response, 'maker_bid_fee') |
| 1009 | maker = Precise.string_max(makerAskFee, makerBidFee) |
| 1010 | return { |
nothing calls this directly
no test coverage detected