# 1delta — Prices endpoints The Prices slice of https://docs.1delta.io/llms-full.txt (Data), split out so a single topic fits a small context window. Index: https://docs.1delta.io/llms.txt · this whole group: see the llms-*.txt files listed there · everything: https://docs.1delta.io/llms-full.txt --- ### GET /v1/data/prices/latest - operationId: `get-latest-prices` - docs: https://docs.1delta.io/1delta-api/get-latest-prices/ - markdown: https://docs.1delta.io/1delta-api/get-latest-prices.md - tags: Prices Get latest prices Returns latest USD prices for tracked assets. **Parameters** | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `assets` | query | string[] | no | Asset group keys (repeatable) | | `asOf` | query | string | no | ISO date anchor; defaults to latest hour | **Response `200`** — Latest price data | Field | Type | Description | | --- | --- | --- | | `success` | true | | | `data` | object | | | `data.asOf` | string | Timestamp the data was measured at. | | `data.count` | integer | Number of entries in `items`. | | `data.items` | object | Map of asset_group → priceUsd | | `data.debug` | object | | | `data.debug.rows` | object[] | | | `actions` | null | | **Example response** ```json { "success": true, "data": { "asOf": "2026-01-01T00:00:00Z", "count": 1, "items": { "USDC": 1.0001, "WBTC": 67432.12 }, "debug": { "rows": [ {} ] } } } ``` **Response `429`** — Rate limited. Unauthenticated callers share a per-IP budget; send an `x-api-key` header to lift it. Retry with exponential backoff. **Response `500`** — Unexpected server error. Safe to retry with backoff. **Response `502`** — An upstream data source or protocol origin failed (`error.code` is `ORIGIN_FAILED`). `error.details` carries the per-origin status. This is also what a missing or malformed required parameter currently returns, rather than a 400. ### GET /v1/data/prices/latest-asof - operationId: `get-prices-as-of-x-hours-ago` - docs: https://docs.1delta.io/1delta-api/get-prices-as-of-x-hours-ago/ - markdown: https://docs.1delta.io/1delta-api/get-prices-as-of-x-hours-ago.md - tags: Prices Get prices as of X hours ago Returns prices at an effective cutoff time computed as `asOf − hoursAgo`. **Parameters** | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `hoursAgo` | query | number | yes | Non-negative number of hours in the past | | `asOf` | query | string | no | ISO date anchor; defaults to now | | `assetGroups` | query | string[] | no | Asset group keys (repeatable) | **Response `200`** — Prices at the effective cutoff time | Field | Type | Description | | --- | --- | --- | | `success` | true | | | `data` | object | | | `data.asOf` | string | Timestamp the data was measured at. | | `data.count` | integer | Number of entries in `items`. | | `data.items` | object | Map of asset_group → priceUsd | | `data.debug` | object | | | `data.debug.rows` | object[] | | | `actions` | null | | **Example response** ```json { "success": true, "data": { "asOf": "2026-01-01T00:00:00Z", "count": 1, "items": { "USDC": 1.0001, "WBTC": 67432.12 }, "debug": { "rows": [ {} ] } } } ``` **Response `400`** — Validation error **Response `429`** — Rate limited. Unauthenticated callers share a per-IP budget; send an `x-api-key` header to lift it. Retry with exponential backoff. **Response `500`** — Unexpected server error. Safe to retry with backoff. **Response `502`** — An upstream data source or protocol origin failed (`error.code` is `ORIGIN_FAILED`). `error.details` carries the per-origin status. This is also what a missing or malformed required parameter currently returns, rather than a 400. ### POST /v1/data/sparklines - operationId: `sparkline-price-ratio-time-series` - docs: https://docs.1delta.io/1delta-api/sparkline-price-ratio-time-series/ - markdown: https://docs.1delta.io/1delta-api/sparkline-price-ratio-time-series.md - tags: Prices Sparkline price-ratio time series Returns price-ratio time series for the cross product of `currencies` × `quotes` over a configurable lookback window (default 24h). **Request body:** `{ currencies: string[], quotes: string[], windowHours?: number }` where each ID is either a shorthand (`"usd"`, `"eth"`) or `"{chainId}-{address}"`. See the `SparklineRequest` schema. **Response:** `{ windowHours, count, result }`. Each `result[i]` has `{ currency, quote, data }` where `data` is an array of `{ time, value }` points and `value = price(currency) / price(quote)`. Pairs with no data are omitted from `result` (so `count` ≤ `currencies.length × quotes.length`). Useful for rendering small inline charts (token cards, asset selectors) without hitting the heavier snapshot endpoints. **Request body** (`application/json`) | Field | Type | Required | Description | | --- | --- | --- | --- | | `currencies` | string[] | yes | Currency identifiers. Use shorthand ("usd", "eth") or "{chainId}-{address}" format. | | `quotes` | string[] | yes | Quote identifiers (same format as currencies) | | `windowHours` | number | no | Lookback window in hours | **Example request body** ```json { "currencies": [ "string" ], "quotes": [ "string" ], "windowHours": 24 } ``` **Response `200`** — Sparkline data | Field | Type | Description | | --- | --- | --- | | `success` | true | | | `data` | object | | | `data.windowHours` | number | | | `data.count` | integer | Number of non-empty sparkline pairs | | `data.result` | object[] | | | `data.result[].currency` | string | | | `data.result[].quote` | string | | | `data.result[].data` | object[] | Informational payload. `null` when the endpoint only builds calldata. | | `data.result[].data[].value` | number | Price ratio (currency / quote) | | `data.result[].data[].time` | string | | | `actions` | null | | **Example response** ```json { "success": true, "data": { "windowHours": 1, "count": 1, "result": [ { "currency": "string", "quote": "string", "data": [ { "value": 1, "time": "2026-01-01T00:00:00Z" } ] } ] } } ``` **Response `429`** — Rate limited. Unauthenticated callers share a per-IP budget; send an `x-api-key` header to lift it. Retry with exponential backoff. **Response `500`** — Unexpected server error. Safe to retry with backoff. **Response `502`** — An upstream data source or protocol origin failed (`error.code` is `ORIGIN_FAILED`). `error.details` carries the per-origin status. This is also what a missing or malformed required parameter currently returns, rather than a 400.