Register and show off your project at Ethereum QuickPitch and win $10,000. Apply now


qn_getTokenMetadataBySymbol RPC method

The API credit value for this method is 4 . To learn more about API credits and each method's value, visit the API Credits page.

Supports ERC-20 compliant contracts (on Ethereum mainnet).


  1. x-qn-api-version — (Integer - optional) Provide an optional request header specifying the QuickNode API version you're targeting. Using this header is recommended as it will become mandatory (required) in the future. Current API version is 1.


  1. Object — Custom Object with the following fields:

    symbol — (String) The ERC-20 token symbol you'd like to get details for.

    page — (Integer - optional) 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 - optional) 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.


  1. Object — Custom Response Object, or null if no Token details found:

    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.

    totalItems — The total number of tokens matching the supplied symbol.

    totalPages — The total number of results pages available.

    pageNumber — The page number of results that was returned with this response.

Code Examples:

const ethers = require("ethers");
(async () => {
  const provider = new ethers.providers.JsonRpcProvider("");
  provider.connection.headers = { "x-qn-api-version": 1 };
  const heads = await provider.send("qn_getTokenMetadataBySymbol", {
    symbol: "USDC",
Ready to get started? Create a free account