# CoinGecko On-Chain Solana SPL Token Price

> CoinGecko On-Chain Solana SPL Token Price is a paid API for AI agents from pro-api.coingecko.com, paid per call via x402, $0.010000/call, status unknown (last checked 2026-09-15).

Returns the current USD price and optional market data for a specific Solana SPL token (4BmaxxckzuAnFZANYP8uZ4MQUBLoKBHxbx1xbZSDbank) using on-chain data

## Facts

- Endpoint: GET https://pro-api.coingecko.com/api/v3/x402/onchain/simple/networks/solana/token_price/4BmaxxckzuAnFZANYP8uZ4MQUBLoKBHxbx1xbZSDbank
- Price: $0.010000/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pro-api-coingecko-com-c0f730eb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_h_RX1tW9jEsLRKJwG4zPd

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability pro-api-coingecko-com-c0f730eb
```

Example prompt: What's the current USD price of the Solana token with mint address 4BmaxxckzuAnFZANYP8uZ4MQUBLoKBHxbx1xbZSDbank, and can you also include its 24-hour volume, market cap, and price change?

## When to prefer this

Use this endpoint when you need a real-time, on-chain USD price for the specific Solana SPL token at mint address 4BmaxxckzuAnFZANYP8uZ4MQUBLoKBHxbx1xbZSDbank. Prefer this over off-chain or aggregated price feeds when on-chain accuracy matters, or when building DeFi workflows on Solana. Choose over generic CoinGecko coin price endpoints when the asset is a Solana SPL token identified by mint address rather than a CoinGecko coin ID.

## Known failure modes

- Invalid or unknown mint address returns empty or error response
- Token with no liquidity may return null market cap and zero volume
- Network outage on Solana may cause stale or unavailable price data
- Missing x402 payment header results in 402 Payment Required response
- Rate limiting if payment not processed correctly

## How this service works

Fetch the current USD price for a Solana SPL token using on-chain data by providing its mint address.

## Output

Returns a JSON object keyed by the token mint address containing the current USD price as a high-precision decimal string, plus optional fields: 24h trading volume in USD, market cap in USD (may be null for low-liquidity tokens), and 24h price change percentage.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "include_24hr_vol": true,
   "include_market_cap": true,
   "include_24hr_price_change": true
  }
 },
 "output": {
  "type": "object",
  "example": {
   "4BmaxxckzuAnFZANYP8uZ4MQUBLoKBHxbx1xbZSDbank": {
    "usd": 0,
    "usd_24h_vol": 0,
    "usd_24h_change": 0,
    "usd_market_cap": 0
   }
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "include_24hr_vol": {
       "type": "boolean"
      },
      "mcap_fdv_fallback": {
       "type": "boolean"
      },
      "include_market_cap": {
       "type": "boolean"
      },
      "include_inactive_source": {
       "type": "boolean"
      },
      "include_24hr_price_change": {
       "type": "boolean"
      },
      "include_total_reserve_in_usd": {
       "type": "boolean"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "data"
 ],
 "properties": {
  "data": {
   "type": "object",
   "required": [
    "id",
    "type",
    "attributes"
   ],
   "properties": {
    "id": {
     "type": "string"
    },
    "type": {
     "type": "string"
    },
    "attributes": {
     "type": "object",
     "required": [
      "token_prices",
      "h24_volume_usd",
      "market_cap_usd",
      "h24_price_change_percentage"
     ],
     "properties": {
      "token_prices": {
       "type": "object",
       "required": [
        "4BmaxxckzuAnFZANYP8uZ4MQUBLoKBHxbx1xbZSDbank"
       ],
       "properties": {
        "4BmaxxckzuAnFZANYP8uZ4MQUBLoKBHxbx1xbZSDbank": {
         "type": "string"
        }
       }
      },
      "h24_volume_usd": {
       "type": "object",
       "required": [
        "4BmaxxckzuAnFZANYP8uZ4MQUBLoKBHxbx1xbZSDbank"
       ],
       "properties": {
        "4BmaxxckzuAnFZANYP8uZ4MQUBLoKBHxbx1xbZSDbank": {
         "type": "string"
        }
       }
      },
      "market_cap_usd": {
       "type": "object",
       "required": [
        "4BmaxxckzuAnFZANYP8uZ4MQUBLoKBHxbx1xbZSDbank"
       ],
       "properties": {
        "4BmaxxckzuAnFZANYP8uZ4MQUBLoKBHxbx1xbZSDbank": {
         "type": "null"
        }
       }
      },
      "h24_price_change_percentage": {
       "type": "object",
       "required": [
        "4BmaxxckzuAnFZANYP8uZ4MQUBLoKBHxbx1xbZSDbank"
       ],
       "properties": {
        "4BmaxxckzuAnFZANYP8uZ4MQUBLoKBHxbx1xbZSDbank": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pro-api-coingecko-com-c0f730eb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pro-api.coingecko.com](https://www.zero.xyz/host/pro-api.coingecko.com/llms.txt)
