GetEarnPools returns aggregated pool information from DeFi protocols (Aave, Morpho).
Earn
GetEarnPools
POST
GetEarnPools returns aggregated pool information from DeFi protocols (Aave, Morpho).
Documentation Index
Fetch the complete documentation index at: https://anypay-trails-api-docs.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
TheGetEarnPools endpoint returns aggregated yield-bearing pool information from supported DeFi protocols such as Aave and Morpho. Use this to display earning opportunities to users and build Earn mode integrations.
Use Cases
- Display yield pools with APY and TVL in your UI
- Filter pools by chain or protocol
- Power the Trails Earn mode with live pool data
- Show users the best yield opportunities across chains
Request Parameters
All fields are optional.- chainIds (number[]): Filter pools to specific chain IDs
- protocols (string[]): Filter by protocol name (e.g.
"aave","morpho") - minTvl (number): Minimum total value locked (USD) filter
- maxApy (number): Maximum APY filter
Response
- pools (
EarnPool[]): Array of yield pool objects - timestamp (string): ISO timestamp of when this data was fetched
- cached (boolean): Whether the response is from cache
EarnPool Object Structure
Each pool includes:- id (string): Unique pool identifier
- name (string): Human-readable pool name
- protocol (string): Protocol name (e.g.
"aave","morpho") - chainId (number): Chain the pool is deployed on
- apy (number): Current annual percentage yield
- tvl (number): Total value locked in USD
- token (
PoolTokenInfo): Deposit token details (symbol, name, address, decimals) - depositAddress (string): Contract address to deposit to
- isActive (boolean): Whether the pool is currently accepting deposits
- poolUrl (string, optional): URL to the pool on the protocol’s UI
- protocolUrl (string, optional): URL to the protocol’s website
- wrappedTokenGatewayAddress (string, optional): Gateway address for native token deposits
Examples
Get All Earn Pools
Filter by Chain and Protocol
Build an Earn Pool List UI
Next Steps
Earn Mode
Use earn pools in the Trails widget
GetChains
Discover supported chains for earn pools