Solana
Solana
Solana
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
getTransaction fetches the complete record of a confirmed or finalized Solana transaction by its base-58 signature. The response includes the slot, blockTime, the transaction itself, and a rich meta block: the SOL fee in lamports, preBalances and postBalances, logMessages, innerInstructions, computeUnitsConsumed, and any error. With encoding: "jsonParsed" the instructions come back in human-readable form, which is ideal for decoding SPL token transfers and program calls. Call it on TheRPC at https://solana.therpc.io/YOUR_API_KEY.
meta — balances, logMessages, and the lamport fee — once a transaction confirms, to drive a receipt or audit record.encoding: "jsonParsed" to get a readable view of a transfer or a Jupiter swap without parsing raw account indexes yourself.preBalances against postBalances (and the parsed token balances) to attribute exactly how much SOL and which SPL tokens moved between accounts.| # | Nom | Type | Obligatoire | Description |
|---|---|---|---|---|
| 1 | signature | string | Oui | Base-58 transaction signature. |
| 2 | config | object | Non | Options: commitment (confirmed|finalized), maxSupportedTransactionVersion (0), encoding (json|jsonParsed|base58|base64). |
| Type | Description |
|---|---|
| object | { slot, blockTime, transaction, meta{ err, fee, preBalances, postBalances, logMessages, innerInstructions, computeUnitsConsumed, ... }, version } or null if not found. |
| Code | Message | Cause |
|---|---|---|
-32602 | Invalid params | A param is missing, of the wrong type, or malformed (e.g. a non-base58 pubkey or a bad config field). |
-32004 | Block not available for slot | The slot is not in this node's ledger (purged, skipped, or behind first available block). Use an archival endpoint for deep history. |
-32603 | Internal error | The node hit an internal error serving the request — retry, and reduce the requested range/encoding if it persists. |
maxSupportedTransactionVersion: 0. Without it, fetching a versioned (v0) transaction — common since address lookup tables — fails instead of returning data.commitment must be confirmed or finalized here; processed is not accepted for this method.null result can mean either that the signature is not yet confirmed or that the transaction has been purged from this node. For deep history, retry against an archival endpoint rather than assuming it never existed.