πŸ’²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 tradable on the Aptos mainnet network.

Accessing the Token Prices

The Token Prices can be accessed through the public API endpoint

  • 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.

API Usage Example:

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()

Query Parameter

  • tokenAddress (string): Comma-separated list of coin (legacy) and/or FA addresses. The API returns the price information for the specified tokens

Token Price Response

The response object contains the following fields:

  • chainId: The chain ID associated with the token (Default: 1 for Aptos Mainnet)

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

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

  • name: The on-chain registered name of the token

  • symbol: The on-chain registered symbol of the token

  • decimals: The number of decimal places of the token

  • usdPrice: The latest usd price of the token

Example Response

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

Attribution

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

Last updated