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

# Memory Price Index

> What the memory prices represent, the tracked memory types, and how they update.

Alongside GPUs, the Ornn Data API tracks **memory prices** for DRAM and Flash components.

## What it covers

Memory prices are spot prices for individual memory components, grouped into categories:

| Category (`category`) | Examples                                              |
| --------------------- | ----------------------------------------------------- |
| **`dram`**            | `DDR5 16Gb (2Gx8) 4800/5600`, `DDR4 16Gb (2Gx8) 3200` |
| **`flash`**           | `MLC 64Gb (8Gx8)`, `SLC 2Gb (256Mx8)`                 |
| **`module`**          | `DDR5 RDIMM 32GB 4800/5600`, `DDR4 UDIMM 16GB 3200`   |

Fetch the full live list from [`/api/memory-types`](/docs/api-reference/memory/list-tracked-memory-types) without an API key.

## Fields

Each memory price includes:

| Field                      | Meaning                                                                                  |
| -------------------------- | ---------------------------------------------------------------------------------------- |
| `id`                       | Frozen ≤32-character partner key (for example `mem_ddr4_16gb`). Never renamed or reused. |
| `price`                    | The current spot price (session average)                                                 |
| `changePct`                | Percent change versus the previous reading                                               |
| `weeklyHigh` / `weeklyLow` | The high and low over the trailing week                                                  |
| `sourceUpdatedAt`          | The upstream publication timestamp                                                       |
| `updatedAt`                | When Ornn ingested the value (ISO 8601, UTC)                                             |

## Update frequency

Memory prices are refreshed **once per trading day (weekdays)**. The `sourceUpdatedAt` string reflects the upstream publication time; `updatedAt` is the UTC ingestion time you should rely on programmatically.

<Note>
  Each part has a frozen `id` (≤32 characters, for example `mem_ddr4_16gb`) and a vendor-style `memory_type` name. Prefer `id` as a primary key. Lookups accept either: `/api/memory-index?type=mem_ddr4_16gb` or the URL-encoded name. Pull the mapping from `/api/memory-types`.
</Note>

## Reading current prices

Memory price endpoints require a **Premium or Full** key; only the `/api/memory-types` catalog is public on Index. With no parameters, `GET /api/memory-index` returns every tracked type:

```bash theme={null}
curl "https://api.ornnai.com/api/memory-index" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Narrow to one `category` (`dram`, `flash`, or `module`) to get an array, or to a single `type` (id or name) to get one object:

```bash theme={null}
# one category
curl "https://api.ornnai.com/api/memory-index?category=dram" \
  -H "Authorization: Bearer YOUR_API_KEY"

# one type by frozen id
curl "https://api.ornnai.com/api/memory-index?type=mem_ddr4_16gb" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```json theme={null}
{
  "success": true,
  "date": "2026-01-01T00:00:00.000Z",
  "count": 14,
  "data": [
    {
      "id": "mem_ddr4_16gb",
      "memoryType": "DDR4 16Gb (2Gx8) 3200",
      "category": "dram",
      "price": 40.00,
      "changePct": 0.00,
      "weeklyHigh": 50.00,
      "weeklyLow": 30.00,
      "sourceUpdatedAt": "2026-01-01T00:00:00.000Z",
      "updatedAt": "2026-01-01T00:00:00.000Z"
    }
  ]
}
```

## Pulling price history

`GET /api/memory/{memoryType}/history` returns a single type's series. The path accepts the frozen `id` or the URL-encoded name. Bound the window with inclusive `startDate` and `endDate` (`YYYY-MM-DD`; a date-only `endDate` includes that day's 4 PM ET settlement), or cap rows with `limit` (default `1000`):

```bash theme={null}
curl "https://api.ornnai.com/api/memory/mem_ddr4_16gb/history?limit=5" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```json theme={null}
{
  "success": true,
  "id": "mem_ddr4_16gb",
  "memoryType": "DDR4 16Gb (2Gx8) 3200",
  "count": 5,
  "data": [
    { "date": "2026-01-01T00:00:00.000Z", "id": "mem_ddr4_16gb", "memoryType": "DDR4 16Gb (2Gx8) 3200", "category": "dram", "price": 40.00, "weeklyHigh": 50.00, "weeklyLow": 30.00, "changePct": 0.00, "sourceUpdatedAt": "2026-01-01T00:00:00.000Z", "timestamp": "2026-01-01T00:00:00.000Z" }
  ]
}
```

See the [Memory API reference](/docs/api-reference/memory/get-current-memory-spot-prices) for the full schema and code samples in every supported language.
