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 内容

网络 RPCKilt Mashnet

什么是 Kilt Mashnet,如何连接它?

Kilt Mashnet 是 Kilt 区块链的无许可主网,专为去中心化身份(DID)和可验证凭证而设计。本文解释了什么是 Mashnet,它与 Kilt Peregrine 测试网有何不同,以及如何使用 RPC 端点将您的 dApp 或钱包连接到网络。 您将找到官方链设置、常用工具的配置示例,以及...

RPC 提供商选择Moonbeam

Moonbeam RPC 的可用性有多可靠,您应该监控什么?

Moonbeam RPC 的可用性决定了您的 dApp 能否读取链上状态、提交交易,并在流量高峰时保持响应。本页解释了可用性声明实际涵盖的内容、如何通过自己的监控来验证这些声明,以及如何选择符合您可靠性需求的 RPC 基础设施。...

网络 RPCGnosis

Gnosis RPC:端点、提供商与最佳实践

# Gnosis RPC:端点、提供商与最佳实践 Gnosis Chain(原 xDai)是一个兼容 EVM 的 L1 区块链,以其稳定的 gas 代币(xDAI)和低交易成本而闻名。为了与 Gnosis Chain 交互,开发者和应用程序需要一个可靠的 RPC(远程过程调用)端点。本指南涵盖了您需...

RPC 提供商选择Starknet

Starknet RPC:端点、提供商和最佳实践

Starknet 是基于以太坊的 ZK-rollup,使用 STARK 证明实现可扩展性。要与 Starknet 交互,您需要一个 RPC 端点。本指南涵盖公共和私有 Starknet RPC 端点、如何选择提供商以及针对开发者的常见故障排除技巧。...

网络 RPCPolygon

什么是Polygon RPC端点,如何选择合适的端点?

# 什么是Polygon RPC端点,如何选择合适的端点? Polygon RPC(远程过程调用)端点是一个URL,允许您的dApp、钱包或后端服务与Polygon区块链通信。由于Polygon兼容EVM,您可以使用标准的以太坊JSON-RPC方法来查询余额、发送交易以及与智能合约交互。RPC提供商...

网络 RPCKaia

Klaytn API:开发者应了解哪些关于RPC、KAS和节点基础设施的内容?

Klaytn(现已更名为Kaia)是一个兼容EVM的Layer 1区块链。开发者可以通过JSON-RPC端点、用于更高级REST API的Klaytn API服务(KAS)或专用节点基础设施与之交互。本指南涵盖这些选项之间的差异、如何连接,以及在选择API提供商时应评估哪些方面。...

永远不用担心基础设施

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

开始