Token Balances

What is this request?

You can see all your ERC-20 tokens and Native coins in these services ethereum, binance smart chain, avalanche and polygon network by wallet.

What can I do with this service?

You can use it as a bag service for your project. With this service, you can tell whether the tokens in the bag are verified or not. In addition, the instant prices of the tokens in the bag also come with this request. In addition to all this, between the contract information and the variables in the photo. All of these combined make the following example very easy to do.

Tutorial

var axios = require('axios');

axios.get('https://api.getdefy.co/v1/o/wallet/tokens', {
    params: {
      address: '0x787970ad122d5947579e613c2464d9540081b46f',
      language: 'en',
      key: 'API_KEY',
    },
  })
  .then(function (response) {
    console.log(JSON.stringify(response.data));
  })
  .catch(function (error) {
    console.log(error);
  });

After synchronized wallet you want to use you can test it like this.

Options

  • address (required): A user address (i.e. 0x1a2b3x...). If specified, the user attached to the query is ignored and the address will be used instead.

  • key (required): API key for requests.

  • language (optional): Service language. Default value is en. Can be en or tr.

Request Example

GET https://api.getdefy.co/v1/o/wallet/tokens

Query Parameters

NameTypeDescription

key*

String

API Key

address*

String

Wallet Address

language

String

Can be: "en", "tr"

{
    "result": {
        "message": "OK",
        "code": 0
    },
    "data": {
        "list": [
            {
                "name": "USD Coin (PoS)",
                "valid": true,
                "symbol": "USDC",
                "chainId": 137,
                "network": "matic",
                "decimals": 6,
                "quantity": 2.108186,
                "contract_address": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
                "price": 1.001,
                "image": "https://assets.coingecko.com/coins/images/6319/large/USD_Coin_icon.png?1547042389"
            },
        ],
        "total": 2.10
    }
}

Last updated