How to use a Solana RPC Node
Authentication
We use Token Authentication at Syndica. All endpoints are protected by an API key which needs to be supplied in either the body of the RPC call or as part of the calling URL endpoint.
See the API Keys documentation for the steps to create an API key within your Syndica Account. Once created, the key can be utilized in the two methods outlined below to make calls to Solana.
To start using our Solana RPC Node service, use one of the two methods below:
API Key URL Embedded
curl https://solana-mainnet.api.syndica.io/api-key/<YOUR_API_KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":"1", "method":"getHealth"}'
API Key Header Embedded
curl https://solana-mainnet.api.syndica.io/ \
-X POST \
-H "Content-Type: application/json" \
-H "X-Syndica-Api-Key: <YOUR_API_KEY>" \
-d '{"jsonrpc":"2.0","id":"1", "method":"getHealth"}'
Valid RPC Server Response, which will be returned from the request above.
{ "jsonrpc": "2.0", "result": "ok", "id": 1 }
We also support WebSocket connections:
wss://solana-mainnet.api.syndica.io/api-key/<YOUR_API_KEY>
note
This is the body you pass to the RPC node itself (it is a proxy)
RPC Node Response:
{ "jsonrpc": "2.0", "result": 102611793, "id": "1" }