# Market Data API | Market Data

> Real-time and historical market data over one REST API — stocks, options and ETFs — with low latency and pricing that suits traders and developers.

Source: https://www.marketdata.app/api/

---

[View Extensive Data Coverage](/data/)

# The Future of Market Data

With 24/7 access to the universe of U.S. financial market data, the Market Data API offers an unmatched, one-stop solution for traders and developers alike.

[Try it](https://api.marketdata.app/) [View Docs](/docs/)

[Try Market Data's Free Stock Market API For Real-Time Quotes and More](https://youtube.com/watch?v=tOIZi7s6nqQ)

Multi-Asset Data Coverage

## All U.S. Market Data, One Flat Fee

Get complete access to U.S. stocks, options, ETFs, mutual funds, and more — all included in a single membership. No upsells, no add-ons. Just one simple plan for everything you need.

[

Stocks

Harness real-time quotes and decades of historical pricing data. Access fundamental data, earnings, and more.

](/data/stocks/)[

Options

Master volatility. Get current and historical options quotes and option chains.

](/data/options/)[

ETFs

Performance data for all index funds and manager-managed funds that trade in the US.

](/data/stocks/)[

Mutual Funds

Venture into the landscape of mutual funds with our pricing and performance data.

](/data/funds/)[

Closed-End Funds

Discover the advantages of CEFs with Market Data's historical pricing and performance metrics.

](/data/stocks/)

Coming Soon

Indices

Empower your strategy with top-tier equity indices from the US and beyond.

Coming Soon

Futures

Historical and front month futures pricing for insights into the global commodities trade.

Coming Soon

Currencies

Defy borders, redefine trading. Dive fearlessly into currencies data.

Coming Soon

Crypto

Elevate your crypto trading. Power-packed data for crypto champions.

Coming Soon

Bonds

Master fixed income securities, explore yield curves, and immerse yourself in bond data.

Coming Soon

Economic Indicators

From employment rates to inflation, gain a 360-degree view of the US economy with our economic indicators.

Unparalleled Ease-of-Use

## Get Started Faster with Our Developer-Friendly Features

Building with the Market Data API is not just about comprehensive data coverage; it's also about unparalleled ease-of-use. Whether you're a beginner or an experienced developer, you'll appreciate how our API has been designed to get you up and running as quickly as possible. Here are some of the features that make it happen:

Multiple Date FormatsHuman Readable OutputJSON/CSV FormatRelative DatesCustomizable Columns

[Parameter dateformat](/docs/api/universal-parameters/date-format)

Unix, ISO timestamp & spreadsheet date formats

Choose the date format that best fits your project requirements, giving you the flexibility to integrate seamlessly with different platforms. Our API handles all date conversions, daylight savings time shifts, and frees you to focus on more important issues.

-   Seconds from the unix epoch
-   ISO 8601 timestamp with exchange timezone
-   Days from Microsoft Excel / Google Sheets epoch

[Try for Free](https://api.marketdata.app/) [View Docs](/docs/api)

```
{// Unix timestamps
  "s": "ok",
  "o": [217.68, 221.03, 219.89],
  "h": [222.49, 221.5, 220.94],
  "l": [217.19, 217.1402, 218.83],
  "c": [221.03, 218.55, 220],
  "t": [1569297600, 1569384000, 1569470400],
  "v": [33463820, 24018876, 20730608]
}

{   // ISO 8601 with exchange timezone
  "s": "ok",
  "o": [217.68, 221.03, 219.89],
  "h": [222.49, 221.5, 220.94],
  "l": [217.19, 217.1402, 218.83],
  "c": [221.03, 218.55, 220],
  "t": ["2019-09-24T00:00:00-04:00", "2019-09-25T00:00:00-04:00", "2019-09-26T00:00:00-04:00"],
  "v": [33463820, 24018876, 20730608]
}

{   // Excel/Sheets timestamp
  "s": "ok",
  "o": [217.68, 221.03, 219.89],
  "h": [222.49, 221.5, 220.94],
  "l": [217.19, 217.1402, 218.83],
  "c": [221.03, 218.55, 220],
  "t": [43732.166666666664, 43733.166666666664, 43734.166666666664],
  "v": [33463820, 24018876, 20730608]
}
```

[Parameter human](/docs/api/universal-parameters/human-readable)

Human Readable Output

Generate tabular data with human-readable output that can be printed directly to the screen, with error/status messaging suppressed. Make debugging and data interpretation straightforward, saving you time in development and analysis.

-   Straightforward debugging and data interpretation
-   Save time in development and analysis
-   Render data directly to the screen with no transformation
-   Status & error messaging suppressed

[Try for Free](https://api.marketdata.app/) [View Docs](/docs/api)

```
// Request status included
// Compressed keys
{
  "s": "ok",
  "o": [217.68, 221.03, 219.89],
  "h": [222.49, 221.5, 220.94],
  "l": [217.19, 217.1402, 218.83],
  "c": [221.03, 218.55, 220],
  "t": [1569297600, 1569384000, 1569470400],
  "v": [33463820, 24018876, 20730608]
}

// Request status omitted
// Human-readable keys
// Data can be sent directly to screen
{
  "Open":   [217.68, 221.03, 219.89],
  "High":   [222.49, 221.5, 220.94],
  "Low":    [217.19, 217.1402, 218.83],
  "Close":  [221.03, 218.55, 220],
  "Date":   [1569297600, 1569384000, 1569470400],
  "Volume": [33463820, 24018876, 20730608]
}
```

[Parameter format](/docs/api/universal-parameters/format)

Work in the Data Format That Suits Your Project

All output can be formatted as JSON or CSV. Flexibility to work in the data format that suits your project, making it easier to integrate with different tools and platforms.

-   Every endpoint can output both json and csv formats
-   Combine csv format with spreadsheet dates & human-readable output to generate complete spreadsheets with a single API request
-   Error messaging and status columns are omitted from spreadsheet output

[Try for Free](https://api.marketdata.app/) [View Docs](/docs/api)

```
// JSON output
{
  "s": "ok",
  "o": [217.68, 221.03, 219.89],
  "h": [222.49, 221.5, 220.94],
  "l": [217.19, 217.1402, 218.83],
  "c": [221.03, 218.55, 220],
  "t": [1569297600, 1569384000, 1569470400],
  "v": [33463820, 24018876, 20730608]
}

// CSV output
o,h,l,c,t,v
217.68,222.49,217.19,221.03,1569297600,33463820
221.03,221.5,217.1402,218.55,1569384000,24018876
219.89,220.94,218.83,220,1569470400,20730608
```

[Parameter to, from, date, dte, and more](/docs/sheets/dates-and-times)

Relative Dates

Use keywords like "today", "yesterday", or "now" for date queries. Allows for faster, more intuitive and streamlined coding, as API calls relative to today can be hardcoded with relative date keywords. Query options expirations using days to expiry "DTE".

-   Use keywords like "yesterday" or "today"
-   Request intraday candles relative to 'now' to access the most recently available exchange data
-   Use "DTE" to match the closest expiration date

[Try for Free](https://api.marketdata.app/) [View Docs](/docs/api)

Try It In Your Browser

-   Intraday 30 minute candles for today: [/v1/stocks/candles/30/AAPL/?from=today&to=now](https://api.marketdata.app/v1/stocks/candles/30/AAPL/?from=today&to=now&dateformat=timestamp)

-   Option expirations 45 days out: [/v1/options/chain/AAPL/?dte=45](https://api.marketdata.app/v1/options/chain/AAPL/?dte=45&dateformat=timestamp)

-   Daily candles with 2 years of history: [/v1/stocks/candles/D/AAPL/?from=2YearsAgo&to=today](https://api.marketdata.app/v1/stocks/candles/D/AAPL/?from=2yearsago&to=today&dateformat=timestamp)


[Parameter columns](/docs/api/universal-parameters/columns)

Get Precisely What You Need

You can include or suppress columns in the output to receive exactly the data needed. Columns are returned in the order you request them. Get precisely what you need, no more and no less, optimizing data loads and application performance.

-   Get exactly the data needed
-   Columns are returned in the order you request them
-   Ideal use-case: Dataframes or spreadsheets

[Try for Free](https://api.marketdata.app/) [View Docs](/docs/api)

```
// Stock Candle endpoint
// Standard output
{
  "s": "ok",
  "o": [217.68, 221.03, 219.89],
  "h": [222.49, 221.5, 220.94],
  "l": [217.19, 217.1402, 218.83],
  "c": [221.03, 218.55, 220],
  "t": [1569297600, 1569384000, 1569470400],
  "v": [33463820, 24018876, 20730608]
}

// Stock Candle endpoint
// Only 2 columns requested
{
  "c": [221.03, 218.55, 220],
  "t": [1569297600, 1569384000, 1569470400]
}
```

## Recent API & Sheets Tutorials

Get up and running quickly with our API and Google Sheets Add-on. Learn how to access real-time or historic market data programmatically or in your spreadsheet. [View all](/tutorials/)

[

(image: Blue isometric circuitry lettered HISTORICAL STOCK DATA API, above a pill reading GETTING STARTED: LEARN BY EXAMPLE.)

How To Use The Historical Stock Data API

Learn by example and get started with the historical stock data api. Both daily and intraday data is available going back decades.

](/api/stocks/historical-stock-data-api/)[

(image: The Greek alphabet in white capitals on dark grey, five rows of five, delta and theta among them.)

How To Calculate Option Greeks In Your Spreadsheet

The OPTIONDATA formula pulls delta, gamma, theta and vega straight into your spreadsheet, so position risk updates itself with the market.

](/sheets/options/calculate-option-greeks/)[

(image: A white bell curve over a faded blue collage of web pages, above a red band lettered IMPLIED VOLATILITY.)

How To Calculate Implied Volatility In Your Spreadsheet

Using the OPTIONDATA formula, you can calculate implied volatility for any option.

](/sheets/options/implied-volatility/)[

(image: The Greek letter theta, the options Greek for time decay, glowing white against a purple starfield.)

How to Calculate Theta For An Option

Learn how to calculate theta and understand how to add time decay to your spreadsheets.

](/sheets/options/how-to-calculate-theta/)[

(image: A phone home screen in close-up: the green Google Sheets icon between the Google and Instagram icons.)

How To Get Options Prices in Google Sheets

Learn how to add real-time and historical options prices into your Google Sheets spreadsheets using a single formula.

](/sheets/options/how-to-get-options-prices/)[

(image: A monitor on an office desk displaying MUTUAL FUNDS API, surrounded by glowing candlestick charts and network lines.)

How To Use The Mutual Fund API

Learn by example and get started with the mutual fund api. Get candlestick and pricing data going back decades.

](/api/funds/how-to-use/)[

(image: Covered call payoff profile: the combined position breaks even at 95, rises to a profit of 5.00 at 100, and stays flat above it, while losses continue below 95.)

How To Build A Covered Call Spreadsheet

Build a covered call tracker in Google Sheets, formula by formula — and download our free example sheet to start tracking your positions today.

](/sheets/options/how-to-build-a-covered-call-spreadsheet/)[

(image: OPTION DATA API in heavy black capitals, rim-lit in cyan against a deep navy starfield, with faint candlesticks arcing upward behind the words.)

How To Use The Option Data API — With Examples!

The Option Data API allows you to easily get a real-time or historical option quote for stock, ETF, or index options.

](/api/options/how-to-use-the-option-data-api/)[

(image: The letters API at the centre of a cyan network diagram, its spokes radiating to eight ringed nodes on dark navy.)

How To Use The Option Chain API — With Examples!

The Option Chain API allows for ample sorting & filtering during each request, making it easy to get exactly the data you need.

](/api/options/option-chain-api/)[

(image: The letters API at the centre of a cyan network diagram, its spokes radiating to eight ringed nodes on dark navy.)

How To Use the Stock Market API — With Examples!

Get real-time and historical market data from the stock market api. Learn quickly with easy to use examples that work right from your browser.

](/api/stocks/stock-market-api/)[

(image: A phone home screen in close-up: the green Google Sheets icon between the Google and Instagram icons.)

How To Get Historical Options Prices For Your Spreadsheet

Using the Market Data Add-on, it is possible to get historical options prices going back decades directly into your spreadsheet with a simple formula.

](/sheets/options/historical-options-prices/)[

(image: The letters API at the centre of a cyan network diagram, its spokes radiating to eight ringed nodes on dark navy.)

How To Use The Free Stock Market API: A Guided Tour of our Swagger UI

Finally, a free stock market API without scraping or proxies. Learn how to get stock pricing data, both current and historical, using swagger.

](/api/stocks/free-stock-market-api/)
