transaction-result - Flow

Returns the execution result of a transaction by its ID: status, status code, any error message, computation used, and the events it emitted. Use it to confirm a transaction sealed successfully.

Endpoint

httpGET /v1/transaction_results/{id}

Path Parameters

ParameterTypeDescription
idstringTransaction ID (hex)

Example

bashexport FLOW_REST=https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

curl "${FLOW_REST}v1/transaction_results/a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90"

example.js

javascriptconst axios = require('axios');

const response = await axios.get('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/v1/transaction_results/a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90', {
    headers: { 'Content-Type': 'application/json' }
});

console.log(response.data);

example.py

pythonimport requests

response = requests.get(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/v1/transaction_results/a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90',
    headers={'Content-Type': 'application/json'}
)

print(response.json())

example.rs

rustuse reqwest::Client;
use serde_json::Value;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new();

    let response = client
        .get("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/v1/transaction_results/a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90")
        .header("Content-Type", "application/json")
        .send()
        .await?
        .json::<Value>()
        .await?;

    println!("Result: {}", response);
    Ok(())
}

Response

json{
    "block_id": "3b5f...",
    "status": "Sealed",
    "status_code": 0,
    "error_message": "",
    "computation_used": "123",
    "events": [
        {
            "type": "A.1654653399040a61.FlowToken.TokensWithdrawn",
            "transaction_id": "a1b2...",
            "transaction_index": "0",
            "event_index": "0",
            "payload": "eyJ0eXBlIjoi..."
        }
    ]
}

Response Fields

FieldTypeDescription
statusstringPending / Finalized / Executed / Sealed / Expired
status_codenumber0 on success, non-zero on error
error_messagestringFailure reason, empty on success
computation_usedstringComputation units consumed
eventsarrayEvents emitted, with base64 payloads

Use Cases

  • Confirmation: Poll until status is Sealed
  • Event Processing: Read emitted events after execution

Error Handling

ErrorMessageDescription
400 / Bad requestBad requestA path, query, or body parameter was invalid
404 / Not foundNot foundThe block, account, transaction, or resource does not exist
403 / RBAC: access deniedAccess deniedThe GetBlock access token is missing or incorrect