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

# positions api

> position tracking and token info

# positions api

## get positions

```
GET /user/positions
```

returns all token positions across all wallets.

```json theme={null}
{
  "positions": [
    {
      "wallet_address": "ABC...",
      "wallet_type": "dev",
      "token_mint": "XYZ...pump",
      "token_name": "...",
      "token_symbol": "...",
      "balance": 1000000,
      "current_value_sol": 0.5,
      "cost_basis_sol": 0.3,
      "unrealized_pl_sol": 0.2,
      "price_usd": 0.00008,
      "market_cap_usd": 8000
    }
  ]
}
```

| field               | what                    |
| ------------------- | ----------------------- |
| `wallet_address`    | wallet holding tokens   |
| `wallet_type`       | dev, bundle, snipe, etc |
| `token_mint`        | mint address            |
| `balance`           | raw token balance       |
| `current_value_sol` | current sol value       |
| `cost_basis_sol`    | total sol spent         |
| `unrealized_pl_sol` | unrealized p\&l         |
| `price_usd`         | current price in usd    |
| `market_cap_usd`    | market cap in usd       |

## trade history

```
GET /user/trade-history
```

returns all trades with timestamps, amounts, and signatures.

## token info

```
GET /token/:mint
```

returns token metadata, price, market cap, and holder info.

## ohlcv candles

```
GET /token/:mint/ohlcv/:timeframe
```

returns ohlcv candle data for charting.

| timeframe | what              |
| --------- | ----------------- |
| `1m`      | 1 minute candles  |
| `5m`      | 5 minute candles  |
| `15m`     | 15 minute candles |
| `1h`      | 1 hour candles    |
| `4h`      | 4 hour candles    |
| `1d`      | 1 day candles     |

## search tokens

```
GET /search?q=<query>
```

search tokens by name, symbol, or mint address.
