For the complete documentation index, see llms.txt. This page is also available as Markdown.

token - Solana Market Data

Stream Solana token metadata by mint address. Complete guide on how to use the token topic in GetBlock Solana Market Data documentation.

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.

Parameters

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

Parameter
Type
Required
Description

mint

string

Yes

Base58-encoded mint address of the token to track.

hydrate

integer

No

Size of the row set to maintain, 1–100.

throttle

string

No

Minimum 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

# 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}}]}
const 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);
};

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.

Response Parameters

Field
Type
Description

id

number

Row identifier. Stable across updates and deletes.

mint

string

Token mint address.

name

string

Token name.

symbol

string

Token ticker symbol.

decimals

string

Decimal precision of the token.

supply

string

Current 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

Code
Message
Cause

(none)

No response

Known issue — the topic accepts the subscription but never acknowledges it.

-32602

base must be a base58-encoded 32-byte Solana public key

mint is not a valid mint address.

-32602

hydrate must be an integer from 1 to 100

hydrate is outside the accepted range.

HTTP 401

authorization failed

API key missing, invalid, or the product is not activated on it.

Last updated

Was this helpful?