MCPcopy Create free account
hub / github.com/ccxt/ccxt / parse_deposit_address

Method parse_deposit_address

python/ccxt/binance.py:8903–8929  ·  view source on GitHub ↗
(self, response, currency: Currency = None)

Source from the content-addressed store, hash-verified

8901 return self.parse_deposit_address(response, currency)
8902
8903 def parse_deposit_address(self, response, currency: Currency = None) -> DepositAddress:
8904 #
8905 # {
8906 # "coin": "XRP",
8907 # "address": "rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh",
8908 # "tag": "108618262",
8909 # "url": "https://bithomp.com/explorer/rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh"
8910 # }
8911 #
8912 url = self.safe_string(response, 'url')
8913 address = self.safe_string(response, 'address')
8914 currencyId = self.safe_string(response, 'currency')
8915 code = self.safe_currency_code(currencyId, currency)
8916 # deposit-address endpoint provides only network url(not network ID/CODE)
8917 # so we should map the url to network(their data is inside currencies)
8918 networkCode = self.get_network_code_by_network_url(code, url)
8919 tag = self.safe_string(response, 'tag', '')
8920 if len(tag) == 0:
8921 tag = None
8922 self.check_address(address)
8923 return {
8924 'info': response,
8925 'currency': code,
8926 'network': networkCode,
8927 'address': address,
8928 'tag': tag,
8929 }
8930
8931 def fetch_transaction_fees(self, codes: Strings = None, params={}):
8932 """

Callers 1

fetch_deposit_addressMethod · 0.95

Calls 4

safe_stringMethod · 0.80
check_addressMethod · 0.80
safe_currency_codeMethod · 0.45

Tested by

no test coverage detected