Transaction Methods

getTransaction

POST - JSON-RPC

Fetches detailed information about a specific transaction using its signature.

stringrequired

Transaction signature as a base-58 encoded string.

object

Configuration object:

  • encoding (string) - json, jsonParsed, base58, base64
  • commitment (string) - finalized or confirmed
  • maxSupportedTransactionVersion (integer)
bash
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}]}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getTransaction",
  "params": [
    "2nBhEBYYvfaAe16UMNqRHre4YNSskvuYgx3M6E4JP1oeYYd8Tm5ATGQ7ufRYM5jnFdoP8bHKevSX1Tc3FRxPpM",
    { "encoding": "jsonParsed", "maxSupportedTransactionVersion": 0 }
  ]
}
json
{
  "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.

object

Configuration object with optional commitment and minContextSlot.

bash
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"}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getTransactionCount"
}
json
{
  "jsonrpc": "2.0",
  "result": 268,
  "id": 1
}

getSignatureStatuses

POST - JSON-RPC

Returns the statuses of a list of transaction signatures (max 256).

arrayrequired

Array of transaction signatures as base-58 encoded strings (max 256).

object

Configuration object:

  • searchTransactionHistory (boolean) - search beyond recent slots
bash
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}]}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getSignatureStatuses",
  "params": [
    ["5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW"],
    { "searchTransactionHistory": true }
  ]
}
json
{
  "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.

stringrequired

Account address as a base-58 encoded string.

object

Configuration object:

  • commitment (string)
  • limit (integer) - max results (1-1000, default 1000)
  • before (string) - start searching before this signature
  • until (string) - search until this signature
  • minContextSlot (integer) - minimum slot for evaluation
bash
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}]}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getSignaturesForAddress",
  "params": [
    "Vote111111111111111111111111111111111111111",
    { "limit": 1 }
  ]
}
json
{
  "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.

stringrequired

Fully-signed transaction as an encoded string.

object

Configuration object:

  • encoding (string) - base58 or base64 (default: base58)
  • skipPreflight (boolean) - skip preflight checks (default: false)
  • preflightCommitment (string) - commitment for preflight (default: finalized)
  • maxRetries (integer) - max node retry attempts
  • minContextSlot (integer) - min slot for preflight evaluation
bash
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"}]}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "sendTransaction",
  "params": [
    "4hXTCkRzt9WyecNzV1XPgCDfGAZzQKNxLXgynz5QDuWWPSAZBZSHptvWRL3BjCvzUXRdKvHL2b7yGrRQcWyaqsaBCncVG7BFggS8w9snUts67BSh3EqKpXLUm5UMHfD7ZBe9GhARjbNQMLJ1QD3Spr6oMTBU6EhdB4RD8CP2xUxr2u3d6fos36PD98XS6oX8TQjLpsMwncs5DAMiD4nNnR8NBfyghGCWvCVifVwvA8B8TJxE1aiyiv2L429BCWfyzAme5sZW8rDb14NeCQHhZbtNqfXhcp2tAnaAT",
    { "encoding": "base58" }
  ]
}
json
{
  "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.

stringrequired

Transaction as an encoded string.

object

Configuration object:

  • commitment (string) - commitment level
  • sigVerify (boolean) - verify signatures (conflicts with replaceRecentBlockhash)
  • replaceRecentBlockhash (boolean) - replace blockhash with latest
  • encoding (string) - base58 or base64
  • innerInstructions (boolean) - return inner instructions in result
  • minContextSlot (integer) - minimum slot for evaluation
  • accounts (object) - { encoding, addresses } to return account state
bash
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}]}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "simulateTransaction",
  "params": [
    "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDArczbMia1tLmq7zz4DinMNN0pJ1JtLdqIJPUw3YrGCzYAMHBsgN27lcgB6H2WQvFgyZuJYHa46puOQo9yQ8CVQbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCph/IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
    {
      "encoding": "base64",
      "replaceRecentBlockhash": true
    }
  ]
}
json
{
  "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.valueobject
properties
errobject
Transaction error (null if success).
logsarray
Array of log messages from execution.
accountsarray
Returned account states if requested.
unitsConsumedinteger
Compute units consumed.
returnDataobject
Return data from the transaction.