TriportRPC

getTransaction

POSThttps://api.triport.io/v1/sol

Returns the full details of a confirmed Solana transaction, looked up by its signature.

Solanasol_read_rpcfree+ — 20 / 60 / 200 / 600 RPS (free / basic / pro / business)

getTransaction fetches a single confirmed transaction by its base-58 signature and returns its decoded contents along with execution metadata — fees, balance changes, inner instructions, log output, and compute units consumed.

Use it to inspect the outcome of a transaction you have already submitted (for example after sendTransaction), to confirm whether it succeeded, or to render the details of any historical transaction. The method returns null when no confirmed transaction matches the supplied signature — either because the signature is unknown to the cluster or because it has not yet reached the requested commitment.

Versioned transactions (those using Address Lookup Tables) are only returned when you pass maxSupportedTransactionVersion. If you omit it and the transaction is a versioned one, the request fails rather than returning the transaction.

Parameters

JSON-RPC params is a positional array: [signature, config?].

signaturestring (base-58)required
The transaction signature to look up.
configobjectoptional
Optional configuration object (see below).
encodingstringoptional
Encoding for the returned transaction: json, jsonParsed, base58, or base64.
commitmentstringoptional
Commitment level: processed, confirmed, or finalized.
maxSupportedTransactionVersionintegeroptional
Highest transaction version to return. Required to receive versioned (lookup-table) transactions; pass 0 for current versioned transactions.

Response

When no confirmed transaction matches the signature, result is null:

{ "jsonrpc": "2.0", "id": 1, "result": null }
resultobject | null
The transaction response, or null if not found.
result.slotinteger
The slot in which the transaction was processed.
result.blockTimeinteger
Estimated production time of the block, as a Unix timestamp (seconds). May be null.
result.versionstring | integer
Transaction version: "legacy" or a version number (e.g. 0).
result.transactionobject
The decoded transaction, in the requested encoding.
result.metaobject
Execution metadata (see below).
result.meta.errobject | null
null on success, or an error object describing why the transaction failed.
result.meta.feeinteger
Fee charged for the transaction, in lamports.
result.meta.preBalancesinteger[]
Account lamport balances before the transaction, ordered by accountKeys.
result.meta.postBalancesinteger[]
Account lamport balances after the transaction, ordered by accountKeys.
result.meta.innerInstructionsarray
Cross-program (inner) instructions invoked during execution.
result.meta.logMessagesstring[]
Program log output emitted during execution.
result.meta.computeUnitsConsumedinteger
Total compute units consumed by the transaction.

Errors

Errors are returned in the standard JSON-RPC error envelope. See the shared errors reference for the full envelope shape and shared codes.

CodeMeaningWhen it happens
-32602Invalid paramssignature is missing or not a valid base-58 string, config is malformed, or the transaction is versioned and maxSupportedTransactionVersion was not supplied.
401UnauthorizedMissing or invalid Authorization: Bearer key.
429Rate limitedMore than your tier's RPS for sol_read_rpc (20 / 60 / 200 / 600).

A signature that simply does not match any confirmed transaction is not an error — the call succeeds with result: null.

Examples

JavaScript (fetch)

const res = await fetch("https://api.triport.io/v1/sol", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    jsonrpc: "2.0",
    id: 1,
    method: "getTransaction",
    params: [
      "4eEzpJ29YBE7iz6Lw5eVNqYpJEMRDM6kF1pPyDmwbDgTynxJgF6Th9oV66XSh1jKvxhqZpKjJqLBu7nGzrjnVqWv",
      { encoding: "jsonParsed", commitment: "finalized", maxSupportedTransactionVersion: 0 },
    ],
  }),
});


const { result } = await res.json();
if (result === null) {
  console.log("Transaction not found");
} else {
  console.log(`Succeeded: ${result.meta.err === null}, fee: ${result.meta.fee} lamports`);
}

TypeScript SDK (@triport/sdk)

import { TriportClient } from "@triport/sdk";


const client = new TriportClient({ apiKey: process.env.TRIPORT_API_KEY });


const tx = await client.solana.getTransaction(
  "4eEzpJ29YBE7iz6Lw5eVNqYpJEMRDM6kF1pPyDmwbDgTynxJgF6Th9oV66XSh1jKvxhqZpKjJqLBu7nGzrjnVqWv",
  { encoding: "jsonParsed", commitment: "finalized", maxSupportedTransactionVersion: 0 }
);


if (tx === null) {
  console.log("Transaction not found");
} else {
  console.log(`Slot ${tx.slot}, fee ${tx.meta.fee} lamports, ok=${tx.meta.err === null}`);
}

Python (triport-sdk)

import os
from triport import TriportClient


client = TriportClient(api_key=os.environ["TRIPORT_API_KEY"])


tx = client.solana.get_transaction(
    "4eEzpJ29YBE7iz6Lw5eVNqYpJEMRDM6kF1pPyDmwbDgTynxJgF6Th9oV66XSh1jKvxhqZpKjJqLBu7nGzrjnVqWv",
    encoding="jsonParsed",
    commitment="finalized",
    max_supported_transaction_version=0,
)


if tx is None:
    print("Transaction not found")
else:
    print(f"Slot {tx['slot']}, fee {tx['meta']['fee']} lamports, ok={tx['meta']['err'] is None}")

Notes

  • Always handle null. A successful response with result: null means the signature is unknown at the requested commitment — it is not an error.
  • Versioned transactions: pass maxSupportedTransactionVersion: 0 to fetch current versioned transactions. Omitting it causes versioned transactions to fail rather than return.
  • Confirmation lag: a freshly submitted transaction may not appear immediately. Poll with commitment: "confirmed" (or processed) for faster visibility, then re-read at finalized once settled.
  • Related methods: use sendTransaction to submit a transaction, getSignaturesForAddress to discover signatures for an account, and getBlock to fetch every transaction in a slot.