Getting Started with the marketdata.co API
Details
Docs navigation
- Getting started: Quickstart (you are here), Authentication, Rate limits, Errors and retries
- Guides: Symbol formats, Timestamps and time zones, Pagination, Split and dividend adjustments, WebSocket streaming, Dataset downloads, Excel and Google Sheets, Changelog
- API reference: Stock bars, Stock trades and quotes, Snapshots and movers, Tickers, exchanges, calendar, Splits and dividends, Fundamentals and SEC filings, Options chain and Greeks, Options EOD, bars, OI, Forex, Crypto, Crypto derivatives, Futures bars and continuous, Settlements and COT, Indices, Economic data, Technical indicators
- SDKs: Python, JavaScript
This quickstart takes you from no account to a first response in about ten minutes: get an API key, call one endpoint, load the result into pandas and know where to go next. It is written for developers and traders who already know what an OHLCV bar is and want the shape of the API before writing real code.
Early access. The API described in these docs is the planned v1. It is not live yet. The free sample downloads on /sample-data are real and available today, and you can join early access to get a key the day the API opens.
Details
Steps
1. Get an API key
Sign up through early access. When your account opens you will find your key under Account > API keys. Keys are long random strings; treat them like a password. The authentication guide covers rotation and storage.
2. Make your first request
Every endpoint lives under one base URL:
https://api.marketdata.co/v1
Send your key in the Authorization header. This example asks for 10 daily bars of Apple:
Example (curl):
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.marketdata.co/v1/stocks/bars?symbol=AAPL&interval=1d&start=2026-11-03&end=2026-11-17"
3. Read the response
Responses are JSON with the same envelope everywhere: a status, a count, a next_cursor for paging and a results list.
{
"status": "ok",
"count": 10,
"next_cursor": null,
"results": [
{
"symbol": "AAPL",
"date": "2026-11-03",
"interval": "1d",
"open": 228.41,
"high": 231.07,
"low": 227.9,
"close": 230.62,
"volume": 48213560,
"adjusted_close": 230.62,
"currency": "USD"
}
]
}
Values above are an example, not real prices. Field names are snake_case and written out in full (open, not o). Prices and sizes are numbers. Every row carries its own symbol, so you can stack responses for many tickers without adding a column.
4. Load it into pandas
Example (Python):
import os
import requests
import pandas as pd
API = "https://api.marketdata.co/v1"
headers = {"Authorization": f"Bearer {os.environ['MARKETDATA_API_KEY']}"}
r = requests.get(f"{API}/stocks/bars", headers=headers,
params={"symbol": "AAPL", "interval": "1d", "start": "2026-01-01"})
r.raise_for_status()
df = pd.DataFrame(r.json()["results"]).set_index("date")
print(df[["open", "high", "low", "close", "volume"]].tail())
5. Ask for CSV instead
Add format=csv to any REST call that returns rows. You get a plain CSV with a header line, which opens in Excel or loads with pd.read_csv. Spreadsheet users can read the Excel and Google Sheets guide.
6. Pick the endpoint you need
| You want | Endpoint | Reference |
|---|---|---|
| Daily or minute bars for a stock | GET /v1/stocks/bars?symbol= |
Stock bars |
| Latest price for a watchlist | GET /v1/stocks/snapshot |
Snapshots |
| An option chain with Greeks | GET /v1/options/chain?underlying_symbol= |
Options chain |
| FX rates | GET /v1/forex/daily?symbol= |
Forex |
| Crypto bars | GET /v1/crypto/bars?symbol= |
Crypto |
| Continuous futures | GET /v1/futures/continuous?symbol= |
Futures |
Watch out
Notes and gotchas
- Timestamps are UTC in ISO 8601. Daily rows use a
datein the exchange's own calendar. Details in timestamps and time zones. - Stock bars are split-adjusted by default. Pass
adjusted=falsefor raw prices. See adjustments. startis inclusive andendis exclusive.- An empty
resultslist withstatus: "ok"means the request was valid but nothing traded in that window (a holiday, or a weekend for stocks). It is not an error. - Long ranges come back in pages. Keep calling with
cursoruntilnext_cursorisnull(pagination). - What you can reach depends on your plan: Free gets 2 years of daily stock bars, Starter ($29/mo) full daily history and delayed intraday, Pro ($79/mo) real time.
Keep reading
Next steps
Details
Was this page useful?
[Yes] [No]
Missing an endpoint, a field or a symbol? Tell us on the custom data form.