cURL
curl --request GET \
--url https://api.mainnet.aptoslabs.com/decibel/api/v1/borrow_lend/account \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mainnet.aptoslabs.com/decibel/api/v1/borrow_lend/account"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mainnet.aptoslabs.com/decibel/api/v1/borrow_lend/account', 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.mainnet.aptoslabs.com/decibel/api/v1/borrow_lend/account",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.mainnet.aptoslabs.com/decibel/api/v1/borrow_lend/account"
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.mainnet.aptoslabs.com/decibel/api/v1/borrow_lend/account")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mainnet.aptoslabs.com/decibel/api/v1/borrow_lend/account")
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{
"account": "<string>",
"borrow_capacity_usdc": "<string>",
"collateral_value_usdc": "<string>",
"debt_usdc": "<string>",
"indices_as_of_secs": "<string>",
"lender_claim_usdc": "<string>",
"lending_positions": [
{
"claim_usdc": "<string>",
"frozen": true,
"shares": "<string>",
"store_address": "<string>"
}
],
"liquidatable": true,
"max_weighted_collateral_usdc": "<string>",
"pledges": [
{
"amount": "<string>",
"asset": "<string>",
"decimals": 1,
"value_usdc": "<string>"
}
],
"primary_asset": "<string>",
"primary_decimals": 1,
"rescue_enabled": true,
"debt_interest_usdc": "<string>",
"debt_principal_usdc": "<string>",
"debt_split_unavailable": "history_lagging",
"lender_earned_usdc": "<string>",
"lender_earnings_unavailable": "history_lagging",
"lender_interest_earned_usdc": "<string>",
"lender_net_supplied_usdc": "<string>",
"lender_principal_usdc": "<string>",
"lender_realized_earned_usdc": "<string>",
"lender_redeemed_total_usdc": "<string>",
"lender_supplied_total_usdc": "<string>"
}Borrow/Lend
Get apiv1borrow lendaccount
GET
/
api
/
v1
/
borrow_lend
/
account
cURL
curl --request GET \
--url https://api.mainnet.aptoslabs.com/decibel/api/v1/borrow_lend/account \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mainnet.aptoslabs.com/decibel/api/v1/borrow_lend/account"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mainnet.aptoslabs.com/decibel/api/v1/borrow_lend/account', 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.mainnet.aptoslabs.com/decibel/api/v1/borrow_lend/account",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.mainnet.aptoslabs.com/decibel/api/v1/borrow_lend/account"
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.mainnet.aptoslabs.com/decibel/api/v1/borrow_lend/account")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mainnet.aptoslabs.com/decibel/api/v1/borrow_lend/account")
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{
"account": "<string>",
"borrow_capacity_usdc": "<string>",
"collateral_value_usdc": "<string>",
"debt_usdc": "<string>",
"indices_as_of_secs": "<string>",
"lender_claim_usdc": "<string>",
"lending_positions": [
{
"claim_usdc": "<string>",
"frozen": true,
"shares": "<string>",
"store_address": "<string>"
}
],
"liquidatable": true,
"max_weighted_collateral_usdc": "<string>",
"pledges": [
{
"amount": "<string>",
"asset": "<string>",
"decimals": 1,
"value_usdc": "<string>"
}
],
"primary_asset": "<string>",
"primary_decimals": 1,
"rescue_enabled": true,
"debt_interest_usdc": "<string>",
"debt_principal_usdc": "<string>",
"debt_split_unavailable": "history_lagging",
"lender_earned_usdc": "<string>",
"lender_earnings_unavailable": "history_lagging",
"lender_interest_earned_usdc": "<string>",
"lender_net_supplied_usdc": "<string>",
"lender_principal_usdc": "<string>",
"lender_realized_earned_usdc": "<string>",
"lender_redeemed_total_usdc": "<string>",
"lender_supplied_total_usdc": "<string>"
}Authorizations
Bearer token from Geomi. See Authentication for setup instructions.

