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

# Data conventions

> 0xArchive REST data conventions: decimal strings vs numbers, UTC timestamps, the symbol/coin alias, and per-route type differences.

Parse REST payloads without losing precision or mixing up types. A few conventions hold across every route; knowing them prevents the most common parsing bugs, which are precision loss on prices and type mismatches between routes.

## Decimal strings vs numbers

Some fields come back as **decimal strings**, others as **numbers**, and it varies by route:

| Shape | Fields, and why |
| - | - |
| Decimal string | L2 `px`/`sz`, `mid_price`, `spread`, trade `price`/`size`/`fee`, `funding_rate`, `premium`, open interest values. Strings preserve precision; small rates and large sizes lose information as floats |
| Number | L4 `price`/`size`, candle `open`/`high`/`low`/`close`/`volume`. These routes return numeric types directly |

Keep decimal strings **as strings to the application edge**, then parse with a decimal library, not a float. Do not assume a field's type from another route: an order book's `px` is a string, but the same book's L4 `price` is a number. Check the type per route on the data-type page.

## Timestamps

Response timestamps are **RFC 3339 UTC** strings with millisecond precision (for example `2026-06-05T13:53:33.971Z`). Integer milliseconds appear only in fields ending in `_ms`; a few payloads still carry integer times unless you send the version header, as listed on [API conventions](/conventions#versioning). Requests accept Unix milliseconds or RFC 3339 for `start`, `end`, `timestamp`, and `at`; see [Parameters](/rest-api/parameters). Store timestamps in UTC and convert only at display.

## Symbol and the `coin` alias

`symbol` is the canonical field. `coin` appears in some payloads as a **deprecated alias** for the same value; prefer `symbol` and treat `coin` as legacy. Preserve the venue-specific symbol shape (plain perp, pair, builder prefix, outcome side) exactly as returned.

## HIP-4 prices are probabilities

On HIP-4 outcome markets, `mark_price` and `mid_price` are implied probabilities in the `[0, 1]` range, not USD. Label them as probability-like values in any chart, model, or export so downstream code does not treat them as asset prices.

## One envelope for every route

Market-data routes wrap the result in `{ success, data, meta }`, and errors share one shape with a stable `error_code`. [API conventions](/conventions) describes the contract every route follows, and the [field dictionary](/responses#field-dictionary) explains individual fields.

## Next step

Handle success, empty, and error bodies with [Responses](/responses).


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