positions
Wallet DeFi positions snapshot (200) or queued scan (202)
GET
/
v1
/
solana
/
wallets
/
{wallet}
/
defi-positions
Wallet DeFi positions snapshot (200) or queued scan (202)
curl --request GET \
--url https://api.lucidblock.xyz/v1/solana/wallets/{wallet}/defi-positions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.lucidblock.xyz/v1/solana/wallets/{wallet}/defi-positions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lucidblock.xyz/v1/solana/wallets/{wallet}/defi-positions', 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.lucidblock.xyz/v1/solana/wallets/{wallet}/defi-positions",
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.lucidblock.xyz/v1/solana/wallets/{wallet}/defi-positions"
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.lucidblock.xyz/v1/solana/wallets/{wallet}/defi-positions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lucidblock.xyz/v1/solana/wallets/{wallet}/defi-positions")
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{
"chain": "solana",
"network": "mainnet-beta",
"wallet": "<string>",
"snapshot_id": "<string>",
"release_status": "alpha_partial",
"as_of": "<string>",
"observed_slots": {
"minimum": 123,
"maximum": 123
},
"snapshot_consistency": "single_slot",
"refreshing": true,
"refresh_job_id": "<string>",
"freshness": {
"age_seconds": 123,
"stale": true,
"max_age_seconds": 123
},
"coverage": {
"status": "complete_for_supported_protocols",
"universe": "supported_adapters_only",
"supported_protocol_count": 123,
"completed_protocol_count": 123,
"failed_protocol_count": 123,
"skipped_protocol_count": 123,
"unsupported_programs_detected": 123,
"protocols": [
{
"id": "<string>",
"status": "complete",
"adapter_version": "<string>",
"warnings": [
"<string>"
],
"error_code": "<string>"
}
],
"warnings": [
"<string>"
],
"last_scan_status": "complete_for_supported_protocols",
"wallet_token_scan": {
"spl_token": "complete",
"token_2022": "complete",
"token_accounts_found": 123
}
},
"positions": [
{
"id": "<string>",
"protocol": {
"id": "<string>",
"name": "<string>",
"program_id": "<string>",
"logo_url": "<string>"
},
"position_type": "lending_supply",
"category": "lending",
"position_account": "<string>",
"owner_role": "authority",
"market": "<string>",
"assets": [
{
"role": "supplied",
"mint": "<string>",
"symbol": "<string>",
"amount_raw": "<string>",
"decimals": 127,
"amount": "<string>",
"price_usd": "<string>",
"value_usd": "<string>",
"pricing_source": "<string>",
"price_as_of": "<string>",
"valuation_status": "priced",
"confidence": "qualified",
"claimable": true,
"amount_basis": "exact",
"informational": true,
"in_totals": true,
"exclusion_reason": "indicative",
"context": {
"account": "<string>",
"as_of_slot": 123,
"status": "active",
"reward_index": 4
},
"market_price_usd": "<string>",
"protocol_mark_price_usd": "<string>",
"price_warnings": [
"<string>"
]
}
],
"debts": [
{
"role": "supplied",
"mint": "<string>",
"symbol": "<string>",
"amount_raw": "<string>",
"decimals": 127,
"amount": "<string>",
"price_usd": "<string>",
"value_usd": "<string>",
"pricing_source": "<string>",
"price_as_of": "<string>",
"valuation_status": "priced",
"confidence": "qualified",
"claimable": true,
"amount_basis": "exact",
"informational": true,
"in_totals": true,
"exclusion_reason": "indicative",
"context": {
"account": "<string>",
"as_of_slot": 123,
"status": "active",
"reward_index": 4
},
"market_price_usd": "<string>",
"protocol_mark_price_usd": "<string>",
"price_warnings": [
"<string>"
]
}
],
"rewards": [
{
"role": "supplied",
"mint": "<string>",
"symbol": "<string>",
"amount_raw": "<string>",
"decimals": 127,
"amount": "<string>",
"price_usd": "<string>",
"value_usd": "<string>",
"pricing_source": "<string>",
"price_as_of": "<string>",
"valuation_status": "priced",
"confidence": "qualified",
"claimable": true,
"amount_basis": "exact",
"informational": true,
"in_totals": true,
"exclusion_reason": "indicative",
"context": {
"account": "<string>",
"as_of_slot": 123,
"status": "active",
"reward_index": 4
},
"market_price_usd": "<string>",
"protocol_mark_price_usd": "<string>",
"price_warnings": [
"<string>"
]
}
],
"net_value_usd": "<string>",
"known_value_usd": "<string>",
"valuation": {
"status": "complete",
"priced_leg_count": 123,
"indicative_leg_count": 123,
"unpriced_leg_count": 123
},
"accounting": {
"counts_toward_totals": true,
"parent_position_id": "<string>",
"carried_forward_from_snapshot": "<string>"
},
"flags": [
"<string>"
],
"evidence": {
"slot": 123,
"adapter_version": "<string>",
"method": "wallet_token",
"accounts": [
"<string>"
],
"decoder_hash": "<string>"
},
"details": {},
"warnings": [
"<string>"
]
}
],
"page": {
"limit": 123,
"returned": 123,
"total_positions": 123,
"next_cursor": "<string>",
"page_complete": true
},
"totals": {
"total_value_usd": "<string>",
"known_value_usd": "<string>",
"total_null_reasons": [
"coverage_incomplete"
],
"unpriced_position_count": 123,
"priced_leg_count": 123,
"indicative_leg_count": 123,
"unpriced_leg_count": 123,
"excluded": {
"indicative_value_usd": "<string>",
"stale_value_usd": "<string>",
"estimated_rewards_value_usd": "<string>",
"claimable_rewards_not_included_usd": "<string>",
"staker_only_value_usd": "<string>"
},
"valuation_status": "complete",
"include_rewards_in_total": true,
"price_sources": [
{
"id": "<string>",
"status": "ok",
"as_of": "<string>"
}
],
"note": "<string>",
"warnings": [
"<string>"
]
},
"request": {
"include": [
"underlying"
],
"protocols": [
"<string>"
],
"freshness_seconds": 123,
"include_rewards_in_total": true,
"limit": 123
},
"metadata": {
"notice": "<string>",
"assets": {},
"protocols": {}
},
"tokens": {
"scan": {
"spl_token": "complete",
"token_2022": "complete",
"native_sol": "complete"
},
"holdings": [
{
"mint": "<string>",
"token_program": "native",
"token_accounts": [
"<string>"
],
"amount_raw": "<string>",
"decimals": 127,
"amount": "<string>",
"symbol": "<string>",
"name": "<string>",
"logo_url": "<string>",
"verified": true,
"spam_suspected": true,
"price_usd": "<string>",
"value_usd": "<string>",
"valuation_status": "priced",
"pricing_source": "<string>",
"price_as_of": "2023-11-07T05:31:56Z",
"counted_in_position": "<string>",
"in_total": true
}
],
"note": "<string>"
},
"tokens_total": {
"total_value_usd": "<string>",
"known_value_usd": "<string>",
"total_null_reasons": [
"coverage_incomplete"
],
"valuation_status": "complete",
"priced_count": 123,
"indicative_count": 123,
"stale_count": 123,
"unpriced_count": 123,
"counted_in_position_count": 123,
"spam_suspected_count": 123,
"note": "<string>"
}
}{
"job_id": "<string>",
"status": "queued",
"wallet": "<string>",
"retry_after_seconds": 2,
"poll_url": "<string>",
"request": {
"include": [
"underlying"
],
"protocols": [
"<string>"
],
"freshness_seconds": 123,
"include_rewards_in_total": true,
"limit": 123
}
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}Authorizations
Path Parameters
Query Parameters
Comma-separated subset of underlying, rewards, valuation, metadata, tokens. Default underlying,rewards,valuation,metadata (tokens, the wallet token balances of D-27, only when asked for).
Maximum string length:
200Pattern:
^(underlying|rewards|valuation|metadata|tokens)(,(underlying|rewards|valuation|metadata|tokens))*$Long-poll (D-29). When the request would start or join a refresh scan (202, or a stale 200 with refreshing), hold it open up to this many seconds for the scan; if it finishes in time the response is the normal fresh 200 for the new snapshot, else exactly the response without wait. Counted once against rate limits. 0 (default) returns at once.
Required range:
0 <= x <= 10Response
Fresh or stale snapshot
⌘I
Wallet DeFi positions snapshot (200) or queued scan (202)
curl --request GET \
--url https://api.lucidblock.xyz/v1/solana/wallets/{wallet}/defi-positions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.lucidblock.xyz/v1/solana/wallets/{wallet}/defi-positions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lucidblock.xyz/v1/solana/wallets/{wallet}/defi-positions', 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.lucidblock.xyz/v1/solana/wallets/{wallet}/defi-positions",
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.lucidblock.xyz/v1/solana/wallets/{wallet}/defi-positions"
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.lucidblock.xyz/v1/solana/wallets/{wallet}/defi-positions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lucidblock.xyz/v1/solana/wallets/{wallet}/defi-positions")
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{
"chain": "solana",
"network": "mainnet-beta",
"wallet": "<string>",
"snapshot_id": "<string>",
"release_status": "alpha_partial",
"as_of": "<string>",
"observed_slots": {
"minimum": 123,
"maximum": 123
},
"snapshot_consistency": "single_slot",
"refreshing": true,
"refresh_job_id": "<string>",
"freshness": {
"age_seconds": 123,
"stale": true,
"max_age_seconds": 123
},
"coverage": {
"status": "complete_for_supported_protocols",
"universe": "supported_adapters_only",
"supported_protocol_count": 123,
"completed_protocol_count": 123,
"failed_protocol_count": 123,
"skipped_protocol_count": 123,
"unsupported_programs_detected": 123,
"protocols": [
{
"id": "<string>",
"status": "complete",
"adapter_version": "<string>",
"warnings": [
"<string>"
],
"error_code": "<string>"
}
],
"warnings": [
"<string>"
],
"last_scan_status": "complete_for_supported_protocols",
"wallet_token_scan": {
"spl_token": "complete",
"token_2022": "complete",
"token_accounts_found": 123
}
},
"positions": [
{
"id": "<string>",
"protocol": {
"id": "<string>",
"name": "<string>",
"program_id": "<string>",
"logo_url": "<string>"
},
"position_type": "lending_supply",
"category": "lending",
"position_account": "<string>",
"owner_role": "authority",
"market": "<string>",
"assets": [
{
"role": "supplied",
"mint": "<string>",
"symbol": "<string>",
"amount_raw": "<string>",
"decimals": 127,
"amount": "<string>",
"price_usd": "<string>",
"value_usd": "<string>",
"pricing_source": "<string>",
"price_as_of": "<string>",
"valuation_status": "priced",
"confidence": "qualified",
"claimable": true,
"amount_basis": "exact",
"informational": true,
"in_totals": true,
"exclusion_reason": "indicative",
"context": {
"account": "<string>",
"as_of_slot": 123,
"status": "active",
"reward_index": 4
},
"market_price_usd": "<string>",
"protocol_mark_price_usd": "<string>",
"price_warnings": [
"<string>"
]
}
],
"debts": [
{
"role": "supplied",
"mint": "<string>",
"symbol": "<string>",
"amount_raw": "<string>",
"decimals": 127,
"amount": "<string>",
"price_usd": "<string>",
"value_usd": "<string>",
"pricing_source": "<string>",
"price_as_of": "<string>",
"valuation_status": "priced",
"confidence": "qualified",
"claimable": true,
"amount_basis": "exact",
"informational": true,
"in_totals": true,
"exclusion_reason": "indicative",
"context": {
"account": "<string>",
"as_of_slot": 123,
"status": "active",
"reward_index": 4
},
"market_price_usd": "<string>",
"protocol_mark_price_usd": "<string>",
"price_warnings": [
"<string>"
]
}
],
"rewards": [
{
"role": "supplied",
"mint": "<string>",
"symbol": "<string>",
"amount_raw": "<string>",
"decimals": 127,
"amount": "<string>",
"price_usd": "<string>",
"value_usd": "<string>",
"pricing_source": "<string>",
"price_as_of": "<string>",
"valuation_status": "priced",
"confidence": "qualified",
"claimable": true,
"amount_basis": "exact",
"informational": true,
"in_totals": true,
"exclusion_reason": "indicative",
"context": {
"account": "<string>",
"as_of_slot": 123,
"status": "active",
"reward_index": 4
},
"market_price_usd": "<string>",
"protocol_mark_price_usd": "<string>",
"price_warnings": [
"<string>"
]
}
],
"net_value_usd": "<string>",
"known_value_usd": "<string>",
"valuation": {
"status": "complete",
"priced_leg_count": 123,
"indicative_leg_count": 123,
"unpriced_leg_count": 123
},
"accounting": {
"counts_toward_totals": true,
"parent_position_id": "<string>",
"carried_forward_from_snapshot": "<string>"
},
"flags": [
"<string>"
],
"evidence": {
"slot": 123,
"adapter_version": "<string>",
"method": "wallet_token",
"accounts": [
"<string>"
],
"decoder_hash": "<string>"
},
"details": {},
"warnings": [
"<string>"
]
}
],
"page": {
"limit": 123,
"returned": 123,
"total_positions": 123,
"next_cursor": "<string>",
"page_complete": true
},
"totals": {
"total_value_usd": "<string>",
"known_value_usd": "<string>",
"total_null_reasons": [
"coverage_incomplete"
],
"unpriced_position_count": 123,
"priced_leg_count": 123,
"indicative_leg_count": 123,
"unpriced_leg_count": 123,
"excluded": {
"indicative_value_usd": "<string>",
"stale_value_usd": "<string>",
"estimated_rewards_value_usd": "<string>",
"claimable_rewards_not_included_usd": "<string>",
"staker_only_value_usd": "<string>"
},
"valuation_status": "complete",
"include_rewards_in_total": true,
"price_sources": [
{
"id": "<string>",
"status": "ok",
"as_of": "<string>"
}
],
"note": "<string>",
"warnings": [
"<string>"
]
},
"request": {
"include": [
"underlying"
],
"protocols": [
"<string>"
],
"freshness_seconds": 123,
"include_rewards_in_total": true,
"limit": 123
},
"metadata": {
"notice": "<string>",
"assets": {},
"protocols": {}
},
"tokens": {
"scan": {
"spl_token": "complete",
"token_2022": "complete",
"native_sol": "complete"
},
"holdings": [
{
"mint": "<string>",
"token_program": "native",
"token_accounts": [
"<string>"
],
"amount_raw": "<string>",
"decimals": 127,
"amount": "<string>",
"symbol": "<string>",
"name": "<string>",
"logo_url": "<string>",
"verified": true,
"spam_suspected": true,
"price_usd": "<string>",
"value_usd": "<string>",
"valuation_status": "priced",
"pricing_source": "<string>",
"price_as_of": "2023-11-07T05:31:56Z",
"counted_in_position": "<string>",
"in_total": true
}
],
"note": "<string>"
},
"tokens_total": {
"total_value_usd": "<string>",
"known_value_usd": "<string>",
"total_null_reasons": [
"coverage_incomplete"
],
"valuation_status": "complete",
"priced_count": 123,
"indicative_count": 123,
"stale_count": 123,
"unpriced_count": 123,
"counted_in_position_count": 123,
"spam_suspected_count": 123,
"note": "<string>"
}
}{
"job_id": "<string>",
"status": "queued",
"wallet": "<string>",
"retry_after_seconds": 2,
"poll_url": "<string>",
"request": {
"include": [
"underlying"
],
"protocols": [
"<string>"
],
"freshness_seconds": 123,
"include_rewards_in_total": true,
"limit": 123
}
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}