1. Querying Safe Data
Read Safe configuration, balances, transaction history, delegates, and nonce from the Ledger Enterprise Multisig API. No private keys required.
Shared configuration
All tutorials use the same Transaction Service base URL pattern:
https://app.multisig.ledger.com/api/safe-transaction-service/{chainId}What you'll learn
Initialize the Safe API Kit against the Ledger Enterprise Multisig Transaction Service.
Query Safe info, creation data, balances, and transaction history.
List delegates and retrieve the next available nonce.
Understand which endpoints the SDK wraps and which require direct
fetch.
Prerequisites
Node.js 18+ and a package manager (npm, pnpm, or yarn)
A Safe deployed on a supported chain, you can use any existing Safe
No private key or API key is needed for read-only queries.
Install the SDK:
npm install @safe-global/api-kit @safe-global/types-kitConfiguration
All examples in this tutorial use the Ledger Enterprise Multisig Transaction Service. This is the Ledger-hosted backend, transactions and Safes indexed here appear in the Ledger Enterprise Multisig UI. It is not the public Safe Transaction Service.
Supported chains: Ethereum (1), Optimism (10), BSC (56), Polygon (137), Base (8453), Arbitrum (42161), Sepolia (11155111).
Replace the CHAIN_ID with the numeric chain ID for your target network. The URL pattern is always:
Steps
Key concepts
The Safe Transaction Service is an off-chain backend that indexes on-chain Safe events and stores proposed (not-yet-executed) transactions. The Ledger Enterprise Multisig Transaction Service is Ledger's hosted instance of this service. When you query it, you get:
On-chain state (owners, threshold, nonce) synced from the blockchain
Off-chain proposals (pending transactions with their collected signatures)
Full transaction history including incoming transfers
The API Kit is a TypeScript wrapper around the Transaction Service REST API. Most endpoints are covered, but some (like balances) require direct HTTP calls.
Tips and pitfalls
getSafeBalancesdoes not exist. The API Kit (v2.5.7) does not wrap the balances endpoint. Use a directfetch()call to/v2/safes/{address}/balances/as shown in step 3.No API key required. The Ledger Multisig Transaction Service does not enforce API keys for read operations. No rate-limiting headers are needed.
ESM import gotcha. In some ESM runtimes,
import SafeApiKit from "@safe-global/api-kit"throwsTypeError: SafeApiKit is not a constructor. Use the interop-safe constructor resolution shown in Configuration.Indexing lag. After an on-chain transaction executes, the Transaction Service may take 10–60 seconds to index the new state. If you query immediately after execution and see stale data, wait and retry.
Paginated responses. Methods like
getMultisigTransactionsreturn paginated results. Use thelimitandoffsetparameters (ornext/previousURLs in the response) to page through large result sets.
Next steps
Tutorial index
Transaction Lifecycle: Create, sign, propose, and execute a Safe transaction
Verified runnable source:
playground/src/phase1-read.tsTroubleshooting
Last updated