본문으로 건너뛰기

How to Migrate to the New Token and NFT RPC API V2 Bundle

업데이트 날짜:
2025년 11월 26일

3 min read

개요

We recently released v2 of our Token and NFT API add-ons. The upgrade gives you the same great, streamlined API with:

  • more accurate data,
  • support for more chains, and
  • faster indexing

In this guide, we will show you how to migrate from the default Token API and NFT Fetch Tool add-ons to the Token and NFT API v2 bundle marketplace add-on.

This guide assumes you have already interacted with the methods within our Token and NFT APIs and installed them on your Quicknode endpoint. If you are new to these APIs, check out our docs.

What We Will Do

  • Review the changes in the Token and NFT API v2 bundle
  • Add the Token and NFT API v2 bundle to an endpoint
  • Review the changes in the Token and NFT API v2 bundle

준비물

  • Quicknode 계정
  • An endpoint with the Token API and NFT Fetch Tool v1 default add-ons installed
  • A project using the Token API and NFT Fetch Tool v1 that will be migrated to the Token and NFT API v2 bundle

Add the Token and NFT API v2 Bundle

First, let's add the Token and NFT API v2 bundle add-on to an existing endpoint.

Note: this will override the methods from the Token API and NFT Fetch Tool v1 add-ons, so you may want to coordinate this step with the deployment of the code changes for production code.

  1. Log in to your Quicknode account and navigate to the endpoints page.
  2. Select the endpoint you would like to update.
  3. Select the add-ons tab
  4. Find the Token and NFT API v2 bundle add-on and select 탐색하기.
  5. Select the Install button to add the add-on to your endpoint.

You will know that your update is successful if you go to your endpoint's add-on page (https://www.quicknode.com/endpoints/YOUR_ENDPOINT_ID/add_ons) you should see Token and NFT API v2 Bundle in the list of Installed Third-Party Add-Ons. Nice job.

Summary of Key Changes in V2

All v2 methods can be found in the Quicknode documentation in the sidebar for the associated chain. The v2 methods are suffixed with (v2). Update your code according to the following changes:

  • x-qn-api-version header is no longer needed or relevant. The v2 methods are used by default when the add-on is installed.
  • 매개변수 are now an object wrapped in an Array. For example:
"params": [{
"contracts": [
"0x60E4d786628Fea6478F785A6d7e704777c86a7c6",
"0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7"
]
}]
  • qn_fetchNFTs no longer returns provenance.
  • qn_fetchNFTs no longer returns currentOwner.
  • qn_getWalletTokenBalance no longer returns 소유자.
  • qn_getWalletTokenBalance no longer returns logoURL, 체인, 그리고 네트워크 for the objects returned in the assets array.
  • qn_getWalletTokenBalance 반환값 totalBalance instead of 금액 for the objects returned in the assets array.
  • qn_getWalletTokenTransactions 반환값 totalBalance instead of 금액 for the objects returned in the transfers array.
  • qn_NFT 소유자 확인 parameters uses an object with named properties inside of an array instead of an array with positional properties.

We're here to help

If you have any questions, please reach out to support or ask in the Quicknode Discord.

마무리

Congratulations! You’ve learned how to migrate to the Token and NFT API v2 bundle. To learn more, check out some of our other tutorials here.

If you have any feedback on this guide, please let us know.

이 가이드를 공유하세요