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

# Momentum factor

> Every Hyperliquid core perp's 7-day or 14-day momentum score at any hour, and the hourly or daily returns of the long-short momentum factor. Build plan and above.

Rank Hyperliquid core perps on momentum and test a momentum strategy on the same numbers. One route returns every eligible perp's momentum score at an hour, strongest first; another returns the long-short momentum factor's return per hour or per day, with the basket behind it on request. Both use a 7-day or a 14-day lookback, start on 2025-05-24 at 01:00 UTC, and come with the Build, Pro, Scale and Enterprise plans.

## How the factor is built

The method is `momentum/1`, named in every record.

| Step | Rule |
| - | - |
| Candidates | Every Hyperliquid core perp ever listed, delisted perps included while they traded |
| Hourly close | The last one-minute close of the hour. A missing close is carried forward for at most 6 hours |
| Hourly return | Close to close. A move of 50% or more, or an hour without a close, counts as 0 |
| Volatility | The sample standard deviation of the last 720 hourly returns (at least 240), ending the hour before. Not annualized |
| Score | The close-to-close return over the lookback, 7 or 14 days, divided by that volatility |
| Eligible | 60 days of history and dollar volume in the 30 days before the universe pick in force |
| Universe | The top 25 or top 50 eligible perps by dollar volume over the 30 days before the pick, re-picked every 30 days from 2025-03-22 00:00 UTC |
| Rebalance | Every 168 hours from the same start: Saturdays at 00:00 UTC |
| Legs | The universe ranked on the score, ties averaged: long the top fifth, short the bottom fifth |
| Weights | Inverse volatility within each leg, each leg summing to 1. They earn from 01:00 UTC until the next rebalance |
| Factor return | The long leg's hourly return minus the short leg's, gross of fees and funding |

## Routes

