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

# ✨ January 15, 2026 - Solana DeFi SDK Optimization & Drift Perps

> Reduced RPC costs by removing heavy SDK dependencies and added Drift perpetuals support to DeFi positions

**TL;DR**: Removed all heavy Solana DeFi SDKs (Drift, Solend, MarginFi, Meteora, Raydium) and replaced them with raw batched RPC calls, drastically reducing RPC costs. Added Kamino lending and Drift perpetuals support.

***

## SDK Removal & RPC Optimization

The **Wallet DeFi Positions** endpoint (`/api/2/wallet/defi-positions`) has been completely refactored to eliminate heavy SDK dependencies:

### Removed SDKs

| SDK                            | Before                       | After                              |
| ------------------------------ | ---------------------------- | ---------------------------------- |
| `@drift-labs/sdk`              | Heavy bundle, many RPC calls | Raw RPC with batched account reads |
| `@solendprotocol/solend-sdk`   | Sequential RPC calls         | Batched `getMultipleAccounts`      |
| `@marginfi/marginfi-client-v2` | Complex initialization       | Direct account deserialization     |
| `@meteora-ag/dlmm`             | Multiple RPC roundtrips      | Single batched request             |
| `@raydium-io/raydium-sdk-v2`   | Heavy dependencies           | Pure CLMM math implementation      |

### Performance Benefits

* **\~70% reduction** in RPC calls per wallet query
* **Faster response times** due to batched account fetching
* **Lower memory footprint** without heavy SDK bundles
* **No SDK initialization overhead** per request

***

## New Protocol Support

### Kamino Lending

The endpoint now supports **Kamino** lending positions:

```json theme={null}
{
  "protocol": {
    "id": "kamino",
    "name": "Kamino",
    "category": "lending"
  },
  "positions": [
    {
      "type": "deposit",
      "name": "USDC Supply",
      "valueUSD": 5000.00,
      "tokens": [...],
      "metadata": {
        "apy": "8.5",
        "collateralEnabled": true
      }
    }
  ]
}
```

### Drift Perpetuals

Full support for **Drift** perpetual positions is now available:

```json theme={null}
{
  "protocol": {
    "id": "drift",
    "name": "Drift",
    "category": "perps"
  },
  "positions": [
    {
      "id": "drift-perp-0-subaccount-0",
      "type": "leverage",
      "name": "drift-sol-usd LONG",
      "valueUSD": 1250.50,
      "metadata": {
        "marketId": "drift-sol-usd",
        "exchange": "drift",
        "side": "BUY",
        "entryPriceQuote": 180.5,
        "currentPriceQuote": 185.2,
        "currentLeverage": 5.2,
        "liquidationPriceQuote": 145.8,
        "amountUSD": 6500.0,
        "unrealizedPnlUSD": 250.50,
        "unrealizedPnlPercent": 20.04
      }
    }
  ]
}
```

***

## Updated Supported Protocols

### Solana

| Category           | Protocols                           |
| ------------------ | ----------------------------------- |
| **Lending**        | Kamino *(new)*, MarginFi, Solend    |
| **DEX (LP)**       | Orca, Raydium, Meteora              |
| **Liquid Staking** | Jito, Marinade, BlazeStake, Sanctum |
| **Perps**          | Drift *(new)*                       |

***

## Perps Metadata Fields

New metadata fields for perpetual positions:

| Field                   | Type     | Description                                                 |
| ----------------------- | -------- | ----------------------------------------------------------- |
| `marketId`              | `string` | Market identifier (e.g., "drift-sol-usd")                   |
| `exchange`              | `string` | Exchange: `drift`, `gains`, `hyperliquid`, `gte`, `lighter` |
| `side`                  | `string` | `BUY` (Long) or `SELL` (Short)                              |
| `entryPriceQuote`       | `number` | Entry price                                                 |
| `currentPriceQuote`     | `number` | Current mark/oracle price                                   |
| `currentLeverage`       | `number` | Current effective leverage                                  |
| `liquidationPriceQuote` | `number` | Estimated liquidation price                                 |
| `unrealizedPnlUSD`      | `number` | Unrealized P\&L in USD                                      |
| `unrealizedPnlPercent`  | `number` | Unrealized P\&L as percentage                               |
| `collateralAsset`       | `string` | Collateral token address                                    |

***

## Affected Endpoints

* [Wallet DeFi Positions](/rest-api-reference/endpoint/wallet-defi-positions)

<Note>
  All existing integrations remain backwards compatible. The response format is unchanged - only the underlying implementation was optimized.
</Note>

***

*🦀 Shipped by Krabs*

***

## New Protocol: Fluid

We've added full support for **Fluid**, a next-generation DeFi protocol on Ethereum.

### What's Included

| Feature          | Description                                  |
| ---------------- | -------------------------------------------- |
| **Charts**       | Full OHLCV price history for all Fluid pools |
| **Trades**       | Real-time and historical trade data          |
| **Market Data**  | Volume, liquidity, TVL tracking              |
| **Token Prices** | Live price feeds from Fluid pools            |

### Supported Data

* **Real-time trades**: All swaps indexed and available via API & WebSocket
* **Historical charts**: Complete price history with multiple timeframes
* **Pool analytics**: TVL, volume, fees, and liquidity metrics
* **Token discovery**: New tokens on Fluid automatically indexed

### Affected Endpoints

* [Market Data](/rest-api-reference/endpoint/market-data)
* [Market Trades](/rest-api-reference/endpoint/market-trades)
* [Market History](/rest-api-reference/endpoint/market-history)
* [WebSocket Live Trades](/websocket-streams)
