Balances
Get balances for a yield
Get one address’s balances in a single yield, including entering, exiting, claimable and withdrawable amounts.
POST
/
v1
/
yields
/
{yieldId}
/
balances
Get balances for a specific yield
curl --request POST \
--url https://api.yield.xyz/v1/yields/{yieldId}/balances \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"arguments": {
"cAddressBech": "0x123...",
"pAddressBech": "P-avax1...",
"autoSweepDayOfMonth": 20,
"autoSweepTimezone": "Europe/London"
}
}
'import requests
url = "https://api.yield.xyz/v1/yields/{yieldId}/balances"
payload = {
"address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"arguments": {
"cAddressBech": "0x123...",
"pAddressBech": "P-avax1...",
"autoSweepDayOfMonth": 20,
"autoSweepTimezone": "Europe/London"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
arguments: {
cAddressBech: '0x123...',
pAddressBech: 'P-avax1...',
autoSweepDayOfMonth: 20,
autoSweepTimezone: 'Europe/London'
}
})
};
fetch('https://api.yield.xyz/v1/yields/{yieldId}/balances', 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/yields/{yieldId}/balances",
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([
'address' => '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
'arguments' => [
'cAddressBech' => '0x123...',
'pAddressBech' => 'P-avax1...',
'autoSweepDayOfMonth' => 20,
'autoSweepTimezone' => 'Europe/London'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.yield.xyz/v1/yields/{yieldId}/balances"
payload := strings.NewReader("{\n \"address\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n \"arguments\": {\n \"cAddressBech\": \"0x123...\",\n \"pAddressBech\": \"P-avax1...\",\n \"autoSweepDayOfMonth\": 20,\n \"autoSweepTimezone\": \"Europe/London\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://api.yield.xyz/v1/yields/{yieldId}/balances")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n \"arguments\": {\n \"cAddressBech\": \"0x123...\",\n \"pAddressBech\": \"P-avax1...\",\n \"autoSweepDayOfMonth\": 20,\n \"autoSweepTimezone\": \"Europe/London\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yield.xyz/v1/yields/{yieldId}/balances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n \"arguments\": {\n \"cAddressBech\": \"0x123...\",\n \"pAddressBech\": \"P-avax1...\",\n \"autoSweepDayOfMonth\": 20,\n \"autoSweepTimezone\": \"Europe/London\"\n }\n}"
response = http.request(request)
puts response.read_body{
"yieldId": "ethereum-eth-lido-staking",
"balances": [
{
"address": "0x1234...",
"type": "active",
"amount": "2.625",
"amountRaw": "2625000000000000000",
"pendingActions": [
{
"intent": "manage",
"type": "CLAIM_REWARDS",
"passthrough": "eyJhZGRyZXNzZXMiOnsiYWRkcmVzcyI6ImNvc21vczF5ZXk...",
"arguments": {
"fields": [
{
"name": "amount",
"type": "string",
"label": "Amount to Enter",
"description": "<string>",
"required": true,
"options": [
"individual",
"batched"
],
"optionsRef": "/api/v1/validators?integrationId=eth-lido",
"default": {},
"placeholder": "<string>",
"minimum": "1.0",
"maximum": "100.0",
"isArray": false
}
],
"notes": "<string>"
},
"amount": "0.1"
}
],
"token": {
"symbol": "ETH",
"name": "Ethereum",
"decimals": 18,
"network": "Ethereum",
"address": "0x...",
"logoURI": "https://...",
"isPoints": true,
"coinGeckoId": "ethereum"
},
"isEarning": true,
"date": "2025-04-23T08:00:00Z",
"feeConfigurationId": "fee-config-1",
"validator": {
"address": "cosmosvaloper1abc...",
"name": "Example Validator",
"logoURI": "https://stakekit.com/logo.png",
"website": "https://stakekit.com",
"rewardRate": {
"total": 8.4,
"rateType": "APR",
"components": [
{
"rate": 6.8,
"rateType": "APR",
"token": {
"symbol": "SOL",
"name": "Solana"
},
"yieldSource": "staking",
"description": "Solana network inflation rewards"
},
{
"rate": 1.2,
"rateType": "APR",
"token": {
"symbol": "SOL",
"name": "Solana"
},
"yieldSource": "validator_commission",
"description": "Transaction fees from processed transactions"
},
{
"rate": 0.4,
"rateType": "APR",
"token": {
"symbol": "SOL",
"name": "Solana"
},
"yieldSource": "mev",
"description": "MEV from Jito block space auctions"
}
]
},
"provider": {
"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",
"rank": 1,
"preferred": true,
"references": [
"<string>"
],
"revshare": {
"standard": {
"minRevShare": 0.3,
"maxRevShare": 0.7
},
"pro": {
"minRevShare": 0.4,
"maxRevShare": 0.8
}
},
"uniqueId": "luganodes",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"commission": 0.05,
"tvlUsd": "18,340,000",
"tvl": "8250.45",
"tvlRaw": "8250450000000000000000",
"votingPower": 0.013,
"preferred": true,
"minimumStake": "1.0",
"remainingPossibleStake": "285,714.28",
"remainingSlots": 8,
"nominatorCount": 321,
"status": "active",
"providerId": "provider-1",
"subnet": {
"id": 1,
"name": "Apex",
"tokenSymbol": "α",
"tvl": "1000000",
"pricePerShare": "1.0"
}
},
"validators": [
{
"address": "cosmosvaloper1abc...",
"name": "Example Validator",
"logoURI": "https://stakekit.com/logo.png",
"website": "https://stakekit.com",
"rewardRate": {
"total": 8.4,
"rateType": "APR",
"components": [
{
"rate": 6.8,
"rateType": "APR",
"token": {
"symbol": "SOL",
"name": "Solana"
},
"yieldSource": "staking",
"description": "Solana network inflation rewards"
},
{
"rate": 1.2,
"rateType": "APR",
"token": {
"symbol": "SOL",
"name": "Solana"
},
"yieldSource": "validator_commission",
"description": "Transaction fees from processed transactions"
},
{
"rate": 0.4,
"rateType": "APR",
"token": {
"symbol": "SOL",
"name": "Solana"
},
"yieldSource": "mev",
"description": "MEV from Jito block space auctions"
}
]
},
"provider": {
"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",
"rank": 1,
"preferred": true,
"references": [
"<string>"
],
"revshare": {
"standard": {
"minRevShare": 0.3,
"maxRevShare": 0.7
},
"pro": {
"minRevShare": 0.4,
"maxRevShare": 0.8
}
},
"uniqueId": "luganodes",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"commission": 0.05,
"tvlUsd": "18,340,000",
"tvl": "8250.45",
"tvlRaw": "8250450000000000000000",
"votingPower": 0.013,
"preferred": true,
"minimumStake": "1.0",
"remainingPossibleStake": "285,714.28",
"remainingSlots": 8,
"nominatorCount": 321,
"status": "active",
"providerId": "provider-1",
"subnet": {
"id": 1,
"name": "Apex",
"tokenSymbol": "α",
"tvl": "1000000",
"pricePerShare": "1.0"
}
}
],
"amountUsd": "2,500.00",
"priceRange": {
"min": "2700",
"max": "3310"
},
"tokenId": "12345",
"shareAmount": "1.5",
"shareAmountRaw": "1500000000000000000",
"shareToken": {
"symbol": "ETH",
"name": "Ethereum",
"decimals": 18,
"network": "Ethereum",
"address": "0x...",
"logoURI": "https://...",
"isPoints": true,
"coinGeckoId": "ethereum"
}
}
],
"rewardRate": {
"total": 6.5,
"rateType": "APR",
"components": [
{
"rate": 0.04,
"rateType": "APR",
"token": {
"symbol": "ETH",
"name": "Ethereum",
"decimals": 18,
"network": "Ethereum",
"address": "0x...",
"logoURI": "https://...",
"isPoints": true,
"coinGeckoId": "ethereum"
},
"yieldSource": "protocol_incentive",
"description": "LDO distributed to incentivize stETH adoption via Lido Boost"
}
]
}
}{
"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
}The body takes
address (required) and optional protocol arguments. The network comes from the yield, so there is no network field. The yield must be enabled for your project, otherwise the call returns 400.
This is the per-yield read. It returns one YieldBalancesDto for the yield, including an empty balances list when the address holds nothing. For many yields or addresses at once, use Get balances across yields, which takes queries[].
Each balance has a type; see Balance types. Balances can carry pendingActions to pass to POST /v1/actions/manage; see Pending actions. Guide: Track balances.Authorizations
Path Parameters
The unique identifier of the yield opportunity
Example:
"ethereum-eth-lido-staking"
Body
application/json
Balance request with address and optional arguments for advanced balance queries
Response
Returns balance information including different balance types (active, entering, exiting, withdrawable, claimable, locked) with amounts and available actions
⌘I
Get balances for a specific yield
curl --request POST \
--url https://api.yield.xyz/v1/yields/{yieldId}/balances \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"arguments": {
"cAddressBech": "0x123...",
"pAddressBech": "P-avax1...",
"autoSweepDayOfMonth": 20,
"autoSweepTimezone": "Europe/London"
}
}
'import requests
url = "https://api.yield.xyz/v1/yields/{yieldId}/balances"
payload = {
"address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"arguments": {
"cAddressBech": "0x123...",
"pAddressBech": "P-avax1...",
"autoSweepDayOfMonth": 20,
"autoSweepTimezone": "Europe/London"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
arguments: {
cAddressBech: '0x123...',
pAddressBech: 'P-avax1...',
autoSweepDayOfMonth: 20,
autoSweepTimezone: 'Europe/London'
}
})
};
fetch('https://api.yield.xyz/v1/yields/{yieldId}/balances', 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/yields/{yieldId}/balances",
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([
'address' => '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
'arguments' => [
'cAddressBech' => '0x123...',
'pAddressBech' => 'P-avax1...',
'autoSweepDayOfMonth' => 20,
'autoSweepTimezone' => 'Europe/London'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.yield.xyz/v1/yields/{yieldId}/balances"
payload := strings.NewReader("{\n \"address\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n \"arguments\": {\n \"cAddressBech\": \"0x123...\",\n \"pAddressBech\": \"P-avax1...\",\n \"autoSweepDayOfMonth\": 20,\n \"autoSweepTimezone\": \"Europe/London\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://api.yield.xyz/v1/yields/{yieldId}/balances")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n \"arguments\": {\n \"cAddressBech\": \"0x123...\",\n \"pAddressBech\": \"P-avax1...\",\n \"autoSweepDayOfMonth\": 20,\n \"autoSweepTimezone\": \"Europe/London\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yield.xyz/v1/yields/{yieldId}/balances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n \"arguments\": {\n \"cAddressBech\": \"0x123...\",\n \"pAddressBech\": \"P-avax1...\",\n \"autoSweepDayOfMonth\": 20,\n \"autoSweepTimezone\": \"Europe/London\"\n }\n}"
response = http.request(request)
puts response.read_body{
"yieldId": "ethereum-eth-lido-staking",
"balances": [
{
"address": "0x1234...",
"type": "active",
"amount": "2.625",
"amountRaw": "2625000000000000000",
"pendingActions": [
{
"intent": "manage",
"type": "CLAIM_REWARDS",
"passthrough": "eyJhZGRyZXNzZXMiOnsiYWRkcmVzcyI6ImNvc21vczF5ZXk...",
"arguments": {
"fields": [
{
"name": "amount",
"type": "string",
"label": "Amount to Enter",
"description": "<string>",
"required": true,
"options": [
"individual",
"batched"
],
"optionsRef": "/api/v1/validators?integrationId=eth-lido",
"default": {},
"placeholder": "<string>",
"minimum": "1.0",
"maximum": "100.0",
"isArray": false
}
],
"notes": "<string>"
},
"amount": "0.1"
}
],
"token": {
"symbol": "ETH",
"name": "Ethereum",
"decimals": 18,
"network": "Ethereum",
"address": "0x...",
"logoURI": "https://...",
"isPoints": true,
"coinGeckoId": "ethereum"
},
"isEarning": true,
"date": "2025-04-23T08:00:00Z",
"feeConfigurationId": "fee-config-1",
"validator": {
"address": "cosmosvaloper1abc...",
"name": "Example Validator",
"logoURI": "https://stakekit.com/logo.png",
"website": "https://stakekit.com",
"rewardRate": {
"total": 8.4,
"rateType": "APR",
"components": [
{
"rate": 6.8,
"rateType": "APR",
"token": {
"symbol": "SOL",
"name": "Solana"
},
"yieldSource": "staking",
"description": "Solana network inflation rewards"
},
{
"rate": 1.2,
"rateType": "APR",
"token": {
"symbol": "SOL",
"name": "Solana"
},
"yieldSource": "validator_commission",
"description": "Transaction fees from processed transactions"
},
{
"rate": 0.4,
"rateType": "APR",
"token": {
"symbol": "SOL",
"name": "Solana"
},
"yieldSource": "mev",
"description": "MEV from Jito block space auctions"
}
]
},
"provider": {
"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",
"rank": 1,
"preferred": true,
"references": [
"<string>"
],
"revshare": {
"standard": {
"minRevShare": 0.3,
"maxRevShare": 0.7
},
"pro": {
"minRevShare": 0.4,
"maxRevShare": 0.8
}
},
"uniqueId": "luganodes",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"commission": 0.05,
"tvlUsd": "18,340,000",
"tvl": "8250.45",
"tvlRaw": "8250450000000000000000",
"votingPower": 0.013,
"preferred": true,
"minimumStake": "1.0",
"remainingPossibleStake": "285,714.28",
"remainingSlots": 8,
"nominatorCount": 321,
"status": "active",
"providerId": "provider-1",
"subnet": {
"id": 1,
"name": "Apex",
"tokenSymbol": "α",
"tvl": "1000000",
"pricePerShare": "1.0"
}
},
"validators": [
{
"address": "cosmosvaloper1abc...",
"name": "Example Validator",
"logoURI": "https://stakekit.com/logo.png",
"website": "https://stakekit.com",
"rewardRate": {
"total": 8.4,
"rateType": "APR",
"components": [
{
"rate": 6.8,
"rateType": "APR",
"token": {
"symbol": "SOL",
"name": "Solana"
},
"yieldSource": "staking",
"description": "Solana network inflation rewards"
},
{
"rate": 1.2,
"rateType": "APR",
"token": {
"symbol": "SOL",
"name": "Solana"
},
"yieldSource": "validator_commission",
"description": "Transaction fees from processed transactions"
},
{
"rate": 0.4,
"rateType": "APR",
"token": {
"symbol": "SOL",
"name": "Solana"
},
"yieldSource": "mev",
"description": "MEV from Jito block space auctions"
}
]
},
"provider": {
"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",
"rank": 1,
"preferred": true,
"references": [
"<string>"
],
"revshare": {
"standard": {
"minRevShare": 0.3,
"maxRevShare": 0.7
},
"pro": {
"minRevShare": 0.4,
"maxRevShare": 0.8
}
},
"uniqueId": "luganodes",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"commission": 0.05,
"tvlUsd": "18,340,000",
"tvl": "8250.45",
"tvlRaw": "8250450000000000000000",
"votingPower": 0.013,
"preferred": true,
"minimumStake": "1.0",
"remainingPossibleStake": "285,714.28",
"remainingSlots": 8,
"nominatorCount": 321,
"status": "active",
"providerId": "provider-1",
"subnet": {
"id": 1,
"name": "Apex",
"tokenSymbol": "α",
"tvl": "1000000",
"pricePerShare": "1.0"
}
}
],
"amountUsd": "2,500.00",
"priceRange": {
"min": "2700",
"max": "3310"
},
"tokenId": "12345",
"shareAmount": "1.5",
"shareAmountRaw": "1500000000000000000",
"shareToken": {
"symbol": "ETH",
"name": "Ethereum",
"decimals": 18,
"network": "Ethereum",
"address": "0x...",
"logoURI": "https://...",
"isPoints": true,
"coinGeckoId": "ethereum"
}
}
],
"rewardRate": {
"total": 6.5,
"rateType": "APR",
"components": [
{
"rate": 0.04,
"rateType": "APR",
"token": {
"symbol": "ETH",
"name": "Ethereum",
"decimals": 18,
"network": "Ethereum",
"address": "0x...",
"logoURI": "https://...",
"isPoints": true,
"coinGeckoId": "ethereum"
},
"yieldSource": "protocol_incentive",
"description": "LDO distributed to incentivize stETH adoption via Lido Boost"
}
]
}
}{
"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
}
