Skip to main content

Earn API

Updated on
Jul 31, 2026

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.

TL;DR
  • 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 apikey header. 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

MethodEndpointDescription
GET/v1Get the machine-readable API index
GET/v1/openapi.jsonGet the OpenAPI 3.1 document

Platform

Vaults

MethodEndpointDescription
GET/v1/vaultsList approved vaults
GET/v1/vaults/rankingsPreview a ranked allocation
GET/v1/vaults/{chainId}/{address}Get an approved vault
GET/v1/vaults/{chainId}/{address}/apyGet a vault's APY history

Wallets

MethodEndpointDescription
GET/v1/wallets/{addr}/balancesGet USDC and native gas balances
GET/v1/wallets/{addr}/approvalsGet allowances and approval templates
GET/v1/wallets/{addr}/prefsGet wallet preferences
PATCH/v1/wallets/{addr}/prefsUpdate wallet preferences
POST/v1/wallets/{addr}/tosRecord a Terms of Service agreement
POST/v1/wallets/{addr}/opencover-termsRecord an OpenCover terms acknowledgment

Strategies

MethodEndpointDescription
GET/v1/strategiesList a wallet's strategies
POST/v1/strategiesCreate 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}/historyGet strategy events
GET/v1/strategies/{id}/bridgesGet CCTP bridge transfers
GET/v1/strategies/{id}/performanceGet strategy value and yield history
GET/v1/strategies/{id}/intents/{intentId}Get an intent's lifecycle status

Calldata

MethodEndpointDescription
POST/v1/strategies/{id}/calldata/depositGenerate deposit calldata
POST/v1/strategies/{id}/calldata/withdrawGenerate withdraw or close calldata
POST/v1/strategies/{id}/calldata/claimGenerate emergency CCTP claim calldata

API reference

Use the interactive API reference to explore the available endpoints and request formats:

Earn API reference
Explore every endpoint in the interactive API documentation.
Open reference

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.

RequestAuthorization
Every API requestRequires the published public apikey header. This key is not the wallet authorization credential.
Read requestsPublic after including the apikey header; no SIWE signature is required.
Calldata requestsPublic after including the apikey header. The returned on-chain transaction must still be signed by the wallet.
State-changing API writesRequire 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.56 represents 1,234.56 USDC.
  • APY fields are percentage numbers rather than fractions. For example, 5.423 represents 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.

Where to go next

Share this doc