RPC
Raw RPC
Anything the SDK does not wrap is one call away. The raw client shares the same endpoint resolution and failover as every other module, so you can reach every hived and Hivemind API.
Open the RPC playgroundCalling a method
const props = await hive.rpc.call("condenser_api.get_dynamic_global_properties", []);
// Positional params (array) — legacy condenser_api style.
const accounts = await hive.rpc.call("condenser_api.get_accounts", [["alice"]]);
// Named params (object) — appbase style used by the modern APIs.
const found = await hive.rpc.call("database_api.find_accounts", { accounts: ["alice"] });
// Abortable.
const controller = new AbortController();
const block = await hive.rpc.call("block_api.get_block", { block_num: 90_000_000 }, {
signal: controller.signal,
});| Parameter | Type | Required | Description |
|---|---|---|---|
| method | string | Yes | Fully qualified "namespace.method", e.g. "block_api.get_block_range". |
| params | unknown[] | object | No | Array for positional params, object for named params. Defaults to []. Check the method's docs for which it expects. |
| options.signal | AbortSignal | No | Cancels the in-flight request; AbortError is rethrown untouched. |
Note
HTTP_ERROR (and trigger failover to the next node), while a JSON-RPC error body raises RPC_ERROR.The wire format
Hive nodes speak JSON-RPC 2.0 over HTTP POST at the root path of the node. There is no REST-style GET API on hived — every read and write is the same POST with a different method. The SDK sends exactly this body, so anything you can curl you can call:
curl -s https://api.hive.blog \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "condenser_api.get_dynamic_global_properties",
"params": [],
"id": 1
}'Older clients also accept the two-argument form {"method":"call","params":["condenser_api","get_accounts",[["alice"]]]}. Prefer the fully qualified namespace.method form shown above — it is what current nodes document and what this SDK uses.
Important
hive.issuer, hive.payments or Keychain to produce one — passing an unsigned transaction to network_broadcast_api.broadcast_transaction is rejected by the node.Built-in helpers
The most common reads already have typed wrappers on hive.rpc — use those before reaching for call.
await hive.rpc.getDynamicGlobalProperties(); // DynamicGlobalProperties
await hive.rpc.getHeadBlockNumber(); // number
await hive.rpc.getBlock(90_000_000); // HiveBlock | null
hive.rpc.endpoint; // currently selected node
hive.rpc.fallbackEndpoint; // failover target
hive.rpc.resetEndpoint(); // drop failure history, re-run Beacon discovery next callAPI namespaces
Every method belongs to a namespace, and each namespace is a plugin the node operator must have enabled — a public node may not serve all of them. The full, authoritative method list lives in the Hive API Definitions; the namespaces you will actually use are:
| Parameter | Type | Required | Description |
|---|---|---|---|
| condenser_api | hived | No | Legacy-compatible catch-all: accounts, blocks, transactions, chain properties, content. Easiest starting point. |
| database_api | hived | No | Modern typed reads: find_accounts, list_accounts, get_dynamic_global_properties, find_votes, list_witnesses. |
| block_api | hived | No | get_block, get_block_header, get_block_range — the fastest way to read blocks. |
| account_history_api | hived | No | get_transaction, get_account_history, enum_virtual_ops — used by the SDK transaction reader. |
| network_broadcast_api | hived | No | broadcast_transaction and broadcast_transaction_synchronous for signed transactions. |
| account_by_key_api | hived | No | get_key_references — resolve a public key back to the accounts that use it. |
| rc_api | hived | No | find_rc_accounts, get_resource_params — Resource Credit accounting. |
| market_history_api | hived | No | Internal HIVE/HBD market: get_ticker, get_trade_history, get_market_history. |
| transaction_status_api | hived | No | find_transaction — check whether a broadcast transaction was included. |
| bridge | hivemind | No | Social layer served by Hivemind (not hived): get_ranked_posts, get_discussion, get_profile, get_follow_list. |
Note
Common methods
A practical starter set — the ones most apps built on this SDK end up calling. Full parameter documentation for each is on developers.hive.io.
// Chain state
await hive.rpc.call("condenser_api.get_dynamic_global_properties", []);
await hive.rpc.call("condenser_api.get_chain_properties", []);
await hive.rpc.call("condenser_api.get_current_median_history_price", []);
// Accounts
await hive.rpc.call("condenser_api.get_accounts", [["alice", "bob"]]);
await hive.rpc.call("database_api.find_accounts", { accounts: ["alice"] });
await hive.rpc.call("account_by_key_api.get_key_references", { keys: ["STM7..."] });
await hive.rpc.call("rc_api.find_rc_accounts", { accounts: ["alice"] });
// Blocks
await hive.rpc.call("block_api.get_block", { block_num: 90000000 });
await hive.rpc.call("block_api.get_block_range", { starting_block_num: 90000000, count: 10 });
await hive.rpc.call("condenser_api.get_block_header", [90000000]);
// Transactions & history
await hive.rpc.call("account_history_api.get_transaction", {
id: "0000000000000000000000000000000000000000",
include_reversible: true,
});
await hive.rpc.call("account_history_api.get_account_history", {
account: "alice",
start: -1,
limit: 100,
include_reversible: true,
});
await hive.rpc.call("transaction_status_api.find_transaction", { transaction_id: "..." });
// Broadcast (transaction must already be signed)
await hive.rpc.call("network_broadcast_api.broadcast_transaction", { trx: signedTransaction });
// Market
await hive.rpc.call("market_history_api.get_ticker", {});
// Social layer (Hivemind)
await hive.rpc.call("bridge.get_ranked_posts", { sort: "trending", tag: "hive", limit: 20 });
await hive.rpc.call("bridge.get_profile", { account: "alice" });Hive Engine RPC
Layer 2 (Hive Engine) is a different JSON-RPC service — it is not reachable through a hived node. The SDK talks to it internally for token and NFT state; if you need a raw Layer 2 contract read, POST to the sidechain node directly:
curl -s https://api.hive-engine.com/rpc/contracts \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "find",
"params": { "contract": "tokens", "table": "balances", "query": { "account": "alice" } },
"id": 1
}'Endpoints: /rpc/contracts (contract state via find / findOne) and /rpc/blockchain (sidechain blocks and transactions). See the Hive Engine contracts wiki.
Reference repositories
There are hundreds of methods across the namespaces and they change with each hardfork, so rather than mirroring them here, go to the source:
- Hive Developer Portal — API Definitions — every namespace, every method, with request and response JSON.
- Plugin & API list — which plugin a node must enable to serve a namespace.
- hive/hive (hived) — the node implementation; the API plugins under
libraries/plugins/apis/are the ground truth for method names and argument structs. - hive/hivemind — the social layer serving
bridge.*and the tag/follow APIs. - openhive-network/hive-js and dhive — reference clients; useful for seeing real params for a method.
- PeakD Beacon — live node list and health, the same source
hive.beaconuses. - Hive Engine contracts wiki — Layer 2 contracts, tables and actions.