| Dataset | Route and endpoint reference |
| - | - |
| Scores at an hour | `/v1/hyperliquid/factors/momentum`: [Get Hyperliquid momentum scores](https://docs.0xarchive.io/api-reference/hyperliquid--factors/get-hyperliquid-momentum-scores.md) |
| Newest scores | `/v1/hyperliquid/factors/momentum/current`: [Get current Hyperliquid momentum scores](https://docs.0xarchive.io/api-reference/hyperliquid--factors/get-current-hyperliquid-momentum-scores.md) |
| Factor returns | `/v1/hyperliquid/factors/momentum/returns`: [Get Hyperliquid momentum factor returns](https://docs.0xarchive.io/api-reference/hyperliquid--factors/get-hyperliquid-momentum-factor-returns.md) |

The factor covers Hyperliquid core perps only.

## Plans and credits

The momentum factor comes with the Build, Pro, Scale and Enterprise plans. A Free key receives `403` with `error_code` `forbidden`, the `datatype` (`momentum`), the `required_plans` and an `upgrade_url`. A refused request is not charged. Each request costs 1 credit, whatever its number of records.

## Request parameters

`lookback` is required on every route: `7d` or `14d`. There is no default, because the two lookbacks answer different questions. A missing or other value returns `400` with `error_code` `invalid_parameter` and the accepted `valid_values`. Each route refuses a parameter it does not take with `400` `invalid_parameter`, naming it, rather than ignoring it.

The scores route takes one more parameter:

| Parameter | Behavior |
| - | - |
| `at` | Optional, Unix milliseconds or RFC 3339. The reading is as of the newest hour close at or before it. Defaults to now; a later time reads the newest settled hour |

`/current` takes `lookback` only and returns the newest reading. A new reading is served a few minutes after each hour closes.

The returns route also accepts:

| Parameter | Behavior |
| - | - |
| `universe` | Optional. `top25` (default) or `top50` |
| `start` | Optional, Unix milliseconds or RFC 3339. The first bucket opens at or after it. Defaults to 30 days before `end` |
| `end` | Optional, Unix milliseconds or RFC 3339. The last bucket opens at or before it. Defaults to now |
| `interval` | Optional. `1d` (default, the UTC day) or `1h` |
| `limit` | Optional. Buckets per page, default 100, maximum 1,000. A larger value is read as 1,000 |
| `cursor` | Optional. `meta.next_cursor` from the previous page, passed back with the other parameters unchanged |
| `holdings` | Optional. `true` adds each bucket's `holdings`. Defaults to `false` |

A page holds the buckets whose open is in `[start, end]`, oldest first. Set both `start` and `end` when paging, because the default window moves with the clock, and keep paging while `meta.has_more` is `true`. The cursor is opaque.

## Scores at an hour

```bash theme={"theme":"github-dark"}
curl "https://api.0xarchive.io/v1/hyperliquid/factors/momentum?lookback=7d&at=2026-11-01T12:00:00Z" \
  -H "X-API-Key: $OXARCHIVE_API_KEY" \
  -H "0xArchive-Version: 2026-10-01"
```

```json theme={"theme":"github-dark"}
{
  "success": true,
  "data": [
    {
      "symbol": "HYPE",
      "timestamp": "2026-11-01T12:00:00.000Z",
      "timestamp_ms": 1793534400000,
      "lookback": "7d",
      "method": "momentum/1",
      "ret": 0.1488637998927249,
      "vol": 0.007509860387029248,
      "score": 19.822445720806865,
      "pct_rank": 1.0,
      "quintile": 5,
      "in_top25": true,
      "in_top50": true,
      "is_final": true
    }
  ],
  "meta": {
    "count": 176,
    "request_id": "cd2995a7-b486-485a-a460-e016eb0737e3"
  }
}
```

The response above is trimmed to the first of its 176 records. `/current` returns the same shape for the newest hour.

| Field | Meaning |
| - | - |
| `symbol` | The Hyperliquid core perp |
| `timestamp`, `timestamp_ms` | The reading's instant: the close of its hour, RFC 3339 UTC and Unix milliseconds |
| `lookback` | `7d` or `14d` |
| `method` | The method version, `momentum/1` |
| `ret` | The close-to-close return over the lookback, as a fraction (0.1 is 10%) |
| `vol` | Hourly volatility over the last 30 days, as a fraction, not annualized |
| `score` | `ret / vol`, what the perps are ranked on |
| `pct_rank` | The score's percentile rank among the perps in the reading, ties averaged: 1 is the strongest |
| `quintile` | The fifth `pct_rank` falls in: 5 at 0.8 or more, 1 at 0.2 or less |
| `in_top25`, `in_top50` | Whether the perp is in the factor's top-25 and top-50 universes in force at the hour |
| `is_final` | Every candle the reading uses is final |

## Factor returns

```bash theme={"theme":"github-dark"}
curl "https://api.0xarchive.io/v1/hyperliquid/factors/momentum/returns?lookback=7d&universe=top25&interval=1d&start=2026-10-01T00:00:00Z&end=2026-11-20T00:00:00Z&limit=10" \
  -H "X-API-Key: $OXARCHIVE_API_KEY" \
  -H "0xArchive-Version: 2026-10-01"
```

```json theme={"theme":"github-dark"}
{
  "success": true,
  "data": [
    {
      "timestamp": "2026-10-01T00:00:00.000Z",
      "timestamp_ms": 1790812800000,
      "calculated_at": "2026-10-02T00:00:00.000Z",
      "calculated_at_ms": 1790899200000,
      "lookback": "7d",
      "universe": "top25",
      "method": "momentum/1",
      "ret": 0.011022206600979339,
      "long_ret": -0.016356793266587358,
      "short_ret": -0.027378999867566683,
      "hours": 24,
      "longs": 6,
      "shorts": 5,
      "is_final": true
    }
  ],
  "meta": {
    "count": 10,
    "next_cursor": "1791676800000",
    "request_id": "baa00e32-baaf-42e4-93e4-e19b5661c182",
    "has_more": true
  }
}
```

The response above is trimmed to the first of its 10 buckets. Both legs fell that day and the short leg fell further, so the factor gained. `meta.has_more` is `true`: pass `meta.next_cursor` back as `cursor`, with the same parameters, for the next 10 days. The two legs need not be the same size: the top and bottom fifths of a universe can hold different numbers of perps, here 6 and 5.

Add `holdings=true` to see what the factor held. This request reads the first three hours of 2026-11-15 on the top 50 with the 14-day lookback:

```bash theme={"theme":"github-dark"}
curl "https://api.0xarchive.io/v1/hyperliquid/factors/momentum/returns?lookback=14d&universe=top50&interval=1h&start=2026-11-15T00:00:00Z&end=2026-11-15T03:00:00Z&holdings=true" \
  -H "X-API-Key: $OXARCHIVE_API_KEY" \
  -H "0xArchive-Version: 2026-10-01"
```

```json theme={"theme":"github-dark"}
{
  "timestamp": "2026-11-15T00:00:00.000Z",
  "timestamp_ms": 1794700800000,
  "calculated_at": "2026-11-15T01:00:00.000Z",
  "calculated_at_ms": 1794704400000,
  "lookback": "14d",
  "universe": "top50",
  "method": "momentum/1",
  "ret": 0.00478299440215793,
  "long_ret": -0.004898041668295541,
  "short_ret": -0.009681036070453472,
  "hours": 1,
  "longs": 11,
  "shorts": 10,
  "holdings": [
    { "symbol": "PAXG", "weight": 0.30253737077998366 },
    { "symbol": "BTC", "weight": -0.17808190579268834 }
  ],
  "is_final": true
}
```

That is the first of the response's four buckets (`end` is inclusive, so the bucket opening at 03:00 is the fourth), trimmed to two of its 21 holdings. The 11 long weights sum to 1 and the 10 short weights to -1.

| Field | Meaning |
| - | - |
| `timestamp`, `timestamp_ms` | Bucket open, RFC 3339 UTC and Unix milliseconds |
| `calculated_at`, `calculated_at_ms` | The close of the last hour the bucket holds: its end, or, for the bucket still forming, the newest settled hour close |
| `lookback`, `universe`, `method` | The factor the bucket belongs to |
| `ret` | The factor's return over the bucket, `long_ret - short_ret`, as a fraction |
| `long_ret` | The long leg's return over the bucket |
| `short_ret` | The short leg's return over the bucket: the return of the perps held short, so a rise in them lowers `ret` |
| `hours` | The hours summed |
| `longs`, `shorts` | The number of perps in each leg at the bucket's last hour |
| `holdings` | Only with `holdings=true`: the weights of the rebalance in force at the bucket's last hour, longs positive and shorts negative, longs first |
| `is_final` | The bucket has closed and every candle its hours use is final |

## Read the numbers correctly

**Returns are sums, not compounded.** A bucket's `ret`, `long_ret` and `short_ret` add the hourly returns it holds. Add buckets the same way to get a longer period's return. For a compounded series, read `1h` buckets and compound those.

**Returns are gross.** They include no trading fees, funding or slippage.

**A quintile is not a holding.** `pct_rank` and `quintile` rank a perp among every eligible perp at that hour. The factor's legs are cut within its top-25 or top-50 universe, and only at the weekly rebalance, so a perp in quintile 5 is not necessarily held. Read `holdings` for what the factor held.

**Fewer hours than the interval.** A `1d` bucket holds 24 hours, except the bucket still forming and the first bucket of the series, which starts at 01:00 UTC. A rebalance does not skip an hour: the old weights earn up to the rebalance and the new ones from the hour after it.

**A final record can still be rebuilt.** `is_final` turns true about a day after the hour, once every candle the record uses is final. If those candles are rebuilt, the record can change.

**A 503 is retryable.** The first request after a restart waits up to about 15 seconds while the factor is prepared, and can then answer `503` with `error_code` `upstream_unavailable` and `Retry-After`. Retry after the delay.

## Available history

Scores and factor returns start on 2025-05-24 at 01:00 UTC: the first weekly rebalance after a 60-day warm-up, plus the hour its weights start earning. A window that ends before then returns an empty page with `meta.coverage_from` and `meta.notice`; a window that straddles it is served from it.

## Access

Plans, page limits and intervals come from [`GET /v1/capabilities`](https://docs.0xarchive.io/capabilities), followed by the SDK, CLI and MCP names for the same data. Send `0xArchive-Version: 2026-10-01` for the current response contract; see [API conventions](https://docs.0xarchive.io/conventions.md).

| Venue | Availability |
| - | - |
| Hyperliquid | From 2025-05-24 01:00 UTC REST only, no WebSocket channel Plans: Build, Pro, Scale and Enterprise only Up to 1,000 rows a page Every Hyperliquid perp's momentum score and the long-short momentum factor's returns, method momentum/1 (lookback required: 7d or 14d, winners minus losers). factors/momentum is one hour's reading (at, default now): every perp with 60 days of history and dollar volume in the 30 days before the universe pick, its lookback return, 30-day hourly volatility, score (return over volatility), `pct_rank`, quintile and whether it is in the top-25 and top-50 universes. factors/momentum/returns is the factor's return per 1h or 1d bucket on the top 25 or top 50 perps by 30-day dollar volume (every perp ever listed, delisted ones included, re-picked every 30 days): long the top fifth on the score, short the bottom fifth, inverse-volatility weighted, rebalanced Saturdays 00:00 UTC, gross of fees and funding; holdings=true adds the weights. Both from 2025-05-24 01:00 UTC. |

| Surface | Names |
| - | - |
| Python SDK | `client.hyperliquid.factors.momentum.get(lookback=..., at=...)`, `.current(lookback=...)`, `.returns(lookback=..., ...)` |
| TypeScript SDK | `client.hyperliquid.factors.momentum.get({ lookback, at })`, `.current({ lookback })`, `.returns({ lookback, ... })` |
| Rust SDK | `client.hyperliquid.factors.momentum.get`, `.current`, `.returns` |
| CLI | `oxa factors momentum get --lookback 7d\|14d [--at <time>]`, `oxa factors momentum current --lookback 7d\|14d`, `oxa factors momentum returns --lookback 7d\|14d [--universe top25\|top50] [--interval 1h\|1d] [--start] [--end] [--limit] [--cursor] [--holdings]` |
| MCP tools | `get_momentum`, `get_momentum_current`, `get_momentum_returns` |

## Stream it live

There is no WebSocket channel for the momentum factor. A new reading is served a few minutes after each hour closes; poll `/current` once an hour.

## Use it from an agent

**Ask for the strongest and weakest perps**

Through the [MCP server](https://docs.0xarchive.io/mcp-server.md), name the lookback, 7 or 14 days, and ask for the perps with the highest or lowest momentum score, or for the factor's returns over a window on the top 25 or top 50 perps.

[Connect your agent](https://docs.0xarchive.io/mcp-server.md)

## Next step

**Compare with breadth above the moving average**

Read how much of the venue is trending next to which perps are leading it.

[Open moving-average breadth](https://docs.0xarchive.io/rest-api/moving-average-breadth.md)


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