> For the complete documentation index, see [llms.txt](https://developer.barchart.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.barchart.com/market-replay-docs/apis.md).

# Market Replay API

Welcome to Barchart's **Market Replay Technical Documentation.**

Market Replay's API provides access to a comprehensive historical market data archive. This platform delivers point-in-time quote, trade, OHLC, and market statistics data across global asset classes.

Built directly from Barchart's real-time market data infrastructure, Market Replay allows developers, quantitative researchers, risk managers, compliance teams, and data engineers to retrieve historical market conditions exactly as they existed at a specific moment in time.

<button type="button" class="button primary" data-action="ask" data-icon="gitbook-assistant">Ask the Assistant a question</button>

<button type="button" class="button secondary" data-action="ask" data-query="How do I deploy my first project" data-icon="rocket-launch">Deploy your first project</button>

## Available API Endpoints

Use the endpoint that matches your data granularity and workflow. All endpoints require `username` and `password`.

| Endpoint                    | Intended design                                                                                                                       |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `queryticks.ashx`           | Returns tick-level trades, quotes, or both for one symbol within a single trading day for up to 365 days from today's date.           |
| `queryminutes.ashx`         | Returns intraday OHLCV bars for a symbol. Use `interval` to aggregate consecutive minutes into larger bars.                           |
| `querynearbyminutes.ashx`   | Returns intraday OHLCV bars for the active nearby futures contract. Use it with a futures root symbol for continuous nearby analysis. |
| `queryformtminutes.ashx`    | Returns stock minute bars that include Form T trades. Use it when pre-market and post-market activity matters.                        |
| `queryeod.ashx`             | Returns daily or aggregated OHLCV history. It supports equities, futures, options, nearby series, and continuation series.            |
| `queryminutedaterange.ashx` | Returns the first and last available minute record for each requested symbol. Use it to plan minute-data backfills.                   |
| `queryeoddaterange.ashx`    | Returns the first and last available end-of-day record for each requested symbol. Use it to plan EOD backfills.                       |
| `queryevents.ashx`          | Returns stock splits, dividends, and earnings events for one or more symbols. Use it to support adjustments and event analysis.       |
| `futuresoptions`            | Returns an end-of-day futures options chain in CSV format for one root symbol and date.                                               |
| `futuresoptions/json`       | Returns an end-of-day futures options chain in JSON format for one root symbol and date. It can include enabled aggregate statistics. |

***


---

# 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://developer.barchart.com/market-replay-docs/apis.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.
