SDK
import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.getWalletPositionsV2('CN8w8cuh87gZYjhpaPxbD78GTrBmUKmVysqgsC9uYu9i', {
category: 'lending', // Or liquidity, staking, leverage, orders, rewards, other.
// platform: 'kamino', // An id from client.getPortfolioPlatformsV2().
limit: 50,
});
for (const position of data.positions) {
console.log(position.name, position.usd, position.apy, position.healthPercent, position.claimableUsd);
}
// client.iterateWalletPositionsV2() walks every page.curl --request GET \
--url https://data.solanatracker.io/v2/wallet/{wallet}/positions \
--header 'x-api-key: <api-key>'import requests
url = "https://data.solanatracker.io/v2/wallet/{wallet}/positions"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://data.solanatracker.io/v2/wallet/{wallet}/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://data.solanatracker.io/v2/wallet/{wallet}/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 => [
"x-api-key: <api-key>"
],
]);
$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://data.solanatracker.io/v2/wallet/{wallet}/positions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://data.solanatracker.io/v2/wallet/{wallet}/positions")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.solanatracker.io/v2/wallet/{wallet}/positions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"wallet": "CN8w8cuh87gZYjhpaPxbD78GTrBmUKmVysqgsC9uYu9i",
"slot": 475880664,
"updatedAt": 1796067128569,
"positions": [
{
"id": "kamino-vault-LnBhqBJEA4T8JpTSZBrWTFCL4Qa6nWJ6H72ukHkE729",
"platform": "kamino",
"service": "vault",
"category": "liquidity",
"name": "Kamino Vault",
"address": "LnBhqBJEA4T8JpTSZBrWTFCL4Qa6nWJ6H72ukHkE729",
"usd": 26010.10554,
"apy": 8.77,
"yearlyUsd": 2280.462624,
"claimableUsd": 83.651952,
"healthPercent": null,
"inRange": null,
"assets": [
{
"mint": "2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo",
"role": "supplied",
"amount": 26005.642935,
"priceUsd": 1.0001716013994661,
"usd": 26010.10554,
"apy": null,
"yearlyUsd": null
}
],
"claimable": [
{
"mint": "2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo",
"amount": 83.6376,
"priceUsd": 1.0001716013994661,
"usd": 83.651952
}
],
"image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fplatform-images.solanatracker.io%2Fkamino.webp"
},
{
"id": "kamino-vault-ADietbkvGfEL5gYFzQN6wzazp4f221tEhZRPUGPck2Sy",
"platform": "kamino",
"service": "vault",
"category": "liquidity",
"name": "Kamino Vault",
"address": "ADietbkvGfEL5gYFzQN6wzazp4f221tEhZRPUGPck2Sy",
"usd": 21154.671999,
"apy": 8,
"yearlyUsd": 1693.263872,
"claimableUsd": 0,
"healthPercent": null,
"inRange": null,
"assets": [
{
"mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"role": "supplied",
"amount": 21154.671999,
"priceUsd": 1,
"usd": 21154.671999,
"apy": null,
"yearlyUsd": null
}
],
"claimable": [],
"image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fplatform-images.solanatracker.io%2Fkamino.webp"
}
],
"tokens": {
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v": {
"name": "USD Coin",
"symbol": "USDC",
"decimals": 6,
"image": "https://image.solanatracker.io/proxy?url=https://static.datapi.jup.ag/token-icons/6c4e5669d2a438653105399865445682e4a6cb51e19e1e61dc97578cd27bb9b2.webp",
"supply": 8121434516.222706,
"uri": null,
"description": null,
"creator": null,
"createdOn": null,
"twitter": "https://twitter.com/circle",
"telegram": null,
"website": "https://www.circle.com/en/usdc"
},
"2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo": {
"name": "PayPal USD",
"symbol": "PYUSD",
"decimals": 6,
"image": "https://image.solanatracker.io/proxy?url=https://static.datapi.jup.ag/token-icons/0817b3345e648b1663385bac48eb086877635ee27639c3d5da2a4d9dfd8603b1.webp",
"supply": 688682738.280124,
"uri": "https://token-metadata.paxos.com/pyusd_metadata/prod/solana/pyusd_metadata.json",
"description": "PayPal USD is designed to contribute to the opportunity stablecoins offer for payments and is 100% backed by U.S. dollar deposits, short-term U.S Treasuries and similar cash equivalents. PayPal USD is redeemable 1:1 for U.S. dollars and is issued by Paxos Trust Company.",
"creator": null,
"createdOn": null,
"twitter": null,
"telegram": null,
"website": null
}
},
"nextCursor": "eyJ2IjoyLCJhdCI6MTc5NjA2NzEyODU2OSwicyI6MjExNTQuNjcxOTk5LCJ0Ijoia2FtaW5vLXZhdWx0LUFEaWV0Ymt2R2ZFTDVnWUZ6UU42d3phenA0ZjIyMXRFaFpSUFVHUGNrMlN5IiwicSI6InB8ZHx8In0",
"hasNextPage": true
}{
"error": "Invalid sort. Valid options are: value, amount, change24h"
}{
"error": "<string>"
}{
"error": "Wallet data is temporarily unavailable, please retry"
}Wallet
Solana Wallet DeFi Positions API
Get a Solana wallet’s DeFi positions across lending, liquidity, staking, leverage and orders, with value, APY, health and claimable rewards.
GET
/
v2
/
wallet
/
{wallet}
/
positions
SDK
import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.getWalletPositionsV2('CN8w8cuh87gZYjhpaPxbD78GTrBmUKmVysqgsC9uYu9i', {
category: 'lending', // Or liquidity, staking, leverage, orders, rewards, other.
// platform: 'kamino', // An id from client.getPortfolioPlatformsV2().
limit: 50,
});
for (const position of data.positions) {
console.log(position.name, position.usd, position.apy, position.healthPercent, position.claimableUsd);
}
// client.iterateWalletPositionsV2() walks every page.curl --request GET \
--url https://data.solanatracker.io/v2/wallet/{wallet}/positions \
--header 'x-api-key: <api-key>'import requests
url = "https://data.solanatracker.io/v2/wallet/{wallet}/positions"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://data.solanatracker.io/v2/wallet/{wallet}/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://data.solanatracker.io/v2/wallet/{wallet}/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 => [
"x-api-key: <api-key>"
],
]);
$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://data.solanatracker.io/v2/wallet/{wallet}/positions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://data.solanatracker.io/v2/wallet/{wallet}/positions")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.solanatracker.io/v2/wallet/{wallet}/positions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"wallet": "CN8w8cuh87gZYjhpaPxbD78GTrBmUKmVysqgsC9uYu9i",
"slot": 475880664,
"updatedAt": 1796067128569,
"positions": [
{
"id": "kamino-vault-LnBhqBJEA4T8JpTSZBrWTFCL4Qa6nWJ6H72ukHkE729",
"platform": "kamino",
"service": "vault",
"category": "liquidity",
"name": "Kamino Vault",
"address": "LnBhqBJEA4T8JpTSZBrWTFCL4Qa6nWJ6H72ukHkE729",
"usd": 26010.10554,
"apy": 8.77,
"yearlyUsd": 2280.462624,
"claimableUsd": 83.651952,
"healthPercent": null,
"inRange": null,
"assets": [
{
"mint": "2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo",
"role": "supplied",
"amount": 26005.642935,
"priceUsd": 1.0001716013994661,
"usd": 26010.10554,
"apy": null,
"yearlyUsd": null
}
],
"claimable": [
{
"mint": "2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo",
"amount": 83.6376,
"priceUsd": 1.0001716013994661,
"usd": 83.651952
}
],
"image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fplatform-images.solanatracker.io%2Fkamino.webp"
},
{
"id": "kamino-vault-ADietbkvGfEL5gYFzQN6wzazp4f221tEhZRPUGPck2Sy",
"platform": "kamino",
"service": "vault",
"category": "liquidity",
"name": "Kamino Vault",
"address": "ADietbkvGfEL5gYFzQN6wzazp4f221tEhZRPUGPck2Sy",
"usd": 21154.671999,
"apy": 8,
"yearlyUsd": 1693.263872,
"claimableUsd": 0,
"healthPercent": null,
"inRange": null,
"assets": [
{
"mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"role": "supplied",
"amount": 21154.671999,
"priceUsd": 1,
"usd": 21154.671999,
"apy": null,
"yearlyUsd": null
}
],
"claimable": [],
"image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fplatform-images.solanatracker.io%2Fkamino.webp"
}
],
"tokens": {
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v": {
"name": "USD Coin",
"symbol": "USDC",
"decimals": 6,
"image": "https://image.solanatracker.io/proxy?url=https://static.datapi.jup.ag/token-icons/6c4e5669d2a438653105399865445682e4a6cb51e19e1e61dc97578cd27bb9b2.webp",
"supply": 8121434516.222706,
"uri": null,
"description": null,
"creator": null,
"createdOn": null,
"twitter": "https://twitter.com/circle",
"telegram": null,
"website": "https://www.circle.com/en/usdc"
},
"2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo": {
"name": "PayPal USD",
"symbol": "PYUSD",
"decimals": 6,
"image": "https://image.solanatracker.io/proxy?url=https://static.datapi.jup.ag/token-icons/0817b3345e648b1663385bac48eb086877635ee27639c3d5da2a4d9dfd8603b1.webp",
"supply": 688682738.280124,
"uri": "https://token-metadata.paxos.com/pyusd_metadata/prod/solana/pyusd_metadata.json",
"description": "PayPal USD is designed to contribute to the opportunity stablecoins offer for payments and is 100% backed by U.S. dollar deposits, short-term U.S Treasuries and similar cash equivalents. PayPal USD is redeemable 1:1 for U.S. dollars and is issued by Paxos Trust Company.",
"creator": null,
"createdOn": null,
"twitter": null,
"telegram": null,
"website": null
}
},
"nextCursor": "eyJ2IjoyLCJhdCI6MTc5NjA2NzEyODU2OSwicyI6MjExNTQuNjcxOTk5LCJ0Ijoia2FtaW5vLXZhdWx0LUFEaWV0Ymt2R2ZFTDVnWUZ6UU42d3phenA0ZjIyMXRFaFpSUFVHUGNrMlN5IiwicSI6InB8ZHx8In0",
"hasNextPage": true
}{
"error": "Invalid sort. Valid options are: value, amount, change24h"
}{
"error": "<string>"
}{
"error": "Wallet data is temporarily unavailable, please retry"
}The wallet’s DeFi positions, largest first. Filter by
platform or category.
Each position has:
assets: the tokens in the position, with their role (supplied,borrowed,liquidityorstaked), amount, price and value. Borrowed tokens have a negativeusd, so the assets add up to the position’susd.apyandyearlyUsd: what the position earns in a year at today’s rates, after borrowing costs. Leveraged positions can have a large negativeapy.healthPercentfor loans: 100 means no debt, 0 means liquidation.inRangefor concentrated liquidity: whether the current price is inside the position’s range.claimable: rewards and fees that can be claimed now. Their value isclaimableUsd, which is not included inusd.
id stays the same for the life of the position. Token names, symbols and logos are in tokens.
Looking for trading profit and loss per token instead? Use Get Wallet Positions in PnL V2.
Paging. Pass nextCursor as cursor until hasNextPage is false, keeping the filters and sortDirection the same.
SDK Example
import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.getWalletPositionsV2('CN8w8cuh87gZYjhpaPxbD78GTrBmUKmVysqgsC9uYu9i', {
category: 'lending', // Or liquidity, staking, leverage, orders, rewards, other.
// platform: 'kamino', // An id from client.getPortfolioPlatformsV2().
limit: 50,
});
for (const position of data.positions) {
console.log(position.name, position.usd, position.apy, position.healthPercent, position.claimableUsd);
}
// client.iterateWalletPositionsV2() walks every page.
Path Parameters
Query Parameters
Only positions on this platform. Use an id from Get Portfolio Platforms.
Example:
"kamino"
Response
A page of the wallet's DeFi positions.
Was this page helpful?