Read a Token Details

To retrieve the details of a token, such as name, symbol, and decimals, send a GET a request to the /wallet/erc20/info, calling the :retrieve method. The token contract address and network are also passed as query parameters.

Read the details of an ERC-20 token

GET https://api.playfix.io/wallet/erc20/info:retrieve

Query Parameters

Name
Type
Description

network*

String

Blockchain network of the ERC-20 token. This can be any of the following values:

NETWORK_ETHEREUM,

NETWORK_ETHEREUM_RINKERBY,

NETWORK_POLYGON, or

NETWORK_POLYGON_MUMBAI .

contractAddress*

String

Contract address of the ERC-20 token.

Headers

Name
Type
Description

Authorization*

String

Bearer <your_access_token>

{
   "decimals": "18",
   "symbol": "KTN",
   "name": "Kytano"
}

Example cURL API Call

curl --request GET \
  --url 'https://api.playfix.io/wallet/erc20/info:retrieve?contractAddress=<token_contract_address>&network=<token_network>' \
  --header 'Authorization: Bearer <your_access_token>'

Example Python API Call

import requests

r = requests.get(
    "https://api.playfix.io/wallet/erc20/info:retrieve",
    params = {
        "contractAddress": "<token_contract_address>".
        "network": "<token_network>"
        },
    headers = {
        "Authorization": "Bearer <your_access_token>"
        }
    )

print(r.text)

Request Query Parameter

  • contractAddress - Contract address of the ERC-20 token.

  • network - The blockchain network of the ERC-20 token. This can be any of the following values:

    • NETWORK_ETHEREUM: Ethereum mainnet.

    • NETWORK_ETHEREUM_RINKEBY: Ethereum Gorli testnet. For testing purposes only.

    • NETWORK_POLYGON: Polygon mainnet.

    • NETWORK_POLYGON_MUMBAI: Polygon Mumbai testnet. For testing purposes only.

Response

{
   "decimals": "18",
   "symbol": "KTN",
   "name": "Kytano"
}

Last updated