Skip to main content

DeFi Positions

The DeFi Positions API provides a unified view of your portfolio across 61+ Solana DeFi protocols. Query a single endpoint to retrieve all your deposits, borrows, liquidity positions, staking, and perpetual trades.

What You Get

With one API call, you can retrieve:
  • Total portfolio value across all protocols
  • Deposits and borrows from lending protocols with APY and health factors
  • Liquidity positions from DEXs with unclaimed fees and range data
  • Staked assets from liquid staking and governance protocols
  • Perpetual positions with leverage, PnL, and liquidation tracking
  • Wallet token holdings automatically detected

View All 61+ Supported Protocols

Browse every supported protocol by category — lending, perpetuals, DEXs, liquid staking, governance, and more.

Supported Chains

ChainStatus
SolanaAvailable

Position Types

TypeDescription
depositAssets supplied to lending protocols or held in wallets
borrowAssets borrowed from lending protocols
liquidityLP positions in DEX pools
stakeStaking positions (liquid staking, governance, native staking)
perpPerpetual futures positions

Quick Start

curl "https://api.nefariouslabs.dev/api/positions?wallet=YOUR_WALLET_ADDRESS"
const response = await fetch(
  'https://api.nefariouslabs.dev/api/positions?wallet=YOUR_WALLET_ADDRESS'
);
const data = await response.json();

console.log(`Total Value: $${data.totalValueUsd}`);
console.log(`Protocols: ${data.protocols.length}`);

Filter by Protocol

You can request positions from specific protocols only:
curl "https://api.nefariouslabs.dev/api/positions?wallet=YOUR_WALLET&protocols=marginfi,drift,jito"

API Reference

For complete endpoint documentation, see the Positions API Reference.