getConfirmedTransaction
Deprecated: This method is deprecated. Use
getTransactioninstead.
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
| # | Type | Required | Description |
|---|---|---|---|
| 1 | string | Yes | Transaction signature (base-58 encoded) |
| 2 | object | No | Configuration object |
Configuration object fields:
| Field | Type | Description |
|---|---|---|
encoding | string | Transaction encoding: json, jsonParsed, base58, or base64 |
commitment | string | Commitment level: confirmed or finalized |
Response
Returns null if the transaction is not found. Otherwise returns an object:
| Field | Type | Description |
|---|---|---|
slot | u64 | The slot the transaction was processed in |
transaction | object | Transaction object (format depends on encoding) |
blockTime | `i64 | null` |
meta | `object | null` |
Code Examples
cURL
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
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
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
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
{
"jsonrpc": "2.0",
"result": {
"slot": 166974442,
"transaction": { "message": {}, "signatures": [] },
"meta": { "fee": 5000, "err": null },
"blockTime": 1681391935
},
"id": 1
}