transaction - Flow

Returns a transaction by ID: its Cadence script, arguments, reference block, gas limit, proposer/payer/authorizers, and signatures. Expand the result to include execution status and events.

Endpoint

httpGET /v1/transactions/{id}

Path Parameters

ParameterTypeDescription
idstringTransaction ID (hex)

Query Parameters

ParameterTypeDescription
expandstringExpand result

Example

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

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

example.js

javascriptconst axios = require('axios');

const response = await axios.get('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/v1/transactions/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/transactions/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/transactions/a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90")
        .header("Content-Type", "application/json")
        .send()
        .await?
        .json::<Value>()
        .await?;

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

Response

json{
    "id": "a1b2...",
    "script": "aW1wb3J0IEZsb3dUb2tlbg==",
    "arguments": [
        "eyJ0eXBlIjoi..."
    ],
    "reference_block_id": "3b5f...",
    "gas_limit": "9999",
    "payer": "1654653399040a61",
    "proposal_key": {
        "address": "1654653399040a61",
        "key_index": "0",
        "sequence_number": "42"
    },
    "authorizers": [
        "1654653399040a61"
    ],
    "envelope_signatures": [
        {
            "address": "1654653399040a61",
            "key_index": "0",
            "signature": "MEUC..."
        }
    ]
}

Response Fields

FieldTypeDescription
scriptstringBase64-encoded Cadence transaction script
argumentsarrayBase64-encoded JSON-Cadence arguments
proposal_keyobjectProposer address, key index, and sequence number
payerstringAccount paying the fee
authorizersarrayAccounts authorizing the transaction

Use Cases

  • Transaction Inspection: Decode a submitted transaction
  • Audit: Verify signers and the Cadence payload

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