WebSocket Authentication
Every WebSocket connection must be authenticated by passing your API token as a query parameter.
Get a token
Sign in with your Solana wallet, open Builder → Access, and create a token. You can issue and revoke tokens there at any time.
To try the API before signing up, use the shared demo token raptor-demo-token - it is rate-limited and intended only for testing.
Query Parameter Auth
Browsers cannot set custom headers on a WebSocket handshake. Therefore, both WebSocket endpoints—the query (rpc) socket and the subscription socket—take your token as a token query parameter.
# queries over WebSocket
wss://rpc.raptor.trade?token=$RAPTOR_TOKEN
# subscriptions
wss://sub.raptor.trade?token=$RAPTOR_TOKENNext steps
With WebSocket authentication set up, learn how to connect and stream with the WebSocket SDK or read about how Subscriptions work.
