> ## 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                                      |
| -------------------------- | -------------------------------------------- |
| `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>
  Memory types use exact, vendor-style names with spaces and slashes (for example `DDR4 16Gb (2Gx8) 3200`). Always URL-encode them, whether passed as a query value (for example `/api/memory-index?type=...`) or a path segment, and pull the canonical spelling from `/api/memory-types`.
</Note>

## Reading current prices

Memory price endpoints require an API key; only the `/api/memory-types` catalog is public. 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` 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 (note the URL-encoded spaces and parentheses)
curl "https://api.ornnai.com/api/memory-index?type=DDR4%2016Gb%20(2Gx8)%203200" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```json theme={null}
{
  "success": true,
  "date": "2026-01-01T00:00:00.000Z",
  "count": 14,
  "data": [
    {
      "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. URL-encode the type in the path. Bound the window with `startDate` and `endDate` (`YYYY-MM-DD`), or cap rows with `limit` (default `1000`):

```bash theme={null}
curl "https://api.ornnai.com/api/memory/DDR4%2016Gb%20(2Gx8)%203200/history?limit=5" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```json theme={null}
{
  "success": true,
  "memoryType": "DDR4 16Gb (2Gx8) 3200",
  "count": 5,
  "data": [
    { "date": "2026-01-01T00:00:00.000Z", "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.
