Skip to main content

qn_getTokenMetadataBySymbol (v2) RPC Method

Returns token details for specified token symbol.

Updated on
Nov 2, 2023

qn_getTokenMetadataBySymbol (v2) RPC Method

Please note that this RPC method requires the Token and NFT API v2 bundle add-on enabled on your QuickNode endpoint.

Parameters

array
array
An array with the first element being:
object
A custom object with the following fields:
symbol
string
The ERC-20 token symbol you'd like to get details for
page
integer
The page number you would like returned. Page numbers start at 1 and end at totalPages. If omitted, defaults to the first page (page 1). If the page number requested is higher than totalPages, an empty tokens array will be returned. If the page number requested is less than 1, an invalid params response will be returned
perPage
integer
The maximum amount of tokens to return on each page. You can request up to 100 items per page. If omitted, defaults to 40 items per page

Returns

pageNumber
The page number of results that was returned with this response
totalPages
The total number of results pages available
totalItems
The total number of tokens matching the supplied symbol
tokens
An array of objects representing tokens matching the supplied symbol
name
The name of this token
symbol
The symbol of this token
address
The contract address of this token
decimals
The number of decimals this token utilizes
genesisBlock
The block number in which this contract was deployed
genesisTransaction
The hash of the transaction in which this contract was deployed
Request
1
curl https://docs-demo.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{
5
"id":67,
6
"jsonrpc":"2.0",
7
"method":"qn_getTokenMetadataBySymbol",
8
"params": [{
9
"symbol": "USDC"
10
}]
11
}'
12
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free