TarifsGitHubTableau de bord

Solana

geyser.Geyser/Subscribe25 crédits

Opens a bidirectional stream of slot, account, transaction and block updates (gRPC; one stream is billed once).

Réseau: solana

Paramètres

NomTypeDescription
accountsmap<string, SubscribeRequestFilterAccounts>Account filters by name. Each filter: account (string[]), owner (string[]), filters (memcmp { offset, bytes | base58 | base64 }, datasize, token_account_state, lamports { eq | ne | lt | gt }), nonempty_txn_signature (bool). (facultatif)
slotsmap<string, SubscribeRequestFilterSlots>Slot filters by name. Each filter: filter_by_commitment (bool), interslot_updates (bool). (facultatif)
transactionsmap<string, SubscribeRequestFilterTransactions>Transaction filters by name. Each filter: vote (bool), failed (bool), signature (string), account_include, account_exclude, account_required (string[]). (facultatif)
transactions_statusmap<string, SubscribeRequestFilterTransactions>Transaction status filters by name; same filter fields as transactions. (facultatif)
blocksmap<string, SubscribeRequestFilterBlocks>Block filters by name. Each filter: account_include (string[]), include_transactions, include_accounts, include_entries (bool). (facultatif)
blocks_metamap<string, SubscribeRequestFilterBlocksMeta>Block metadata filters by name; the filter message has no fields. (facultatif)
entrymap<string, SubscribeRequestFilterEntry>Entry filters by name; the filter message has no required fields. (facultatif)
commitmentCommitmentLevelCommitment level: 0 = PROCESSED, 1 = CONFIRMED, 2 = FINALIZED. Optional. (facultatif)
accounts_data_sliceSubscribeRequestAccountsDataSlice[]Slices { offset, length } (uint64) of account data to return. (facultatif)
pingSubscribeRequestPing{ id: int32 }; the node answers with a pong update. (facultatif)
from_slotuint64Replay updates starting from this slot (see SubscribeReplayInfo). (facultatif)

Valeur renvoyée

Type

stream SubscribeUpdate

A stream of messages { filters: string[], created_at: Timestamp, update_oneof } where update_oneof is one of account, slot, transaction, transaction_status, block, ping, pong, block_meta or entry. filters lists the names of the matched filters from the request.

Exemples de code

# the key of the endpoint goes in the x-token header; add -proto <file> when the node has no gRPC reflection
grpcurl \
  -H 'x-token: 7c9e6679-7425-40de-944b-e07fc1f90ae7' \
  -d '{
  "slots": {
    "slots": {
      "filter_by_commitment": true
    }
  },
  "commitment": 1
}' \
  grpc-holy-burned-sky-solana-mainnet.rpcnode.dev:443 \
  geyser.Geyser/Subscribe