(self, fee, currency: Currency = None)
| 8821 | return self.parse_deposit_withdraw_fees(data, codes, 'currency') |
| 8822 | |
| 8823 | def parse_deposit_withdraw_fee(self, fee, currency: Currency = None): |
| 8824 | # |
| 8825 | # { |
| 8826 | # "currency": "sxp", |
| 8827 | # "assetType": "1", |
| 8828 | # "chains": [ |
| 8829 | # { |
| 8830 | # "chain": "sxp", |
| 8831 | # "displayName": "ERC20", |
| 8832 | # "baseChain": "ETH", |
| 8833 | # "baseChainProtocol": "ERC20", |
| 8834 | # "isDynamic": True, |
| 8835 | # "numOfConfirmations": "12", |
| 8836 | # "numOfFastConfirmations": "12", |
| 8837 | # "depositStatus": "allowed", |
| 8838 | # "minDepositAmt": "0.23", |
| 8839 | # "withdrawStatus": "allowed", |
| 8840 | # "minWithdrawAmt": "0.23", |
| 8841 | # "withdrawPrecision": "8", |
| 8842 | # "maxWithdrawAmt": "227000.000000000000000000", |
| 8843 | # "withdrawQuotaPerDay": "227000.000000000000000000", |
| 8844 | # "withdrawQuotaPerYear": null, |
| 8845 | # "withdrawQuotaTotal": null, |
| 8846 | # "withdrawFeeType": "fixed", |
| 8847 | # "transactFeeWithdraw": "11.1653", |
| 8848 | # "addrWithTag": False, |
| 8849 | # "addrDepositTag": False |
| 8850 | # } |
| 8851 | # ], |
| 8852 | # "instStatus": "normal" |
| 8853 | # } |
| 8854 | # |
| 8855 | chains = self.safe_value(fee, 'chains', []) |
| 8856 | code = self.safe_string(currency, 'code') |
| 8857 | result = self.deposit_withdraw_fee(fee) |
| 8858 | for j in range(0, len(chains)): |
| 8859 | chainEntry = chains[j] |
| 8860 | networkId = self.safe_string(chainEntry, 'chain') |
| 8861 | withdrawFeeType = self.safe_string(chainEntry, 'withdrawFeeType') |
| 8862 | networkCode = self.network_id_to_code(networkId, code) |
| 8863 | withdrawFee = None |
| 8864 | withdrawResult = None |
| 8865 | if withdrawFeeType == 'fixed': |
| 8866 | withdrawFee = self.safe_number(chainEntry, 'transactFeeWithdraw') |
| 8867 | withdrawResult = { |
| 8868 | 'fee': withdrawFee, |
| 8869 | 'percentage': False, |
| 8870 | } |
| 8871 | else: |
| 8872 | withdrawFee = self.safe_number(chainEntry, 'transactFeeRateWithdraw') |
| 8873 | withdrawResult = { |
| 8874 | 'fee': withdrawFee, |
| 8875 | 'percentage': True, |
| 8876 | } |
| 8877 | result['networks'][networkCode] = { |
| 8878 | 'withdraw': withdrawResult, |
| 8879 | 'deposit': { |
| 8880 | 'fee': None, |
nothing calls this directly
no test coverage detected