One strategy by market id
curl --request GET \
--url https://api.spiralstake.xyz/v1/strategies/{id}import requests
url = "https://api.spiralstake.xyz/v1/strategies/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.spiralstake.xyz/v1/strategies/{id}', 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.spiralstake.xyz/v1/strategies/{id}",
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.spiralstake.xyz/v1/strategies/{id}"
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.spiralstake.xyz/v1/strategies/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spiralstake.xyz/v1/strategies/{id}")
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{
"id": "<string>",
"chainId": 123,
"correlated": true,
"collateral": {},
"loan": {},
"collateralApyPct": "<string>",
"collateralApySource": "pendle",
"borrowApyPct": "<string>",
"netBorrowApyPct": "<string>",
"maxLeverage": "<string>",
"leverageLadder": [
{
"leverage": "3.0",
"ltvPct": "66.7",
"leverageApyPct": "18.96"
}
],
"defaultLeverage": {
"leverage": "3.0",
"ltvPct": "66.7",
"leverageApyPct": "18.96"
},
"ltvPct": {
"liquidation": "<string>",
"max": "<string>"
},
"exitLiquidity": {},
"noSwapRoute": true,
"freshness": {
"borrow": {
"asOf": "2023-11-07T05:31:56Z",
"staleAfterSec": 123,
"staleForSec": 123
},
"collateralApy": {
"asOf": "2023-11-07T05:31:56Z",
"staleAfterSec": 123,
"staleForSec": 123
},
"exitLiquidity": {
"asOf": "2023-11-07T05:31:56Z",
"staleAfterSec": 123,
"staleForSec": 123
}
},
"yieldSustainabilityPct": {},
"quarterlyBorrowApyPct": "<string>",
"borrowIncentive": {},
"supplyUsd": 123,
"liquidityUsd": 123,
"publicAllocatorLiquidityUsd": 123,
"utilizationPct": "<string>",
"historicalLeverageApyPct": {},
"oracle": {},
"spiralHints": {},
"links": {}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "<string>",
"details": "<unknown>"
}
}API Reference
One strategy by market id
GET
/
v1
/
strategies
/
{id}
One strategy by market id
curl --request GET \
--url https://api.spiralstake.xyz/v1/strategies/{id}import requests
url = "https://api.spiralstake.xyz/v1/strategies/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.spiralstake.xyz/v1/strategies/{id}', 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.spiralstake.xyz/v1/strategies/{id}",
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.spiralstake.xyz/v1/strategies/{id}"
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.spiralstake.xyz/v1/strategies/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spiralstake.xyz/v1/strategies/{id}")
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{
"id": "<string>",
"chainId": 123,
"correlated": true,
"collateral": {},
"loan": {},
"collateralApyPct": "<string>",
"collateralApySource": "pendle",
"borrowApyPct": "<string>",
"netBorrowApyPct": "<string>",
"maxLeverage": "<string>",
"leverageLadder": [
{
"leverage": "3.0",
"ltvPct": "66.7",
"leverageApyPct": "18.96"
}
],
"defaultLeverage": {
"leverage": "3.0",
"ltvPct": "66.7",
"leverageApyPct": "18.96"
},
"ltvPct": {
"liquidation": "<string>",
"max": "<string>"
},
"exitLiquidity": {},
"noSwapRoute": true,
"freshness": {
"borrow": {
"asOf": "2023-11-07T05:31:56Z",
"staleAfterSec": 123,
"staleForSec": 123
},
"collateralApy": {
"asOf": "2023-11-07T05:31:56Z",
"staleAfterSec": 123,
"staleForSec": 123
},
"exitLiquidity": {
"asOf": "2023-11-07T05:31:56Z",
"staleAfterSec": 123,
"staleForSec": 123
}
},
"yieldSustainabilityPct": {},
"quarterlyBorrowApyPct": "<string>",
"borrowIncentive": {},
"supplyUsd": 123,
"liquidityUsd": 123,
"publicAllocatorLiquidityUsd": 123,
"utilizationPct": "<string>",
"historicalLeverageApyPct": {},
"oracle": {},
"spiralHints": {},
"links": {}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "<string>",
"details": "<unknown>"
}
}Path Parameters
Morpho market id.
Pattern:
^0x[0-9a-fA-F]{64}$Response
Strategy
Frozen /strategies contract (v1). Raw facts; the only verdict is under spiralHints.
Morpho market id (0x + 64 hex).
Available options:
pendle, defillama, royco, stablewatch, onchain, none Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Optional, namespaced Spiral opinion; carries its thresholds.