Indexer API

REST API documentation for the indexer service.

SolSoul Indexer API

The SolSoul indexer (services/indexer) subscribes to on-chain program logs, parses events into a SQLite database, and exposes a REST API for token discovery and Soul provenance.

Base URL

  • Local: http://localhost:8080
  • Devnet: https://indexer-production-bf20.up.railway.app

Endpoints

Health Check

GET /health

Response:

{
  "ok": true,
  "service": "solsoul-indexer",
  "inserted": 42,
  "subscriptions": 2
}

List All Tokens

GET /tokens

Query parameters:

ParameterTypeDefaultDescription
limitinteger50Max results
offsetinteger0Pagination offset
sortstringcreated_at_desccreated_at_desc, price_asc, price_desc

Response:

{
  "tokens": [
    {
      "mint": "Mint11111111111111111111111111111111111111",
      "symbol": "SOUL",
      "name": "Soul Token",
      "creator": "Creator111111111111111111111111111111111111",
      "current_price": "0.000001 SOL/token",
      "cumulative_sol": "150000000000",
      "total_minted": "5000000000000",
      "generation_count": 12,
      "claim_count": 3,
      "created_at": "2026-05-01T12:00:00Z",
      "self_deprecated": false
    }
  ],
  "total": 1,
  "limit": 50,
  "offset": 0
}

Get Token Detail

GET /tokens/:mint

Response:

{
  "mint": "Mint11111111111111111111111111111111111111",
  "symbol": "SOUL",
  "name": "Soul Token",
  "creator": "Creator111111111111111111111111111111111111",
  "current_price": "0.000001 SOL/token",
  "cumulative_sol": "150000000000",
  "total_minted": "5000000000000",
  "generation_count": 12,
  "claim_count": 3,
  "created_at": "2026-05-01T12:00:00Z",
  "self_deprecated": false,
  "curve_pda": "CurvePDA1111111111111111111111111111111111",
  "vault_pda": "VaultPDA1111111111111111111111111111111111",
  "soul_pda": "SoulPDA11111111111111111111111111111111111"
}

Get Token Generations

GET /tokens/:mint/generations

Response:

{
  "generations": [
    {
      "generation": 1,
      "side": "buy",
      "amount": "1000000",
      "trader": "Trader1111111111111111111111111111111111",
      "seed_hash": "abcdef0123456789",
      "slot": "458769366",
      "signature": "Signature111111111111111111111111111111111",
      "created_at": "2026-05-01T12:05:00Z"
    }
  ]
}

Get Token Claims

GET /tokens/:mint/claims

Response:

{
  "claims": [
    {
      "sequence": 1,
      "claimer": "Claimer111111111111111111111111111111111",
      "nft_mint": "NftMint111111111111111111111111111111111",
      "generation": 1,
      "claimed_at": "2026-05-01T12:10:00Z"
    }
  ]
}

Get Soul SVG

GET /tokens/:mint/souls/:generation/svg

Returns the raw SVG bytes with Content-Type: image/svg+xml.

Search Tokens

GET /tokens/search?q=:query

Searches by symbol or name (case-insensitive prefix match).

WebSocket Events

The indexer emits WebSocket events for real-time updates:

const ws = new WebSocket('wss://indexer-production-bf20.up.railway.app/ws');

ws.onmessage = (event) => {
  const data = JSON.parse(event.data);
  // data.type: 'token_created' | 'generation' | 'claim' | 'buy' | 'sell'
  // data.payload: event-specific data
};

Database Schema

token_rows

ColumnTypeDescription
mintTEXT PRIMARY KEYToken mint address
symbolTEXTToken symbol
nameTEXTToken name
creatorTEXTLauncher pubkey
cumulative_solINTEGERTotal SOL deposited (lamports)
total_mintedINTEGERTotal tokens minted (base units)
generation_countINTEGERNumber of Soul generations
claim_countINTEGERNumber of claimed Souls
created_atTEXT ISO8601Launch timestamp
self_deprecatedINTEGER0 or 1

generation_events

ColumnTypeDescription
idINTEGER PRIMARY KEYAuto-increment
token_mintTEXTForeign key to token_rows
generationINTEGERGeneration number
sideTEXT"buy" or "sell"
amountINTEGERTrade amount
traderTEXTTrader pubkey
seed_hashTEXTDeterministic seed hash
slotINTEGERSlot number
signatureTEXTTransaction signature
created_atTEXT ISO8601Event timestamp

claim_events

ColumnTypeDescription
idINTEGER PRIMARY KEYAuto-increment
token_mintTEXTForeign key to token_rows
sequenceINTEGERClaim sequence
claimerTEXTClaimer pubkey
nft_mintTEXTNFT mint address
generationINTEGERClaimed generation
claimed_atTEXT ISO8601Claim timestamp

Error Responses

All errors use the following format:

{
  "error": "description",
  "code": "ERROR_CODE"
}

Common codes:

CodeHTTP StatusMeaning
NOT_FOUND404Token or resource not found
INVALID_MINT400Invalid mint address format
RATE_LIMITED429Too many requests
INTERNAL_ERROR500Server error

Document version: 2026-05-04