Developers Forum for XinFin XDC Network

Cover image for [Proposal] Add functionality to check if a specific holder address holds a specific token on the BlocksScan API.
CoinCow Art
CoinCow Art

Posted on

[Proposal] Add functionality to check if a specific holder address holds a specific token on the BlocksScan API.

I would like a search feature in the BlocksScan API to determine if a holder address holds a particular token.

If that feature were added, it would enable the development of various web services. Particularly, by adding a function to confirm whether someone holds an NFT on the web, it would be possible to create web pages that only holders can view, and it would also enable the development of games centered around holders' NFTs.

Image description

Current Situation:

The API currently has a function to retrieve a list of tokens based on the token type and holder address. However, there is no function to determine whether a specific token is held.

Challenges:

Without this function, developers need to implement the following tasks on their own:

  • Call the API to retrieve the token holding list
  • Search for a specific token in the holding list
  • Determine whether the token exists These tasks can be a burden for developers and can lead to code complication.

Additionally, if there is a wallet address holding hundreds of tokens, such as NFTs, the API needs to be accessed page by page using a while loop due to the 50 token limit per page. This can be avoided with the proposed function, which can reduce the number of API accesses.

Benefits:

Adding this function will provide the following benefits:

  • Reduced workload for developers
  • Simplified code
  • Improved development efficiency
  • Reduced number of API accesses

Discussion (2)

Collapse
mitali_blocksscan profile image
Mitali_BlocksScan

Hey @coincow_art_a9fac6bf88081

Noted. Thanks for the suggestions, We will definitely look into it and implement in a next release.

Collapse
coincow_art_a9fac6bf88081 profile image
CoinCow Art Author

Hi, Mitali

Thank you so much! I look forward to the implementation!