> For the complete documentation index, see [llms.txt](https://docs.wildmeta.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wildmeta.ai/trading-terminal/x402-support-and-extension/data-provider/real-time-long-short-ratio.md).

# Real-Time Long Short Ratio

## `GET /coin/position_value/{symbol}`

**Description:** Retrieve long/short position value analytics for a specific token, including user distribution, PnL metrics, and sortable long/short user lists.

***

### **Request**

**HTTP Method:** `GET`\
**Endpoint:**

```
/coin/position_value/{symbol}
```

#### **Path Parameter**

| Name     | Type   | Description           |
| -------- | ------ | --------------------- |
| `symbol` | string | Token symbol to query |

#### **Query Parameters (optional)**

| Name          | Type   | Description                                   |
| ------------- | ------ | --------------------------------------------- |
| `sortBy`      | string | Sorting field (`value`), optional             |
| `sortOrder`   | string | Sorting direction (`asc` or `desc`), optional |
| `userAddress` | string | Filter by user address, optional              |
| `offset`      | number | Pagination offset, optional                   |
| `limit`       | number | Pagination limit, optional                    |

***

### **Response**

**Content Type:** `application/json`

| Field       | Type                  | Description                      |
| ----------- | --------------------- | -------------------------------- |
| `long`      | `PositionSideStats`   | Long-side aggregated statistics  |
| `short`     | `PositionSideStats`   | Short-side aggregated statistics |
| `longList`  | `PositionValueItem[]` | User list for long positions     |
| `shortList` | `PositionValueItem[]` | User list for short positions    |
| `total`     | number                | Total record count               |

#### **Type: `PositionSideStats`**

| Field          | Type   | Description            |
| -------------- | ------ | ---------------------- |
| `totalUsers`   | number | Total number of users  |
| `averagePrice` | number | Average position price |

#### **Type: `PositionValueItem`**

| Field           | Type   | Description          |
| --------------- | ------ | -------------------- |
| `address`       | string | User wallet address  |
| `nickname`      | string | User nickname        |
| `pnl`           | number | Profit or loss value |
| `pnlPercentage` | number | PnL percentage       |
| `positionValue` | number | Total position value |

***

### **Functionality**

This endpoint analyzes the position distribution of a specific token, separating long and short traders, evaluating aggregated statistics, and ranking users by position value or other metrics. It is designed to help understand market sentiment around a token and identify influential long/short holders.

***

### **Example Request**

```
GET https://openapi.wildmeta.ai/dataprovider/v1/coin/position_value/BTC?sortBy=value&sortOrder=desc&offset=0&limit=20
```

***

### **Example Response**

```json
{
  "long": {
    "totalUsers": 1523,
    "averagePrice": 62450.12
  },
  "short": {
    "totalUsers": 847,
    "averagePrice": 61890.44
  },
  "longList": [
    {
      "address": "0x1111...abcd",
      "nickname": "BullKing",
      "pnl": 1543.2,
      "pnlPercentage": 3.2,
      "positionValue": 48000.5
    }
  ],
  "shortList": [
    {
      "address": "0x9999...beef",
      "nickname": "ShortMaster",
      "pnl": -820.4,
      "pnlPercentage": -1.7,
      "positionValue": 37500.8
    }
  ],
  "total": 2370
}
```
