Currency Endpoints¶
-
class
idex.client.
Client
(api_key, address=None, private_key=None)[source] -
get_currencies
()[source] Get token data indexed by symbol
https://github.com/AuroraDAO/idex-api-docs#returncurrencies
currencies = client.get_currencies()
Returns: API Response { ETH: { decimals: 18, address: '0x0000000000000000000000000000000000000000', name: 'Ether' }, REP: { decimals: 8, address: '0xc853ba17650d32daba343294998ea4e33e7a48b9', name: 'Reputation' }, DVIP: { decimals: 8, address: '0xf59fad2879fb8380ffa6049a48abf9c9959b3b5c', name: 'Aurora' } }
Raises: IdexResponseException, IdexAPIException
-
get_currency
(currency)[source] Get the details for a particular currency using it’s token name or address
Parameters: currency (string or hex string) – Name of the currency e.g. EOS or ‘0x7c5a0ce9267ed19b22f8cae653f198e3e8daf098’ # using token name currency = client.get_currency('REP') # using the address string currency = client.get_currency('0xc853ba17650d32daba343294998ea4e33e7a48b9')
Returns: { decimals: 8, address: '0xc853ba17650d32daba343294998ea4e33e7a48b9', name: 'Reputation' }
Raises: IdexCurrencyNotFoundException, IdexResponseException, IdexAPIException
-