> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nefariouslabs.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# DeFi Positions

> Track your DeFi positions across 61+ Solana protocols with a single API call

# 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

<Card title="View All 61+ Supported Protocols" icon="cubes" href="/protocols/overview">
  Browse every supported protocol by category — lending, perpetuals, DEXs, liquid staking, governance, and more.
</Card>

## Supported Chains

| Chain  | Status    |
| ------ | --------- |
| Solana | Available |

## Position Types

| 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 theme={null}
curl "https://api.nefariouslabs.dev/api/positions?wallet=YOUR_WALLET_ADDRESS"
```

```typescript theme={null}
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:

```bash theme={null}
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](/api-reference/endpoints/positions).
