Bitcoin
准备好在生产环境中调用了吗?
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
Bitcoin
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
TheRPC gives you a hosted, production-grade Bitcoin Core JSON-RPC endpoint — the same RPC bitcoind speaks — without running, syncing, or securing a node yourself. Bitcoin developers use it to read the chain, look up transactions and UTXOs, estimate fees, and broadcast signed transactions through one URL and one API key. This guide takes you from zero to a working call in a few minutes: grab a key, point at https://bitcoin.therpc.io/YOUR_API_KEY, and run your first request in curl, JavaScript, or Python.
Sign up for a free account at TheRPC.io, then open your Dashboard and go to the API Keys section. Click Generate to create a key, or copy an existing one. The key is an opaque token you'll drop into the endpoint URL in place of YOUR_API_KEY — so your live endpoint becomes https://bitcoin.therpc.io/<your-key>. Keep it private; you can revoke and regenerate it from the dashboard at any time.
TheRPC serves both Bitcoin mainnet — the real network where BTC has value — and testnet, where coins are free for development. Both speak the identical JSON-RPC interface and accept the same API key, so the only thing that changes between them is the endpoint host. Configure your environment with the Bitcoin endpoint URL and your key (shown below), and start on testnet while you build so mistakes cost nothing.
Below are three ways to make the same first call — curl, JavaScript (axios), and Python (requests) — so you can use whichever fits your stack; the Tools & SDKs reference at the end covers each language in more depth. The call is getblockchaininfo, a read-only query that returns the network's current state (chain, height, best block hash, sync progress). It's the ideal first request: it touches no keys or private data, just confirms your endpoint and API key work end to end.
Unlike some ecosystems, Bitcoin has no single dominant high-level SDK — most production code simply talks raw JSON-RPC over HTTP, which is exactly what the examples above do. Thin convenience clients exist per language, such as python-bitcoinrpc (which lets you put the API key in the connection URL), but they're optional: a plain HTTP client works everywhere and keeps your dependencies light. The two snippets below show both styles — a reusable rpc() helper over node-fetch, and the python-bitcoinrpc proxy. See the Tools & SDKs documentation for full, language-specific coverage.
The full list of supported methods lives on the All Methods page. Each method has its own reference covering its purpose, parameters, response shape, error codes, real-world use cases, and copy-paste examples in curl, JavaScript, Python, and Go. Note the public surface is read and broadcast methods only — block and chain reads, mempool inspection, raw transaction lookup, fee estimation, address validation, and sendrawtransaction. Wallet methods and node-admin methods are not exposed, since they act on a single node's private wallet and configuration and have no place on a shared endpoint.
Mainnet and testnet each have their own endpoint host; you select the network by choosing which URL you point at, with the same API key and request format on both. The Bitcoin endpoint URL follows the pattern https://bitcoin.therpc.io/YOUR_API_KEY, with your key in the path.