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

# ApiResponsePositionArray Schema

> Hourly position rows. Includes required fields, field types, schema references, and generated JSON details from the 0xArchive OpenAPI contract.

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

Hourly position rows.

## Required Fields

| Field | Type | Description |
| - | - | - |
| `data` | array\<object> | Defined by the generated JSON Schema block. |
| `meta` | object | Response metadata of the account positions routes. |
| `success` | boolean | Defined by the generated JSON Schema block. |

## JSON Schema

```json theme={"theme":"github-dark"}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "ApiResponsePositionArray",
  "description": "Hourly position rows.",
  "type": "object",
  "required": [
    "data",
    "meta",
    "success"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "description": "One open position. Numbers are decimal strings (sizes to the market size precision, prices to the market price precision, USD values to 6 decimals); a flat position serializes as `\"0\"`. Hyperliquid rows carry `dex` on HIP-3; Lighter rows carry `account_index`, `account_kind`, and the Lighter fields at the end. Fields a source does not report are null, never estimated.",
        "type": "object",
        "required": [
          "coin",
          "cum_funding",
          "entry_price",
          "leverage",
          "liquidation_price",
          "liquidation_price_status",
          "margin_used",
          "mark_price",
          "mark_time",
          "max_leverage",
          "opened_at",
          "position_value",
          "quality",
          "return_on_equity",
          "side",
          "size",
          "snapshot_as_of",
          "symbol",
          "unrealized_pnl"
        ],
        "properties": {
          "account_index": {
            "description": "Lighter only: account index, serialized as a string because it can exceed JavaScript integers.",
            "type": "string",
            "example": "281474976710654"
          },
          "account_kind": {
            "description": "Lighter only: `user`, `insurance`, `settlement`, or `system`. Non-user accounts appear in market routes only with `include_system=true`.",
            "type": "string",
            "example": "user"
          },
          "allocated_margin": {
            "description": "Lighter only: isolated margin allocated to the position.",
            "type": "string",
            "nullable": true,
            "example": "1200.5"
          },
          "coin": {
            "description": "Alias of `symbol`.",
            "type": "string",
            "example": "BTC"
          },
          "cum_funding": {
            "description": "Cumulative funding in USD (decimal strings). Null when not reported, including every Lighter row and as-of reconstructions.",
            "type": "object",
            "required": [
              "all_time",
              "since_change",
              "since_open"
            ],
            "properties": {
              "all_time": {
                "description": "Funding paid or received over the account lifetime for this coin.",
                "type": "string",
                "nullable": true,
                "example": "-12.345678"
              },
              "since_change": {
                "description": "Funding since the last change in position size.",
                "type": "string",
                "nullable": true,
                "example": "-0.5"
              },
              "since_open": {
                "description": "Funding since the current position opened.",
                "type": "string",
                "nullable": true,
                "example": "-1.25"
              }
            }
          },
          "dex": {
            "description": "HIP-3 only: the dex the position belongs to.",
            "type": "string",
            "example": "xyz"
          },
          "entry_price": {
            "description": "Average entry price.",
            "type": "string",
            "nullable": true,
            "example": "64210.5"
          },
          "finalized": {
            "description": "Lighter only: true when every trade behind the row is final (reconciled).",
            "type": "boolean",
            "example": true
          },
          "initial_margin_fraction": {
            "description": "Lighter only: initial margin fraction at the last trade, as a decimal ratio.",
            "type": "string",
            "nullable": true,
            "example": "0.05"
          },
          "leverage": {
            "description": "Leverage of a position.",
            "type": "object",
            "required": [
              "type",
              "value"
            ],
            "properties": {
              "type": {
                "description": "Margin type: `cross`, `isolated`, or `unknown`. On Lighter this is the margin mode of the position.",
                "type": "string",
                "example": "cross"
              },
              "value": {
                "description": "Leverage multiple as a decimal string. Null when unknown (Lighter rows and as-of reconstructions).",
                "type": "string",
                "nullable": true,
                "example": "20"
              }
            }
          },
          "liquidation_price": {
            "description": "Liquidation price as reported for the position. Hyperliquid snapshot rows only.",
            "type": "string",
            "nullable": true,
            "example": "81250"
          },
          "liquidation_price_status": {
            "description": "How `liquidation_price` should be read: `exact`, `not_published_cross`, `changed_since_snapshot`, or `unavailable` (always `unavailable` on Lighter and on as-of reconstructions).",
            "type": "string",
            "example": "exact"
          },
          "margin_mode": {
            "description": "Lighter only: `cross`, `isolated`, or `unknown`.",
            "type": "string",
            "example": "cross"
          },
          "margin_used": {
            "description": "Margin allocated to the position in USD. Hyperliquid snapshot rows only.",
            "type": "string",
            "nullable": true,
            "example": "1625.5"
          },
          "mark_price": {
            "description": "Mark price used for value and PnL. Null when no mark is available.",
            "type": "string",
            "nullable": true,
            "example": "65020.1"
          },
          "mark_source": {
            "description": "Lighter only: where the mark came from: `mark`, `last_trade`, `stale_mark`, or `none`.",
            "type": "string",
            "example": "mark"
          },
          "mark_time": {
            "description": "Time of the mark price.",
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "max_leverage": {
            "description": "Maximum leverage allowed for the market. Hyperliquid snapshot rows only.",
            "type": "integer",
            "nullable": true,
            "example": 40
          },
          "opened_at": {
            "description": "Start of the current position lifecycle. Null when it opened before coverage.",
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "position_value": {
            "description": "Absolute position value in USD at the mark price.",
            "type": "string",
            "nullable": true,
            "example": "32510.05"
          },
          "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"
          },
          "return_on_equity": {
            "description": "Return on equity as a decimal ratio. Hyperliquid snapshot rows only.",
            "type": "string",
            "nullable": true,
            "example": "-0.1245"
          },
          "side": {
            "description": "Position side.",
            "type": "string",
            "enum": [
              "long",
              "short"
            ],
            "example": "short"
          },
          "size": {
            "description": "Signed position size in base units (negative is short).",
            "type": "string",
            "example": "-0.5"
          },
          "snapshot_as_of": {
            "description": "Time the leverage, margin, and funding fields describe, which can differ from the hour. Hyperliquid snapshot rows only.",
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "snapshot_ts": {
            "description": "Hour the row describes. Present on hourly history rows only.",
            "type": "string",
            "format": "date-time"
          },
          "symbol": {
            "description": "Market symbol (HIP-3: `dex:COIN`).",
            "type": "string",
            "example": "BTC"
          },
          "unrealized_pnl": {
            "description": "Unrealized PnL in USD at the mark price.",
            "type": "string",
            "nullable": true,
            "example": "-404.8"
          }
        }
      }
    },
    "meta": {
      "description": "Response metadata of the account positions routes. Every instant is RFC 3339 UTC with milliseconds and comes from the data, never the request time.",
      "type": "object",
      "required": [
        "count",
        "request_id"
      ],
      "properties": {
        "as_of": {
          "description": "Instant the returned state describes: the snapshot tick or hour, or the requested as-of time.",
          "type": "string",
          "format": "date-time"
        },
        "built_through": {
          "description": "Every event before this instant is built into the change log and as-of state. Reads are clamped to it.",
          "type": "string",
          "format": "date-time"
        },
        "clamped_to": {
          "description": "Boundary the read was clamped to (`built_through`). Present only when clamped.",
          "type": "string",
          "format": "date-time"
        },
        "count": {
          "description": "Number of records returned.",
          "type": "integer"
        },
        "coverage_from": {
          "description": "Coverage start, present with `notice` when the request falls before coverage or the address has no recorded activity.",
          "type": "string",
          "format": "date-time"
        },
        "finalized_through": {
          "description": "Every event before this instant is final and will not be re-derived (Lighter: the trade finalization watermark). Never later than `built_through`.",
          "type": "string",
          "format": "date-time"
        },
        "next_cursor": {
          "description": "Signed cursor for the next page, bound to the request. Pass it back with the same parameters. A market cursor pins its snapshot; if that snapshot is replaced or expires the next page answers 409 `snapshot_advanced`.",
          "type": "string",
          "nullable": true
        },
        "notice": {
          "description": "Human-readable advisory: before coverage, no recorded activity, or a stale snapshot.",
          "type": "string"
        },
        "quality": {
          "description": "Completeness of the snapshot the response was read from: `complete`, `partial`, or `degraded`. Rows carry their own `quality`. On Lighter and Robinhood Chain, snapshots from the latest day, before the venue's daily trade reconcile, can read `degraded` while their rows read `preliminary`; they read `complete` once the reconcile has run.",
          "type": "string"
        },
        "request_id": {
          "description": "Unique request ID for support.",
          "type": "string",
          "format": "uuid"
        },
        "requested_end": {
          "description": "The `end` or `timestamp` the caller asked for, echoed when the read was clamped.",
          "type": "string",
          "format": "date-time"
        },
        "snapshot_ts": {
          "description": "Committed snapshot the response was read from. Market routes echo the resolved `hour` here.",
          "type": "string",
          "format": "date-time"
        },
        "source": {
          "description": "How the rows were produced: `snapshot` (live or hourly snapshot), `reconstructed` (as-of state between snapshots), or `changes` (change log).",
          "type": "string",
          "enum": [
            "snapshot",
            "reconstructed",
            "changes"
          ]
        },
        "stale": {
          "description": "True on current reads when the latest snapshot is older than 12 minutes; paired with `notice`.",
          "type": "boolean"
        },
        "totals": {
          "description": "Market listings, first page only: aggregates over the whole filtered result set, not just this page.",
          "allOf": [
            {
              "description": "Long and short aggregates of every open position in one market at one snapshot. Averages cover only positions with a known entry (`*_positions_with_entry`). Shares are decimal ratios of the side or total value held by the ten largest positions.",
              "type": "object",
              "required": [
                "coin",
                "long_avg_entry_price",
                "long_count",
                "long_positions_with_entry",
                "long_size",
                "long_top10_value_share",
                "long_value",
                "quality",
                "short_avg_entry_price",
                "short_count",
                "short_positions_with_entry",
                "short_size",
                "short_top10_value_share",
                "short_value",
                "snapshot_ts",
                "symbol",
                "top10_value_share"
              ],
              "properties": {
                "coin": {
                  "description": "Alias of `symbol`.",
                  "type": "string",
                  "example": "BTC"
                },
                "dex": {
                  "description": "HIP-3 only.",
                  "type": "string",
                  "example": "xyz"
                },
                "long_avg_entry_price": {
                  "description": "Size-weighted average entry of long positions with a known entry.",
                  "type": "string",
                  "nullable": true,
                  "example": "63120.4"
                },
                "long_count": {
                  "type": "integer",
                  "format": "int64",
                  "example": 18234
                },
                "long_positions_with_entry": {
                  "type": "integer",
                  "format": "int64",
                  "example": 18230
                },
                "long_size": {
                  "description": "Total long size in base units.",
                  "type": "string",
                  "example": "8123.45"
                },
                "long_top10_value_share": {
                  "description": "Share of long value held by the ten largest long positions.",
                  "type": "string",
                  "nullable": true,
                  "example": "0.412345"
                },
                "long_value": {
                  "description": "Total long value in USD. Null when any long position has no mark.",
                  "type": "string",
                  "nullable": true,
                  "example": "528000000.5"
                },
                "quality": {
                  "description": "`complete`, `partial`, or `degraded`, from this market's own rows.",
                  "type": "string",
                  "example": "complete"
                },
                "short_avg_entry_price": {
                  "description": "Size-weighted average entry of short positions with a known entry.",
                  "type": "string",
                  "nullable": true,
                  "example": "66210.9"
                },
                "short_count": {
                  "type": "integer",
                  "format": "int64",
                  "example": 15102
                },
                "short_positions_with_entry": {
                  "type": "integer",
                  "format": "int64",
                  "example": 15100
                },
                "short_size": {
                  "description": "Total short size in base units.",
                  "type": "string",
                  "example": "8120.1"
                },
                "short_top10_value_share": {
                  "description": "Share of short value held by the ten largest short positions.",
                  "type": "string",
                  "nullable": true,
                  "example": "0.385"
                },
                "short_value": {
                  "description": "Total short value in USD. Null when any short position has no mark.",
                  "type": "string",
                  "nullable": true,
                  "example": "527800000.25"
                },
                "snapshot_ts": {
                  "description": "Snapshot the aggregates describe.",
                  "type": "string",
                  "format": "date-time",
                  "nullable": true
                },
                "symbol": {
                  "type": "string",
                  "example": "BTC"
                },
                "top10_value_share": {
                  "description": "Share of total value held by the ten largest positions.",
                  "type": "string",
                  "nullable": true,
                  "example": "0.301"
                }
              }
            }
          ]
        }
      }
    },
    "success": {
      "type": "boolean",
      "example": true
    }
  }
}
```

## Referenced By

* [GET /v1/hyperliquid/hip3/wallets/{address}/positions/history](/schemas/operations/get-hip3-wallet-positions-history)
* [GET /v1/hyperliquid/wallets/{address}/positions/history](/schemas/operations/get-hyperliquid-wallet-positions-history)
* [GET /v1/lighter/accounts/{account_index}/positions/history](/schemas/operations/get-lighter-account-positions-history)
* [GET /v1/rh-lighter/accounts/{account_index}/positions/history](/schemas/operations/get-rh-lighter-account-positions-history)


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