> ## 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.

# Perpetual Protocols

> Monitor leveraged positions, unrealized PnL, entry prices, and liquidation levels across 9 Solana perpetual protocols.

# Perpetual Protocols

Nefarious tracks positions across **9 perpetual trading protocols** on Solana. Get full visibility into leveraged positions, margin accounts, PnL, and liquidation risk — all from a single API call.

## Position Types

| Type      | Description                                    |
| --------- | ---------------------------------------------- |
| `perp`    | Leveraged perpetual futures positions          |
| `deposit` | Spot deposits, margin collateral, or LP tokens |
| `borrow`  | Margin borrows                                 |

***

<AccordionGroup>
  <Accordion title="Drift" icon="chart-line">
    The largest perpetual DEX on Solana with spot margin trading and lending markets. Nefarious tracks perp positions, spot deposits, borrows, and full margin account data.

    **Position types:** `deposit`, `borrow`, `perp`

    **Enriched data:**

    * `leverage` — Current position leverage
    * `unrealizedPnl` — Unrealized profit and loss in USD
    * `entryPrice` — Average entry price
    * `markPrice` — Current mark price
    * `side` — Position direction (`long` or `short`)

    <CodeGroup>
      ```json Response Example theme={null}
      {
        "protocol": {
          "id": "drift",
          "name": "Drift",
          "url": "https://app.drift.trade",
          "category": "perps"
        },
        "totalValueUsd": 8540.25,
        "totalDepositedUsd": 5000.00,
        "totalBorrowedUsd": 0,
        "positions": [
          {
            "id": "drift-perp-sol",
            "type": "perp",
            "name": "SOL-PERP Long",
            "valueUsd": 3540.25,
            "tokens": [
              {
                "mint": "So11111111111111111111111111111111111111112",
                "symbol": "SOL",
                "name": "Solana",
                "amount": "23601666666",
                "amountUsd": 3540.25,
                "decimals": 9
              }
            ],
            "metadata": {
              "leverage": 3.0,
              "entryPrice": 142.50,
              "markPrice": 150.00,
              "unrealizedPnl": 540.25,
              "side": "long"
            }
          },
          {
            "id": "drift-deposit-usdc",
            "type": "deposit",
            "name": "USDC Collateral",
            "valueUsd": 5000.00,
            "tokens": [
              {
                "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                "symbol": "USDC",
                "name": "USD Coin",
                "amount": "5000000000",
                "amountUsd": 5000.00,
                "decimals": 6
              }
            ]
          }
        ]
      }
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Mango Markets" icon="chart-line">
    Full-featured DEX with spot, perps, and lending. Nefarious tracks margin accounts with health factor monitoring.

    **Position types:** `deposit`, `borrow`, `perp`

    **Enriched data:**

    * `apy` — Deposit or borrow yield
    * `leverage` — Current position leverage
    * `entryPrice` — Average entry price
    * `healthFactor` — Account health (liquidation risk)

    <CodeGroup>
      ```json Response Example theme={null}
      {
        "protocol": {
          "id": "mango",
          "name": "Mango Markets",
          "url": "https://app.mango.markets",
          "category": "perps"
        },
        "totalValueUsd": 12300.00,
        "totalDepositedUsd": 10000.00,
        "totalBorrowedUsd": 0,
        "positions": [
          {
            "id": "mango-perp-btc",
            "type": "perp",
            "name": "BTC-PERP Short",
            "valueUsd": 2300.00,
            "tokens": [
              {
                "mint": "3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh",
                "symbol": "BTC",
                "name": "Bitcoin",
                "amount": "2300000",
                "amountUsd": 2300.00,
                "decimals": 6
              }
            ],
            "metadata": {
              "leverage": 2.0,
              "entryPrice": 68500.00,
              "healthFactor": 4.2
            }
          }
        ]
      }
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Flash Trade" icon="chart-line">
    High-performance perpetual trading with integrated token staking. Track leveraged perps and FLP staking rewards.

    **Position types:** `perp`, `deposit`

    **Enriched data:**

    * `leverage` — Current leverage
    * `entryPrice` — Average entry price
    * `markPrice` — Current mark price
    * `side` — Position direction
    * `unrealizedPnl` — Unrealized PnL in USD

    <CodeGroup>
      ```json Response Example theme={null}
      {
        "protocol": {
          "id": "flash",
          "name": "Flash Trade",
          "url": "https://beast.flash.trade",
          "category": "perps"
        },
        "totalValueUsd": 4200.00,
        "totalDepositedUsd": 2000.00,
        "totalBorrowedUsd": 0,
        "positions": [
          {
            "id": "flash-perp-sol",
            "type": "perp",
            "name": "SOL Long",
            "valueUsd": 2200.00,
            "tokens": [
              {
                "mint": "So11111111111111111111111111111111111111112",
                "symbol": "SOL",
                "name": "Solana",
                "amount": "14666666666",
                "amountUsd": 2200.00,
                "decimals": 9
              }
            ],
            "metadata": {
              "leverage": 5.0,
              "entryPrice": 145.00,
              "markPrice": 150.00,
              "side": "long",
              "unrealizedPnl": 200.00
            }
          }
        ]
      }
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Parcl" icon="chart-line">
    Real estate perpetuals — trade tokenized real estate indices on-chain. Track all open positions with full PnL data, plus LP deposits supplying margin liquidity.

    **Position types:** `perp`, `deposit`

    **Enriched data:**

    * `leverage` — Current leverage
    * `entryPrice` — Average entry price
    * `markPrice` — Current mark price
    * `side` — Position direction
    * `unrealizedPnl` — Unrealized PnL in USD

    <CodeGroup>
      ```json Response Example theme={null}
      {
        "protocol": {
          "id": "parcl",
          "name": "Parcl",
          "url": "https://app.parcl.co",
          "category": "perps"
        },
        "totalValueUsd": 1850.00,
        "totalDepositedUsd": 0,
        "totalBorrowedUsd": 0,
        "positions": [
          {
            "id": "parcl-perp-miami",
            "type": "perp",
            "name": "Miami Real Estate Long",
            "valueUsd": 1850.00,
            "tokens": [
              {
                "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                "symbol": "USDC",
                "name": "USD Coin",
                "amount": "1850000000",
                "amountUsd": 1850.00,
                "decimals": 6
              }
            ],
            "metadata": {
              "leverage": 3.0,
              "entryPrice": 524.30,
              "markPrice": 542.10,
              "side": "long",
              "unrealizedPnl": 350.00
            }
          }
        ]
      }
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Jupiter JLP" icon="chart-line">
    Jupiter's perpetual exchange liquidity pool. Track JLP token holdings that earn fees from perpetual trading activity.

    **Position types:** `deposit`

    <CodeGroup>
      ```json Response Example theme={null}
      {
        "protocol": {
          "id": "jupiter",
          "name": "Jupiter JLP",
          "url": "https://jup.ag",
          "category": "perps"
        },
        "totalValueUsd": 22500.00,
        "totalDepositedUsd": 22500.00,
        "totalBorrowedUsd": 0,
        "positions": [
          {
            "id": "jlp-deposit",
            "type": "deposit",
            "name": "JLP Position",
            "valueUsd": 22500.00,
            "tokens": [
              {
                "mint": "27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4",
                "symbol": "JLP",
                "name": "Jupiter Perps LP",
                "amount": "7700000000",
                "amountUsd": 22500.00,
                "decimals": 6
              }
            ]
          }
        ]
      }
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Wasabi" icon="chart-line">
    Cross-chain perpetual trading protocol. Track leveraged long and short positions with collateral details.

    **Position types:** `perp`, `deposit`

    **Enriched data:**

    * `leverage` — Current leverage
    * `entryPrice` — Average entry price
    * `side` — Position direction

    <CodeGroup>
      ```json Response Example theme={null}
      {
        "protocol": {
          "id": "wasabi",
          "name": "Wasabi",
          "url": "https://wasabi.xyz",
          "category": "perps"
        },
        "totalValueUsd": 3100.00,
        "totalDepositedUsd": 1000.00,
        "totalBorrowedUsd": 0,
        "positions": [
          {
            "id": "wasabi-perp-sol",
            "type": "perp",
            "name": "SOL Long",
            "valueUsd": 2100.00,
            "tokens": [
              {
                "mint": "So11111111111111111111111111111111111111112",
                "symbol": "SOL",
                "name": "Solana",
                "amount": "14000000000",
                "amountUsd": 2100.00,
                "decimals": 9
              }
            ],
            "metadata": {
              "leverage": 3.0,
              "entryPrice": 148.00,
              "side": "long"
            }
          }
        ]
      }
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Lavarage" icon="chart-line">
    Leverage trading protocol on Solana. Track open leveraged positions with entry prices and PnL.

    **Position types:** `perp`, `deposit`

    **Enriched data:**

    * `leverage` — Current leverage
    * `entryPrice` — Average entry price
    * `side` — Position direction
    * `unrealizedPnl` — Unrealized PnL in USD

    <CodeGroup>
      ```json Response Example theme={null}
      {
        "protocol": {
          "id": "lavarage",
          "name": "Lavarage",
          "url": "https://app.lavarage.xyz",
          "category": "perps"
        },
        "totalValueUsd": 950.00,
        "totalDepositedUsd": 0,
        "totalBorrowedUsd": 0,
        "positions": [
          {
            "id": "lavarage-perp-sol",
            "type": "perp",
            "name": "SOL Long",
            "valueUsd": 950.00,
            "tokens": [
              {
                "mint": "So11111111111111111111111111111111111111112",
                "symbol": "SOL",
                "name": "Solana",
                "amount": "6333333333",
                "amountUsd": 950.00,
                "decimals": 9
              }
            ],
            "metadata": {
              "leverage": 2.5,
              "entryPrice": 143.00,
              "side": "long",
              "unrealizedPnl": 75.00
            }
          }
        ]
      }
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Mooncake" icon="chart-line">
    Structured yield and leverage protocol. Track LT and FT token positions used for leveraged yield strategies.

    **Position types:** `deposit`

    **Enriched data:**

    * `leverage` — Effective leverage of the position
    * `underlying` — Underlying asset identifier

    <CodeGroup>
      ```json Response Example theme={null}
      {
        "protocol": {
          "id": "mooncake",
          "name": "Mooncake",
          "url": "https://app.mooncake.fi",
          "category": "perps"
        },
        "totalValueUsd": 5600.00,
        "totalDepositedUsd": 5600.00,
        "totalBorrowedUsd": 0,
        "positions": [
          {
            "id": "mooncake-lt-jitosol",
            "type": "deposit",
            "name": "JitoSOL LT",
            "valueUsd": 5600.00,
            "tokens": [
              {
                "mint": "J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn",
                "symbol": "JitoSOL",
                "name": "Jito Staked SOL",
                "amount": "37333333333",
                "amountUsd": 5600.00,
                "decimals": 9
              }
            ],
            "metadata": {
              "leverage": 2.0,
              "underlying": "JitoSOL"
            }
          }
        ]
      }
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Haven (Solauto)" icon="chart-line">
    Automated leverage management protocol. Track leveraged supply and borrow positions with real-time health monitoring.

    **Position types:** `deposit`, `borrow`

    **Enriched data:**

    * `leverage` — Effective leverage
    * `healthFactor` — Account health factor
    * `ltv` — Loan-to-value ratio

    <CodeGroup>
      ```json Response Example theme={null}
      {
        "protocol": {
          "id": "haven",
          "name": "Haven",
          "url": "https://www.haven.fi",
          "category": "perps"
        },
        "totalValueUsd": 6800.00,
        "totalDepositedUsd": 10000.00,
        "totalBorrowedUsd": 3200.00,
        "positions": [
          {
            "id": "haven-deposit-sol",
            "type": "deposit",
            "name": "SOL Supply",
            "valueUsd": 10000.00,
            "tokens": [
              {
                "mint": "So11111111111111111111111111111111111111112",
                "symbol": "SOL",
                "name": "Solana",
                "amount": "66666666666",
                "amountUsd": 10000.00,
                "decimals": 9
              }
            ],
            "metadata": {
              "leverage": 3.1,
              "healthFactor": 1.85,
              "ltv": 0.32
            }
          },
          {
            "id": "haven-borrow-usdc",
            "type": "borrow",
            "name": "USDC Borrow",
            "valueUsd": 3200.00,
            "tokens": [
              {
                "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                "symbol": "USDC",
                "name": "USD Coin",
                "amount": "3200000000",
                "amountUsd": 3200.00,
                "decimals": 6
              }
            ]
          }
        ]
      }
      ```
    </CodeGroup>
  </Accordion>
</AccordionGroup>
