What a vault holds, with sources
curl --request GET \
--url https://api.atlasyield.club/v1/vaults/{chainId}/{address}/compositionimport requests
url = "https://api.atlasyield.club/v1/vaults/{chainId}/{address}/composition"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.atlasyield.club/v1/vaults/{chainId}/{address}/composition', 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.atlasyield.club/v1/vaults/{chainId}/{address}/composition",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.atlasyield.club/v1/vaults/{chainId}/{address}/composition"
req, _ := http.NewRequest("GET", url, nil)
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.atlasyield.club/v1/vaults/{chainId}/{address}/composition")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atlasyield.club/v1/vaults/{chainId}/{address}/composition")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"disclaimer": "Research and information, not investment advice.",
"data": {
"composed": true,
"vaultId": "<string>",
"chainId": 123,
"address": "<string>",
"computedAt": "2023-11-07T05:31:56Z",
"coverage": 123,
"fingerprint": "<string>",
"top": [
{
"label": "USDC",
"symbol": "USDC",
"weight": 0.42
}
],
"root": {
"kind": "vault",
"chainId": 123,
"address": "<string>",
"symbol": "<string>",
"label": "<string>",
"usd": 123,
"weight": 123,
"opaque": true,
"source": {
"via": "onchain",
"ref": "0x98C23E9d8f34FEFb1B7BD6a91B7FF122F4e16F5c.POOL()",
"at": "2023-11-07T05:31:56Z"
},
"children": "<array>",
"backing": [
{
"scope": "market",
"share": 123,
"ltv": 123,
"lltv": 123,
"liquidationThreshold": 123,
"oracle": "<string>",
"collateralRatio": 123
}
]
},
"history": [
{
"computedAt": "2023-11-07T05:31:56Z",
"fingerprint": "<string>",
"coverage": 123,
"top": [
{
"label": "USDC",
"symbol": "USDC",
"weight": 0.42
}
]
}
]
}
}{
"success": false,
"error": "Validation error",
"details": {}
}Endpoints
Vault composition
The vault’s holdings, recursively: the markets, pools, strategies and tokens it sits in, how much of each, and for lending positions the collateral behind the loans. Every holding names the contract call or API request it was read from, so anyone can re-check it. Rebuilt every 4-hour scoring run; stored when it changes and once a day.
A vault without a stored composition returns composed: false with every field null, never an invented one.
GET
/
vaults
/
{chainId}
/
{address}
/
composition
What a vault holds, with sources
curl --request GET \
--url https://api.atlasyield.club/v1/vaults/{chainId}/{address}/compositionimport requests
url = "https://api.atlasyield.club/v1/vaults/{chainId}/{address}/composition"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.atlasyield.club/v1/vaults/{chainId}/{address}/composition', 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.atlasyield.club/v1/vaults/{chainId}/{address}/composition",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.atlasyield.club/v1/vaults/{chainId}/{address}/composition"
req, _ := http.NewRequest("GET", url, nil)
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.atlasyield.club/v1/vaults/{chainId}/{address}/composition")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atlasyield.club/v1/vaults/{chainId}/{address}/composition")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"disclaimer": "Research and information, not investment advice.",
"data": {
"composed": true,
"vaultId": "<string>",
"chainId": 123,
"address": "<string>",
"computedAt": "2023-11-07T05:31:56Z",
"coverage": 123,
"fingerprint": "<string>",
"top": [
{
"label": "USDC",
"symbol": "USDC",
"weight": 0.42
}
],
"root": {
"kind": "vault",
"chainId": 123,
"address": "<string>",
"symbol": "<string>",
"label": "<string>",
"usd": 123,
"weight": 123,
"opaque": true,
"source": {
"via": "onchain",
"ref": "0x98C23E9d8f34FEFb1B7BD6a91B7FF122F4e16F5c.POOL()",
"at": "2023-11-07T05:31:56Z"
},
"children": "<array>",
"backing": [
{
"scope": "market",
"share": 123,
"ltv": 123,
"lltv": 123,
"liquidationThreshold": 123,
"oracle": "<string>",
"collateralRatio": 123
}
]
},
"history": [
{
"computedAt": "2023-11-07T05:31:56Z",
"fingerprint": "<string>",
"coverage": 123,
"top": [
{
"label": "USDC",
"symbol": "USDC",
"weight": 0.42
}
]
}
]
}
}{
"success": false,
"error": "Validation error",
"details": {}
}