Skip to main content
POST
/
rpc
/
Trails
/
YieldGetNetworks
YieldGetNetworks returns available Yield networks.
curl --request POST \
  --url https://trails-api.sequence.app/rpc/Trails/YieldGetNetworks \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "networks": [
    {
      "id": "<string>",
      "name": "<string>",
      "category": "<string>",
      "logoURI": "<string>"
    }
  ]
}

Overview

The YieldGetNetworks endpoint returns the networks (chains) that yield providers can be queried on. Use it to populate chain pickers in earn UIs or to validate that a target chain is supported before calling YieldGetMarkets.

Request

YieldGetNetworks takes no parameters.

Response

  • networks (array of YieldNetwork):
    • id (string)
    • name (string)
    • category (string)
    • logoURI (string)

Example

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

const { networks } = await response.json();

for (const network of networks) {
  console.log(network.id, network.name);
}

Next Steps

YieldGetMarkets

List markets on a network

YieldGetProviders

List yield providers

Body

application/json

The body is of type object.

Response

OK

networks
object[]
required

[]YieldNetwork