getTokenMetadata - SDK
Returns metadata for a given token contract address.
Don’t have an API key?
Start using this method in your app today. Get started for free
Description
Returns metadata for a given token contract address.
Parameters
Response
TokenMetadataResponse
object parameters
Example Request and Response
Prerequisite: You will need to install the Alchemy SDK before making requests with it.
The commands for installing it using npm or yarn are given below:
Request
Here is an example of how to make a getTokenMetadata
request using the Alchemy SDK:
gettokenmetadata.js
Response
shell
Use Cases
Here are some possible use cases for the getTokenMetadata
method:
- Displaying Token Information: DApps and other blockchain applications often need to display information about a particular token. By using
getTokenMetadata
, developers can easily retrieve information such as the token name, symbol, and decimal places for display in their application.
Related Methods
Here are the methods related to getTokenMetadata
:
- getTokenBalances: Returns the ERC-20 token balances for a specific owner address.
- getFeeData: Returns the recommended fee data to use in a transaction. For an EIP-1559 transaction, the
maxFeePerGas
andmaxPriorityFeePerGas
should be used.