Earn provides a public HTTP API for integrating its vault and strategy workflows into applications and AI agents. The API returns data and unsigned transactions while your wallet retains control of signing.
- Read Earn data. Retrieve platform configuration, vaults, wallet information, strategies, and positions.
- Manage strategies. Create, update, and close strategies through SIWE-authorized requests.
- Prepare transactions. Get unsigned transaction data for approvals, deposits, withdrawals, and emergency claims.
- Keep wallet control. Your wallet signs and broadcasts transactions; the API never holds your keys.
- Include the public API key. Every request uses the published
apikeyheader. State-changing writes also require Sign-In with Ethereum (SIWE).
Base URL
Send every request to the documented production server:
https://earn-api.quicknode.dev/functions/v1/api
Endpoint paths include the API version. For example, the deployment configuration endpoint is GET /v1/config.
Authentication
Every request requires the public apikey header published by Earn. This key identifies requests to the API but does not authorize access to a wallet or its funds.
curl --request GET \
--url 'https://earn-api.quicknode.dev/functions/v1/api/v1/config' \
--header 'Accept: application/json' \
--header 'apikey: <EARN_PUBLIC_API_KEY>'
The API key is public by design and is not an authorization credential. Use the following key for production requests:
sb_publishable_3xcdKa_uMRhK71Izd6BLdg_2vskXZ_h
Requests that change wallet preferences or strategy state also require a valid Sign-In with Ethereum (SIWE) proof. The SIWE signature authorizes the write request for the connected wallet.
Endpoints
The Earn API contains 27 operations grouped by resource. Select an operation to view its parameters, request body, cURL example, response fields, examples, and documented errors.
Discovery
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1 | Get the machine-readable API index |
| GET | /v1/openapi.json | Get the OpenAPI 3.1 document |
Platform
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/config | Get the public deployment configuration |
| GET | /v1/stats | Get platform-wide aggregate statistics |
| GET | /v1/prices | Get native gas-token prices in USD |
Vaults
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/vaults | List approved vaults |
| GET | /v1/vaults/rankings | Preview a ranked allocation |
| GET | /v1/vaults/{chainId}/{address} | Get an approved vault |
| GET | /v1/vaults/{chainId}/{address}/apy | Get a vault's APY history |
Wallets
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/wallets/{addr}/balances | Get USDC and native gas balances |
| GET | /v1/wallets/{addr}/approvals | Get allowances and approval templates |
| GET | /v1/wallets/{addr}/prefs | Get wallet preferences |
| PATCH | /v1/wallets/{addr}/prefs | Update wallet preferences |
| POST | /v1/wallets/{addr}/tos | Record a Terms of Service agreement |
| POST | /v1/wallets/{addr}/opencover-terms | Record an OpenCover terms acknowledgment |
Strategies
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/strategies | List a wallet's strategies |
| POST | /v1/strategies | Create a strategy |
| GET | /v1/strategies/{id} | Get a strategy |
| PATCH | /v1/strategies/{id} | Update a strategy |
| DELETE | /v1/strategies/{id} | Delete or close a strategy |
| GET | /v1/strategies/{id}/history | Get strategy events |
| GET | /v1/strategies/{id}/bridges | Get CCTP bridge transfers |
| GET | /v1/strategies/{id}/performance | Get strategy value and yield history |
| GET | /v1/strategies/{id}/intents/{intentId} | Get an intent's lifecycle status |
Calldata
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/strategies/{id}/calldata/deposit | Generate deposit calldata |
| POST | /v1/strategies/{id}/calldata/withdraw | Generate withdraw or close calldata |
| POST | /v1/strategies/{id}/calldata/claim | Generate emergency CCTP claim calldata |
API reference
Use the interactive API reference to explore the available endpoints and request formats:
The machine-readable OpenAPI 3.1 specification is available at GET /v1/openapi.json for generating client tools.
What you can do
The API supports the following documented workflows:
- Read vaults, strategies, and positions
- Create a new strategy
- Update an existing strategy's configuration
- Close an existing strategy
- Prepare transaction data for approvals, deposits, withdrawals, and emergency claims
How authorization works
Earn remains non-custodial when you use the API. It returns unsigned transaction data for your wallet to sign and broadcast; it does not hold your keys or move funds.
| Request | Authorization |
|---|---|
| Every API request | Requires the published public apikey header. This key is not the wallet authorization credential. |
| Read requests | Public after including the apikey header; no SIWE signature is required. |
| Calldata requests | Public after including the apikey header. The returned on-chain transaction must still be signed by the wallet. |
| State-changing API writes | Require a Sign-In with Ethereum (SIWE) signature. |
For strategy creation, the wallet recovered from the SIWE signature becomes the strategy owner. The API does not require an account login or a private API credential.
Units
Earn uses different unit formats for display values and on-chain transaction values.
- Read models return USDC values as decimal-dollar JSON numbers. For example,
1234.56represents 1,234.56 USDC. - APY fields are percentage numbers rather than fractions. For example,
5.423represents 5.423% APY. - Transaction templates, approval templates, balances, and allowances use base-unit strings. USDC uses six decimals, native gas uses wei, and share values use raw integer strings.