ETF balances in the API
The API calls each ETF balance a subaccount. A subaccount is an entry in our ledger, not a wallet or a place on-chain. The wallets show where assets are held. The subaccounts show what those assets represent.
The subaccounts are peers under your organization. They aren’t nested, and none of them replaces your vaults and wallets. For how the balances relate to the wallet structure, see the ETF overview.
Set up
You need an API key with the Read sub-accounts permission. See Permission groups for how to assign it. These endpoints are read-only for ETF reporting. You don’t create or change subaccounts. The examples use the sandbox base URL. For production, see Base URLs.Step 1: List your ETF balances
GET /v2/subaccounts/customers/accounts
Lists the subaccounts for your organization, each with its current balances per asset. See List all subaccounts for the full reference.
Request
Response (trimmed)
subaccountIdis the ID to use when you pull transactions for that balance. Store it.nameidentifies the balance. A staking ETF returns a spam balance in addition to the fund and network fee balances. Other ETFs don’t.balanceshas one entry per asset, withtotalBalance,availableForWithdrawal, andavailableForTrading.
To fetch the next page, request the
page.next URL from the previous response. A null page.next means there are no more results. See Pagination.
Step 2: List transactions for a balance
GET /v2/subaccounts/transactions
Lists transactions, newest activity first by creation date. Pass subaccountId to see one balance. Use the ID from step 1 for your fund, network fee, or spam balance. See List all transactions for the full reference.
Request
Response (trimmed)
transactionTypeis one of the types in the reference, such asDEPOSIT,WITHDRAWAL,GAS_FILL, orTRANSACTION_FEE.statusisPOSTED,PENDING, orCANCELED. APENDINGtransaction holds funds until it posts or is canceled.subaccountslists the balances the transaction touched, each withamountsper asset andbalanceType.endedAtis set once the transaction reachesPOSTEDorCANCELED.
To fetch specific transactions, use
GET /v2/subaccounts/transactions/{transactionsIds} with one or more comma-separated transaction IDs. It accepts the same date and pagination parameters.
Reconcile each balance
To reconcile a day or a month, combine the two calls:- Call
GET /v2/subaccounts/customers/accountsand record each balance’stotalBalanceper asset. - Call
GET /v2/subaccounts/transactionsonce persubaccountIdwithstartDateandendDate, and followpage.nextuntil it’s null. - Compare the balances against the transactions, one balance at a time.
GET /v2/wallets and GET /v2/transactions for what each wallet holds and moves on-chain, as described in the Reporting overview.
Your monthly custody statements cover the fund balance only. Use the subaccount endpoints when you also need the network fee and spam balances.