Network and Cluster Methods
getHealth
POST JSON-RPC
Returns ok when the node is healthy.
Parameters: None
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":"health","method":"getHealth"}'{
"jsonrpc": "2.0",
"result": "ok",
"id": "health"
}getClusterNodes
POST - JSON-RPC
Returns information about all the nodes participating in the cluster.
Parameters: None
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getClusterNodes"}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getClusterNodes"
}{
"jsonrpc": "2.0",
"result": [
{
"featureSet": 4192065167,
"gossip": "10.239.6.48:8001",
"pubkey": "9QzsJf7LPLj8GkXbYT3LFDKqE8R7q9UKcEVPFiKkKgUD",
"rpc": "10.239.6.48:8899",
"shredVersion": 761,
"tpu": "10.239.6.48:8856",
"version": "1.0.0 c375ce1f"
}
],
"id": 1
}result[]arrayNode object properties
pubkeystringgossipstringtpustringrpcstringversionstringfeatureSetintegershredVersionintegergetSlot
POST - JSON-RPC
Returns the current slot that has reached the given commitment level.
objectConfiguration object with optional commitment and minContextSlot.
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getSlot"}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getSlot"
}{
"jsonrpc": "2.0",
"result": 1234,
"id": 1
}getSlotLeader
POST - JSON-RPC
Returns the current slot leader's identity Pubkey.
objectConfiguration object with optional commitment and minContextSlot.
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getSlotLeader"}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getSlotLeader"
}{
"jsonrpc": "2.0",
"result": "ENvAW7JScgYq6o4MkZRMs5PGzUKkpGEZMKAGMxiSJfV9",
"id": 1
}getSlotLeaders
POST - JSON-RPC
Returns the slot leaders for a given slot range.
integerrequiredStart slot (u64).
integerrequiredLimit (u64, range 1–5000).
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getSlotLeaders","params":[100,10]}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getSlotLeaders",
"params": [100, 10]
}{
"jsonrpc": "2.0",
"result": [
"ChorusmmC7i2GmyZzc61G2r3M2YDdxFpf8jcgKyPbc6d",
"dv1ZAGvdsz5hHLwWXsVnM94hWf1pjbKVau1QVkaMJ92",
"dv2tdsQ2TRLwm1I66TVbKRZ366FX3nGacR2V7d93FPH"
],
"id": 1
}getVersion
POST - JSON-RPC
Returns the current Solana version running on the node.
Parameters: None
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getVersion"}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getVersion"
}{
"jsonrpc": "2.0",
"result": {
"feature-set": 2891131721,
"solana-core": "1.16.7"
},
"id": 1
}getIdentity
POST - JSON-RPC
Returns the identity public key for the current node.
Parameters: None
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getIdentity"}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getIdentity"
}{
"jsonrpc": "2.0",
"result": {
"identity": "2r1F4iWqVcb8M1DbAjQuFpebkQHY9hcVU4WuW2DJBppN"
},
"id": 1
}getEpochInfo
POST - JSON-RPC
Returns information about the current epoch.
objectConfiguration object with optional commitment and minContextSlot.
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getEpochInfo"}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getEpochInfo"
}{
"jsonrpc": "2.0",
"result": {
"absoluteSlot": 166598,
"blockHeight": 166500,
"epoch": 27,
"slotIndex": 2790,
"slotsInEpoch": 8192,
"transactionCount": 22661093
},
"id": 1
}resultobjectproperties
absoluteSlotintegerblockHeightintegerepochintegerslotIndexintegerslotsInEpochintegertransactionCountintegergetEpochSchedule
POST - JSON-RPC
Returns the epoch schedule information from the cluster's genesis config.
Parameters: None
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getEpochSchedule"}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getEpochSchedule"
}{
"jsonrpc": "2.0",
"result": {
"firstNormalEpoch": 8,
"firstNormalSlot": 8160,
"leaderScheduleSlotOffset": 8192,
"slotsPerEpoch": 8192,
"warmup": true
},
"id": 1
}resultobjectproperties
slotsPerEpochintegerleaderScheduleSlotOffsetintegerwarmupbooleanfirstNormalEpochintegerslotsPerEpoch slots.firstNormalSlotintegerfirstNormalEpoch.getLeaderSchedule
POST - JSON-RPC
Returns the leader schedule for an epoch.
integerSlot to determine which epoch to query (optional, defaults to current).
objectConfiguration object:
commitment(string) - commitment levelidentity(string) - filter results to a single validator
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getLeaderSchedule","params":[null,{"identity":"4Qkev8aNZcqFNSRhQzwyLMFSsi94jHqE8WNVTJzTP99F"}]}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getLeaderSchedule",
"params": [
null,
{ "identity": "4Qkev8aNZcqFNSRhQzwyLMFSsi94jHqE8WNVTJzTP99F" }
]
}{
"jsonrpc": "2.0",
"result": {
"4Qkev8aNZcqFNSRhQzwyLMFSsi94jHqE8WNVTJzTP99F": [0, 1, 2, 3, 4]
},
"id": 1
}getVoteAccounts
POST - JSON-RPC
Returns the account info and associated stake for all the voting accounts.
objectConfiguration object:
commitment(string)votePubkey(string) - filter to a single vote accountkeepUnstakedDelinquents(boolean) - include delinquent validators with no stakedelinquentSlotDistance(integer) - slots behind to consider delinquent
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getVoteAccounts"}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getVoteAccounts"
}{
"jsonrpc": "2.0",
"result": {
"current": [
{
"activatedStake": 42,
"commission": 0,
"epochCredits": [[1, 64, 0], [2, 192, 64]],
"epochVoteAccount": true,
"lastVote": 147,
"nodePubkey": "B97CCTR8ZFJhsAFDhCUqGXk1G5v95UHeSTFnJKDBBSN3",
"rootSlot": 146,
"votePubkey": "3ZT31jkAGhUaw8jsy4bTknwBKodFCG9BjZBKn1MYdjEq"
}
],
"delinquent": []
},
"id": 1
}getRecentPerformanceSamples
POST - JSON-RPC
Returns a list of recent performance samples, in reverse slot order.
integerNumber of samples to return (max 720, default 720).
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getRecentPerformanceSamples","params":[4]}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getRecentPerformanceSamples",
"params": [4]
}{
"jsonrpc": "2.0",
"result": [
{
"numNonVoteTransactions": 971,
"numSlots": 60,
"numTransactions": 5765,
"samplePeriodSecs": 60,
"slot": 348125
}
],
"id": 1
}result[]arrayproperties
slotintegernumTransactionsintegernumNonVoteTransactionsintegernumSlotsintegersamplePeriodSecsinteger