Wallet Endpoints
Query wallet UTXOs and balances directly from Anvil's indexed blockchain data.
Endpoint
Method
Purpose
GET /wallets/utxos
/wallets/utxosParameter
Type
Required
Description
const API_BASE = 'https://preprod.api.ada-anvil.app/v2/services';
// Fetch UTXOs by payment address
const response = await fetch(`${API_BASE}/wallets/utxos?address=addr_test1qz...`, {
headers: { 'X-Api-Key': 'YOUR_API_KEY' }
});
const utxos = await response.json(); // string[]
// Use directly in transaction building
await fetch(`${API_BASE}/transactions/build`, {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'X-Api-Key': 'YOUR_API_KEY' },
body: JSON.stringify({
changeAddress: 'addr_test1qz...',
utxos, // Ready to use!
outputs: [{ address: 'addr_test1qy...', lovelace: 5_000_000 }]
})
});GET /wallets/balance
/wallets/balanceParameter
Type
Required
Description
When to Use
Scenario
Endpoint
Last updated
Was this helpful?

