YieldGetProviders returns available Yield providers.
curl --request POST \
--url https://trails-api.sequence.app/rpc/Trails/YieldGetProviders \
--header 'Content-Type: application/json' \
--data '
{
"limit": 123,
"offset": 123
}
'import requests
url = "https://trails-api.sequence.app/rpc/Trails/YieldGetProviders"
payload = {
"limit": 123,
"offset": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({limit: 123, offset: 123})
};
fetch('https://trails-api.sequence.app/rpc/Trails/YieldGetProviders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://trails-api.sequence.app/rpc/Trails/YieldGetProviders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'limit' => 123,
'offset' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://trails-api.sequence.app/rpc/Trails/YieldGetProviders"
payload := strings.NewReader("{\n \"limit\": 123,\n \"offset\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://trails-api.sequence.app/rpc/Trails/YieldGetProviders")
.header("Content-Type", "application/json")
.body("{\n \"limit\": 123,\n \"offset\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://trails-api.sequence.app/rpc/Trails/YieldGetProviders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"limit\": 123,\n \"offset\": 123\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"name": "<string>",
"id": "<string>",
"logoURI": "<string>",
"description": "<string>",
"website": "<string>",
"tvlUsd": {},
"type": "<string>",
"supportsBeneficiary": true,
"references": [
"<string>"
]
}
],
"total": 123,
"offset": 123,
"limit": 123
}{
"error": "WebrpcEndpoint",
"code": 0,
"msg": "endpoint error",
"status": 400,
"cause": "<string>"
}{
"error": "WebrpcBadResponse",
"code": -5,
"msg": "bad response",
"status": 500,
"cause": "<string>"
}Earn
YieldGetProviders
List DeFi protocols available through the Trails earn system
POST
/
rpc
/
Trails
/
YieldGetProviders
YieldGetProviders returns available Yield providers.
curl --request POST \
--url https://trails-api.sequence.app/rpc/Trails/YieldGetProviders \
--header 'Content-Type: application/json' \
--data '
{
"limit": 123,
"offset": 123
}
'import requests
url = "https://trails-api.sequence.app/rpc/Trails/YieldGetProviders"
payload = {
"limit": 123,
"offset": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({limit: 123, offset: 123})
};
fetch('https://trails-api.sequence.app/rpc/Trails/YieldGetProviders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://trails-api.sequence.app/rpc/Trails/YieldGetProviders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'limit' => 123,
'offset' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://trails-api.sequence.app/rpc/Trails/YieldGetProviders"
payload := strings.NewReader("{\n \"limit\": 123,\n \"offset\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://trails-api.sequence.app/rpc/Trails/YieldGetProviders")
.header("Content-Type", "application/json")
.body("{\n \"limit\": 123,\n \"offset\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://trails-api.sequence.app/rpc/Trails/YieldGetProviders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"limit\": 123,\n \"offset\": 123\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"name": "<string>",
"id": "<string>",
"logoURI": "<string>",
"description": "<string>",
"website": "<string>",
"tvlUsd": {},
"type": "<string>",
"supportsBeneficiary": true,
"references": [
"<string>"
]
}
],
"total": 123,
"offset": 123,
"limit": 123
}{
"error": "WebrpcEndpoint",
"code": 0,
"msg": "endpoint error",
"status": 400,
"cause": "<string>"
}{
"error": "WebrpcBadResponse",
"code": -5,
"msg": "bad response",
"status": 500,
"cause": "<string>"
}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.| Field | Type | Description |
|---|---|---|
limit | number | Number of providers to return |
offset | number | Pagination offset |
Response
Returnspayload containing an array of provider objects. Each provider includes:
| Field | Description |
|---|---|
id | Provider identifier — use as the provider filter in YieldGetMarkets |
name | Human-readable protocol name |
url | Protocol website |
logoUrl | Protocol 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 theuseEarnProviders hook:
import { useEarnProviders } from '0xtrails'
const { data: providers } = useEarnProviders()
See also
- YieldGetMarkets — Filter markets by provider ID
- Markets & Providers — SDK hooks reference
Was this page helpful?
⌘I