Transaction Methods
getTransaction
POST - JSON-RPC
Fetches detailed information about a specific transaction using its signature.
stringrequiredTransaction signature as a base-58 encoded string.
objectConfiguration object:
encoding(string) -json,jsonParsed,base58,base64commitment(string) -finalizedorconfirmedmaxSupportedTransactionVersion(integer)
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":"getTransaction","params":["2nBhEBYYvfaAe16UMNqRHre4YNSskvuYgx3M6E4JP1oeYYd8Tm5ATGQ7ufRYM5jnFdoP8bHKevSX1Tc3FRxPpM",{"encoding":"jsonParsed","maxSupportedTransactionVersion":0}]}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getTransaction",
"params": [
"2nBhEBYYvfaAe16UMNqRHre4YNSskvuYgx3M6E4JP1oeYYd8Tm5ATGQ7ufRYM5jnFdoP8bHKevSX1Tc3FRxPpM",
{ "encoding": "jsonParsed", "maxSupportedTransactionVersion": 0 }
]
}{
"jsonrpc": "2.0",
"result": {
"slot": 430,
"transaction": {
"message": {
"accountKeys": [],
"instructions": [],
"recentBlockhash": "mfcyqEXB3DnHXki6KjjmZck6YjmZLvpAByy2fj4nh6B"
},
"signatures": []
},
"meta": {
"err": null,
"fee": 5000,
"preBalances": [],
"postBalances": []
},
"blockTime": 1574721591
},
"id": 1
}getTransactionCount
POST - JSON-RPC
Returns the current transaction count from the ledger.
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":"getTransactionCount"}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getTransactionCount"
}{
"jsonrpc": "2.0",
"result": 268,
"id": 1
}getSignatureStatuses
POST - JSON-RPC
Returns the statuses of a list of transaction signatures (max 256).
arrayrequiredArray of transaction signatures as base-58 encoded strings (max 256).
objectConfiguration object:
searchTransactionHistory(boolean) - search beyond recent slots
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":"getSignatureStatuses","params":[["5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW"],{"searchTransactionHistory":true}]}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getSignatureStatuses",
"params": [
["5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW"],
{ "searchTransactionHistory": true }
]
}{
"jsonrpc": "2.0",
"result": {
"context": { "slot": 82 },
"value": [
{
"slot": 72,
"confirmations": 10,
"err": null,
"confirmationStatus": "finalized"
}
]
},
"id": 1
}getSignaturesForAddress
POST - JSON-RPC
Returns transaction signatures for confirmed transactions that include the given account address.
stringrequiredAccount address as a base-58 encoded string.
objectConfiguration object:
commitment(string)limit(integer) - max results (1-1000, default 1000)before(string) - start searching before this signatureuntil(string) - search until this signatureminContextSlot(integer) - minimum slot for evaluation
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":"getSignaturesForAddress","params":["Vote111111111111111111111111111111111111111",{"limit":1}]}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getSignaturesForAddress",
"params": [
"Vote111111111111111111111111111111111111111",
{ "limit": 1 }
]
}{
"jsonrpc": "2.0",
"result": [
{
"blockTime": 1574721591,
"confirmationStatus": "finalized",
"err": null,
"memo": null,
"signature": "5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW",
"slot": 72
}
],
"id": 1
}sendTransaction
POST - JSON-RPC
Submits a signed transaction to the cluster for processing.
stringrequiredFully-signed transaction as an encoded string.
objectConfiguration object:
encoding(string) -base58orbase64(default:base58)skipPreflight(boolean) - skip preflight checks (default:false)preflightCommitment(string) - commitment for preflight (default:finalized)maxRetries(integer) - max node retry attemptsminContextSlot(integer) - min slot for preflight evaluation
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":"sendTransaction","params":["4hXTCkRzt9WyecNzV1XPgCDfGAZzQKNxLXgynz5QDuWWPSAZBZSHptvWRL3BjCvzUXRdKvHL2b7yGrRQcWyaqsaBCncVG7BFggS8w9snUts67BSh3EqKpXLUm5UMHfD7ZBe9GhARjbNQMLJ1QD3Spr6oMTBU6EhdB4RD8CP2xUxr2u3d6fos36PD98XS6oX8TQjLpsMwncs5DAMiD4nNnR8NBfyghGCWvCVifVwvA8B8TJxE1aiyiv2L429BCWfyzAme5sZW8rDb14NeCQHhZbtNqfXhcp2tAnaAT",{"encoding":"base58"}]}'{
"jsonrpc": "2.0",
"id": 1,
"method": "sendTransaction",
"params": [
"4hXTCkRzt9WyecNzV1XPgCDfGAZzQKNxLXgynz5QDuWWPSAZBZSHptvWRL3BjCvzUXRdKvHL2b7yGrRQcWyaqsaBCncVG7BFggS8w9snUts67BSh3EqKpXLUm5UMHfD7ZBe9GhARjbNQMLJ1QD3Spr6oMTBU6EhdB4RD8CP2xUxr2u3d6fos36PD98XS6oX8TQjLpsMwncs5DAMiD4nNnR8NBfyghGCWvCVifVwvA8B8TJxE1aiyiv2L429BCWfyzAme5sZW8rDb14NeCQHhZbtNqfXhcp2tAnaAT",
{ "encoding": "base58" }
]
}{
"jsonrpc": "2.0",
"result": "2id3YC2jK9G5Wo2phDx4gJVAew8DcY5NAojnVuao8rkxwPYPe8cSwE5GzhEgJA2y8fVjDEo6iR7E6QLa2S9sJoKa",
"id": 1
}Transactions must be signed before submission. The sendTransaction method does not sign transactions.
simulateTransaction
POST - JSON-RPC
Simulates sending a transaction without requiring a valid signature. Useful for testing transaction execution.
stringrequiredTransaction as an encoded string.
objectConfiguration object:
commitment(string) - commitment levelsigVerify(boolean) - verify signatures (conflicts withreplaceRecentBlockhash)replaceRecentBlockhash(boolean) - replace blockhash with latestencoding(string) -base58orbase64innerInstructions(boolean) - return inner instructions in resultminContextSlot(integer) - minimum slot for evaluationaccounts(object) -{ encoding, addresses }to return account state
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":"simulateTransaction","params":["AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDArczbMia1tLmq7zz4DinMNN0pJ1JtLdqIJPUw3YrGCzYAMHBsgN27lcgB6H2WQvFgyZuJYHa46puOQo9yQ8CVQbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCph/IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",{"encoding":"base64","replaceRecentBlockhash":true}]}'{
"jsonrpc": "2.0",
"id": 1,
"method": "simulateTransaction",
"params": [
"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDArczbMia1tLmq7zz4DinMNN0pJ1JtLdqIJPUw3YrGCzYAMHBsgN27lcgB6H2WQvFgyZuJYHa46puOQo9yQ8CVQbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCph/IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
{
"encoding": "base64",
"replaceRecentBlockhash": true
}
]
}{
"jsonrpc": "2.0",
"result": {
"context": { "slot": 218 },
"value": {
"accounts": null,
"err": null,
"logs": [
"Program 11111111111111111111111111111111 invoke [1]",
"Program 11111111111111111111111111111111 success"
],
"returnData": null,
"unitsConsumed": 150
}
},
"id": 1
}result.valueobjectproperties
errobjectlogsarrayaccountsarrayunitsConsumedintegerreturnDataobject