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-kit

Configuration

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 UIarrow-up-right. 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

1

Get Safe info

Retrieve the on-chain configuration of a Safe: owners, threshold, nonce, version, modules, and guard.

REST API: GET /v1/safes/{address}/ Example: GET https://app.multisig.ledger.com/api/safe-transaction-service/11155111/v1/safes/0xYourSafe/

2

Get Safe creation info

Find out when and how a Safe was deployed, the creator address, factory, and deployment transaction hash.

REST API: GET /v1/safes/{address}/creation/

3

Get balances

Query native and token balances held by the Safe.

Important: The API Kit does not expose a getSafeBalances method. Use a direct fetch call against the v2 balances endpoint.

REST API: GET /v2/safes/{address}/balances/

4

Get multisig transactions

List all multisig transactions (both executed and pending) for the Safe, ordered by nonce.

REST API: GET /v2/safes/{address}/multisig-transactions/

5

Get pending transactions

Filter to only transactions that have been proposed but not yet executed.

6

Get all transactions (including incoming transfers)

Returns every transaction type: multisig, module, and incoming transfers (ETH and ERC-20 received by the Safe).

REST API: GET /v2/safes/{address}/all-transactions/

7

Get delegates

List all delegates authorized to propose transactions on behalf of Safe owners.

REST API: GET /v2/delegates/?safe={address}

8

Get next nonce

Returns the next nonce to use when creating a new Safe transaction. This accounts for both executed and pending (queued) transactions.

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

  • getSafeBalances does not exist. The API Kit (v2.5.7) does not wrap the balances endpoint. Use a direct fetch() 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" throws TypeError: 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 getMultisigTransactions return paginated results. Use the limit and offset parameters (or next/previous URLs in the response) to page through large result sets.

Next steps

Last updated