Skip to main content

Documentation Index

Fetch the complete documentation index at: https://helius-auto-translations.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Endpoints

Enhanced WebSockets are available on mainnet and devnet:
  • Mainnet wss://mainnet.helius-rpc.com/?api-key=<api-key>
  • Devnet wss://devnet.helius-rpc.com/?api-key=<api-key>
WebSockets have a 10-minute inactivity timer; implementing health checks and sending pings every minute is heavily recommended to keep the WebSocket connection alive.

Authorizations

api-key
string
required
Your Helius API key. You can get one for free in the dashboard.

Body

params
array
required

Response

result
integer
Subscription id (needed to unsubscribe)
{
  "jsonrpc": "2.0",
  "id": 420,
  "method": "transactionSubscribe",
  "params": [
    {
      "accountInclude": ["675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8"]
    },
    {
      "commitment": "processed",
      "encoding": "jsonParsed",
      "transactionDetails": "full",
      "showRewards": true,
      "maxSupportedTransactionVersion": 0
    }
  ]
}
{
  "jsonrpc": "2.0",
  "result": 4743323479349712,
  "id": 420
}

Managing Subscriptions

Subscription IDs

When transactionSubscribe succeeds, the server returns a subscription ID in the result field. This is the same number that appears in params.subscription on every notification from that subscription:
{
  "jsonrpc": "2.0",
  "result": 4743323479349712,
  "id": 420
}
Store the subscription ID from the response. You need it to unsubscribe.

Unsubscribing

To stop receiving notifications, call transactionUnsubscribe with the subscription ID. Each transactionSubscribe call on the same connection creates a separate subscription with its own ID, so make sure to unsubscribe before resubscribing to avoid receiving duplicate notifications.
{
  "jsonrpc": "2.0",
  "id": 421,
  "method": "transactionUnsubscribe",
  "params": [4743323479349712]
}
A few in-flight messages may still arrive briefly after calling transactionUnsubscribe. This is expected behavior.