Skip to main content
POST
/
rpc
/
Trails
/
YieldGetProviders
YieldGetProviders returns available Yield providers.
curl --request POST \
  --url https://api.example.com/rpc/Trails/YieldGetProviders \
  --header 'Content-Type: application/json' \
  --data '
{
  "limit": 123,
  "offset": 123
}
'
{
  "items": [
    {
      "name": "<string>",
      "id": "<string>",
      "logoURI": "<string>",
      "description": "<string>",
      "website": "<string>",
      "tvlUsd": {},
      "type": "<string>",
      "supportsBeneficiary": true,
      "references": [
        "<string>"
      ]
    }
  ],
  "total": 123,
  "offset": 123,
  "limit": 123
}

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
number
offset
number

Response

OK

items
object[]
required

[]YieldProvider

total
number
required
offset
number
required
limit
number
required