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

# MarketPosition Schema

> One open position in a market-wide listing (/positions/symbol and bulk /positions). Includes route metadata, schemas, examples, and implementation notes.

Source OpenAPI: 0xArchive API 1.7.0; 218 paths; 210 component schemas.

One open position in a market-wide listing (`/positions/&#123;symbol&#125;` and bulk `/positions`). A lean record: use the wallet or account routes for the full `Position`.

## Required Fields

| Field | Type | Description |
| - | - | - |
| `coin` | string | Alias of `symbol`. |
| `entry_price` | string | Average entry price. |
| `leverage_type` | string | `cross`, `isolated`, or `unknown` (Lighter: the margin mode). |
| `liquidation_price` | string | Reported liquidation price. |
| `mark_price` | string | Mark price. |
| `position_value` | string | Absolute position value in USD. |
| `quality` | string | Quality of this row. |
| `side` | string | Defined by the generated JSON Schema block. |
| `size` | string | Signed position size in base units. |
| `symbol` | string | Market symbol (HIP-3: `dex:COIN`). |
| `unrealized_pnl` | string | Unrealized PnL in USD. |

## JSON Schema

```json theme={"theme":"github-dark"}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "MarketPosition",
  "description": "One open position in a market-wide listing (`/positions/{symbol}` and bulk `/positions`). A lean record: use the wallet or account routes for the full `Position`.",
  "type": "object",
  "required": [
    "coin",
    "entry_price",
    "leverage_type",
    "liquidation_price",
    "mark_price",
    "position_value",
    "quality",
    "side",
    "size",
    "symbol",
    "unrealized_pnl"
  ],
  "properties": {
    "account_index": {
      "description": "Lighter only: account index as a string.",
      "type": "string",
      "example": "513030"
    },
    "account_kind": {
      "description": "Lighter only: `user`, `insurance`, `settlement`, or `system`.",
      "type": "string",
      "example": "user"
    },
    "coin": {
      "description": "Alias of `symbol`.",
      "type": "string",
      "example": "BTC"
    },
    "dex": {
      "description": "HIP-3 only: dex of the market.",
      "type": "string",
      "example": "xyz"
    },
    "entry_price": {
      "description": "Average entry price.",
      "type": "string",
      "nullable": true,
      "example": "64210.5"
    },
    "leverage_type": {
      "description": "`cross`, `isolated`, or `unknown` (Lighter: the margin mode).",
      "type": "string",
      "example": "cross"
    },
    "liquidation_price": {
      "description": "Reported liquidation price. Hyperliquid only; null on Lighter.",
      "type": "string",
      "nullable": true,
      "example": "51000"
    },
    "mark_price": {
      "description": "Mark price.",
      "type": "string",
      "nullable": true,
      "example": "65020.1"
    },
    "position_value": {
      "description": "Absolute position value in USD. Listings sort by this value, largest first.",
      "type": "string",
      "nullable": true,
      "example": "812751.25"
    },
    "quality": {
      "description": "Quality of this row. `complete`, `partial` (a mark or entry is missing, so value and PnL fields are null), or `degraded`. Lighter rows can also read `preliminary` (built from real-time trades not yet reconciled), `unreconciled` (a market with no reconciled trades), or `incomplete`. No row reads `complete` when its own data is not complete, or when its snapshot has a problem that could not be pinned to specific rows. A small number of Hyperliquid positions around three short windows in June and July 2025, where Hyperliquid's published fill data has gaps, read `partial`.",
      "type": "string",
      "example": "complete"
    },
    "side": {
      "type": "string",
      "enum": [
        "long",
        "short"
      ],
      "example": "long"
    },
    "size": {
      "description": "Signed position size in base units.",
      "type": "string",
      "example": "12.5"
    },
    "snapshot_ts": {
      "description": "Hour the row describes. Present on bulk `/positions` rows.",
      "type": "string",
      "format": "date-time"
    },
    "symbol": {
      "description": "Market symbol (HIP-3: `dex:COIN`).",
      "type": "string",
      "example": "BTC"
    },
    "unrealized_pnl": {
      "description": "Unrealized PnL in USD.",
      "type": "string",
      "nullable": true,
      "example": "10120.2"
    },
    "user_address": {
      "description": "Hyperliquid and HIP-3 only: wallet address holding the position (lowercase).",
      "type": "string",
      "example": "0x31ca8395cf837de08b24da3f660e77761dfb974b"
    }
  }
}
```

## Referenced By

Use this shared schema with the generated component index and route-specific endpoint pages during implementation.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.