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
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
| addr | path | string | Yes | Wallet address (`0x` + 40 hex). |
| chains | query | string | No | CSV of supported chain ids. Defaults to all. |
| requiredUsdc | query | string | No | USDC the pending deposit needs, in 6-decimal base units, evaluated against each requested chain's USDC allowance. Default 0 (report-only). |
| vaults | query | string | No | CSV 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
| Field | Type | Required | Description |
|---|---|---|---|
| address | string | Yes | Lowercased wallet address. |
| chains | array<object> | Yes | Approval information grouped by chain. |
| chains[].chainId | integer | Yes | EVM chain ID for this approval group. |
| chains[].spender | string | null | Yes | Earn proxy address authorized to spend the tokens, or `null` when the chain lookup fails. |
| chains[].usdc | object | null | Yes | USDC allowance state for the chain, or `null` when it is unavailable. |
| chains[].usdc.token | string | Yes | USDC contract address on the chain. |
| chains[].usdc.currentAllowance | string | Yes | Current USDC allowance in base units. |
| chains[].usdc.requiredAllowance | string | Yes | USDC allowance required by the request, in base units. |
| chains[].usdc.approved | boolean | Yes | Whether the current USDC allowance meets the required allowance. |
| chains[].usdc.tx | object | No | Ready-to-sign approval transaction when additional USDC allowance is required. |
| chains[].usdc.tx.to | string | Yes | USDC token contract that receives the approval transaction. |
| chains[].usdc.tx.data | string | Yes | ABI-encoded `approve(spender, amount)` calldata. |
| chains[].usdc.tx.value | string | Yes | Native-token value to send with the transaction, in wei. |
| chains[].vaults | array<object> | Yes | Allowance states for the requested or approved vault share tokens on the chain. |
| chains[].vaults[].token | string | Yes | Vault share-token contract address. |
| chains[].vaults[].vaultAddress | string | No | Address of the vault represented by the share token. |
| chains[].vaults[].currentAllowance | string | Yes | Current vault share-token allowance in base units. |
| chains[].vaults[].requiredAllowance | string | Yes | Required vault share-token allowance in base units. |
| chains[].vaults[].approved | boolean | Yes | Whether the vault share token has a non-zero allowance. |
| chains[].vaults[].tx | object | No | Ready-to-sign approval transaction when the vault share token is not approved. |
| chains[].vaults[].tx.to | string | Yes | Token contract that receives the approval transaction. |
| chains[].vaults[].tx.data | string | Yes | ABI-encoded `approve(spender, amount)` calldata. |
| chains[].vaults[].tx.value | string | Yes | Native-token value to send with the transaction, in wei. |
| chains[].error | string | null | Yes | `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
| Status | Description |
|---|---|
| 200 | Approval state and templates, grouped per chain. |
| 400 | Invalid wallet address, chain ID, required allowance, or vault key. |
| 429 | Rate 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. |
| 500 | Internal server error. |
This page is based on operation getWalletApprovals in the Earn OpenAPI 3.1 specification.