getaddresstxids - Zcash

This method returns the list of transaction IDs involving one or more transparent addresses within a specified block range. A Zcash extension over Bitcoin Core, requiring address indexing on the Zebra node. Transactions are returned in ascending block height order.

Parameters

ParameterTypeRequiredDescription
requestobjectYesRequest object (see below)

Request Object

FieldTypeRequiredDescription
addressesarray of stringYesTransparent addresses to query
startintegerNoStarting block height (inclusive). Default 0
endintegerNoEnding block height (inclusive). Default: chain tip

Request

bashcurl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "getaddresstxids",
    "params": [
        {
            "addresses": [
                "t1KfwsnwJeNRVjQGBDZhwKskpQbih2qx5Ua"
            ],
            "start": 3487700,
            "end": 3487790
        }
    ],
    "id": "getblock.io"
}'

example.js

javascriptconst axios = require('axios');

const response = await axios.post('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/', {
    jsonrpc: '2.0',
    method: 'getaddresstxids',
    params: [
        {
            "addresses": [
                "t1KfwsnwJeNRVjQGBDZhwKskpQbih2qx5Ua"
            ],
            "start": 3487700,
            "end": 3487790
        }
    ],
    id: 'getblock.io'
}, {
    headers: { 'Content-Type': 'application/json' }
});

console.log(response.data.result);

example.py

pythonimport requests

response = requests.post(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/',
    headers={'Content-Type': 'application/json'},
    json={
        'jsonrpc': '2.0',
        'method': 'getaddresstxids',
        'params': [
        {
            "addresses": [
                "t1KfwsnwJeNRVjQGBDZhwKskpQbih2qx5Ua"
            ],
            "start": 3487700,
            "end": 3487790
        }
    ],
        'id': 'getblock.io'
    }
)

print(response.json())

example.rs

rustuse reqwest::Client;
use serde_json::{json, Value};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new();
    
    let response = client
        .post("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/")
        .header("Content-Type", "application/json")
        .json(&json!({
            "jsonrpc": "2.0",
            "method": "getaddresstxids",
            "params": [
        {
            "addresses": [
                "t1KfwsnwJeNRVjQGBDZhwKskpQbih2qx5Ua"
            ],
            "start": 3487700,
            "end": 3487790
        }
    ],
            "id": "getblock.io"
        }))
        .send()
        .await?
        .json::<Value>()
        .await?;
    
    println!("Result: {}", response["result"]);
    Ok(())
}

Response

json{
    "jsonrpc": "2.0",
    "result": [
        "55b5dcc579e59f57a703b701d66c0176a22975544d3b24aac68c682650383e38",
        "d23fe67e3bab491b26999eac332412fa9176653adad8c0677d74699965e0055f"
    ],
    "id": "getblock.io"
}

Response Parameters

ParameterTypeDescription
resultarray of stringTransaction IDs involving the queried addresses, in ascending block height order

Use Cases

  • Wallet Transaction History: Reconstruct a wallet's complete on-chain transparent history
  • Explorer Address Activity: Display all transactions touching an address on an explorer page
  • Compliance and Audit Trails: Enumerate transactions for a family of addresses for AML compliance
  • Balance Reconstruction from Genesis: Iterate all transactions to independently compute address balances

Error Handling

Error CodeMessageDescription
-8Invalid addressOne or more addresses are malformed
-32602Invalid paramsBlock range is invalid
-32603Internal errorAddress indexing may be disabled on the endpoint