Get all providers
curl --request GET \
--url https://api.yield.xyz/v1/providers \
--header 'x-api-key: <api-key>'import requests
url = "https://api.yield.xyz/v1/providers"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.yield.xyz/v1/providers', 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://api.yield.xyz/v1/providers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.yield.xyz/v1/providers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.yield.xyz/v1/providers")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yield.xyz/v1/providers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"total": 100,
"offset": 0,
"limit": 20,
"items": [
{
"name": "Morpho",
"id": "morpho",
"logoURI": "https://morpho.xyz/logo.png",
"description": "A peer-to-peer DeFi lending protocol",
"website": "https://morpho.xyz",
"tvlUsd": "10,200,000",
"type": "protocol",
"references": [
"<string>"
]
}
]
}{
"message": "Validation failed",
"error": "Bad Request",
"statusCode": 400
}{
"message": "Invalid API key",
"error": "Unauthorized",
"statusCode": 401
}{
"message": "Rate limit exceeded",
"error": "Too Many Requests",
"statusCode": 429,
"retryAfter": 30
}{
"message": "Internal server error",
"error": "Internal Server Error",
"statusCode": 500
}Discovery
Get all providers
Returns a paginated list of all providers, including both protocol and validator providers.
GET
/
v1
/
providers
Get all providers
curl --request GET \
--url https://api.yield.xyz/v1/providers \
--header 'x-api-key: <api-key>'import requests
url = "https://api.yield.xyz/v1/providers"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.yield.xyz/v1/providers', 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://api.yield.xyz/v1/providers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.yield.xyz/v1/providers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.yield.xyz/v1/providers")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yield.xyz/v1/providers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"total": 100,
"offset": 0,
"limit": 20,
"items": [
{
"name": "Morpho",
"id": "morpho",
"logoURI": "https://morpho.xyz/logo.png",
"description": "A peer-to-peer DeFi lending protocol",
"website": "https://morpho.xyz",
"tvlUsd": "10,200,000",
"type": "protocol",
"references": [
"<string>"
]
}
]
}{
"message": "Validation failed",
"error": "Bad Request",
"statusCode": 400
}{
"message": "Invalid API key",
"error": "Unauthorized",
"statusCode": 401
}{
"message": "Rate limit exceeded",
"error": "Too Many Requests",
"statusCode": 429,
"retryAfter": 30
}{
"message": "Internal server error",
"error": "Internal Server Error",
"statusCode": 500
}Authorizations
Query Parameters
Offset for pagination
Required range:
x >= 0Number of items per page
Required range:
1 <= x <= 100⌘I

