token - Solana Market Data

The token topic streams metadata for a single token selected with the mint parameter — name, ticker, decimal precision, and current supply. It does not use base, quote, or window.

This topic is currently not returning data. The service accepts token as a valid topic name, but a subscription to it receives no acknowledgement, no data, and no error — the request is silently dropped and the client waits indefinitely. Verified against mint values for SOL and USDC, with mint omitted, and with empty params.

Do not build against this topic yet, and set a client-side timeout on the subscription acknowledgement so a request cannot hang. For token decimals in the meantime, use base_decimals and quote_decimals from the trades topic.

Parameters

Pass one structured request object to getblock_subscribe, with "source": "market" and "topic": "token". The fields below go inside the nested params object.

ParameterTypeRequiredDescription
mintstringYesBase58-encoded mint address of the token to track.
hydrateintegerNoSize of the row set to maintain, 1–100.
throttlestringNoMinimum interval between pushes. A positive integer followed by ms, s, m, or h.

base, quote, and window are not used by this topic.

Request Example

bash# WebSocket-only. Connect first:
wscat -c 'wss://stream.eu-central-1.getblock.io/v1/solana-mainnet/stream?apiKey=<API-KEY>'

# Then send:
{"jsonrpc":"2.0","id":"getblock.io","method":"getblock_subscribe","params":[{"source":"market","topic":"token","params":{"mint":"So11111111111111111111111111111111111111112","hydrate":5}}]}
javascriptconst ws = new WebSocket(
  'wss://stream.eu-central-1.getblock.io/v1/solana-mainnet/stream?apiKey=<API-KEY>'
);

ws.onopen = () => {
  ws.send(JSON.stringify({
    jsonrpc: '2.0',
    id: 'getblock.io',
    method: 'getblock_subscribe',
    params: [{
      source: 'market',
      topic: 'token',
      params: { mint: 'So11111111111111111111111111111111111111112', hydrate: 5 }
    }]
  }));

  // The topic currently does not acknowledge. Fail fast rather than hang.
  setTimeout(() => {
    if (!subscriptionId) {
      console.error('No subscription acknowledgement — token topic unavailable.');
      ws.close();
    }
  }, 10_000);
};
pythonimport asyncio, json, websockets

URL = 'wss://stream.eu-central-1.getblock.io/v1/solana-mainnet/stream?apiKey=<API-KEY>'

async def main():
    async with websockets.connect(URL) as ws:
        await ws.send(json.dumps({
            "jsonrpc": "2.0",
            "id": "getblock.io",
            "method": "getblock_subscribe",
            "params": [{
                "source": "market",
                "topic": "token",
                "params": {"mint": "So11111111111111111111111111111111111111112", "hydrate": 5}
            }]
        }))

        # The topic currently does not acknowledge. Fail fast rather than hang.
        try:
            message = await asyncio.wait_for(ws.recv(), timeout=10)
        except asyncio.TimeoutError:
            raise RuntimeError('No subscription acknowledgement — token topic unavailable.')

asyncio.run(main())

Response Example

The shape below is the specified response for this topic. It could not be captured from a live subscription because the topic does not currently return data, so treat it as provisional until the topic is working.

json{
  "jsonrpc": "2.0",
  "method": "getblock_subscribe",
  "params": {
    "subscription": "0x4503d281ca474f3322ed277fde75db15",
    "result": {
      "inserts": [
        {
          "id": 1,
          "mint": "So11111111111111111111111111111111111111112",
          "name": "Wrapped SOL",
          "symbol": "SOL",
          "decimals": "9",
          "supply": "0"
        }
      ],
      "updates": [],
      "deletes": []
    }
  }
}

Response Parameters

FieldTypeDescription
idnumberRow identifier. Stable across updates and deletes.
mintstringToken mint address.
namestringToken name.
symbolstringToken ticker symbol.
decimalsstringDecimal precision of the token.
supplystringCurrent token supply.

Use Cases

  • Resolving a mint address to a display name and ticker in a UI
  • Reading decimal precision to convert raw amounts to human-readable values
  • Tracking supply changes for a token
  • Enriching trade and candle rows, which carry mint addresses rather than symbols

Error Handling

CodeMessageCause
(none)No responseKnown issue — the topic accepts the subscription but never acknowledges it.
-32602base must be a base58-encoded 32-byte Solana public keymint is not a valid mint address.
-32602hydrate must be an integer from 1 to 100hydrate is outside the accepted range.
HTTP 401authorization failedAPI key missing, invalid, or the product is not activated on it.