ENS Support

The Transpose API fully supports the use of ENS names.

In addition to the ENS API, you can pass in an ENS name in place of an address for any parameter that specifies supports ENS names.

import requests


def get_tokens(owner):
  url = 'https://api.transpose.io/v0/token/tokens-by-owner?owner_address={}'
  headers = {'X-API-KEY': 'x3cXibyAoi3bj73SFgTQr6f8ceVvhP0f3xftXHs2'}
  response = requests.get(url.format(owner), headers=headers)
  return response.json()


# lets get all tokens owned by an address
tokens_1 = get_tokens(owner='0x6b912F9Dd1A35794f6CAb59Fdd1adCA0794A64D0')

# lets get all tokens owned by an address (using ENS name)
tokens_2 = get_tokens(owner='alexhimself.eth')

# same response!
assert tokens_1 == tokens_2