Skip to main content

Get wallet approvals – Earn API

Updated on
Jul 31, 2026

Overview

Current USDC and per-vault share-token allowances toward the Earn contract (the spender), grouped per chain. Each entry carries an approved flag and, when not approved, a ready-to-sign approve(spender, amount) template. A share token is approved when allowance > 0; USDC is approved when allowance >= requiredUsdc. Allowances and amounts are base-unit strings. Per-chain error isolation: a failed RPC marks that chain error: "rpc_error" and never fails the whole response.

Endpoint

GET https://earn-api.quicknode.dev/functions/v1/api/v1/wallets/{addr}/approvals

Authorization

Include the published apikey header. This read request is public and does not require a SIWE signature.

Parameters

ParameterLocationTypeRequiredDescription
addrpathstringYesWallet address (`0x` + 40 hex).
chainsquerystringNoCSV of supported chain ids. Defaults to all.
requiredUsdcquerystringNoUSDC the pending deposit needs, in 6-decimal base units, evaluated against each requested chain's USDC allowance. Default 0 (report-only).
vaultsquerystringNoCSV of `chainId:0xaddress` vault keys to report. Each key applies only to its own chain; a requested chain with no listed vaults still returns its USDC entry. A key targeting a chain outside the requested set is a 400. Defaults to every approved vault per chain.

Example request

curl --location 'https://earn-api.quicknode.dev/functions/v1/api/v1/wallets/0x1234567890abcdef1234567890abcdef12345678/approvals' \
--header 'Accept: application/json' \
--header 'apikey: <EARN_PUBLIC_API_KEY>'

Response

FieldTypeRequiredDescription
addressstringYesLowercased wallet address.
chainsarray<object>YesApproval information grouped by chain.
chains[].chainIdintegerYesEVM chain ID for this approval group.
chains[].spenderstring | nullYesEarn proxy address authorized to spend the tokens, or `null` when the chain lookup fails.
chains[].usdcobject | nullYesUSDC allowance state for the chain, or `null` when it is unavailable.
chains[].usdc.tokenstringYesUSDC contract address on the chain.
chains[].usdc.currentAllowancestringYesCurrent USDC allowance in base units.
chains[].usdc.requiredAllowancestringYesUSDC allowance required by the request, in base units.
chains[].usdc.approvedbooleanYesWhether the current USDC allowance meets the required allowance.
chains[].usdc.txobjectNoReady-to-sign approval transaction when additional USDC allowance is required.
chains[].usdc.tx.tostringYesUSDC token contract that receives the approval transaction.
chains[].usdc.tx.datastringYesABI-encoded `approve(spender, amount)` calldata.
chains[].usdc.tx.valuestringYesNative-token value to send with the transaction, in wei.
chains[].vaultsarray<object>YesAllowance states for the requested or approved vault share tokens on the chain.
chains[].vaults[].tokenstringYesVault share-token contract address.
chains[].vaults[].vaultAddressstringNoAddress of the vault represented by the share token.
chains[].vaults[].currentAllowancestringYesCurrent vault share-token allowance in base units.
chains[].vaults[].requiredAllowancestringYesRequired vault share-token allowance in base units.
chains[].vaults[].approvedbooleanYesWhether the vault share token has a non-zero allowance.
chains[].vaults[].txobjectNoReady-to-sign approval transaction when the vault share token is not approved.
chains[].vaults[].tx.tostringYesToken contract that receives the approval transaction.
chains[].vaults[].tx.datastringYesABI-encoded `approve(spender, amount)` calldata.
chains[].vaults[].tx.valuestringYesNative-token value to send with the transaction, in wei.
chains[].errorstring | nullYes`rpc_error` when the chain lookup fails; otherwise `null`.

Example response

The complete response includes every requested chain and its vault entries. This excerpt shows the Base USDC approval state and one vault approval returned by the API.

{
"address": "0x1234567890abcdef1234567890abcdef12345678",
"chains": [
{
"chainId": 8453,
"spender": "0x48b415841165304f7EfaA7D5dD5FC65cc7B4bd8e",
"usdc": {
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"currentAllowance": "0",
"requiredAllowance": "0",
"approved": true
},
"vaults": [
{
"token": "0xc0c5689e6f4D256E861F65465b691aeEcC0dEb12",
"vaultAddress": "0xc0c5689e6f4D256E861F65465b691aeEcC0dEb12",
"currentAllowance": "0",
"requiredAllowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
"approved": false,
"tx": {
"to": "0xc0c5689e6f4D256E861F65465b691aeEcC0dEb12",
"data": "0x095ea7b300000000000000000000000048b415841165304f7efaa7d5dd5fc65cc7b4bd8effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
"value": "0"
}
}
],
"error": null
}
]
}

HTTP responses

StatusDescription
200Approval state and templates, grouped per chain.
400Invalid wallet address, chain ID, required allowance, or vault key.
429Rate limit exceeded. `Retry-After` (seconds) tells you when to retry. Reads, feedback, and push writes are keyed per IP; create/update/delete are keyed per wallet+IP; deposit/withdraw/claim calldata is keyed per strategy+IP.
500Internal server error.
OpenAPI source

This page is based on operation getWalletApprovals in the Earn OpenAPI 3.1 specification.

Share this doc