Skip to main content

Token Price API — Quick start

Quick integration flow

Before you start, prepare the X-API-Key assigned to your service and make sure your runtime can reach https://api.gelabs.org. See API reference for the full response shape, error codes, and field descriptions.

Set the API key

Store the API key in a server-side environment variable and avoid exposing it in frontend code or public repositories.

export API_KEY="your-api-key"

Get latest USD quotes for BTC and ETH

curl -H "X-API-Key: $API_KEY" "https://api.gelabs.org/price/api/v1/quotes/latest?ids=1,1027"

Switch target fiat

Use the fiat parameter to request another quote currency, such as CNY:

curl -H "X-API-Key: $API_KEY" "https://api.gelabs.org/price/api/v1/quotes/latest?ids=1,1027&fiat=CNY"

Continue integration

  • Use GET /price/api/v1/quotes/latest when you know internal token IDs.
  • Use GET /price/api/v1/quotes/contract-addresses when you know the chain and contract address.
  • See API reference for asset lists, fiat currencies, and DEX pool information.