Cambrian List Tokens API

By Cambrian Network solana

GET /api/v1/solana/tokens

List Tokens

Overview

Returns a paginated list of known tokens for the Solana chain. Each entry includes the token's program ID (mint address), symbol, name, and decimal precision, so it works well for building token selectors, lookups, and reference datasets.

Business Value

  • Token Discovery: Access a comprehensive database of Solana tokens for portfolio tracking, DeFi applications, and market analysis
  • Integration Support: Standardized token metadata enables seamless integration with wallets, DEXs, and trading platforms
  • Data Reliability: Curated token list ensures accurate symbol and decimal information for financial calculations
  • Scalable Access: Pagination support allows efficient handling of large token datasets without performance impact
  • Real-time Updates: Access to the latest token additions and metadata changes in the Solana ecosystem

Endpoint Details

URL:

https://api.cambrian.org/solana/tokens

Method: GET
Authentication: Required via X-API-Key header

Query Parameters

Parameter Type Required Default Description
limit integer No 100 Limit the number of results. Minimum: 1. Maximum: 300.
offset integer No 0 Offset the results, allows you to skip a number of rows before starting to return rows. Minimum: 0. Maximum: 100000000.

Response Field Descriptions

Response Field Type Description
programId String The token's program ID (mint address) on Solana
symbol String The token's ticker symbol
name String The token's full name
decimals UInt8 Number of decimal places used by the token

Examples

1. List Solana Tokens

This example retrieves a page of known Solana tokens with their mint address, symbol, name, and decimals.

curl -X GET "https://api.cambrian.org/solana/tokens?limit=10" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response:

[
  {
    "columns": [
      {
        "name": "programId",
        "type": "String"
      },
      {
        "name": "symbol",
        "type": "String"
      },
      {
        "name": "name",
        "type": "String"
      },
      {
        "name": "decimals",
        "type": "UInt8"
      }
    ],
    "data": [
      [
        "8u6a8sQX6NMfXb7M65miZ9Y5hmDft26Aaffeeas8pump",
        "PFDESIGNER",
        "Designing Pump.fun Merch Live",
        6
      ],
      [
        "8u6aN6VeL6xQByL1aBYqc3efCpbJ1vUwMB4uaZT4moon",
        "UNITED",
        "Btr",
        6
      ],
      [
        "8u6b1Us3GnQg8jdVY8yofiexxrPTL1Qb6emmbqYPpump",
        "SHALLA BAL",
        "Silver Surfers Girlfriend",
        6
      ],
      [
        "8u6bE6fxRurkdRNuRz1gmKjYCEewRdgpZkRbb2iCmoon",
        "TRNS",
        "TransCoin",
        6
      ],
      [
        "8u6bXpxJKjJez3nLmShkPqoDmTUrBEqcoHtuUVtypump",
        "SLANG",
        "Trench Dictionary",
        6
      ],
      [
        "8u6bbTPATEDdefVnLgkukyvZ9XJUkW3RXuwcwuE3pump",
        "\u200e ",
        "\u200e ",
        6
      ],
      [
        "8u6beM4bPK4xvp3RD9AyKdNEbUhjB6gcNMpKzxLzpump",
        "Slug",
        "Floofy Smol Kitty",
        6
      ],
      [
        "8u6bggJuQuuGutSz6JCiKTXSbLUx3LmPoPki4pk8pump",
        "MAY",
        "MayAswellYolo",
        6
      ],
      [
        "8u6c4w5odK2tNNqBpzZyqKZUCuUuDb9EDdZzUJBt9Wc8",
        "00",
        "Grumpy Cat",
        6
      ],
      [
        "8u6cKFjmFYSL7XMRHGzsvW3ropwH3CQc1cPSdeYBpump",
        "Spoder",
        "Spoderman",
        6
      ]
    ],
    "rows": 10
  }
]

Note: This example limits the result collection to 10 items. The response above returns 10 Solana tokens, each with its programId, symbol, name, and decimals fields populated from the columnar columns/data structure.

x402 Payment Option

This endpoint supports pay-per-use access via the x402 payment protocol (v2): pay $0.05 USDC per request using blockchain micropayments. No API key required.

Quick Start (TypeScript)

npm install @x402/fetch @x402/evm viem
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
const client = new x402Client();
client.register("eip155:*", new ExactEvmScheme(signer));

const fetchWithPayment = wrapFetchWithPayment(fetch, client);
const response = await fetchWithPayment(
  "https://x402.cambrian.org/solana/tokens"
);
const data = await response.json();

Quick Start (Python)

pip install "x402[httpx]"
import asyncio, os
from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

async def main():
    client = x402Client()
    account = Account.from_key(os.getenv("EVM_PRIVATE_KEY"))
    register_exact_evm_client(client, EthAccountSigner(account))

    async with x402HttpxClient(client) as http:
        response = await http.get("https://x402.cambrian.org/solana/tokens")
        print(response.json())

asyncio.run(main())

Payment Flow

  1. Send a normal request to the endpoint; you don't need an API key for this step
  2. Server returns 402 Payment Required with payment details
  3. The x402 SDK automatically signs a payment authorization with your wallet
  4. The SDK resubmits the request with the signed payment
  5. Server verifies payment and returns the API response

The x402 SDK handles steps 2 through 5 automatically.

Network: Base (chain ID 8453) | Currency: USDC | Price: $0.05 per request