Solana
Solana
Solana
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
getMultipleAccounts is the batched form of getAccountInfo on Solana: it reads many accounts in a single call instead of one request per address. You pass an array of base-58 public keys and get back an array of account objects — each with data, owner, lamports (native SOL, where 1 SOL = 1,000,000,000 lamports), executable, rentEpoch, and space, or null for any address that does not exist — returned in the same order as the input. It is the efficient way to hydrate a set of known accounts over Solana's high-throughput, ~400ms-slot network. Call it as a JSON-RPC 2.0 POST with positional params against https://solana.therpc.io/YOUR_API_KEY, choosing base64 for raw bytes or jsonParsed for decoded data.
getAccountInfo per address.| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | pubkeys | array | 是 | Array of base-58 account addresses to read. |
| 2 | config | object | 否 | Options: commitment, encoding, dataSlice, minContextSlot. |
| 类型 | 描述 |
|---|---|
| object | RpcResponse wrapping an array of account objects (or null), in the same order as the input. |
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32602 | Invalid params | A param is missing, of the wrong type, or malformed (e.g. a non-base58 pubkey or a bad config field). |
-32603 | Internal error | The node hit an internal error serving the request — retry, and reduce the requested range/encoding if it persists. |
null entries for accounts that do not exist; match each returned item back to its input address by index, never by assuming a one-to-one non-null mapping.