Get Earn Vault History
curl --request POST \
--url https://tars.loopscale.com/v1/markets/earn/vaults/history \
--header 'Content-Type: application/json' \
--data '
{
"address": "<string>",
"timeLookback": 123,
"sampleIntervalSecs": 1
}
'import requests
url = "https://tars.loopscale.com/v1/markets/earn/vaults/history"
payload = {
"address": "<string>",
"timeLookback": 123,
"sampleIntervalSecs": 1
}
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({address: '<string>', timeLookback: 123, sampleIntervalSecs: 1})
};
fetch('https://tars.loopscale.com/v1/markets/earn/vaults/history', 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://tars.loopscale.com/v1/markets/earn/vaults/history",
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' => '<string>',
'timeLookback' => 123,
'sampleIntervalSecs' => 1
]),
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://tars.loopscale.com/v1/markets/earn/vaults/history"
payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"timeLookback\": 123,\n \"sampleIntervalSecs\": 1\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://tars.loopscale.com/v1/markets/earn/vaults/history")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"timeLookback\": 123,\n \"sampleIntervalSecs\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tars.loopscale.com/v1/markets/earn/vaults/history")
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 \"address\": \"<string>\",\n \"timeLookback\": 123,\n \"sampleIntervalSecs\": 1\n}"
response = http.request(request)
puts response.read_body[
{
"navPerShareE18": "<string>",
"pendingWithdrawalsAssets": "<string>",
"shareSupply": "<string>",
"snapshotSlot": "<string>",
"timestamp": 123,
"totalAumAssets": "<string>",
"displayApyBps": 123,
"leverageX100": 1,
"realizedApyBps24h": 123,
"realizedApyBps30d": 123,
"realizedApyBps7d": 123,
"realizedReturnBps24h": 123,
"realizedReturnBps30d": 123,
"realizedReturnBps7d": 123,
"rewardsApyBps": 123,
"utilizationBps": 1
}
]{
"error": {
"code": 400,
"message": "Request could not be processed."
}
}{
"error": {
"code": 400,
"message": "Request could not be processed."
}
}Earn Vaults
Get Earn Vault History
Returns snapshot history for a vault. timeLookback is the window in seconds back from now; sampleIntervalSecs optionally buckets the points (for example 3600 for hourly).
POST
/
markets
/
earn
/
vaults
/
history
Get Earn Vault History
curl --request POST \
--url https://tars.loopscale.com/v1/markets/earn/vaults/history \
--header 'Content-Type: application/json' \
--data '
{
"address": "<string>",
"timeLookback": 123,
"sampleIntervalSecs": 1
}
'import requests
url = "https://tars.loopscale.com/v1/markets/earn/vaults/history"
payload = {
"address": "<string>",
"timeLookback": 123,
"sampleIntervalSecs": 1
}
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({address: '<string>', timeLookback: 123, sampleIntervalSecs: 1})
};
fetch('https://tars.loopscale.com/v1/markets/earn/vaults/history', 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://tars.loopscale.com/v1/markets/earn/vaults/history",
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' => '<string>',
'timeLookback' => 123,
'sampleIntervalSecs' => 1
]),
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://tars.loopscale.com/v1/markets/earn/vaults/history"
payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"timeLookback\": 123,\n \"sampleIntervalSecs\": 1\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://tars.loopscale.com/v1/markets/earn/vaults/history")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"timeLookback\": 123,\n \"sampleIntervalSecs\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tars.loopscale.com/v1/markets/earn/vaults/history")
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 \"address\": \"<string>\",\n \"timeLookback\": 123,\n \"sampleIntervalSecs\": 1\n}"
response = http.request(request)
puts response.read_body[
{
"navPerShareE18": "<string>",
"pendingWithdrawalsAssets": "<string>",
"shareSupply": "<string>",
"snapshotSlot": "<string>",
"timestamp": 123,
"totalAumAssets": "<string>",
"displayApyBps": 123,
"leverageX100": 1,
"realizedApyBps24h": 123,
"realizedApyBps30d": 123,
"realizedApyBps7d": 123,
"realizedReturnBps24h": 123,
"realizedReturnBps30d": 123,
"realizedReturnBps7d": 123,
"rewardsApyBps": 123,
"utilizationBps": 1
}
]{
"error": {
"code": 400,
"message": "Request could not be processed."
}
}{
"error": {
"code": 400,
"message": "Request could not be processed."
}
}Body
application/json
Response
Snapshot history points, oldest first
Forward-looking headline vault APY, mirrored from the snapshot. Signed
basis points; null when coverage is insufficient at that snapshot.
Required range:
x >= 0DEPRECATED — use realizedReturnBps24h.
DEPRECATED — use realizedReturnBps30d. Mirrored for one release cycle.
DEPRECATED — use realizedReturnBps7d.
Backward-looking NAV-delta return over the trailing 24h, in basis points.
Backward-looking NAV-delta return over the trailing 30d, in basis points.
Backward-looking NAV-delta return over the trailing 7d, in basis points.
Required range:
x >= 0