Avalanche
Bereit, das in der Produktion aufzurufen?
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
Avalanche
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
TheRPC is a managed JSON-RPC provider that gives you fast, reliable access to the Avalanche C-Chain without running your own node. Developers building on Avalanche use it to ship quickly against ecosystem protocols like Trader Joe, Aave, and GMX while relying on the C-Chain's roughly one-to-two-second finality under Snowman consensus. This guide takes you from zero to a working call in a few minutes: get a key, point your code at the endpoint, and read the latest block height with eth_blockNumber.
Sign up for a free account at TheRPC.io, then open the Dashboard. Navigate to the API Keys section and either create a new key or copy an existing one. The key is a unique secret string tied to your account and plan. You will append it to the Avalanche C-Chain endpoint — https://avalanche.therpc.io/YOUR_API_KEY — and send it in the Authorization header on every request.
TheRPC supports many networks, each at its own endpoint, and switching between them is just a matter of changing the URL. For the Avalanche C-Chain, set your endpoint to https://avalanche.therpc.io/YOUR_API_KEY and keep your API key alongside it. The snippet below stores both in environment variables so the rest of your code can reference them without hardcoding secrets.
Now make your first call to the Avalanche C-Chain. Below are three ways to fetch the latest block number — with curl, JavaScript, and Python — each pointed at your endpoint and key. Pick the one that matches your stack; for the full set of languages and SDKs, see the All Methods reference.
For anything beyond simple reads, Web3 libraries are the better choice over raw HTTP calls. They handle ABI encoding and decoding, transaction signing, gas estimation, and event parsing for you, which is essential when interacting with C-Chain contracts like Trader Joe or Aave. They also manage retries and connection reuse out of the box. See the All Methods reference for full language-specific coverage.
The complete list of methods supported on the Avalanche C-Chain lives on the All Methods page. Each entry includes a description of what the method does, its request and response formats, copy-paste code examples, and the common use cases it serves — so you can move from this quick start to building real features without guessing at parameters.
Each network TheRPC hosts has its own dedicated endpoint, and you select a network simply by choosing the right URL. For the Avalanche C-Chain, that URL is https://avalanche.therpc.io/YOUR_API_KEY for HTTP and wss://avalanche.therpc.io/YOUR_API_KEY for WebSocket. Swap in your key and you are connected to chain ID 43114.