Insight - Token Owner Queries Add Balances

Insight - Token Owner Queries Add Balances

NFT owner queries have been improved with added balance data and a new ERC20 token owners endpoint has been added to Insight API.

ERC20 Owners

v1/tokens/owners has been added to return a list of token owners with their balances.

Try it out on our playground.

NFT Owners

The two endpoints to query NFT owners (v1/nfts/owners/:contract_address and /v1/nfts/owners/:contract_address/:token_id ) now have the ability to return the balance of each owner in addition to owner addresses.

To enable it, use the query param include_balances=true when calling the endpoints. This will change the response format, so make sure it will not break your app!

The new response format will be an array of owner objects, for example:

{
    "data": [
        {
            "chain_id": 1,
            "token_address": "0x5bb3d01f32687f92f8636799687e55cba0627704",
            "owner_address": "0x0000000000000000000000000000000000000001",
            "token_id": "88",
            "balance": "1"
        },
        ...
    ]
}

📖 Learn more about Insight - it’s open source and ready to power your applications!