curl --request GET \
--url https://api.vaults.fyi/v2/portfolio/positions/{userAddress}/{network}/{vaultId} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.vaults.fyi/v2/portfolio/positions/{userAddress}/{network}/{vaultId}"
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.vaults.fyi/v2/portfolio/positions/{userAddress}/{network}/{vaultId}', 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.vaults.fyi/v2/portfolio/positions/{userAddress}/{network}/{vaultId}",
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.vaults.fyi/v2/portfolio/positions/{userAddress}/{network}/{vaultId}"
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.vaults.fyi/v2/portfolio/positions/{userAddress}/{network}/{vaultId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vaults.fyi/v2/portfolio/positions/{userAddress}/{network}/{vaultId}")
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{
"vaultId": "<string>",
"address": "<string>",
"network": {
"chainId": 123,
"networkCaip": "<string>"
},
"asset": {
"address": "<string>",
"assetCaip": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"assetGroup": "<string>",
"balanceNative": "<string>",
"assetLogo": "<string>",
"assetPriceInUsd": "<string>",
"balanceUsd": "<string>",
"unclaimedNative": "<string>",
"unclaimedUsd": "<string>",
"positionValueInAsset": "<string>"
},
"name": "<string>",
"protocol": {
"name": "<string>",
"displayName": "<string>",
"product": "<string>",
"version": "<string>",
"protocolUrl": "<string>",
"description": "<string>",
"protocolLogo": "<string>"
},
"isTransactional": true,
"isAppFeatured": true,
"userEventsIndexed": true,
"apy": {
"base": 123,
"reward": 123,
"total": 123
},
"additionalAssets": [
{
"address": "<string>",
"assetCaip": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"assetGroup": "<string>",
"balanceNative": "<string>",
"assetLogo": "<string>",
"assetPriceInUsd": "<string>",
"balanceUsd": "<string>",
"unclaimedNative": "<string>",
"unclaimedUsd": "<string>",
"positionValueInAsset": "<string>"
}
],
"lpToken": {
"address": "<string>",
"tokenCaip": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"balanceNative": "<string>",
"balanceUsd": "<string>",
"unclaimedNative": "<string>",
"unclaimedUsd": "<string>",
"positionValueInAsset": "<string>",
"assetPriceInUsd": "<string>"
},
"childrenVaults": [
{
"vaultId": "<string>",
"address": "<string>",
"asset": {
"address": "<string>",
"assetCaip": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"assetGroup": "<string>",
"balanceNative": "<string>",
"assetLogo": "<string>",
"assetPriceInUsd": "<string>",
"balanceUsd": "<string>",
"unclaimedNative": "<string>",
"unclaimedUsd": "<string>",
"positionValueInAsset": "<string>"
},
"lpToken": {
"address": "<string>",
"tokenCaip": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"balanceNative": "<string>",
"balanceUsd": "<string>",
"unclaimedNative": "<string>",
"unclaimedUsd": "<string>",
"positionValueInAsset": "<string>",
"assetPriceInUsd": "<string>"
},
"additionalAssets": [
{
"address": "<string>",
"assetCaip": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"assetGroup": "<string>",
"balanceNative": "<string>",
"assetLogo": "<string>",
"assetPriceInUsd": "<string>",
"balanceUsd": "<string>",
"unclaimedNative": "<string>",
"unclaimedUsd": "<string>",
"positionValueInAsset": "<string>"
}
]
}
],
"apyComposite": {
"totalApy": {
"base": 123,
"reward": 123,
"total": 123
},
"intrinsicApy": {
"base": 123,
"reward": 123,
"total": 123
},
"asset": {
"address": "<string>",
"assetCaip": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"assetGroup": "<string>",
"assetLogo": "<string>",
"assetPriceInUsd": "<string>"
},
"vault": {
"vaultId": "<string>",
"address": "<string>"
}
}
}{
"statusCode": 123,
"error": "Bad Request",
"message": "<string>",
"errorId": "<string>"
}{
"error": "Unauthorized",
"message": "An API key is required to access this service. Sign up at https://portal.vaults.fyi/signup to generate a key. We offer a Pay-As-You-Go plan so you only pay for what you use, with no commitments.",
"errorId": "<string>"
}{
"x402Version": 123,
"resource": {
"url": "<string>",
"description": "<string>",
"mimeType": "<string>",
"serviceName": "<string>",
"tags": [
"<string>"
],
"iconUrl": "<string>"
},
"error": "<string>",
"accepts": [
{
"scheme": "exact",
"network": "<string>",
"amount": "<string>",
"payTo": "<string>",
"maxTimeoutSeconds": 123,
"asset": "<string>",
"extra": {
"name": "<string>",
"version": "<string>"
}
}
],
"extensions": {}
}{
"error": "Forbidden",
"message": "This API key has exhausted its available credits. To resume service, please visit https://portal.vaults.fyi/signup to top-up your credits",
"errorId": "<string>"
}{
"error": "Not Found",
"message": "<string>"
}{
"message": "<string>",
"errorId": "<string>"
}{
"statusCode": 123,
"error": "Unprocessable Entity",
"message": "<string>",
"errorId": "<string>"
}{
"error": "Internal Server Error",
"message": "<string>",
"errorId": "<string>"
}{
"statusCode": 123,
"error": "Service Unavailable",
"message": "<string>",
"errorId": "<string>"
}Get portfolio position
Gives a detailed view of one specific vault position on a given network.
curl --request GET \
--url https://api.vaults.fyi/v2/portfolio/positions/{userAddress}/{network}/{vaultId} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.vaults.fyi/v2/portfolio/positions/{userAddress}/{network}/{vaultId}"
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.vaults.fyi/v2/portfolio/positions/{userAddress}/{network}/{vaultId}', 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.vaults.fyi/v2/portfolio/positions/{userAddress}/{network}/{vaultId}",
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.vaults.fyi/v2/portfolio/positions/{userAddress}/{network}/{vaultId}"
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.vaults.fyi/v2/portfolio/positions/{userAddress}/{network}/{vaultId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vaults.fyi/v2/portfolio/positions/{userAddress}/{network}/{vaultId}")
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{
"vaultId": "<string>",
"address": "<string>",
"network": {
"chainId": 123,
"networkCaip": "<string>"
},
"asset": {
"address": "<string>",
"assetCaip": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"assetGroup": "<string>",
"balanceNative": "<string>",
"assetLogo": "<string>",
"assetPriceInUsd": "<string>",
"balanceUsd": "<string>",
"unclaimedNative": "<string>",
"unclaimedUsd": "<string>",
"positionValueInAsset": "<string>"
},
"name": "<string>",
"protocol": {
"name": "<string>",
"displayName": "<string>",
"product": "<string>",
"version": "<string>",
"protocolUrl": "<string>",
"description": "<string>",
"protocolLogo": "<string>"
},
"isTransactional": true,
"isAppFeatured": true,
"userEventsIndexed": true,
"apy": {
"base": 123,
"reward": 123,
"total": 123
},
"additionalAssets": [
{
"address": "<string>",
"assetCaip": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"assetGroup": "<string>",
"balanceNative": "<string>",
"assetLogo": "<string>",
"assetPriceInUsd": "<string>",
"balanceUsd": "<string>",
"unclaimedNative": "<string>",
"unclaimedUsd": "<string>",
"positionValueInAsset": "<string>"
}
],
"lpToken": {
"address": "<string>",
"tokenCaip": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"balanceNative": "<string>",
"balanceUsd": "<string>",
"unclaimedNative": "<string>",
"unclaimedUsd": "<string>",
"positionValueInAsset": "<string>",
"assetPriceInUsd": "<string>"
},
"childrenVaults": [
{
"vaultId": "<string>",
"address": "<string>",
"asset": {
"address": "<string>",
"assetCaip": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"assetGroup": "<string>",
"balanceNative": "<string>",
"assetLogo": "<string>",
"assetPriceInUsd": "<string>",
"balanceUsd": "<string>",
"unclaimedNative": "<string>",
"unclaimedUsd": "<string>",
"positionValueInAsset": "<string>"
},
"lpToken": {
"address": "<string>",
"tokenCaip": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"balanceNative": "<string>",
"balanceUsd": "<string>",
"unclaimedNative": "<string>",
"unclaimedUsd": "<string>",
"positionValueInAsset": "<string>",
"assetPriceInUsd": "<string>"
},
"additionalAssets": [
{
"address": "<string>",
"assetCaip": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"assetGroup": "<string>",
"balanceNative": "<string>",
"assetLogo": "<string>",
"assetPriceInUsd": "<string>",
"balanceUsd": "<string>",
"unclaimedNative": "<string>",
"unclaimedUsd": "<string>",
"positionValueInAsset": "<string>"
}
]
}
],
"apyComposite": {
"totalApy": {
"base": 123,
"reward": 123,
"total": 123
},
"intrinsicApy": {
"base": 123,
"reward": 123,
"total": 123
},
"asset": {
"address": "<string>",
"assetCaip": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"assetGroup": "<string>",
"assetLogo": "<string>",
"assetPriceInUsd": "<string>"
},
"vault": {
"vaultId": "<string>",
"address": "<string>"
}
}
}{
"statusCode": 123,
"error": "Bad Request",
"message": "<string>",
"errorId": "<string>"
}{
"error": "Unauthorized",
"message": "An API key is required to access this service. Sign up at https://portal.vaults.fyi/signup to generate a key. We offer a Pay-As-You-Go plan so you only pay for what you use, with no commitments.",
"errorId": "<string>"
}{
"x402Version": 123,
"resource": {
"url": "<string>",
"description": "<string>",
"mimeType": "<string>",
"serviceName": "<string>",
"tags": [
"<string>"
],
"iconUrl": "<string>"
},
"error": "<string>",
"accepts": [
{
"scheme": "exact",
"network": "<string>",
"amount": "<string>",
"payTo": "<string>",
"maxTimeoutSeconds": 123,
"asset": "<string>",
"extra": {
"name": "<string>",
"version": "<string>"
}
}
],
"extensions": {}
}{
"error": "Forbidden",
"message": "This API key has exhausted its available credits. To resume service, please visit https://portal.vaults.fyi/signup to top-up your credits",
"errorId": "<string>"
}{
"error": "Not Found",
"message": "<string>"
}{
"message": "<string>",
"errorId": "<string>"
}{
"statusCode": 123,
"error": "Unprocessable Entity",
"message": "<string>",
"errorId": "<string>"
}{
"error": "Internal Server Error",
"message": "<string>",
"errorId": "<string>"
}{
"statusCode": 123,
"error": "Service Unavailable",
"message": "<string>",
"errorId": "<string>"
}Authorizations
Path Parameters
User address to be used for best vault calculation
^0x[a-fA-F0-9]{40}$Include only vaults with provided network(name or CAIP)
mainnet, optimism, arbitrum, polygon, gnosis, base, unichain, swellchain, celo, worldchain, berachain, ink, bsc, hyperliquid, plasma, avalanche, katana, linea, mega-eth, monad, etherlink, robinhood, eip155:1, eip155:10, eip155:42161, eip155:137, eip155:100, eip155:8453, eip155:130, eip155:1923, eip155:42220, eip155:480, eip155:80094, eip155:57073, eip155:56, eip155:999, eip155:9745, eip155:43114, eip155:747474, eip155:59144, eip155:4326, eip155:143, eip155:42793, eip155:4663 Vault id of the vault for which the data will be returned
Query Parameters
Interval for APY data. Possible values: 1day, 7day, 30day
1day, 7day, 30day Response
Default Response
Stable vault identity for API lookups and links
Address of the vault
^0x[a-fA-F0-9]{40}$Network details of the vault
Show child attributes
Show child attributes
Asset details of the vault
Show child attributes
Show child attributes
Name of the vault
Protocol details of the vault
Show child attributes
Show child attributes
Indicates if the vault supports transactional endpoints
Indicates if the vault is featured in app.vaults.fyi
Indicates if user events related to the vault are indexed and available in the API
APY details of the vault
Show child attributes
Show child attributes
Additional assets of the vault
Show child attributes
Show child attributes
LP token details of the vault
Show child attributes
Show child attributes
List of child vaults
Show child attributes
Show child attributes
Composite APY data when vault asset is another vault LP token. When present, totalApy compounds the current vault with the underlying vault and intrinsicApy shows the underlying vault's own APY
Show child attributes
Show child attributes

