Logo
新用户订阅 RPC,首月享 6.5 折优惠查看优惠
RPC Assistant

Solana Public RPC Endpoints

摘要

Solana public RPC endpoints are free, shared JSON-RPC gateways that let developers read network state, send transactions, and subscribe to updates without running their own node. The mainnet endpoint is https://api.mainnet-beta.solana.com; Devnet uses https://api.devnet.solana.com. They require no API key and support standard Solana RPC methods, which makes them convenient for prototyping, development, and low-volume testing. Public endpoints are shared across all users, so the operator enforces rate limits and can change them without notice. They do not provide archive data by default, WebSocket capacity is shared, and there is no uptime guarantee. That makes them unsuitable for production dApps with real users or high request volumes. For development, use Devnet and test SOL from the official faucet. For production, a managed Solana RPC service or dedicated node provides predictable capacity, HTTP/WebSocket access, archive support, and a support path. Before choosing, estimate request volume, required RPC methods, and latency expectations. Always check the current Solana cluster documentation before relying on a public endpoint.

关键要点

  • Public Solana RPC endpoints are free, shared JSON-RPC gateways for mainnet and Devnet, but they are rate-limited and not for production.
  • Mainnet endpoint: https://api.mainnet-beta.solana.com; Devnet endpoint: https://api.devnet.solana.com with test SOL from the faucet.
  • Rate limits are enforced per IP and can change; always check current Solana docs before relying on public endpoints.
  • For production, a managed Solana RPC service or dedicated node provides predictable capacity, WebSocket stability, archive access, and support.

Solana Mainnet Public RPC Endpoint

Mainnet is the live Solana network using real SOL. The public JSON-RPC endpoint is https://api.mainnet-beta.solana.com. It is shared and rate-limited, so use it for quick reads, transaction simulation, and low-volume dApp calls, not sustained production traffic.

You can test basic connectivity with a JSON-RPC call such as: curl https://api.mainnet-beta.solana.com -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"getSlot"}'

For OnFinality managed Solana endpoints and network details, see the Solana network page.

  • HTTP and WebSocket access to standard Solana JSON-RPC methods.
  • No API key required, but IP-based rate limits apply.
  • Shared capacity; heavy methods such as getProgramAccounts may be throttled.
  • Use api.mainnet-beta.solana.com for mainnet; verify current limits in official Solana documentation.

Solana Devnet Public RPC Endpoint

Devnet is for development and testing only; it uses test SOL and is not production. The public endpoint is https://api.devnet.solana.com. You can get test SOL from the official faucet at https://faucet.solana.com or via Solana CLI (solana airdrop).

Do not send real SOL to Devnet addresses. Use Devnet to test transactions, smart contracts, and RPC methods without risking mainnet funds.

See Solana Devnet guide and Devnet network page for setup and cluster details.

Public RPC Rate Limits

Public endpoints enforce rate limits to protect shared infrastructure. Limits are applied per IP address and can change without notice. Do not assume a fixed request-per-second number; check the current Solana cluster documentation before integrating.

When you exceed the limit, the endpoint may return HTTP 429 Too Many Requests or HTTP 403 Forbidden, or drop the connection. Handle these errors with exponential backoff, caching, and reduced polling.

WebSocket subscriptions also share capacity and may be disconnected under load.

  • Rate limits apply to HTTP and WebSocket connections.
  • HTTP 429 and 403 are common signals of shared capacity exhaustion.
  • Apply backoff and retry logic for transient errors.
  • Cache expensive calls such as getProgramAccounts and getSignaturesForAddress.
  • Consider batching multiple JSON-RPC calls in one request where the endpoint supports it.

When Public RPC Is Enough

Public RPC endpoints are suitable for prototypes, learning exercises, one-off scripts, hackathons, and low-volume development. They work well when occasional failures or latency spikes do not affect user experience.

For CI and automated tests, use a local validator (solana-test-validator) or Devnet to avoid consuming public endpoint quota. Public endpoints are also fine for small private betas with limited traffic.

  • Local scripts and manual balance checks.
  • Development and testing on Devnet.
  • Hackathons and short-lived demos.
  • Low-traffic personal wallets or dashboards where temporary unavailability is acceptable.

Public RPC vs Managed Solana RPC

