πŸ’²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: This API key's limits should be sufficient for most use cases. For protocols in the Aptos ecosystem, please submit a ticket on Discord to get a dedicated API key.

API Usage Example:

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

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

const query = {
  tokenAddress: "0xbae207659db88bea0cbead6da0ed00aac12edcdda169e591cd41c94180b46f3b",
}

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

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

  • tokenAddress (string, optional): Comma-separated list of coin (legacy) and / or FA addresses. The API returns the price information for the specified tokens. If not provided, the query will return prices of all tokens having liquidity above a nominal threshold.

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

  • nativePrice: The latest price of the token relative to the native token

Example Response

[
    {
        "chainId": 1,
        "tokenAddress": null,
        "faAddress": "0xbae207659db88bea0cbead6da0ed00aac12edcdda169e591cd41c94180b46f3b",
        "name": "USDC",
        "symbol": "USDC",
        "decimals": 6,
        "usdPrice": "0.99995",
        "nativePrice": "0.18077031"
    }
]

Attribution

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

Last updated