> For the complete documentation index, see [llms.txt](https://nytshift.gitbook.io/nytshift-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nytshift.gitbook.io/nytshift-docs/engineering-guide/04-market-data-and-charting.md).

# Market data and charting

[← Trust and authority](/nytshift-docs/engineering-guide/03-trust-and-authority.md) · [Documentation home](/nytshift-docs/start-here/readme.md) · Next: [Paper trading →](/nytshift-docs/engineering-guide/05-paper-trading.md)

NYTSHIFT treats market data as a provenance graph, not a bag of numbers. Every observation has a venue, instrument identity, source class, observation time and admissible consumer set.

![Robinhood Chain market radar with live cross-venue context](https://365345826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FD02RJbcs8ypn0hikgNUk%2Fuploads%2Fgit-blob-24f972c92b27aa881c698c78a2950dde35c3eea8%2Fproduction-rhc-radar.png?alt=media)

> The screenshot is a time-specific production capture. Counts, prices, latency and block height are volatile observations, not fixtures or compatibility promises.

## Venue coverage

| Rail            | Public market data                                                                            | Public account data                                        | Execution posture                                        |
| --------------- | --------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | -------------------------------------------------------- |
| Arcus           | Discovery, marks/oracles, books, trades, candles, funding, OI, volume                         | Address-scoped account/order/fill/transfer reconciliation  | Separate disabled protected signer boundary              |
| Lighter         | Discovery, marks/indexes, books, trades, candles, funding, OI, volume                         | Bounded public balance/position context                    | Read only; no signer integration                         |
| Hyperliquid     | Primary and deployer-DEX metadata, marks/oracles, books, trades, candles, funding, OI, volume | Master/subaccount clearinghouse, orders, fills and funding | Separately gated signer and DPoP testnet automation      |
| Robinhood Chain | Canonical contracts, Chainlink identity, holdings, activity, provider topology and bridges    | Exact public address only                                  | Read-only chain evidence; no generic transaction builder |

## Observation pipeline

```mermaid
flowchart LR
    R[REST snapshot] --> V[Runtime validation]
    W[WebSocket frame] --> V
    V --> I[Exact venue + instrument identity]
    I --> T[Temporal transition]
    T --> Q[Reference quarantine]
    Q --> C{Consumer projection}
    C -->|fresh mark| CH[Chart and book]
    C -->|fresh exact context| PA[Paper and alerts]
    C -->|retained/held| EV[Evidence-only label]
    C -->|missing/stale| UN[Unavailable/degraded UI]
```

## Mark authority

The following are intentionally non-interchangeable:

* **Mark:** venue-defined position/risk reference and primary terminal price authority.
* **Midpoint:** arithmetic/book context; Hyperliquid `allMids` never advances the mark.
* **Oracle/index:** corroborating reference with its own provenance and freshness.
* **Last accepted:** retained prior mark after an implausible transition; evidence only.

A malformed or more-than-5%-divergent oracle/index loses its numeric consumer authority and remains visibly quarantined. A mark jump above 25% advances only when a close same-frame oracle/index corroborates it. Otherwise the prior mark/time is held and the feed degrades until recovery.

Held values are withheld from:

* alerts;
* all PAPER venues;
* chart risk guides;
* order shortcuts;
* watchlists and command results;
* market briefs;
* book mark labels.

An evidence surface may show `LAST ACCEPTED … HELD`; it cannot relabel that value live.

## WebSocket supervision

Each venue gets one pooled browser socket with bounded subscriptions, messages and reconnect attempts. The pool provides:

* reference-counted subscribe/unsubscribe;
* exact replay after reconnect;
* message/frame byte limits;
* heartbeat and stale detection;
* bounded jitter;
* strict REST repair;
* reason-coded health without endpoint or account leakage.

Lighter order books require exact `begin_nonce` → prior `nonce` continuity. A gap freezes accepted state, resubscribes and repairs from REST. Arcus address-scoped account streams accept only frames that echo the requested address and require a new account snapshot after a sequence gap.

## Candles and history

Browser history merges validated REST pages and stream updates by exact venue, symbol, interval and timestamp. Overlap replaces the same bar; a current REST page cannot erase earlier pagination or a newer stream-only bar. Sequence/context guards reject late responses.

The server history checkpoint is separate:

* provider REST bars are its only write authority;
* keys include venue, live-discovered symbol and interval;
* corrections replace exact timestamps;
* retention and LRU limits are deterministic;
* writes are atomic;
* outage reads remain explicitly aged/degraded.

## Chart authority

The chart supports native candles, line, area and Heikin-Ashi views, 14 intervals, bounded zoom/pan, persistent studies and exact UTC OHLCV inspection. Presentation transforms never replace source-candle authority.

Risk/account overlays require exact, fresh venue/symbol/account context. Missing entry, liquidation, leverage, capital or funding fields remain absent. They are not reconstructed from generic exchange formulas.

Advanced Charts is a licensed optional runtime. Proprietary assets are never committed. It activates only after the official package passes manifest/SRI/CSP checks and a fresh production rehearsal is bound to the exact release and asset tree. The complete custom chart remains the fallback.

## Robinhood Chain identity mesh

![Robinhood Chain 4663 identity mesh keeping canonical identity, oracle context, provider topology and public reads as independent evidence](https://365345826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FD02RJbcs8ypn0hikgNUk%2Fuploads%2Fgit-blob-61290820c5a60aed8b30ba526ee933d33576e53f%2F05-rhc-identity-radar.png?alt=media)

The radar starts with immutable reviewed contract identity, then joins independent evidence:

1. canonical chain-4663 contract identity;
2. reviewed Chainlink proxy/heartbeat/decimals;
3. current Arcus/Lighter/Hyperliquid underlying-symbol match;
4. current market status and hours evidence;
5. bridge/provider evidence;
6. explicit quote/execution capability.

No downstream step retroactively proves an upstream identity. A perp ticker match does not prove a spot deployment, and an ecosystem provider listing does not prove a pool, router or quote.

Deep references: [API strategy](/nytshift-docs/normative-design/api-strategy.md), [RHC observability](/nytshift-docs/normative-design/rhc-observability.md), [architecture data plane](/nytshift-docs/normative-design/architecture.md#data-plane) and the [market reference audit runbook](/nytshift-docs/market-data-and-providers/provider-divergence.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://nytshift.gitbook.io/nytshift-docs/engineering-guide/04-market-data-and-charting.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
