Get Position Risk
curl --request GET \
--url https://api.defiorbit.xyz/v1/lending/aavev3/position/{chain_id}/risk \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.defiorbit.xyz/v1/lending/aavev3/position/{chain_id}/risk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.defiorbit.xyz/v1/lending/aavev3/position/{chain_id}/risk"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.defiorbit.xyz/v1/lending/aavev3/position/{chain_id}/risk"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.defiorbit.xyz/v1/lending/aavev3/position/{chain_id}/risk")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.defiorbit.xyz/v1/lending/aavev3/position/{chain_id}/risk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.defiorbit.xyz/v1/lending/aavev3/position/{chain_id}/risk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"chain_id": 8453,
"wallet": "0xbf7620d0377b0660a6cbaef5cdfe2e00eddc1495",
"market_id": "main",
"health_factor": "1.42",
"current_ltv_percentage": "56.12",
"safe_borrow_amount_usd": "200.00",
"safe_withdraw_amount_usd": "500.00",
"risk_metrics": {
"priceDropToLiquidation": "29.67",
"borrowCapacityUtilization": "74.24",
"interestCoverageRatio": "0.36",
"maxBorrowCapacityUSD": "3844.66",
"liquidationThreshold": "79.80",
"ltv": "75.00"
},
"asset_metrics": {
"suppliedAssets": [
{
"symbol": "WETH",
"suppliedUSD": "1706.67",
"weightInPortfolio": "33.56",
"dailyEarnings": "0.08",
"liquidation": {
"direction": "decrease",
"currentPrice": 3413.34,
"liquidationPricePerTokenUSD": "2400.00",
"liquidationNotionalUSD": "1200.00",
"priceDropToLiquidationPct": "29.67"
}
}
],
"borrowedAssets": [
{
"symbol": "USDC",
"borrowedUSD": "2854.38",
"weightInDebt": "100.00",
"dailyCost": "0.35",
"liquidation": {
"direction": "increase",
"currentPrice": 1,
"liquidationPricePerTokenUSD": "1.42",
"liquidationNotionalUSD": "4050.00",
"priceIncreaseToLiquidationPct": "42.00"
}
}
]
}
},
"request_id": "req_..."
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "page must be a positive integer.",
"request_id": "req_..."
}
}{
"error": {
"code": "INVALID_API_KEY",
"message": "Missing API key.",
"request_id": "req_..."
}
}{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Insufficient API credits.",
"request_id": "req_..."
}
}{
"error": {
"code": "ACCOUNT_SUSPENDED",
"message": "This organization is suspended.",
"request_id": "req_..."
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Please try again later.",
"request_id": "req_..."
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"request_id": "req_..."
}
}Get Position Risk
Liquidation distance, LTV, and per-asset risk breakdown for one chain’s live position. Optional market_id (default main) and target_health_factor (default 1.5) for the safe borrow/withdraw slider.
Credits: 8 per successful call.
GET
https://api.defiorbit.xyz
/
v1
/
lending
/
aavev3
/
position
/
{chain_id}
/
risk
Get Position Risk
curl --request GET \
--url https://api.defiorbit.xyz/v1/lending/aavev3/position/{chain_id}/risk \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.defiorbit.xyz/v1/lending/aavev3/position/{chain_id}/risk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.defiorbit.xyz/v1/lending/aavev3/position/{chain_id}/risk"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.defiorbit.xyz/v1/lending/aavev3/position/{chain_id}/risk"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.defiorbit.xyz/v1/lending/aavev3/position/{chain_id}/risk")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.defiorbit.xyz/v1/lending/aavev3/position/{chain_id}/risk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.defiorbit.xyz/v1/lending/aavev3/position/{chain_id}/risk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"chain_id": 8453,
"wallet": "0xbf7620d0377b0660a6cbaef5cdfe2e00eddc1495",
"market_id": "main",
"health_factor": "1.42",
"current_ltv_percentage": "56.12",
"safe_borrow_amount_usd": "200.00",
"safe_withdraw_amount_usd": "500.00",
"risk_metrics": {
"priceDropToLiquidation": "29.67",
"borrowCapacityUtilization": "74.24",
"interestCoverageRatio": "0.36",
"maxBorrowCapacityUSD": "3844.66",
"liquidationThreshold": "79.80",
"ltv": "75.00"
},
"asset_metrics": {
"suppliedAssets": [
{
"symbol": "WETH",
"suppliedUSD": "1706.67",
"weightInPortfolio": "33.56",
"dailyEarnings": "0.08",
"liquidation": {
"direction": "decrease",
"currentPrice": 3413.34,
"liquidationPricePerTokenUSD": "2400.00",
"liquidationNotionalUSD": "1200.00",
"priceDropToLiquidationPct": "29.67"
}
}
],
"borrowedAssets": [
{
"symbol": "USDC",
"borrowedUSD": "2854.38",
"weightInDebt": "100.00",
"dailyCost": "0.35",
"liquidation": {
"direction": "increase",
"currentPrice": 1,
"liquidationPricePerTokenUSD": "1.42",
"liquidationNotionalUSD": "4050.00",
"priceIncreaseToLiquidationPct": "42.00"
}
}
]
}
},
"request_id": "req_..."
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "page must be a positive integer.",
"request_id": "req_..."
}
}{
"error": {
"code": "INVALID_API_KEY",
"message": "Missing API key.",
"request_id": "req_..."
}
}{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Insufficient API credits.",
"request_id": "req_..."
}
}{
"error": {
"code": "ACCOUNT_SUSPENDED",
"message": "This organization is suspended.",
"request_id": "req_..."
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Please try again later.",
"request_id": "req_..."
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"request_id": "req_..."
}
}Authorizations
Path Parameters
Chain ID.
Example:
8453
Query Parameters
Wallet address.
Example:
"0xbf7620d0377b0660a6cbaef5cdfe2e00eddc1495"
Default: main. Values: main, lido, horizon.
Available options:
main, lido, horizon Target health factor. Default: 1.5.