Skip to main content
POST
YieldGetMarkets returns DeFi markets with optional filters.

Overview

YieldGetMarkets returns DeFi markets available for deposit through Trails, including lending markets (Aave, Morpho) and yield vaults (Yearn, ERC-4626). Use this to power market selection UIs or discover marketId values for composable actions. The SDK’s useEarnMarkets hook wraps this endpoint with typed filters and caching — prefer it in React apps.

Request Parameters

All fields are optional.

Response

Returns payload containing an array of market objects. Each market includes:

Examples

List all markets on Base

Filter lending markets by protocol

Search for USDC markets

SDK alternative

In React, use the typed useEarnMarkets hook instead of calling this endpoint directly:

See also

Body

application/json
provider
string

Filter by protocol ID (e.g. "aave", "morpho", "yearn")

chainId
string

Filter by chain ID as a string (e.g. "8453" for Base)

type
string

Market category: "lending" or "vault"

Free-text search over market names and tokens

sort
string

Sort order (e.g. "rewardRateDesc")

limit
integer<int32>

Number of results to return

offset
integer<int32>

Pagination offset

Response

OK

payload
object
required

JSON array of market objects from the yield provider