Documentation index

getConfirmedTransaction

Deprecated: This method is deprecated. Use getTransaction instead.

Returns transaction details for a confirmed transaction given its signature. This method has been deprecated in favor of getTransaction, which supports versioned transactions and provides a more consistent API surface. All new integrations should use getTransaction instead, and existing users should plan to migrate.

Parameters

#TypeRequiredDescription
1stringYesTransaction signature (base-58 encoded)
2objectNoConfiguration object

Configuration object fields:

FieldTypeDescription
encodingstringTransaction encoding: json, jsonParsed, base58, or base64
commitmentstringCommitment level: confirmed or finalized

Response

Returns null if the transaction is not found. Otherwise returns an object:

FieldTypeDescription
slotu64The slot the transaction was processed in
transactionobjectTransaction object (format depends on encoding)
blockTime`i64null`
meta`objectnull`

Code Examples

cURL

Terminal
curl http://88.216.36.108:7999 -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getConfirmedTransaction",
  "params": [
    "5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW",
    { "encoding": "jsonParsed", "commitment": "confirmed" }
  ]
}'

TypeScript

TypeScript
const response = await fetch("http://88.216.36.108:7999", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    jsonrpc: "2.0",
    id: 1,
    method: "getConfirmedTransaction",
    params: [
      "5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW",
      { encoding: "jsonParsed", commitment: "confirmed" }
    ]
  }),
});
const { result } = await response.json();
console.log("Slot:", result.slot);

Python

Python
import requests

response = requests.post("http://88.216.36.108:7999", json={
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getConfirmedTransaction",
    "params": [
        "5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW",
        {"encoding": "jsonParsed", "commitment": "confirmed"}
    ]
})
result = response.json()["result"]
print(f"Slot: {result['slot']}")

Rust

Rust
use reqwest::Client;
use serde_json::json;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new();
    let res = client.post("http://88.216.36.108:7999")
        .json(&json!({
            "jsonrpc": "2.0",
            "id": 1,
            "method": "getConfirmedTransaction",
            "params": [
                "5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW",
                {"encoding": "jsonParsed", "commitment": "confirmed"}
            ]
        }))
        .send().await?
        .text().await?;
    println!("{}", res);
    Ok(())
}

Example Response

JSON
{
  "jsonrpc": "2.0",
  "result": {
    "slot": 166974442,
    "transaction": { "message": {}, "signatures": [] },
    "meta": { "fee": 5000, "err": null },
    "blockTime": 1681391935
  },
  "id": 1
}