DeFi Positions
The DeFi Positions API provides a unified view of your portfolio across 115+ DeFi protocols spanning Solana and major EVM chains. 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 and chains
- 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
- Yield vault positions from auto-compounding strategies
- Wallet token holdings automatically detected on every chain
Coverage
115+
Supported protocols
Solana + EVM
Cross-chain by default
Real-time
On-chain data
Supported Chains
| Field | Type | Description |
|---|---|---|
| Solana | Available | |
| Ethereum | Available | |
| Arbitrum | Available | |
| Optimism | Available | |
| Base | Available | |
| Polygon | Available | |
| BSC, Avalanche, Gnosis, Fantom, Sonic, Linea, Mantle, Scroll, Berachain, Hyperliquid, and more | Available |
Position Types
| Field | Type | Description |
|---|---|---|
| deposit | Assets supplied to lending protocols or held in wallets | |
| borrow | Assets borrowed from lending protocols | |
| liquidity | LP positions in DEX pools | |
| stake | Staking positions (liquid staking, governance, native staking) | |
| perp | Perpetual futures positions |
Quick Start
bash
curl "https://api.nefariouslabs.dev/api/positions?wallet=YOUR_WALLET_ADDRESS"
ts
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}`);
The endpoint accepts both Solana base58 pubkeys and EVM 0x… addresses. Cross-chain aggregation is automatic when an EVM address is provided.
Filter by Protocol
You can request positions from specific protocols only:
bash
curl "https://api.nefariouslabs.dev/api/positions?wallet=YOUR_WALLET&protocols=marginfi,drift,aave-v3"
API Reference
For complete endpoint documentation, see the Positions API Reference.
Ready to start building?
Get your API key in seconds. Free tier included.
Get Started — freeNo credit card required