ERPC - Mayor Solana RPC Documentación
Solana RPC Endpoint
Por favor, agregue su clave API al parámetro 'api-key'.
text
https://edge.erpc.global?api-key=<YOUR_API_KEY>https://edge.erpc.global?api-key=<YOUR_API_KEY>Ejemplos:
Aquí está un ejemplo de solicitud HTTP.
bash
curl https://edge.erpc.global?api-key=<YOUR_API_KEY> --header 'Content-Type: application/json' --data '{
"jsonrpc":"2.0","id":1,
"method":"getBlockHeight"
}'curl https://edge.erpc.global?api-key=<YOUR_API_KEY> --header 'Content-Type: application/json' --data '{
"jsonrpc":"2.0","id":1,
"method":"getBlockHeight"
}'Aquí hay un ejemplo de suscripción a WebSocket. El host es el mismo que HTTP.
text
wss://edge.erpc.global?api-key=<YOUR_API_KEY>wss://edge.erpc.global?api-key=<YOUR_API_KEY>bash
# Example: subscribe to slot updates
wscat -c "wss://edge.erpc.global?api-key=<YOUR_API_KEY>"
# After connected, send:
{"jsonrpc":"2.0","id":1,"method":"slotSubscribe"}# Example: subscribe to slot updates
wscat -c "wss://edge.erpc.global?api-key=<YOUR_API_KEY>"
# After connected, send:
{"jsonrpc":"2.0","id":1,"method":"slotSubscribe"}Usted puede obtener y comprobar su clave de API en ERPC Dashboard: ERPC Dashboard
Si necesita menor latencia que WebSocket, considere Geyser gRPC o Shredstream. Puede discutir detalles con nosotros a través de ERPC Dashboard.
Solana RPC Métodos y Documentación
Para la lista completa de métodos, parámetros y especificaciones de suscripción, consulte la documentación oficial. Cubre tanto el uso de HTTP como WebSocket.