(self, currency: dict)
| 1801 | return self.parse_currencies(rows) |
| 1802 | |
| 1803 | def parse_currency(self, currency: dict) -> Currency: |
| 1804 | currencyId = self.safe_string(currency, 'coin') |
| 1805 | code = self.safe_currency_code(currencyId) |
| 1806 | name = self.safe_string(currency, 'name') |
| 1807 | chains = self.safe_list(currency, 'chains', []) |
| 1808 | networks = {} |
| 1809 | for j in range(0, len(chains)): |
| 1810 | chain = chains[j] |
| 1811 | networkId = self.safe_string(chain, 'chain') |
| 1812 | networkCode = self.network_id_to_code(networkId, code) |
| 1813 | networks[networkCode] = { |
| 1814 | 'info': chain, |
| 1815 | 'id': networkId, |
| 1816 | 'network': networkCode, |
| 1817 | 'active': None, |
| 1818 | 'deposit': self.safe_integer(chain, 'chainDeposit') == 1, |
| 1819 | 'withdraw': self.safe_integer(chain, 'chainWithdraw') == 1, |
| 1820 | 'fee': self.safe_number(chain, 'withdrawFee'), |
| 1821 | 'precision': self.parse_number(self.parse_precision(self.safe_string(chain, 'minAccuracy'))), |
| 1822 | 'limits': { |
| 1823 | 'withdraw': { |
| 1824 | 'min': self.safe_number(chain, 'withdrawMin'), |
| 1825 | 'max': None, |
| 1826 | }, |
| 1827 | 'deposit': { |
| 1828 | 'min': self.safe_number(chain, 'depositMin'), |
| 1829 | 'max': None, |
| 1830 | }, |
| 1831 | }, |
| 1832 | } |
| 1833 | return self.safe_currency_structure({ |
| 1834 | 'info': currency, |
| 1835 | 'code': code, |
| 1836 | 'id': currencyId, |
| 1837 | 'name': name, |
| 1838 | 'active': None, |
| 1839 | 'deposit': None, |
| 1840 | 'withdraw': None, |
| 1841 | 'fee': None, |
| 1842 | 'precision': None, |
| 1843 | 'limits': { |
| 1844 | 'amount': { |
| 1845 | 'min': None, |
| 1846 | 'max': None, |
| 1847 | }, |
| 1848 | 'withdraw': { |
| 1849 | 'min': None, |
| 1850 | 'max': None, |
| 1851 | }, |
| 1852 | 'deposit': { |
| 1853 | 'min': None, |
| 1854 | 'max': None, |
| 1855 | }, |
| 1856 | }, |
| 1857 | 'networks': networks, |
| 1858 | 'type': 'crypto', # atm exchange api provides only cryptos |
| 1859 | }) |
| 1860 |
nothing calls this directly
no test coverage detected