πŸ’²Token Prices

The Panora Price API provides real-time price data for tokens on the Aptos chain, making it easy for developers to integrate accurate pricing information into their dApps.

Key Features

  • Real-Time Price Feeds: Get up-to-date token prices for accurate trading and analysis.

  • Wide Token Coverage: Supports all tokens tradeable on the Aptos mainnet network.

Getting Started

  • Public API Key:

    a4^KV_EaTf4MW#ZdvgGKX#HUD^3IFEAOV_kzpIE^3BQGA8pDnrkT7JcIy#HNlLGi

    Note: For large-scale apps, please raise a ticket on Discord for a dedicated key.

Get token prices:

GET https://api.panora.exchange/prices

const end_point = "https://api.panora.exchange/prices"

const query = {
  tokenAddress: "0x1::aptos_coin::AptosCoin",
}

const headers = {
  "x-api-key":
    "a4^KV_EaTf4MW#ZdvgGKX#HUD^3IFEAOV_kzpIE^3BQGA8pDnrkT7JcIy#HNlLGi",
}

const queryString = new URLSearchParams(query)
const url = `${end_point}?${queryString}`

const response = await(
  await fetch(url, {
    method: "GET",
    headers: headers,
  })
).json()

Parameters

  1. tokenAddress - string Comma-separated list of token addresses. The API returns the price information for the specified tokens)

Aptos Token Prices Response

The response object consists of the following fields:

  • chainId: The chain ID to which the token belongs. (Note: The default chain ID is 1 for Aptos Mainnet)

  • tokenAddress: The complete address used to identify the token as per the Aptos Coin Standard (Legacy)

  • faAddress: The complete address used to identify the token as per the Aptos Fungible Asset (FA) Standard

  • name: The name of the token

  • symbol: The symbol registered by the token minter on-chain

  • decimals: The number of decimal places for the token

  • usdPrice: The current usd price of the token

Sample response:

{
    "chainId": 1,
    "tokenAddress": "0x1::aptos_coin::AptosCoin",
    "faAddress": "0xa",
    "name": "Aptos Coin",
    "symbol": "APT",
    "decimals": 8,
    "usdPrice": "7.8550984"
 }

Attribution

Kindly include proper attribution when using the API in projects or presentations. Mention β€œPowered by Panora” wherever applicable.


Last updated