Skip to main content
GET
SDK
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, liquidity or staked), amount, price and value. Borrowed tokens have a negative usd, so the assets add up to the position’s usd.
  • apy and yearlyUsd: what the position earns in a year at today’s rates, after borrowing costs. Leveraged positions can have a large negative apy.
  • healthPercent for loans: 100 means no debt, 0 means liquidation.
  • inRange for concentrated liquidity: whether the current price is inside the position’s range.
  • claimable: rewards and fees that can be claimed now. Their value is claimableUsd, which is not included in usd.
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

Authorizations

x-api-key
string
header
required

API Key for authentication

Path Parameters

wallet
string
default:CN8w8cuh87gZYjhpaPxbD78GTrBmUKmVysqgsC9uYu9i
required

Wallet address.

Query Parameters

limit
integer
default:100

Rows per page, up to 500. Larger values return 500 rows.

Required range: 1 <= x <= 500
cursor
string

nextCursor from the previous page. Keep the other parameters the same, or the request returns a 400.

platform
string

Only positions on this platform. Use an id from Get Portfolio Platforms.

Example:

"kamino"

category
enum<string>

Only positions in this category.

Available options:
liquidity,
lending,
staking,
leverage,
orders,
rewards,
other
sortDirection
enum<string>
default:DESC

DESC for largest first (default) or ASC for smallest first. Rows without a value always come last.

Available options:
DESC,
ASC

Response

A page of the wallet's DeFi positions.

wallet
string
required
slot
integer
required

Solana slot the data was fetched at.

updatedAt
integer
required

When the data was fetched, in Unix milliseconds.

positions
object[]
required
tokens
object
required

Details of each token on the page: name, symbol, decimals and logo.

nextCursor
string | null
required

Pass as cursor to get the next page. Null on the last page.

hasNextPage
boolean
required