Skip to main content
Returns the full transaction object for a confirmed transaction. Returns null if the transaction is not found or has not yet been confirmed.

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getTransaction",
  "params": [
    "5yGsRzg4MCzTBq5mHJSWAtCZEXh6ZBF7CBrHp4AHiuuTKe5j...",
    { "encoding": "jsonParsed", "maxSupportedTransactionVersion": 0 }
  ]
}

Parameters

signature
string
required
Transaction signature as a base-58 encoded string.
encoding
string
Encoding for the returned transaction. One of json, jsonParsed, base58, or base64. Defaults to json.
commitment
string
Commitment level for the query. Only confirmed and finalized are supported.
maxSupportedTransactionVersion
number
The maximum transaction version to return. Set to 0 to support versioned transactions. If not specified, only legacy transactions are returned.

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "slot": 430000000,
    "blockTime": 1700000000,
    "transaction": { "...": "..." },
    "meta": {
      "err": null,
      "fee": 5000,
      "preBalances": [1000000000, 0],
      "postBalances": [999995000, 0],
      "logMessages": [
        "Program 11111111111111111111111111111111 invoke [1]",
        "Program 11111111111111111111111111111111 success"
      ],
      "innerInstructions": [],
      "preTokenBalances": [],
      "postTokenBalances": [],
      "rewards": null
    }
  }
}
slot
number
The slot in which this transaction was confirmed.
blockTime
number | null
Unix timestamp (seconds) of the block in which this transaction was confirmed. null if not available.
transaction
object
The transaction data. Structure depends on the requested encoding.
meta.err
object | null
null if the transaction succeeded. Contains the error object if it failed.
meta.fee
number
Transaction fee paid in lamports.
meta.preBalances
number[]
Account balances in lamports before the transaction was processed, in the same order as transaction.message.accountKeys.
meta.postBalances
number[]
Account balances in lamports after the transaction was processed.
meta.logMessages
string[]
Program log output from the transaction.

Example

curl "https://rpc.solami.fast/sol?api_key=YOUR_API_KEY" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getTransaction",
    "params": [
      "5yGsRzg4MCzTBq5mHJSWAtCZEXh6ZBF7CBrHp4AHiuuTKe5j...",
      { "encoding": "jsonParsed", "maxSupportedTransactionVersion": 0 }
    ]
  }'