Skip to main content
POST
/
rpc
/
Trails
/
YieldGetProviders
YieldGetProviders returns available yield protocol providers.
curl --request POST \
  --url https://trails-api.sequence.app/rpc/Trails/YieldGetProviders \
  --header 'Content-Type: application/json' \
  --data '
{
  "limit": 123,
  "offset": 123
}
'
{
  "payload": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.trails.build/llms.txt

Use this file to discover all available pages before exploring further.

Overview

YieldGetProviders returns the DeFi protocols (providers) available through Trails’ earn system — Aave, Morpho, Yearn, and others. Use the returned provider IDs as filter values for YieldGetMarkets. The SDK’s useEarnProviders hook wraps this endpoint — prefer it in React apps.

Request Parameters

All fields are optional.
FieldTypeDescription
limitnumberNumber of providers to return
offsetnumberPagination offset

Response

Returns payload containing an array of provider objects. Each provider includes:
FieldDescription
idProvider identifier — use as the provider filter in YieldGetMarkets
nameHuman-readable protocol name
urlProtocol website
logoUrlProtocol logo image URL

Examples

List all providers

const response = await fetch('https://trails-api.sequence.app/rpc/Trails/YieldGetProviders', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-Access-Key': 'YOUR_ACCESS_KEY',
  },
  body: JSON.stringify({}),
})

const { payload } = await response.json()
const providers = JSON.parse(payload)

providers.forEach(provider => {
  console.log(`${provider.id}: ${provider.name}`)
})

SDK alternative

In React, use the useEarnProviders hook:
import { useEarnProviders } from '0xtrails'

const { data: providers } = useEarnProviders()

See also

Body

application/json
limit
integer<int32>

Number of providers to return

offset
integer<int32>

Pagination offset

Response

OK

payload
object
required

JSON array of provider objects