Node API - Solana
API AuthenticationClick to view API Authentication details
Authorization
request header or URL
property. Calls are made to one of the Solana Node API endpoints found in your app's dashboard. For example:
https://solana--mainnet.datahub.figment.io
- Fetch with Header
- Fetch with Parameter
- CURL with Header
- CURL with Parameter
fetch("https://solana--mainnet.datahub.figment.io", {
method: 'POST', // can also be 'GET', 'PUT' or any appropriate method
headers: {
"Authorization" : "<api_key>",
"Content-Type": "application/json" // if method is 'POST'
},
body: JSON.stringify({
// JSON Payload
})
})
fetch("https://solana--mainnet.datahub.figment.io/apikey/{{apikey}}", {
method: 'POST', // can also be 'GET', 'PUT' or any appropriate method
headers: {
"Content-Type": "application/json" // if method is 'POST'
},
body: JSON.stringify({
// JSON Payload
})
})
curl -X POST 'https://solana--mainnet.datahub.figment.io' \
--header 'Content-Type: application/json' \
--header 'Authorization: <api_key>' \
--data '{
// JSON Payload
}'
curl -X POST 'https://solana--mainnet.datahub.figment.io/apikey/{{apikey}}' \
--header 'Content-Type: application/json' \
--data '{
// JSON Payload
}'
Available Methods
getAccountInfo
Returns all information associated with the account of provided Pubkey.
{
"jsonrpc": "2.0",
"result": {
"context": {
"apiVersion": "1.10.25",
"slot": 142188757
},
"value": {
"data": [
"",
"base58"
],
"executable": false,
"lamports": 407413255,
"owner": "11111111111111111111111111111111",
"rentEpoch": 329
}
},
"id": 1
}
SpecificationView Specification
Parameters
pubkey
-string
Pubkey of account to query, as base-58 encoded string.object
- Configuration object containing the following fields:- (optional)
commitment
: Commitment - (optional)
encoding:
- encoding for Account data, eitherbase58
(slow),base64
,base64+zstd
, orjsonParsed
.base58
is limited to Account data of less than 129 bytes.base64
will return base-64 encoded data for Account data of any size.base64+zstd
compresses the Account data using Zstandard and base64-encodes the result.jsonParsed
encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. IfjsonParsed
is requested but a parser cannot be found, the field falls back tobase64
encoding, detectable when thedata
field is type<string>
. - (optional)
dataSlice
: - limit the returned account data using the providedoffset:
andlength:
fields; only available forbase58
,base64
orbase64+zstd
encodings. - (optional)
minContextSlot:
- set the minimum slot that the request can be evaluated at.
Response
The result will be an RpcResponse
JSON object with value
equal to:
null
if the requested account doesn't exist. Otherwise, a JSON object containing:lamports:
, number of lamports assigned to this account, as au64
.owner:
, base-58 encoded Pubkey of the program this account has been assigned to.data: <[string, encoding]|object>
, data associated with the account, either as encoded binary data or JSON format{: }
, depending on encoding parameter.executable:
, boolean indicating if the account contains a program (and is strictly read-only). *rentEpoch:
, the epoch at which this account will next owe rent, asu64
.
getBalance
Returns the balance of the account of provided Pubkey
{
"jsonrpc": "2.0",
"result": {
"context": {
"apiVersion": "1.10.25",
"slot": 142188919
},
"value": 0
},
"id": 1
}
SpecificationView Specification
Parameters
<string>
- Pubkey of account to query, as base-58 encoded string<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
Response
RpcResponse<u64>
- RpcResponse JSON object withvalue
field set to the balance
getBlock
Returns identity and transaction information about a confirmed block in the ledger
{
"jsonrpc": "2.0",
"result": {
"blockHeight": null,
"blockTime": null,
"blockhash": "DUCT8VSgk2BXkMhQfxKVYfikEZCQf4dZ4ioPdGdaVxMN",
"parentSlot": 429,
"previousBlockhash": "HA2fJgGqmQezCXJRVNZAWPbRMXCPjUyo7VjRF47JGdYs",
"transactions": [
{
"meta": null,
"transaction": {
"message": {
"accountKeys": [
"GdnSyH3YtwcxFvQrVVJMm1JhTS4QVX7MFsX56uJLUfiZ",
"sCtiJieP8B3SwYnXemiLpRFRR8KJLMtsMVN25fAFWjW",
"SysvarS1otHashes111111111111111111111111111",
"SysvarC1ock11111111111111111111111111111111",
"Vote111111111111111111111111111111111111111"
],
"header": {
"numReadonlySignedAccounts": 0,
"numReadonlyUnsignedAccounts": 3,
"numRequiredSignatures": 1
},
"instructions": [
{
"accounts": [
1,
2,
3,
0
],
"data": "37u9WtQpcm6ULa3WRQHmj49EPs5hZfet7nKmHTYD6Vww48rtUK99VNvA7fVscfBpL6KyjwiF",
"programIdIndex": 4
}
],
"recentBlockhash": "HA2fJgGqmQezCXJRVNZAWPbRMXCPjUyo7VjRF47JGdYs"
},
"signatures": [
"MsdZAVaCjHcVWs8zMJinXvntufdXwtHJWCRLSyw9zeAZuNDec6s41H12KFFyPHbq3uj98wRjMa86z6nW2kUv1Zs"
]
}
}
]
},
"id": 1
}
SpecificationView Specification
Parameters
<u64>
- slot, as u64 integer<object>
- (optional) Configuration object containing the following optional fields:- (optional)
encoding: <string>
- encoding for each returned Transaction, either "json", "jsonParsed", "base58" (slow), "base64". If parameter not provided, the default encoding is "json". "jsonParsed" encoding attempts to use program-specific instruction parsers to return more human-readable and explicit data in thetransaction.message.instructions
list. If "jsonParsed" is requested but a parser cannot be found, the instruction falls back to regular JSON encoding (accounts
,data
, andprogramIdIndex
fields). - (optional)
transactionDetails: <string>
- level of transaction detail to return, either "full", "signatures", or "none". If parameter not provided, the default detail level is "full". - (optional)
rewards: bool
- whether to populate therewards
array. If parameter not provided, the default includes rewards. - (optional) Commitment; "processed" is not supported. If parameter not provided, the default is "finalized".
- (optional)
maxSupportedTransactionVersion: <number>
- set the max transaction version to return in responses. If the requested block contains a transaction with a higher version, an error will be returned. If this parameter is omitted, only legacy transactions will be returned, and a block containing any versioned transaction will prompt the error.
- (optional)
Response
The result field will be an object with the following fields:
<null>
- if specified block is not confirmed<object>
- if block is confirmed, an object with the following fields:blockhash: <string>
- the blockhash of this block, as base-58 encoded stringpreviousBlockhash: <string>
- the blockhash of this block's parent, as base-58 encoded string; if the parent block is not available due to ledger cleanup, this field will return "11111111111111111111111111111111"parentSlot: <u64>
- the slot index of this block's parenttransactions: <array>
- present if "full" transaction details are requested; an array of JSON objects containing:transaction: <object|[string,encoding]>
- Transaction object, either in JSON format or encoded binary data, depending on encoding parametermeta: <object>
- transaction status metadata object, containingnull
or:err: <object | null>
- Error if transaction failed, null if transaction succeeded. TransactionError definitionsfee: <u64>
- fee this transaction was charged, as u64 integerpreBalances: <array>
- array of u64 account balances from before the transaction was processedpostBalances: <array>
- array of u64 account balances after the transaction was processedinnerInstructions: <array|null>
- List of inner instructions ornull
if inner instruction recording was not enabled during this transactionpreTokenBalances: <array|undefined>
- List of token balances from before the transaction was processed or omitted if token balance recording was not yet enabled during this transactionpostTokenBalances: <array|undefined>
- List of token balances from after the transaction was processed or omitted if token balance recording was not yet enabled during this transactionlogMessages: <array|null>
- array of string log messages ornull
if log message recording was not enabled during this transaction- DEPRECATED:
status: <object>
- Transaction status"Ok": <null>
- Transaction was successful"Err": <ERR>
- Transaction failed with TransactionError
loadedAddresses: <object|undefined>
- Transaction addresses loaded from address lookup tables. Undefined ifmaxSupportedTransactionVersion
is not set in request params.writable: <array[string]>
- Ordered list of base-58 encoded addresses for writable loaded accountsreadonly: <array[string]>
- Ordered list of base-58 encoded addresses for readonly loaded accounts
version: <"legacy"|number|undefined>
- Transaction version. Undefined ifmaxSupportedTransactionVersion
is not set in request params.
signatures: <array>
- present if "signatures" are requested for transaction details; an array of signatures strings, corresponding to the transaction order in the blockrewards: <array>
- present if rewards are requested; an array of JSON objects containing:pubkey: <string>
- The public key, as base-58 encoded string, of the account that received the rewardlamports: <i64>
- number of reward lamports credited or debited by the account, as a i64postBalance: <u64>
- account balance in lamports after the reward was appliedrewardType: <string|undefined>
- type of reward: "fee", "rent", "voting", "staking"commission: <u8|undefined>
- vote account commission when the reward was credited, only present for voting and staking rewards
blockTime: <i64 | null>
- estimated production time, as Unix timestamp (seconds since the Unix epoch). null if not availableblockHeight: <u64 | null>
- the number of blocks beneath this blockReturns identity and transaction information about a confirmed block in the ledger.
getBlockHeight
Returns the current block height of the node
{
"jsonrpc": "2.0",
"result": 128398948,
"id": 1
}
SpecificationView Specification
Parameters
<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
Response
<u64>
- Current block heightReturns the current block height of the node.
getBlockProduction
Returns recent block production information from the current or previous epoch.
{
"jsonrpc": "2.0",
"result": {
"context": {
"apiVersion": "1.10.25",
"slot": 142189298
},
"value": {
"byIdentity": {
"12CUDzb3oe8RBQ4tYGqsuPsCbsVE4KWfktXRihXf8Ggq": [
8,
8
]
},
"range": {
"firstSlot": 142128000,
"lastSlot": 142189298
}
}
},
"id": 1
}
SpecificationView Specification
Parameters
<object>
- (optional) Configuration object containing the following optional fields:- (optional) Commitment
- (optional)
range: <object>
- Slot range to return block production for. If parameter not provided, defaults to current epoch.firstSlot: <u64>
- first slot to return block production information for (inclusive)- (optional)
lastSlot: <u64>
- last slot to return block production information for (inclusive). If parameter not provided, defaults to the highest slot
- (optional)
identity: <string>
- Only return Response for this validator identity (base-58 encoded)
Response
The result will be an RpcResponse JSON object with value
equal to:
<object>
byIdentity: <object>
- a dictionary of validator identities, as base-58 encoded strings. Value is a two element array containing the number of leader slots and the number of blocks produced.range: <object>
- Block production slot rangefirstSlot: <u64>
- first slot of the block production information (inclusive)lastSlot: <u64>
- last slot of block production information (inclusive)
getBlockCommitment
Returns commitment for particular block
{
"jsonrpc": "2.0",
"result": {
"commitment": null,
"totalStake": 395813543202824060
},
"id": 1
}
SpecificationView Specification
Parameters
<u64>
- block, identified by Slot
Response
The result field will be a JSON object containing:
commitment
- commitment, comprising either:<null>
- Unknown block<array>
- commitment, array of u64 integers logging the amount of cluster stake in lamports that has voted on the block at each depth from 0 toMAX_LOCKOUT_HISTORY
+ 1
totalStake
- total active stake, in lamports, of the current epoch
getBlocks
Returns a list of confirmed blocks between two slots
{
"jsonrpc": "2.0",
"result": [
5,
6,
7,
8,
9,
10
],
"id": 1
}
SpecificationView Specification
Parameters
<u64>
- start_slot, as u64 integer<u64>
- (optional) end_slot, as u64 integer (must be no more than 500,000 blocks higher than thestart_slot
)- (optional) Commitment; "processed" is not supported. If parameter not provided, the default is "finalized".
Response
The result field will be an array of u64 integers listing confirmed blocks
between start_slot
and either end_slot
, if provided, or latest confirmed block,
inclusive. Max range allowed is 500,000 slots.
getBlocksWithLimit
Returns a list of confirmed blocks starting at the given slot
{
"jsonrpc": "2.0",
"result": [
5,
6,
7
],
"id": 1
}
SpecificationView Specification
Parameters
<u64>
- start_slot, as u64 integer<u64>
- limit, as u64 integer (must be no more than 500,000 blocks higher than thestart_slot
)- (optional) Commitment; "processed" is not supported. If parameter not provided, the default is "finalized".
Response
The result field will be an array of u64 integers listing confirmed blocks
starting at start_slot
for up to limit
blocks, inclusive.
getBlockTime
Returns the estimated production time of a block.
{
"jsonrpc": "2.0",
"result": 1649198697,
"id": 1
}
SpecificationView Specification
Each validator reports their UTC time to the ledger on a regular interval by intermittently adding a timestamp to a Vote for a particular block. A requested block's time is calculated from the stake-weighted mean of the Vote timestamps in a set of recent blocks recorded on the ledger.
Parameters
<u64>
- block, identified by Slot
Response
<i64>
- estimated production time, as Unix timestamp (seconds since the Unix epoch)<null>
- timestamp is not available for this block
getClusterNodes
Returns information about all the nodes participating in the cluster
{
"jsonrpc": "2.0",
"result": [
{
"featureSet": 965221688,
"gossip": "15.235.67.142:8001",
"pubkey": "Gse8mvTuDiNnuMUFZmBATSTrMZA3tgHWeWgiqNskZ9Ub",
"rpc": null,
"shredVersion": 51382,
"tpu": "15.235.67.142:8023",
"version": "1.10.25"
}
],
"id": 1
}
SpecificationView Specification
Parameters
None
Response
The result field will be an array of JSON objects, each with the following sub fields:
pubkey: <string>
- Node public key, as base-58 encoded stringgossip: <string | null>
- Gossip network address for the nodetpu: <string | null>
- TPU network address for the noderpc: <string | null>
- JSON RPC network address for the node, ornull
if the JSON RPC service is not enabledversion: <string | null>
- The software version of the node, ornull
if the version information is not availablefeatureSet: <u32 | null >
- The unique identifier of the node's feature setshredVersion: <u16 | null>
- The shred version the node has been configured to use
getEpochInfo
Returns information about the current epoch
{
"jsonrpc": "2.0",
"result": {
"absoluteSlot": 142190445,
"blockHeight": 128400051,
"epoch": 329,
"slotIndex": 62445,
"slotsInEpoch": 432000,
"transactionCount": 85478114513
},
"id": 1
}
SpecificationView Specification
Parameters
<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
-Commitment - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
Response
The result field will be an object with the following fields:
absoluteSlot: <u64>
, the current slotblockHeight: <u64>
, the current block heightepoch: <u64>
, the current epochslotIndex: <u64>
, the current slot relative to the start of the current epochslotsInEpoch: <u64>
, the number of slots in this epochtransactionCount: <u64 | null>
, total number of transactions processed without error since genesis
getEpochSchedule
Returns epoch schedule information from this cluster's genesis config
{
"jsonrpc": "2.0",
"result": {
"firstNormalEpoch": 0,
"firstNormalSlot": 0,
"leaderScheduleSlotOffset": 432000,
"slotsPerEpoch": 432000,
"warmup": false
},
"id": 1
}
SpecificationView Specification
Parameters
None
Response
The result field will be an object with the following fields:
slotsPerEpoch: <u64>
, the maximum number of slots in each epochleaderScheduleSlotOffset: <u64>
, the number of slots before beginning of an epoch to calculate a leader schedule for that epochwarmup: <bool>
, whether epochs start short and growfirstNormalEpoch: <u64>
, first normal-length epoch, log2(slotsPerEpoch) - log2(MINIMUM_SLOTS_PER_EPOCH)firstNormalSlot: <u64>
, MINIMUM_SLOTS_PER_EPOCH * (2.pow(firstNormalEpoch) - 1)
getFeeForMessage
NEW: This method is only available in solana-core v1.9 or newer. Please use getFees for solana-core v1.8
{
"jsonrpc": "2.0",
"result": {
"context": {
"apiVersion": "1.10.25",
"slot": 142190787
},
"value": null
},
"id": 1
}
SpecificationView Specification
Get the fee the network will charge for a particular Message
Parameters
message: <string>
- Base-64 encoded Message<object>
- (optional) Commitment (used for retrieving blockhash)
Response
<u64 | null>
- Fee corresponding to the message at the specified blockhash
getFirstAvailableBlock
Returns the slot of the lowest confirmed block that has not been purged from the ledger
{
"jsonrpc": "2.0",
"result": 0,
"id": 1
}
SpecificationView Specification
Parameters
None
Response
<u64>
- Slot
getGenesisHash
Returns the genesis hash
{
"jsonrpc": "2.0",
"result": "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d",
"id": 1
}
SpecificationView Specification
Parameters
None
Response
<string>
- a Hash as base-58 encoded string
getHealth
Returns the current health of the node.
{
"jsonrpc": "2.0",
"result": "ok",
"id": 1
}
SpecificationView Specification
If one or more --known-validator
arguments are provided to solana-validator
, "ok" is returned when the node has within HEALTH_CHECK_SLOT_DISTANCE
slots of the highest known validator, otherwise an error is returned. "ok" is always returned if no known validators are provided.
Parameters
None
Response
- If the node is healthy: "ok"
- If the node is unhealthy, a JSON RPC error response is returned. The specifics of the error response are UNSTABLE and may change in the future
getHighestSnapshotSlot
NEW: This method is only available in solana-core v1.9 or newer. Please use getSnapshotSlot for solana-core v1.8
{
"jsonrpc": "2.0",
"result": {
"full": 142190393,
"incremental": 142191106
},
"id": 1
}
SpecificationView Specification
Returns the highest slot information that the node has snapshots for. This will find the highest full snapshot slot, and the highest incremental snapshot slot based on the full snapshot slot, if there is one.
Parameters
None
Response
<object>
full: <u64>
- Highest full snapshot slotincremental: <u64 | undefined>
- Highest incremental snapshot slot based onfull
getIdentity
Returns the identity pubkey for the current node
{
"jsonrpc": "2.0",
"result": {
"identity": "EcAQbGoZ3BdNfhhyhDNrTJKgaTcn25tfES7xXuiNyc8A"
},
"id": 1
}
SpecificationView Specification
Parameters
None
Response
The result field will be a JSON object with the following fields:
identity
, the identity pubkey of the current node (as a base-58 encoded string)
getInflationGovernor
Returns the current inflation governor
{
"jsonrpc": "2.0",
"result": {
"foundation": 0,
"foundationTerm": 0,
"initial": 0.08,
"taper": 0.15,
"terminal": 0.015
},
"id": 1
}
SpecificationView Specification
Parameters
<object>
- (optional) Commitment
Response
The result field will be a JSON object with the following fields:
initial: <f64>
, the initial inflation percentage from time 0terminal: <f64>
, terminal inflation percentagetaper: <f64>
, rate per year at which inflation is lowered. Rate reduction is derived using the target slot time in genesis configfoundation: <f64>
, percentage of total inflation allocated to the foundationfoundationTerm: <f64>
, duration of foundation pool inflation in yearsReturns the current inflation governor.
getInflationRate
Returns the specific inflation values for the current epoch
{
"jsonrpc": "2.0",
"result": {
"epoch": 329,
"foundation": 0,
"total": 0.0681588005608071,
"validator": 0.0681588005608071
},
"id": 1
}
SpecificationView Specification
Parameters
None
Response
The result field will be a JSON object with the following fields:
total: <f64>
, total inflationvalidator: <f64>
, inflation allocated to validatorsfoundation: <f64>
, inflation allocated to the foundationepoch: <u64>
, epoch for which these values are valid
getInflationReward
Returns the inflation / staking reward for a list of addresses for an epoch
{
"jsonrpc": "2.0",
"result": [
{
"amount": 2500,
"effectiveSlot": 224,
"epoch": 2,
"postBalance": 499999442500
},
null
],
"id": 1
}
SpecificationView Specification
Parameters
<array>
- An array of addresses to query, as base-58 encoded strings<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
epoch: <u64>
- An epoch for which the reward occurs. If omitted, the previous epoch will be used - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
Response
The result field will be a JSON array with the following fields:
epoch: <u64>
, epoch for which reward occuredeffectiveSlot: <u64>
, the slot in which the rewards are effectiveamount: <u64>
, reward amount in lamportspostBalance: <u64>
, post balance of the account in lamportscommission: <u8|undefined>
- vote account commission when the reward was credited
getLargestAccounts
Returns the 20 largest accounts, by lamport balance (Response may be cached up to two hours)
{
"jsonrpc": "2.0",
"result": {
"context": {
"slot": 54
},
"value": [
{
"lamports": 999974,
"address": "99P8ZgtJYe1buSK8JXkvpLh8xPsCFuLYhz9hQFNw93WJ"
}
],
"id": 1
}
}
SpecificationView Specification
Parameters
<object>
- (optional) Configuration object containing the following optional fields:- (optional) Commitment
- (optional)
filter: <string>
- filter Response by account type; currently supported:circulating|nonCirculating
Response
The result will be an RpcResponse JSON object with value
equal to an array of:
<object>
- otherwise, a JSON object containing:address: <string>
, base-58 encoded address of the accountlamports: <u64>
, number of lamports in the account, as a u64
getLatestBlockhash
NEW: This method is only available in solana-core v1.9 or newer. Please use getRecentBlockhash for solana-core v1.8
{
"jsonrpc": "2.0",
"result": {
"context": {
"apiVersion": "1.10.25",
"slot": 142193147
},
"value": {
"blockhash": "Hp5hiQsYSGRoF2UXLmk3SHimy9SETrNubMFT4zXuoGZn",
"lastValidBlockHeight": 128402628
}
},
"id": 1
}
SpecificationView Specification
Returns the latest blockhash
Parameters
<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment (used for retrieving blockhash) - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
Response
RpcResponse<object>
- RpcResponse JSON object withvalue
field set to a JSON object including:blockhash: <string>
- a Hash as base-58 encoded stringlastValidBlockHeight: <u64>
- last block height at which the blockhash will be valid
getLeaderSchedule
Returns the leader schedule for an epoch
{
"jsonrpc": "2.0",
"result": {
"11NXupFrmqj6SuZxkP1HsfkNw9aKnnkgbHqXx9QHNmj": [
397324,
397325,
397326,
397327
],
"12CUDzb3oe8RBQ4tYGqsuPsCbsVE4KWfktXRihXf8Ggq": [
54292,
54293,
54294,
54295
]
},
"id": 1
}
SpecificationView Specification
Parameters
<u64>
- (optional) Fetch the leader schedule for the epoch that corresponds to the provided slot. If unspecified, the leader schedule for the current epoch is fetched<object>
- (optional) Configuration object containing the following field:- (optional) Commitment
- (optional)
identity: <string>
- Only return Response for this validator identity (base-58 encoded)
Response
<null>
- if requested epoch is not found<object>
- otherwise, the result field will be a dictionary of validator identities, as base-58 encoded strings, and their corresponding leader slot indices as values (indices are relative to the first slot in the requested epoch)
getMaxRetransmitSlot
Get the max slot seen from retransmit stage.
{
"jsonrpc": "2.0",
"result": 142195091,
"id": 1
}
SpecificationView Specification
Parameters
None
Response
<u64>
- Slot
getMaxShredInsertSlot
Get the max slot seen from after shred insert.
{
"jsonrpc": "2.0",
"result": 142195319,
"id": 1
}
SpecificationView Specification
Parameters
None
Response
<u64>
- Slot
getMinimumBalanceForRentExemption
Returns minimum balance required to make account rent exempt.
{
"jsonrpc": "2.0",
"result": 1238880,
"id": 1
}
SpecificationView Specification
Parameters
<usize>
- account data length<object>
- (optional) Commitment
Response
<u64>
- minimum lamports required in account
getMultipleAccounts
Returns the account information for a list of Pubkeys.
{
"jsonrpc": "2.0",
"result": {
"context": {
"apiVersion": "1.10.25",
"slot": 142195598
},
"value": [
{
"data": [
"",
"base64"
],
"executable": false,
"lamports": 407413255,
"owner": "11111111111111111111111111111111",
"rentEpoch": 329
},
{
"data": [
"",
"base64"
],
"executable": false,
"lamports": 2000000,
"owner": "11111111111111111111111111111111",
"rentEpoch": 328
}
]
},
"id": 1
}
SpecificationView Specification
Parameters
<array>
- An array of Pubkeys to query, as base-58 encoded strings (up to a maximum of 100).<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
encoding: <string>
- encoding for Account data, either "base58" (slow), "base64", "base64+zstd", or "jsonParsed". "base58" is limited to Account data of less than 129 bytes. "base64" will return base64 encoded data for Account data of any size. "base64+zstd" compresses the Account data using Zstandard and base64-encodes the result. "jsonParsed" encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If "jsonParsed" is requested but a parser cannot be found, the field falls back to "base64" encoding, detectable when thedata
field is type<string>
. - (optional)
dataSlice: <object>
- limit the returned account data using the providedoffset: <usize>
andlength: <usize>
fields; only available for "base58", "base64" or "base64+zstd" encodings. - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
Response
The result will be an RpcResponse JSON object with value
equal to:
An array of:
<null>
- if the account at that Pubkey doesn't exist<object>
- otherwise, a JSON object containing:lamports: <u64>
, number of lamports assigned to this account, as a u64owner: <string>
, base-58 encoded Pubkey of the program this account has been assigned todata: <[string, encoding]|object>
, data associated with the account, either as encoded binary data or JSON format{<program>: <state>}
, depending on encoding parameterexecutable: <bool>
, boolean indicating if the account contains a program (and is strictly read-only)rentEpoch: <u64>
, the epoch at which this account will next owe rent, as u64
getProgramAccounts
Returns all accounts owned by the provided program Pubkey
{
"jsonrpc": "2.0",
"result": [
{
"account": {
"data": "2R9jLfiAQ9bgdcw6h8s44439",
"executable": false,
"lamports": 15298080,
"owner": "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",
"rentEpoch": 28
},
"pubkey": "CxELquR1gPP8wHe33gZ4QxqGB3sZ9RSwsJ2KshVewkFY"
}
],
"id": 1
}
SpecificationView Specification
Parameters
<string>
- Pubkey of program, as base-58 encoded string<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
encoding: <string>
- encoding for Account data, either "base58" (slow), "base64", "base64+zstd", or "jsonParsed". "base58" is limited to Account data of less than 129 bytes. "base64" will return base64 encoded data for Account data of any size. "base64+zstd" compresses the Account data using Zstandard and base64-encodes the result. "jsonParsed" encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If "jsonParsed" is requested but a parser cannot be found, the field falls back to "base64" encoding, detectable when thedata
field is type<string>
. - (optional)
dataSlice: <object>
- limit the returned account data using the providedoffset: <usize>
andlength: <usize>
fields; only available for "base58", "base64" or "base64+zstd" encodings. - (optional)
filters: <array>
- filter Response using up to 4 filter objects; account must meet all filter criteria to be included in Response - (optional)
withContext: bool
- wrap the result in an RpcResponse JSON object. - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
- Filters
memcmp: <object>
- compares a provided series of bytes with program account data at a particular offset. Fields:offset: <usize>
- offset into program account data to start comparisonbytes: <string>
- data to match, as encoded stringencoding: <string>
- encoding for filterbytes
data, either "base58" or "base64". Data is limited in size to 128 or fewer decoded bytes. NEW: This field, and base64 support generally, is only available in solana-core v1.11.5 or newer. Please omit when querying nodes on earlier versions
dataSize: <u64>
- compares the program account data length with the provided data size
Response
By default the result field will be an array of JSON objects. If withContext
flag is set the array will be wrapped in an RpcResponse JSON object.
The array will contain:
pubkey: <string>
- the account Pubkey as base-58 encoded stringaccount: <object>
- a JSON object, with the following sub fields:lamports: <u64>
, number of lamports assigned to this account, as a u64owner: <string>
, base-58 encoded Pubkey of the program this account has been assigned todata: <[string,encoding]|object>
, data associated with the account, either as encoded binary data or JSON format{<program>: <state>}
, depending on encoding parameterexecutable: <bool>
, boolean indicating if the account contains a program (and is strictly read-only)rentEpoch: <u64>
, the epoch at which this account will next owe rent, as u64
getRecentPerformanceSamples
Returns a list of recent performance samples, in reverse slot order. Performance samples are taken every 60 seconds and include the number of transactions and slots that occur in a given time window.
{
"jsonrpc": "2.0",
"result": [
{
"numSlots": 99,
"numTransactions": 132093,
"samplePeriodSecs": 60,
"slot": 142197038
},
{
"numSlots": 96,
"numTransactions": 160336,
"samplePeriodSecs": 60,
"slot": 142196939
}
],
"id": 1
}
SpecificationView Specification
Parameters
limit: <usize>
- (optional) number of samples to return (maximum 720)
Response
An array of:
RpcPerfSample<object>
slot: <u64>
- Slot in which sample was taken atnumTransactions: <u64>
- Number of transactions in samplenumSlots: <u64>
- Number of slots in samplesamplePeriodSecs: <u16>
- Number of seconds in a sample window
getSignaturesForAddress
Returns signatures for confirmed transactions that include the given address in their accountKeys
list. Returns signatures backwards in time from the provided signature or most recent confirmed block
{
"jsonrpc": "2.0",
"result": [
{
"blockTime": 1658216207,
"confirmationStatus": "finalized",
"err": null,
"memo": null,
"signature": "67VcsoCiq173pQfaaPLXXNgBjkfeYsaqfpr6P8KwCzz6yGLbNQkKCabgppZz4h1Vn1RVcpFssgjNwnEn4eCjNqbL",
"slot": 142197435
}
],
"id": 1
}
SpecificationView Specification
Parameters
<string>
- account address as base-58 encoded string<object>
- (optional) Configuration object containing the following fields:- (optional)
limit: <number>
- maximum transaction signatures to return (between 1 and 1,000, default: 1,000). - (optional)
before: <string>
- start searching backwards from this transaction signature. If not provided the search starts from the top of the highest max confirmed block. - (optional)
until: <string>
- search until this transaction signature, if found before limit reached. - (optional)
commitment: <string>
- Commitment - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
Response
The result field will be an array of transaction signature information, ordered from newest to oldest transaction:
<object>
signature: <string>
- transaction signature as base-58 encoded stringslot: <u64>
- The slot that contains the block with the transactionerr: <object | null>
- Error if transaction failed, null if transaction succeeded. TransactionError definitionsmemo: <string |null>
- Memo associated with the transaction, null if no memo is presentblockTime: <i64 | null>
- estimated production time, as Unix timestamp (seconds since the Unix epoch) of when transaction was processed. null if not available.
getSignatureStatuses
Returns the statuses of a list of signatures. Unless the searchTransactionHistory
configuration parameter is included, this method only searches the recent status cache of signatures, which retains statuses for all active slots plus MAX_RECENT_BLOCKHASHES
rooted slots.
{
"jsonrpc": "2.0",
"result": {
"context": {
"apiVersion": "1.10.25",
"slot": 142197568
},
"value": [
null,
null
]
},
"id": 1
}
SpecificationView Specification
Parameters
<array>
- An array of transaction signatures to confirm, as base-58 encoded strings (up to a maximum of 256)<object>
- (optional) Configuration object containing the following field:searchTransactionHistory: <bool>
- if true, a Solana node will search its ledger cache for any signatures not found in the recent status cache
Response
An RpcResponse containing a JSON object consisting of an array of TransactionStatus objects.
RpcResponse<object>
- RpcResponse JSON object withvalue
field: An array of:<null>
- Unknown transaction<object>
slot: <u64>
- The slot the transaction was processedconfirmations: <usize | null>
- Number of blocks since signature confirmation, null if rooted, as well as finalized by a supermajority of the clustererr: <object | null>
- Error if transaction failed, null if transaction succeeded. TransactionError definitionsconfirmationStatus: <string | null>
- The transaction's cluster confirmation status; eitherprocessed
,confirmed
, orfinalized
. See Commitment for more on optimistic confirmation.- DEPRECATED:
status: <object>
- Transaction status"Ok": <null>
- Transaction was successful"Err": <ERR>
- Transaction failed with TransactionError
getSlot
Returns the slot that has reached the given or default commitment level
{
"jsonrpc": "2.0",
"result": 142197655,
"id": 1
}
SpecificationView Specification
Parameters
<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
Response
<u64>
- Current slot
getSlotLeader
Returns the current slot leader
{
"jsonrpc": "2.0",
"result": "XkCriyrNwS3G4rzAXtG5B1nnvb5Ka1JtCku93VqeKAr",
"id": 1
}
SpecificationView Specification
Parameters
<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
Response
<string>
- Node identity Pubkey as base-58 encoded string
getSlotLeaders
Returns the slot leaders for a given slot range
{
"jsonrpc": "2.0",
"result": [
"BXAxLMMMUNYfC1z166VjWHR3WjTmqzLxB837o5ghmRtH",
"BXAxLMMMUNYfC1z166VjWHR3WjTmqzLxB837o5ghmRtH",
"BXAxLMMMUNYfC1z166VjWHR3WjTmqzLxB837o5ghmRtH",
"BXAxLMMMUNYfC1z166VjWHR3WjTmqzLxB837o5ghmRtH",
"FSVdqBzx5D4UsqBLnvmH5dFx2dCm1pTPAbQWJ1PYzTJ2",
"FSVdqBzx5D4UsqBLnvmH5dFx2dCm1pTPAbQWJ1PYzTJ2",
"FSVdqBzx5D4UsqBLnvmH5dFx2dCm1pTPAbQWJ1PYzTJ2",
"FSVdqBzx5D4UsqBLnvmH5dFx2dCm1pTPAbQWJ1PYzTJ2",
"Awes4Tr6TX8JDzEhCZY2QVNimT6iD1zWHzf1vNyGvpLM",
"Awes4Tr6TX8JDzEhCZY2QVNimT6iD1zWHzf1vNyGvpLM"
],
"id": 1
}
SpecificationView Specification
Parameters
<u64>
- Start slot, as u64 integer<u64>
- Limit, as u64 integer (between 1 and 5,000)
Response
<array[string]>
- Node identity public keys as base-58 encoded strings
getStakeActivation
Returns epoch activation information for a stake account
{
"jsonrpc": "2.0",
"result": {
"active": 0,
"inactive": 0,
"state": "inactive"
},
"id": 1
}
SpecificationView Specification
Parameters
<string>
- Pubkey of stake account to query, as base-58 encoded string<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
epoch: <u64>
- epoch for which to calculate activation details. If parameter not provided, defaults to current epoch. - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
Response
The result will be a JSON object with the following fields:
state: <string
- the stake account's activation state, one of:active
,inactive
,activating
,deactivating
active: <u64>
- stake active during the epochinactive: <u64>
- stake inactive during the epoch
getSupply
Returns information about the current supply.
{
"jsonrpc": "2.0",
"result": {
"context": {
"apiVersion": "1.10.25",
"slot": 142199146
},
"value": {
"circulating": 345608553771113700,
"nonCirculating": 179649044946327740,
"nonCirculatingAccounts": [
"AQxNC7YdeR9qMa1aocGu8tRRuNLmTazpoojjgpWcWVgg",
"DjSe5AsRXuhrTP1q1fSCFEwSQ6ccnMGwuP9Fxv6E77eL",
"6xpotomrtNk8BbkLMc4h4JsctpEYaZbCF4q9aaz6dWVE"
],
"total": 525257598717441500
}
},
"id": 1
}
SpecificationView Specification
Parameters
<object>
- (optional) Configuration object containing the following optional fields:- (optional) Commitment
- (optional)
excludeNonCirculatingAccountsList: <bool>
- exclude non circulating accounts list from response
Response
The result will be an RpcResponse JSON object with value
equal to a JSON object containing:
total: <u64>
- Total supply in lamportscirculating: <u64>
- Circulating supply in lamportsnonCirculating: <u64>
- Non-circulating supply in lamportsnonCirculatingAccounts: <array>
- an array of account addresses of non-circulating accounts, as strings. IfexcludeNonCirculatingAccountsList
is enabled, the returned array will be empty.
getTokenAccountBalance
Returns the token balance of an SPL Token account.
{
"jsonrpc": "2.0",
"result": {
"context": {
"slot": 1114
},
"value": {
"amount": "9864",
"decimals": 2,
"uiAmount": 98.64,
"uiAmountString": "98.64"
},
"id": 1
}
}
SpecificationView Specification
Parameters
<string>
- Pubkey of Token account to query, as base-58 encoded string<object>
- (optional) Commitment
Response
The result will be an RpcResponse JSON object with value
equal to a JSON object containing:
amount: <string>
- the raw balance without decimals, a string representation of u64decimals: <u8>
- number of base 10 digits to the right of the decimal placeuiAmount: <number | null>
- the balance, using mint-prescribed decimals DEPRECATEDuiAmountString: <string>
- the balance as a string, using mint-prescribed decimals
getTokenAccountsByDelegate
Returns all SPL Token accounts by approved Delegate.
{
"jsonrpc": "2.0",
"result": {
"context": {
"slot": 1114
},
"value": [
{
"account": {
"data": {
"program": "spl-token",
"parsed": {
"info": {
"tokenAmount": {
"amount": "1",
"decimals": 1,
"uiAmount": 0.1,
"uiAmountString": "0.1"
},
"delegate": "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",
"delegatedAmount": {
"amount": "1",
"decimals": 1,
"uiAmount": 0.1,
"uiAmountString": "0.1"
},
"state": "initialized",
"isNative": false,
"mint": "3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E",
"owner": "CnPoSPKXu7wJqxe59Fs72tkBeALovhsCxYeFwPCQH9TD"
},
"type": "account"
},
"space": 165
},
"executable": false,
"lamports": 1726080,
"owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"rentEpoch": 4
},
"pubkey": "28YTZEwqtMHWrhWcvv34se7pjS7wctgqzCPB3gReCFKp"
}
]
},
"id": 1
}
SpecificationView Specification
Parameters
<string>
- Pubkey of account delegate to query, as base-58 encoded string<object>
- Either:mint: <string>
- Pubkey of the specific token Mint to limit accounts to, as base-58 encoded string; orprogramId: <string>
- Pubkey of the Token program that owns the accounts, as base-58 encoded string
<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
encoding: <string>
- encoding for Account data, either "base58" (slow), "base64", "base64+zstd", or "jsonParsed". "base58" is limited to Account data of less than 129 bytes. "base64" will return base64 encoded data for Account data of any size. "base64+zstd" compresses the Account data using Zstandard and base64-encodes the result. "jsonParsed" encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If "jsonParsed" is requested but a parser cannot be found, the field falls back to "base64" encoding, detectable when thedata
field is type<string>
. - (optional)
dataSlice: <object>
- limit the returned account data using the providedoffset: <usize>
andlength: <usize>
fields; only available for "base58", "base64" or "base64+zstd" encodings. - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
Response
The result will be an RpcResponse JSON object with value
equal to an array of JSON objects, which will contain:
pubkey: <string>
- the account Pubkey as base-58 encoded stringaccount: <object>
- a JSON object, with the following sub fields:lamports: <u64>
, number of lamports assigned to this account, as a u64owner: <string>
, base-58 encoded Pubkey of the program this account has been assigned todata: <object>
, Token state data associated with the account, either as encoded binary data or in JSON format{<program>: <state>}
executable: <bool>
, boolean indicating if the account contains a program (and is strictly read-only)rentEpoch: <u64>
, the epoch at which this account will next owe rent, as u64 When the data is requested with thejsonParsed
encoding a format similar to that of the Token Balances Structure can be expected inside the structure, both for thetokenAmount
and thedelegatedAmount
, with the latter being an optional object.
getTokenAccountsByOwner
Returns all SPL Token accounts by token owner.
{
"jsonrpc": "2.0",
"result": {
"context": {
"apiVersion": "1.10.25",
"slot": 142200996
},
"value": []
},
"id": 1
}
SpecificationView Specification
Parameters
<string>
- Pubkey of account owner to query, as base-58 encoded string<object>
- Either:mint: <string>
- Pubkey of the specific token Mint to limit accounts to, as base-58 encoded string; orprogramId: <string>
- Pubkey of the Token program that owns the accounts, as base-58 encoded string
<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
encoding: <string>
- encoding for Account data, either "base58" (slow), "base64", "base64+zstd", or "jsonParsed". "base58" is limited to Account data of less than 129 bytes. "base64" will return base64 encoded data for Account data of any size. "base64+zstd" compresses the Account data using Zstandard and base64-encodes the result. "jsonParsed" encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If "jsonParsed" is requested but a parser cannot be found, the field falls back to "base64" encoding, detectable when thedata
field is type<string>
. - (optional)
dataSlice: <object>
- limit the returned account data using the providedoffset: <usize>
andlength: <usize>
fields; only available for "base58", "base64" or "base64+zstd" encodings. - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
Response
The result will be an RpcResponse JSON object with value
equal to an array of JSON objects, which will contain:
pubkey: <string>
- the account Pubkey as base-58 encoded stringaccount: <object>
- a JSON object, with the following sub fields:lamports: <u64>
, number of lamports assigned to this account, as a u64owner: <string>
, base-58 encoded Pubkey of the program this account has been assigned todata: <object>
, Token state data associated with the account, either as encoded binary data or in JSON format{<program>: <state>}
executable: <bool>
, boolean indicating if the account contains a program (and is strictly read-only)rentEpoch: <u64>
, the epoch at which this account will next owe rent, as u64 When the data is requested with thejsonParsed
encoding a format similar to that of the Token Balances Structure can be expected inside the structure, both for thetokenAmount
and thedelegatedAmount
, with the latter being an optional object.
getTokenLargestAccounts
Returns the 20 largest accounts of a particular SPL Token type.
{
"jsonrpc": "2.0",
"result": {
"context": {
"apiVersion": "1.10.25",
"slot": 142201114
},
"value": [
{
"address": "AyVo5ZPHgkppgj4356tFtDgv9rJYvNH26MBn9zVhBzg2",
"amount": "15636878",
"decimals": 8,
"uiAmount": 0.15636878,
"uiAmountString": "0.15636878"
}
],
"id": 1
}
}
SpecificationView Specification
Parameters
<string>
- Pubkey of token Mint to query, as base-58 encoded string<object>
- (optional) Commitment
Response
The result will be an RpcResponse JSON object with value
equal to an array of JSON objects containing:
address: <string>
- the address of the token accountamount: <string>
- the raw token account balance without decimals, a string representation of u64decimals: <u8>
- number of base 10 digits to the right of the decimal placeuiAmount: <number | null>
- the token account balance, using mint-prescribed decimals DEPRECATEDuiAmountString: <string>
- the token account balance as a string, using mint-prescribed decimals
getTokenSupply
Returns the total supply of an SPL Token type.
{
"jsonrpc": "2.0",
"result": {
"context": {
"apiVersion": "1.10.25",
"slot": 142201217
},
"value": {
"amount": "28066741",
"decimals": 8,
"uiAmount": 0.28066741,
"uiAmountString": "0.28066741"
}
},
"id": 1
}
SpecificationView Specification
Parameters
<string>
- Pubkey of token Mint to query, as base-58 encoded string<object>
- (optional) Commitment
Response
The result will be an RpcResponse JSON object with value
equal to a JSON object containing:
amount: <string>
- the raw total token supply without decimals, a string representation of u64decimals: <u8>
- number of base 10 digits to the right of the decimal placeuiAmount: <number | null>
- the total token supply, using mint-prescribed decimals DEPRECATEDuiAmountString: <string>
- the total token supply as a string, using mint-prescribed decimals
getTransaction
Returns transaction details for a confirmed transaction
{
"jsonrpc": "2.0",
"result": {
"blockTime": 1658218779,
"meta": {
"err": {
"InstructionError": [
3,
{
"Custom": 6000
}
]
},
"fee": 7002,
"innerInstructions": [
{
"index": 2,
"instructions": [
{
"accounts": [
15,
12,
0,
10,
9,
4,
8,
1,
18
],
"data": "pUTd4gLN5T4CGbx4CepFhq",
"programIdIndex": 16
}
],
"recentBlockhash": "5mF5HmR88tv2m9zVDMqDiDYDiQLyrNuL33HyurEtcbXg"
}
],
"signatures": [
"oYVJPWxtEVCT6xJs4JouvnsmHEPB64SXk3haiwBhoBwgzujbxAZLZr1581ZfsZoTLkGKs7QSieiePmEFZDuDC9H"
]
}
},
"id": 1
}
SpecificationView Specification
Parameters
<string>
- transaction signature as base-58 encoded string<object>
- (optional) Configuration object containing the following optional fields:- (optional)
encoding: <string>
- encoding for each returned Transaction, either "json", "jsonParsed", "base58" (slow), "base64". If parameter not provided, the default encoding is "json". "jsonParsed" encoding attempts to use program-specific instruction parsers to return more human-readable and explicit data in thetransaction.message.instructions
list. If "jsonParsed" is requested but a parser cannot be found, the instruction falls back to regular JSON encoding (accounts
,data
, andprogramIdIndex
fields). - (optional) Commitment; "processed" is not supported. If parameter not provided, the default is "finalized".
- (optional)
maxSupportedTransactionVersion: <number>
- set the max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned. If this parameter is omitted, only legacy transactions will be returned, and any versioned transaction will prompt the error.
- (optional)
Response
<null>
- if transaction is not found or not confirmed<object>
- if transaction is confirmed, an object with the following fields:slot: <u64>
- the slot this transaction was processed intransaction: <object|[string,encoding]>
- Transaction object, either in JSON format or encoded binary data, depending on encoding parameterblockTime: <i64 | null>
- estimated production time, as Unix timestamp (seconds since the Unix epoch) of when the transaction was processed. null if not availablemeta: <object | null>
- transaction status metadata object:err: <object | null>
- Error if transaction failed, null if transaction succeeded. TransactionError definitionsfee: <u64>
- fee this transaction was charged, as u64 integerpreBalances: <array>
- array of u64 account balances from before the transaction was processedpostBalances: <array>
- array of u64 account balances after the transaction was processedinnerInstructions: <array|null>
- List of inner instructions ornull
if inner instruction recording was not enabled during this transactionpreTokenBalances: <array|undefined>
- List of token balances from before the transaction was processed or omitted if token balance recording was not yet enabled during this transactionpostTokenBalances: <array|undefined>
- List of token balances from after the transaction was processed or omitted if token balance recording was not yet enabled during this transactionlogMessages: <array|null>
- array of string log messages ornull
if log message recording was not enabled during this transaction- DEPRECATED:
status: <object>
- Transaction status"Ok": <null>
- Transaction was successful"Err": <ERR>
- Transaction failed with TransactionError
rewards: <array>
- present if rewards are requested; an array of JSON objects containing:pubkey: <string>
- The public key, as base-58 encoded string, of the account that received the rewardlamports: <i64>
- number of reward lamports credited or debited by the account, as a i64postBalance: <u64>
- account balance in lamports after the reward was appliedrewardType: <string>
- type of reward: currently only "rent", other types may be added in the futurecommission: <u8|undefined>
- vote account commission when the reward was credited, only present for voting and staking rewards
loadedAddresses: <object|undefined>
- Transaction addresses loaded from address lookup tables. Undefined ifmaxSupportedTransactionVersion
is not set in request params.writable: <array[string]>
- Ordered list of base-58 encoded addresses for writable loaded accountsreadonly: <array[string]>
- Ordered list of base-58 encoded addresses for readonly loaded accounts
version: <"legacy"|number|undefined>
- Transaction version. Undefined ifmaxSupportedTransactionVersion
is not set in request params.Returns transaction details for a confirmed transaction.
getTransactionCount
Returns the current Transaction count from the ledger
{
"jsonrpc": "2.0",
"result": 85494685591,
"id": 1
}
SpecificationView Specification
Parameters
<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
Response
<u64>
- count
getVersion
Returns the current solana versions running on the node
{
"jsonrpc": "2.0",
"result": {
"feature-set": 965221688,
"solana-core": "1.10.25"
},
"id": 1
}
SpecificationView Specification
Parameters
None
Response
The result field will be a JSON object with the following fields:
solana-core
, software version of solana-corefeature-set
, unique identifier of the current software's feature set
getVoteAccounts
Returns the account info and associated stake for all the voting accounts in the current bank.
{
"jsonrpc": "2.0",
"result": {
"current": [
{
"activatedStake": 84348343566093,
"commission": 10,
"epochCredits": [
[
325,
57743131,
57418019
],
[
326,
58093522,
57743131
],
[
327,
58442456,
58093522
],
[
328,
58755732,
58442456
],
[
329,
58809307,
58755732
]
],
"epochVoteAccount": true,
"lastVote": 142202222,
"nodePubkey": "4xp7K2vkm9LnJh1aCXjJyyF6XxL1u5gmYkrVCxHU6Cnw",
"rootSlot": 142202191,
"votePubkey": "9agefe58BLxF3dyDUg8JQLoGocWgTvZ6QEYeNrNTbi89"
}
]
},
"id": 1
}
SpecificationView Specification
Parameters
<object>
- (optional) Configuration object containing the following field:- (optional) Commitment
- (optional)
votePubkey: <string>
- Only return Response for this validator vote address (base-58 encoded) - (optional)
keepUnstakedDelinquents: <bool>
- Do not filter out delinquent validators with no stake - (optional)
delinquentSlotDistance: <u64>
- Specify the number of slots behind the tip that a validator must fall to be considered delinquent. NOTE: For the sake of consistency between ecosystem products, it is not recommended that this argument be specified.
Response
The result field will be a JSON object of current
and delinquent
accounts,
each containing an array of JSON objects with the following sub fields:
votePubkey: <string>
- Vote account address, as base-58 encoded stringnodePubkey: <string>
- Validator identity, as base-58 encoded stringactivatedStake: <u64>
- the stake, in lamports, delegated to this vote account and active in this epochepochVoteAccount: <bool>
- bool, whether the vote account is staked for this epochcommission: <number>
, percentage (0-100) of rewards payout owed to the vote accountlastVote: <u64>
- Most recent slot voted on by this vote accountepochCredits: <array>
- History of how many credits earned by the end of each epoch, as an array of arrays containing:[epoch, credits, previousCredits]
isBlockhashValid
NEW: This method is only available in solana-core v1.9 or newer. Please use getFeeCalculatorForBlockhash for solana-core v1.8
{
"jsonrpc": "2.0",
"result": {
"context": {
"apiVersion": "1.10.25",
"slot": 142202391
},
"value": false
},
"id": 45
}
SpecificationView Specification
Returns whether a blockhash is still valid or not
Parameters
blockhash: <string>
- the blockhash of this block, as base-58 encoded string<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment (used for retrieving blockhash) - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
Response
<bool>
- True if the blockhash is still valid
minimumLedgerSlot
Returns the lowest slot that the node has information about in its ledger. This value may increase over time if the node is configured to purge older ledger data
{
"jsonrpc": "2.0",
"result": 141980071,
"id": 1
}
SpecificationView Specification
Parameters
None
Response
u64
- Minimum ledger slot
requestAirdrop
Not Supported by Figment
{
"jsonrpc": "2.0",
"error": {
"code": -32600,
"message": "Invalid request"
},
"id": 1
}
SpecificationView Specification
Requests an airdrop of lamports to a Pubkey
Parameters
<string>
- Pubkey of account to receive lamports, as base-58 encoded string<integer>
- lamports, as a u64<object>
- (optional) Commitment (used for retrieving blockhash and verifying airdrop success)
Response
<string>
- Transaction Signature of airdrop, as base-58 encoded string
sendTransaction
Submits a signed transaction to the cluster for processing.
{
"jsonrpc": "2.0",
"result": "2id3YC2jK9G5Wo2phDx4gJVAew8DcY5NAojnVuao8rkxwPYPe8cSwE5GzhEgJA2y8fVjDEo6iR6ykBvDxrTQrtpb",
"id": 1
}
SpecificationView Specification
Parameters
<string>
- fully-signed Transaction, as encoded string<object>
- (optional) Configuration object containing the following field:skipPreflight: <bool>
- if true, skip the preflight transaction checks (default: false)preflightCommitment: <string>
- (optional) Commitment) level to use for preflight (default:"finalized"
).encoding: <string>
- (optional) Encoding used for the transaction data. Either"base58"
(slow, DEPRECATED), or"base64"
. (default:"base58"
).maxRetries: <usize>
- (optional) Maximum number of times for the RPC node to retry sending the transaction to the leader. If this parameter not provided, the RPC node will retry the transaction until it is finalized or until the blockhash expires.- (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
Response
<string>
- First Transaction Signature embedded in the transaction, as base-58 encoded string transaction id
simulateTransaction
Simulate sending a transaction
{
"jsonrpc": "2.0",
"result": {
"context": {
"slot": 218
},
"value": {
"err": null,
"accounts": null,
"logs": [
"Program 83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri invoke [1]",
"Program 83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri consumed 2366 of 1400000 compute units",
"Program return: 83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri KgAAAAAAAAA=",
"Program 83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri success"
],
"returnData": {
"data": [
"Kg==",
"base64"
],
"programId": "83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri"
},
"unitsConsumed": 2366
}
},
"id": 1
}
SpecificationView Specification
Parameters
<string>
- Transaction, as an encoded string. The transaction must have a valid blockhash, but is not required to be signed.<object>
- (optional) Configuration object containing the following fields:sigVerify: <bool>
- if true the transaction signatures will be verified (default: false, conflicts withreplaceRecentBlockhash
)commitment: <string>
- (optional) Commitment level to simulate the transaction at (default:"finalized"
).encoding: <string>
- (optional) Encoding used for the transaction data. Either"base58"
(slow, DEPRECATED), or"base64"
. (default:"base58"
).replaceRecentBlockhash: <bool>
- (optional) if true the transaction recent blockhash will be replaced with the most recent blockhash. (default: false, conflicts withsigVerify
)accounts: <object>
- (optional) Accounts configuration object containing the following fields:encoding: <string>
- (optional) encoding for returned Account data, either "base64" (default), "base64+zstd" or "jsonParsed". "jsonParsed" encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If "jsonParsed" is requested but a parser cannot be found, the field falls back to binary encoding, detectable when thedata
field is type<string>
.addresses: <array>
- An array of accounts to return, as base-58 encoded strings
- (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
Response
An RpcResponse containing a TransactionStatus object
The result will be an RpcResponse JSON object with value
set to a JSON object with the following fields:
err: <object | string | null>
- Error if transaction failed, null if transaction succeeded. TransactionError definitionslogs: <array | null>
- Array of log messages the transaction instructions output during execution, null if simulation failed before the transaction was able to execute (for example due to an invalid blockhash or signature verification failure)accounts: <array | null>
- array of accounts with the same length as theaccounts.addresses
array in the request<null>
- if the account doesn't exist or iferr
is not null<object>
- otherwise, a JSON object containing:lamports: <u64>
, number of lamports assigned to this account, as a u64owner: <string>
, base-58 encoded Pubkey of the program this account has been assigned todata: <[string, encoding]|object>
, data associated with the account, either as encoded binary data or JSON format{<program>: <state>}
, depending on encoding parameterexecutable: <bool>
, boolean indicating if the account contains a program (and is strictly read-only)rentEpoch: <u64>
, the epoch at which this account will next owe rent, as u64
unitsConsumed: <u64 | undefined>
, The number of compute budget units consumed during the processing of this transactionreturnData: <object | null>
- the most-recent return data generated by an instruction in the transaction, with the following fields:programId: <string>
, the program that generated the return data, as base-58 encoded Pubkeydata: <[string, encoding]>
, the return data itself, as base-64 encoded binary data
accountSubscribe
Subscribe to an account to receive notifications when the lamports or data for a given account public key changes
{
"jsonrpc": "2.0",
"result": 23784,
"id": 1
}
SpecificationView Specification
Parameters
<string>
- account Pubkey, as base-58 encoded string<object>
- (optional) Configuration object containing the following optional fields:<object>
- (optional) Commitmentencoding: <string>
- encoding for Account data, either "base58" (slow), "base64", "base64+zstd" or "jsonParsed". "jsonParsed" encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If "jsonParsed" is requested but a parser cannot be found, the field falls back to binary encoding, detectable when thedata
field is type<string>
.
Response
<number>
- Subscription id (needed to unsubscribe)
accountUnsubscribe
Unsubscribe from account change notifications
{
"jsonrpc": "2.0",
"result": true,
"id": 1
}
SpecificationView Specification
Parameters
<number>
- id of account Subscription to cancel
Response
<bool>
- unsubscribe success message
blockSubscribe
This subscription is unstable and only available if the validator was started with the --rpc-pubsub-enable-block-subscription
flag. The format of this subscription may change in the future
{
"jsonrpc": "2.0",
"result": 0,
"id": 1
}
SpecificationView Specification
Subscribe to receive notification anytime a new block is Confirmed or Finalized.
Parameters
filter: <string>|<object>
- filter criteria for the logs to receive Response by account type; currently supported:- "all" - include all transactions in block
{ "mentionsAccountOrProgram": <string> }
- return only transactions that mention the provided public key (as base-58 encoded string). If no mentions in a given block, then no notification will be sent.
<object>
- (optional) Configuration object containing the following optional fields:- (optional) Commitment
- (optional)
encoding: <string>
- encoding for Account data, either "base58" (slow), "base64", "base64+zstd" or "jsonParsed". "jsonParsed" encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If "jsonParsed" is requested but a parser cannot be found, the field falls back to base64 encoding, detectable when thedata
field is type<string>
. Default is "base64". - (optional)
transactionDetails: <string>
- level of transaction detail to return, either "full", "signatures", or "none". If parameter not provided, the default detail level is "full". - (optional)
showRewards: bool
- whether to populate therewards
array. If parameter not provided, the default includes rewards.
Response
integer
- subscription id (needed to unsubscribe)
blockUnsubscribe
Unsubscribe from block notifications
{
"jsonrpc": "2.0",
"result": true,
"id": 1
}
SpecificationView Specification
Parameters
<integer>
- subscription id to cancel
Response
<bool>
- unsubscribe success message
logsSubscribe
Subscribe to transaction logging
{
"jsonrpc": "2.0",
"result": 24040,
"id": 1
}
SpecificationView Specification
Parameters
filter: <string>|<object>
- filter criteria for the logs to receive Response by account type; currently supported:- "all" - subscribe to all transactions except for simple vote transactions
- "allWithVotes" - subscribe to all transactions including simple vote transactions
{ "mentions": [ <string> ] }
- subscribe to all transactions that mention the provided Pubkey (as base-58 encoded string)
<object>
- (optional) Configuration object containing the following optional fields:- (optional) Commitment
Response
<integer>
- Subscription id (needed to unsubscribe)
logsUnsubscribe
Unsubscribe from transaction logging
{
"jsonrpc": "2.0",
"result": true,
"id": 1
}
SpecificationView Specification
Parameters
<integer>
- id of subscription to cancel
Response
<bool>
- unsubscribe success message
programSubscribe
Subscribe to a program to receive notifications when the lamports or data for a given account owned by the program changes
{
"jsonrpc": "2.0",
"result": 24040,
"id": 1
}
SpecificationView Specification
Parameters
<string>
- program_id Pubkey, as base-58 encoded string<object>
- (optional) Configuration object containing the following optional fields:- (optional) Commitment
encoding: <string>
- encoding for Account data, eitherbase58
(slow),base64
,base64+zstd
orjsonParsed
.jsonParsed
encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. IfjsonParsed
is requested but a parser cannot be found, the field falls back tobase64
encoding, detectable when thedata
field is type<string>
.- (optional)
filters: <array>
- filter Response using various filter objects; account must meet all filter criteria to be included in Response.
Response
<integer>
- Subscription id (needed to unsubscribe)
programUnsubscribe
Unsubscribe from program-owned account change notifications
{
"jsonrpc": "2.0",
"result": true,
"id": 1
}
SpecificationView Specification
Parameters
<integer>
- id of account Subscription to cancel
Response
<bool>
- unsubscribe success message
signatureSubscribe
Subscribe to a transaction signature to receive notification when the transaction is confirmed On signatureNotification
, the subscription is automatically cancelled
{
"jsonrpc": "2.0",
"result": 0,
"id": 1
}
SpecificationView Specification
Parameters
<string>
- Transaction Signature, as base-58 encoded string<object>
- (optional) Commitment
Response
integer
- subscription id (needed to unsubscribe)
signatureUnsubscribe
Unsubscribe from signature confirmation notification
{
"jsonrpc": "2.0",
"result": true,
"id": 1
}
SpecificationView Specification
Parameters
<integer>
- subscription id to cancel
Response
<bool>
- unsubscribe success message
slotSubscribe
Subscribe to receive notification anytime a slot is processed by the validator
{
"jsonrpc": "2.0",
"result": 0,
"id": 1
}
SpecificationView Specification
Parameters
None
Response
integer
- subscription id (needed to unsubscribe)
slotUnsubscribe
Unsubscribe from slot notifications
{
"jsonrpc": "2.0",
"result": true,
"id": 1
}
SpecificationView Specification
Parameters
<integer>
- subscription id to cancel
Response
<bool>
- unsubscribe success message
slotsUpdatesSubscribe
This subscription is unstable; the format of this subscription may change in the future and it may not always be supported
{
"jsonrpc": "2.0",
"result": 0,
"id": 1
}
SpecificationView Specification
Subscribe to receive a notification from the validator on a variety of updates on every slot
Parameters
None
Response
integer
- subscription id (needed to unsubscribe)
slotsUpdatesUnsubscribe
Unsubscribe from slot-update notifications
{
"jsonrpc": "2.0",
"result": true,
"id": 1
}
SpecificationView Specification
Parameters
<integer>
- subscription id to cancel
Response
<bool>
- unsubscribe success message
rootSubscribe
Subscribe to receive notification anytime a new root is set by the validator.
{
"jsonrpc": "2.0",
"result": 0,
"id": 1
}
SpecificationView Specification
Parameters
None
Response
integer
- subscription id (needed to unsubscribe)
rootUnsubscribe
Unsubscribe from root notifications
{
"jsonrpc": "2.0",
"result": true,
"id": 1
}
SpecificationView Specification
Parameters
<integer>
- subscription id to cancel
Response
<bool>
- unsubscribe success message
voteSubscribe
This subscription is unstable and only available if the validator was started with the --rpc-pubsub-enable-vote-subscription
flag. The format of this subscription may change in the future
{
"jsonrpc": "2.0",
"result": 0,
"id": 1
}
SpecificationView Specification
Subscribe to receive notification anytime a new vote is observed in gossip. These votes are pre-consensus therefore there is no guarantee these votes will enter the ledger.
Parameters
None
Response
integer
- subscription id (needed to unsubscribe)
voteUnsubscribe
Unsubscribe from vote notifications
{
"jsonrpc": "2.0",
"result": true,
"id": 1
}
SpecificationView Specification
Parameters
<integer>
- subscription id to cancel
Response
<bool>
- unsubscribe success message