Sei Endpoints RPC calls

Authenticating

To authenticate when using Sei RPCs, you need to include an authorization header with your API key as the bearer token.

As an example:

curl "https://<endpoint>" -H 'Authorization: Bearer <your API key>'

SEI Supported RPC Method Endpoints

You can use the different Sei RPC methods through different paths on your endpoint. You can view your specific endpoint on the dashboard .

RPC MethodsHTTP EndpointWebSocket Endpoint
Seihttps://<endpoint>/sei wss://<endpoint>/sei/websocket
Ethereumhttps://<endpoint>/eth wss://<endpoint>/eth/websocket
Tenderminthttps://<endpoint>/tendermint wss://<endpoint>/tendermint/websocket
Cosmoshttps://<endpoint>/cosmos N/A
CosmWasmhttps://<endpoint>/cosmwasm N/A

Please refer to the full Sei documentation for the latest methods available through these method sets.

WebSocket Connections

WebSocket connections are available for Ethereum RPC methods, enabling real-time event subscriptions and streaming data.

Endpoints:

  • wss://<endpoint>/eth/websocket
  • wss://<endpoint>/sei/websocket (alias to eth/websocket)

Authentication: Include your API key in the connection headers:

const WebSocket = require('ws');

const ws = new WebSocket('wss://<endpoint>/websocket', {
  headers: {
    'Authorization': 'Bearer <your API key>'
  }
});

ws.on('open', () => {
  // Send JSON-RPC requests
  ws.send(JSON.stringify({
    jsonrpc: '2.0',
    method: 'eth_blockNumber',
    params: [],
    id: 1
  }));
});

ws.on('message', (data) => {
  const response = JSON.parse(data);
  console.log('Response:', response.result);
});

Supported Methods: All standard Ethereum JSON-RPC methods are supported over WebSocket, including subscriptions via eth_subscribe.

Archival Data

You can access archival data by prepending archive. to your endpoint. Such as https://archive.<endpoint> .