Solana
Pronto para usar isso em produção?
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
Solana
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
TheRPC gives you managed access to Solana's high-throughput cluster through a single authenticated endpoint, so you can query accounts, submit transactions, and stream real-time notifications without running your own validator or worrying about ~400ms slot cadence. Solana developers reach for it because the same JSON-RPC 2.0 surface they already know is served reliably over both HTTP and WebSocket PubSub, with commitment levels, SPL token reads, and base64/jsonParsed encodings fully supported. This guide takes you from zero to a working call in a few minutes: you'll grab an API key, point your client at the Solana endpoint, and read the current slot with getSlot using curl, JavaScript, or Python.
Head to TheRPC.io and create a free account. Once you're signed in, open your dashboard (your personal account cabinet) and go to the API Keys section, where you can generate a new key or copy an existing one. The key is an opaque token string — treat it like a password. You'll drop it straight into the Solana endpoint path, replacing the YOUR_API_KEY placeholder so every request is authenticated as soon as it reaches https://solana.therpc.io.
TheRPC serves Solana mainnet-beta alongside the devnet and testnet clusters, so you can build and test against the same JSON-RPC surface before going live. To wire up your environment, store the Solana endpoint URL and your key as variables; the endpoint host stays the same while your key fills the path. For the rest of this guide we use the mainnet endpoint below, but you can swap in your devnet or testnet endpoint the same way.
Now make the call. Below you'll find the same request in three flavors — curl, JavaScript, and Python — so you can use whichever fits your stack; for the complete language and SDK coverage see the Tools & SDKs reference. Each example invokes getSlot, the simplest possible read, which returns the slot the cluster is currently processing. A numeric result back means your key works and you're talking to Solana.
For anything beyond a one-off read, the official Solana libraries save you a lot of boilerplate. The @solana/web3.js Connection class and the Python solana-py Client handle request shaping, commitment defaults, lamports-to-SOL math, PublicKey parsing, transaction signing, and retries for you, so you don't hand-build JSON-RPC envelopes or juggle base64 encoding by hand. Point the client at your Solana endpoint once and call typed methods. See the Tools & SDKs documentation for full coverage across JavaScript, Python, Rust, and Go.
When you're ready to go past getSlot, the All Methods page lists every Solana JSON-RPC method TheRPC supports — account and balance reads, SPL token queries, transaction submission and lookup, block and slot data, cluster and economics calls, and the WebSocket PubSub subscriptions. Each method's reference page carries a plain-language description, the exact request and response formats, runnable code examples, and typical use cases so you can copy a working call straight into your project.
Each Solana cluster — mainnet, devnet, and testnet — is reached through its own endpoint, so switching networks is just a matter of changing the URL while keeping the same key and request format. The HTTP endpoint follows the pattern https://solana.therpc.io/YOUR_API_KEY, and for real-time streaming the WebSocket PubSub endpoint uses the wss:// scheme at wss://solana.therpc.io/YOUR_API_KEY.
getAccountInfo to sendTransaction and the PubSub subscriptions.@solana/web3.js, solana-py, solana-client (Rust), or solana-go for your language.getProgramAccounts are counted.