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

# TradeIntentBucket Schema

> One bucket of trade intent for one market. Includes generated fields, route metadata, response shapes, and implementation-safe 0xArchive contract details.

Source OpenAPI: 0xArchive API 1.13.0; 242 paths; 243 component schemas.

One bucket of trade intent for one market. Both sides of every trade are counted, so the eight intent buckets plus `mm_usd` sum to twice the bucket's traded notional, less delisting settlements, which are in no bucket. Winners and losers are aggregates over the market's trailing 72 hours: no wallet is named.

## Required Fields

| Field | Type | Description |
| - | - | - |
| `close` | number:double | The price the bucket's end is marked at. |
| `flip_ls` | number:double | USD sold that took a position from long to short in one fill. |
| `flip_sl` | number:double | USD bought that took a position from short to long in one fill. |
| `is_final` | boolean | The bucket is complete and will not change. |
| `losers_count` | integer | Losers counted at full weight. |
| `losers_flow` | number:double | The same for the market's losers. |
| `losers_gross` | number:double | The losers' gross position in USD at the bucket's end. |
| `losers_net` | number:double | The losers' net position in USD at the bucket's end. |
| `method` | string | Version of the method the bucket was computed with: `who/3`, or `who/2` on older rows. |
| `mm_usd` | number:double | USD traded by wallets classified as market makers, counted here instead of in an intent bucket. |
| `open_long` | number:double | USD bought to open or increase a long. |
| `open_short` | number:double | USD sold to open or increase a short. |
| `preliminary` | boolean | The bucket holds figures computed live after the archive's end. |
| `preliminary_from` | string:date-time | Where the bucket's preliminary figures begin: inside the bucket, or at its open when the whole bucket is preliminary. |
| `preliminary_from_ms` | integer:int64 | `preliminary_from` as Unix milliseconds. |
| `price_source` | string | Where `close` comes from: `mark`, `oracle` (a HIP-3 market without a stored mark), `carried` (the last of those when none is recent) or `trade`. |
| `quality` | string | `ok`; `partial` while the method's 7-day lookbacks were not yet full; `quarantined` when an input of the bucket failed a continuity check, so the winners' and losers' figures are null. |
| `stop_long` | number:double | USD sold to reduce or close a long at a loss or break-even, or by liquidation or auto-deleveraging. |
| `stop_short` | number:double | USD bought to reduce or close a short at a loss or break-even, or by liquidation or auto-deleveraging. |
| `timestamp` | string:date-time | Bucket open time, RFC 3339 UTC. |
| `timestamp_ms` | integer:int64 | `timestamp` as Unix milliseconds. |
| `tp_long` | number:double | USD sold to reduce or close a long at a profit (closed PnL above zero, not forced). |
| `tp_short` | number:double | USD bought to reduce or close a short at a profit (closed PnL above zero, not forced). |
| `winners_count` | integer | Winners counted at full weight. |
| `winners_flow` | number:double | What the market's winners bought less what they sold in the bucket, in USD, weighted as the cohort stood at the previous hour's close. |
| `winners_gross` | number:double | The winners' gross position in USD at the bucket's end. |
| `winners_net` | number:double | The winners' net position in USD (long positive) at the bucket's end. |

## JSON Schema

