Skip to main content

0.01 credits per call

slotSubscribe on Solana: Subscribes to receive notification when a slot is processed.

Endpoint

wss://rpc.goldrushdata.com/v1/solana-mainnet
slotSubscribe is a WebSocket subscription method. Authenticate with Authorization: Bearer <GOLDRUSH_API_KEY>. See authentication.

Parameters

This method takes no parameters.

Returns

number: Subscription id (used with slotUnsubscribe). Notifications arrive as slotNotification messages with {parent, root, slot}.
0

Examples

# Connect (header auth works from Node/CLI clients):
wscat -c "wss://rpc.goldrushdata.com/v1/solana-mainnet" \
  -H "Authorization: Bearer $GOLDRUSH_API_KEY"

# Once connected, send:
{"jsonrpc":"2.0","id":1,"method":"slotSubscribe","params":[]}

Errors

Standard JSON-RPC errors: -32600 invalid request, -32601 method not found, -32602 invalid params.