Skip to main content
Access CoinGecko’s professional API endpoints for price data, onchain token information, trending pools, and DEX analytics.

Simple Price Endpoint

Get current price and market data for cryptocurrencies by symbol or CoinGecko ID.

Endpoint

GET /coingecko/simple-price

x402 Payment Required

This endpoint uses CoinGecko’s x402 API. If x402 payment fails, it automatically falls back to CoinGecko’s free API to ensure data availability.

Parameters

vs_currencies
string
default:"usd"
Target currency (e.g., “usd”, “eur”, “btc”)
symbols
string
Comma-separated symbols (e.g., “btc,eth,sol”). Either symbols or ids is required.
ids
string
Comma-separated CoinGecko IDs (e.g., “bitcoin,ethereum,solana”). Either symbols or ids is required.
include_market_cap
boolean
Include market cap in response
include_24hr_vol
boolean
Include 24-hour volume
include_24hr_change
boolean
Include 24-hour price change percentage
include_last_updated_at
boolean
Include last update timestamp
precision
string
Price precision (e.g., “full”)

Example Request

curl "https://api.syraa.fun/coingecko/simple-price?symbols=btc,eth&include_24hr_change=true" \
  -H "Payment-Request: {x402-payment-header}"

Example Response

{
  "bitcoin": {
    "usd": 45000,
    "usd_24h_change": 2.5
  },
  "ethereum": {
    "usd": 3000,
    "usd_24h_change": 1.8
  }
}

Onchain Endpoints

Access CoinGecko’s onchain data for DEX pools and tokens across multiple networks.

Search Pools

Search for DEX pools by name, symbol, or contract address.

Endpoint

GET /coingecko/onchain/search-pools

Parameters

query
string
required
Search query (name, symbol, or contract address)
network
string
default:"solana"
Network ID (e.g., “solana”, “base”, “eth”)
page
string
Page number for pagination
include
string
Comma-separated fields: base_token, quote_token, dex

Example Request

curl "https://api.syraa.fun/coingecko/onchain/search-pools?query=SOL&network=solana" \
  -H "Payment-Request: {x402-payment-header}"

Get trending DEX pools by network.

Endpoint

GET /coingecko/onchain/trending-pools

Parameters

network
string
default:"base"
Network ID (e.g., “base”, “solana”, “eth”)
duration
string
default:"5m"
Time duration for trending calculation (e.g., “5m”, “1h”, “24h”)
page
string
Page number
include
string
Additional fields to include

Example Request

curl "https://api.syraa.fun/coingecko/onchain/trending-pools?network=base&duration=1h" \
  -H "Payment-Request: {x402-payment-header}"

Token Data

Get detailed onchain data for a specific token.

Endpoint

GET /coingecko/onchain/token

Parameters

network
string
default:"base"
Network ID (e.g., “base”, “solana”, “eth”)
address
string
required
Token contract address
include
string
Additional data to include (e.g., “top_pools”)
include_composition
boolean
Include token composition data

Example Request

curl "https://api.syraa.fun/coingecko/onchain/token?network=solana&address=So11111111111111111111111111111111111111112" \
  -H "Payment-Request: {x402-payment-header}"

Token Price

Get simple price data for onchain tokens by contract address.

Endpoint

GET /coingecko/onchain/token-price

Parameters

network
string
default:"base"
Network ID
address
string
required
Token contract address (comma-separated for multiple)
include_market_cap
boolean
Include market cap
include_24hr_vol
boolean
Include 24-hour volume
include_24hr_price_change
boolean
Include 24-hour price change

Example Request

curl "https://api.syraa.fun/coingecko/onchain/token-price?network=base&address=0x123...&include_24hr_vol=true" \
  -H "Payment-Request: {x402-payment-header}"

Error Responses

  • 400 Bad Request - Missing required parameters
  • 502 Bad Gateway - CoinGecko upstream request failed
  • 503 Service Unavailable - CoinGecko x402 payer unavailable

Data Source Header

Responses include X-Data-Source header:
  • coingecko-pro-x402 - Data from paid CoinGecko Pro API
  • coingecko-free - Fallback data from free CoinGecko API (simple-price only)

Build docs developers (and LLMs) love