Managed Solana RPC services provide private or higher-tier shared endpoints with defined capacity, HTTP/WebSocket access, archive support, and operational visibility. OnFinality offers managed Solana RPC endpoints and dedicated Solana nodes for teams that need isolated resources.

For detailed provider criteria, see the best Solana RPC provider guide. The table below compares the main decision factors.

  • Managed services may offer dedicated nodes and archive support; verify current plan details.
标准检查内容为什么重要
CostPublic: free; Managed: paid or plan-specific usage allowancePublic fits early experiments; managed scales with production budgets.
Rate limitsPublic: enforced per IP and can change; Managed: defined by planPredictable limits reduce the risk of unexpected 429 errors.
Archive accessPublic: usually not available; Managed: often available (verify current plan)Historical queries need archive depth.
WebSocket capacityPublic: shared and may drop; Managed: dedicated or higher capacityReal-time apps need stable subscriptions.
Uptime and supportPublic: no SLA; Managed: support terms and monitoringProduction incidents need a support path.

常见问题

What is the Solana public RPC endpoint for mainnet?

The mainnet public RPC endpoint is https://api.mainnet-beta.solana.com. It is shared and rate-limited; use it for testing, not production traffic.

What is the Devnet public RPC endpoint?

Devnet uses https://api.devnet.solana.com. Get test SOL from https://faucet.solana.com. Devnet is for development and testing only.

Are Solana public RPC endpoints free?

Yes, they are free and require no API key. However, they are shared infrastructure with rate limits and no uptime guarantee.

Can I use a public RPC for a production dApp?

Not recommended. Production apps need predictable capacity and support. Use a managed Solana RPC service or a dedicated node for reliability.

How do I switch from a public endpoint to a managed Solana RPC?

Replace the endpoint URL in your application code with the managed endpoint provided by your RPC provider. If the provider uses API keys, update authentication. See Solana network page for OnFinality options.

Does OnFinality offer a Solana public RPC endpoint?

OnFinality offers managed Solana RPC endpoints. Check current plans and endpoints on the Solana network page. Public endpoints are provided by Solana Foundation and other community services.

RPC 知识库

相关 RPC 内容

测试网 RPCSolana

Devnet Solana RPC:端点、水龙头和调试指南

了解如何连接到 Solana Devnet RPC 端点、从水龙头获取测试 SOL 并调试常见问题。本指南涵盖链设置、请求示例以及如何在开发中选择公共和专用 RPC 基础设施。...

网络 RPCAvalanche

Avalanche RPC:端点、链ID与提供商选择

本指南涵盖C链、P链和X链的Avalanche RPC端点,包括主网和Fuji测试网的URL、链ID,以及如何选择可靠的RPC提供商。其中包含决策清单、评估标准和代码示例,帮助开发者将Avalanche RPC集成到他们的dApp中。...

网络 RPCEth Sepolia

What is an Ethereum RPC endpoint and how do you choose the right one?

An Ethereum RPC endpoint is the URL your dapp, wallet, or backend uses to talk to an Ethereum node via JSON-RPC. Public endpoints are free but rate-li...

区块链基础设施Efinity

Polygon 节点托管:何时租用基础设施而非自行运行

Polygon 节点托管意味着在他人运营的基础设施上运行 Polygon PoS 堆栈——一个 Erigon 或 Bor 风格的执行客户端加上一个 Heimdall 共识客户端——这样你的团队无需拥有服务器即可获得 RPC 端点、WebSocket 访问和归档数据。决策很少是“我们能运行节点吗?”,...

区块链基础设施Compound

Polygon 支付网关 API 需要 RPC 基础设施提供什么?

Polygon 支付网关 API 是后端层,负责监控链上支付、确认支付并触发结算逻辑。它依赖可靠的 Polygon RPC 访问来进行区块扫描、交易确认和重组处理。本文解释了支付流程背后的 RPC 需求,以及如何评估满足这些需求的基础设施。OnFinality 为需要可预测吞吐量的团队提供 Poly...

RPC 提供商选择Avalanche

在选择专用Avalanche节点时应该注意什么?

专用Avalanche节点为您提供私有RPC端点,具有明确的速率限制,并让您完全控制Avalanche基础设施。本指南涵盖了选择专用节点提供商时需要评估的要素,包括性能、可靠性以及对C链、X链和P链的支持。...

永远不用担心基础设施

OnFinality 消除了 DevOps 的繁重工作,让您能够更聪明、更快地构建。

开始