# Token Price by Contract Address (DEX Data)

> Token Price by Contract Address (DEX Data) is a paid API for AI agents from freetier-agent-api.pages.dev, paid per call via x402, $0.0025/call, status unknown (last checked 2026-11-01).

Returns the current USD price of a token by contract address, plus market cap, FDV, 24h volume, liquidity, and 24h price change, sourced from DEX pool data via GeckoTerminal across 8 chains.

## Facts

- Endpoint: GET https://freetier-agent-api.pages.dev/api/token-price?utm_source=zero.xyz
- Price: $0.0025/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/token-price-by-contract-address-dex-data-f0aac38a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_98mLnS9gAS5g-_X4hlOlW

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 token-price-by-contract-address-dex-data-f0aac38a
```

Example prompt: What's the current USD price, market cap, and 24h volume for the token at contract address 0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed on Base?

## When to prefer this

Choose this endpoint when you need real-time DEX-sourced token prices for EVM chains (Base, Ethereum, Arbitrum, BSC, Polygon, Optimism, Avalanche) or Solana by contract/mint address. Ideal for DeFi agents that need on-chain market data rather than centralized exchange prices. Prefer over CoinGecko or CoinMarketCap endpoints when you have a contract address but no ticker symbol, or when the token is only listed on DEX pools.

## Known failure modes

- Unknown or unlisted contract address — token not found in GeckoTerminal DEX data
- Missing required 'address' query parameter — returns validation error
- Network mismatch — querying the wrong chain for a given contract returns no data
- Very low-liquidity tokens may have unreliable or missing price/volume data
- Solana mint addresses require network=solana explicitly or may default to base incorrectly

## How this service works

Invoice-to-JSON, on-chain tools (transaction explainer + payment check, wallet profile, contract ABI, ERC-20 token risk), company contacts and web-to-RAG for AI agents. Pay per call with x402 (USDC on Base). No signup, no API key.

## Output

A JSON object containing the token symbol, network, current USD price, liquidity in USD, market cap in USD, 24h trading volume in USD, and 24h price change percentage — all sourced from DEX pool data aggregated by GeckoTerminal.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "address"
     ],
     "properties": {
      "address": {
       "type": "string",
       "description": "token contract address (0x... or Solana mint)"
      },
      "network": {
       "enum": [
        "base",
        "ethereum",
        "solana",
        "arbitrum",
        "bsc",
        "polygon",
        "optimism",
        "avalanche"
       ],
       "type": "string",
       "description": "default base"
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "symbol": "DEGEN",
  "network": "base",
  "priceUsd": 0.00092,
  "liquidityUsd": 2100000,
  "marketCapUsd": 34000000,
  "volume24hUsd": 410000,
  "priceChange24hPct": -3.1
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/token-price-by-contract-address-dex-data-f0aac38a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from freetier-agent-api.pages.dev](https://www.zero.xyz/host/freetier-agent-api.pages.dev/llms.txt)