```json theme={"theme":"github-dark"}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "TradeIntentBucket",
  "description": "One bucket of trade intent for one market. Both sides of every trade are counted, so the eight intent buckets plus `mm_usd` sum to twice the bucket's traded notional, less delisting settlements, which are in no bucket. Winners and losers are aggregates over the market's trailing 72 hours: no wallet is named.",
  "type": "object",
  "required": [
    "close",
    "flip_ls",
    "flip_sl",
    "is_final",
    "losers_count",
    "losers_flow",
    "losers_gross",
    "losers_net",
    "method",
    "mm_usd",
    "open_long",
    "open_short",
    "preliminary",
    "preliminary_from",
    "preliminary_from_ms",
    "price_source",
    "quality",
    "stop_long",
    "stop_short",
    "timestamp",
    "timestamp_ms",
    "tp_long",
    "tp_short",
    "winners_count",
    "winners_flow",
    "winners_gross",
    "winners_net"
  ],
  "properties": {
    "close": {
      "description": "The price the bucket's end is marked at. Null on second intervals.",
      "type": "number",
      "format": "double",
      "nullable": true,
      "example": 81448
    },
    "flip_ls": {
      "description": "USD sold that took a position from long to short in one fill. To the cent.",
      "type": "number",
      "format": "double",
      "example": 683012.29
    },
    "flip_sl": {
      "description": "USD bought that took a position from short to long in one fill. To the cent.",
      "type": "number",
      "format": "double",
      "example": 334456.02
    },
    "is_final": {
      "description": "The bucket is complete and will not change.",
      "type": "boolean",
      "example": true
    },
    "losers_count": {
      "description": "Losers counted at full weight. Null on second intervals and when `quality` is `quarantined`.",
      "type": "integer",
      "nullable": true,
      "example": 16
    },
    "losers_flow": {
      "description": "The same for the market's losers.",
      "type": "number",
      "format": "double",
      "nullable": true,
      "example": -607408.26
    },
    "losers_gross": {
      "description": "The losers' gross position in USD at the bucket's end. Null on second intervals and when `quality` is `quarantined`.",
      "type": "number",
      "format": "double",
      "nullable": true,
      "example": 155965344.67
    },
    "losers_net": {
      "description": "The losers' net position in USD at the bucket's end. Null on second intervals and when `quality` is `quarantined`.",
      "type": "number",
      "format": "double",
      "nullable": true,
      "example": 46895101.67
    },
    "method": {
      "description": "Version of the method the bucket was computed with: `who/3`, or `who/2` on older rows.",
      "type": "string",
      "example": "who/3"
    },
    "mm_usd": {
      "description": "USD traded by wallets classified as market makers, counted here instead of in an intent bucket. To the cent.",
      "type": "number",
      "format": "double",
      "example": 84960401.5
    },
    "open_long": {
      "description": "USD bought to open or increase a long. To the cent.",
      "type": "number",
      "format": "double",
      "example": 50638693.18
    },
    "open_short": {
      "description": "USD sold to open or increase a short. To the cent.",
      "type": "number",
      "format": "double",
      "example": 41296459.21
    },
    "preliminary": {
      "description": "The bucket holds figures computed live after the archive's end. They are replaced by the archived figures once those hours are built.",
      "type": "boolean",
      "example": false
    },
    "preliminary_from": {
      "description": "Where the bucket's preliminary figures begin: inside the bucket, or at its open when the whole bucket is preliminary. Null when `preliminary` is false.",
      "type": "string",
      "format": "date-time",
      "nullable": true,
      "example": null
    },
    "preliminary_from_ms": {
      "description": "`preliminary_from` as Unix milliseconds.",
      "type": "integer",
      "format": "int64",
      "nullable": true,
      "example": null
    },
    "price_source": {
      "description": "Where `close` comes from: `mark`, `oracle` (a HIP-3 market without a stored mark), `carried` (the last of those when none is recent) or `trade`. Null on second intervals.",
      "type": "string",
      "enum": [
        "mark",
        "oracle",
        "carried",
        "trade"
      ],
      "nullable": true,
      "example": "mark"
    },
    "quality": {
      "description": "`ok`; `partial` while the method's 7-day lookbacks were not yet full; `quarantined` when an input of the bucket failed a continuity check, so the winners' and losers' figures are null. Intent buckets and `mm_usd` are always served.",
      "type": "string",
      "enum": [
        "ok",
        "partial",
        "quarantined"
      ],
      "example": "ok"
    },
    "stop_long": {
      "description": "USD sold to reduce or close a long at a loss or break-even, or by liquidation or auto-deleveraging. To the cent.",
      "type": "number",
      "format": "double",
      "example": 30236676.09
    },
    "stop_short": {
      "description": "USD bought to reduce or close a short at a loss or break-even, or by liquidation or auto-deleveraging. To the cent.",
      "type": "number",
      "format": "double",
      "example": 12304052.04
    },
    "timestamp": {
      "description": "Bucket open time, RFC 3339 UTC.",
      "type": "string",
      "format": "date-time",
      "example": "2026-10-23T00:00:00.000Z"
    },
    "timestamp_ms": {
      "description": "`timestamp` as Unix milliseconds.",
      "type": "integer",
      "format": "int64",
      "example": 1792713600000
    },
    "tp_long": {
      "description": "USD sold to reduce or close a long at a profit (closed PnL above zero, not forced). To the cent.",
      "type": "number",
      "format": "double",
      "example": 8084342.05
    },
    "tp_short": {
      "description": "USD bought to reduce or close a short at a profit (closed PnL above zero, not forced). To the cent.",
      "type": "number",
      "format": "double",
      "example": 29240753.02
    },
    "winners_count": {
      "description": "Winners counted at full weight. Null on second intervals and when `quality` is `quarantined`.",
      "type": "integer",
      "nullable": true,
      "example": 17
    },
    "winners_flow": {
      "description": "What the market's winners bought less what they sold in the bucket, in USD, weighted as the cohort stood at the previous hour's close. Null when `quality` is `quarantined`.",
      "type": "number",
      "format": "double",
      "nullable": true,
      "example": -2861558.86
    },
    "winners_gross": {
      "description": "The winners' gross position in USD at the bucket's end. Null on second intervals and when `quality` is `quarantined`.",
      "type": "number",
      "format": "double",
      "nullable": true,
      "example": 121926882.58
    },
    "winners_net": {
      "description": "The winners' net position in USD (long positive) at the bucket's end. Null on second intervals and when `quality` is `quarantined`.",
      "type": "number",
      "format": "double",
      "nullable": true,
      "example": -77011655.75
    }
  }
}
```

## Components using this schema

* [ApiResponseTradeIntentBucketArray](https://docs.0xarchive.io/schemas/components/api-response-trade-intent-bucket-array.md)

## Referenced By

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

## Operations using this component transitively

* [`GET /v1/hyperliquid/hip3/trade-intent/{symbol}`](https://docs.0xarchive.io/schemas/operations/get-hip3-trade-intent)
* [`GET /v1/hyperliquid/trade-intent/{symbol}`](https://docs.0xarchive.io/schemas/operations/get-hyperliquid-trade-intent)


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