US Stock Market Data API

TickDB delivers US stock quotes, top-of-book data, trades and historical bars via REST and WebSocket, with premarket, after-hours and overnight coverage by symbol.

Market Coverage

Exchange / Category Symbols Data Capabilities Frequency
NYSE 2,553
  • Quotes
  • Candlesticks
  • Intraday
  • Order book
  • Trades

Also supports instrument information, adjusted candles and adjustment factors; metrics, capital flow, company financials and events depend on instrument and permissions.

Updates during trading sessions
NASDAQ 6,801
  • Quotes
  • Candlesticks
  • Intraday
  • Order book
  • Trades

Also supports instrument information, adjusted candles and adjustment factors; metrics, capital flow, company financials and events depend on instrument and permissions.

Updates during trading sessions
AMEX 839
  • Quotes
  • Candlesticks
  • Intraday
  • Order book
  • Trades

Also supports instrument information, adjusted candles and adjustment factors; metrics, capital flow, company financials and events depend on instrument and permissions.

Updates during trading sessions
NYSE Arca 2,672
  • Quotes
  • Candlesticks
  • Intraday
  • Order book
  • Trades

Also supports instrument information, adjusted candles and adjustment factors; metrics, capital flow, company financials and events depend on instrument and permissions.

Updates during trading sessions
BATS 1,302
  • Quotes
  • Candlesticks
  • Intraday
  • Order book
  • Trades

Also supports instrument information, adjusted candles and adjustment factors; metrics, capital flow, company financials and events depend on instrument and permissions.

Updates during trading sessions
OTC Market 2
  • Quotes
  • Candlesticks
  • Intraday
  • Order book
  • Trades

Also supports instrument information, adjusted candles and adjustment factors; metrics, capital flow, company financials and events depend on instrument and permissions.

Updates during trading sessions

Candlesticks are queried via REST; live subscriptions use supported channels. Endpoints, fields and historical coverage depend on the instrument, plan permissions and available data. Instrument counts do not imply full capability coverage for every instrument.

Key US market-data capabilities

Unified access to five major US exchanges for real-time quotes, order books, trades and full-session coverage.

01

Real-time quote snapshots

Query last price, previous close, OHLC, volume and change for individual quotes or multi-symbol scans.

REST · ticker
02

Best Bid / Ask

Returns best bid and ask prices and sizes through REST queries and WebSocket subscriptions.

REST + WS · depth
03

Time-and-sales

Query recent trades and subscribe to the trade channel, with price, size, side and event time fields.

REST + WS · trades / trade
04

Full-session market coverage

Covers US pre-market, regular, after-hours and overnight sessions for continuous cross-session market updates.

Pre-market · Regular · After-hours · Overnight

US stock prices, historical data and extended sessions

How do I get stock prices and historical stock data?

Use ticker for a quote snapshot, WebSocket for ongoing updates, and the K-line endpoint for periodic open, high, low, close and volume. Historical bars are not historical tick-by-tick trades.

How are premarket, after-hours and overnight quotes identified?

REST returns pre_market_quote, post_market_quote and overnight_quote when supported and available. WebSocket trade_session appears in extended sessions as pre_market, post_market or overnight. Availability varies by instrument.

How do I query historical bars?

Bars support 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 1d, 1w and 1M: lowercase m means minutes, uppercase M means months. start_time/end_time use milliseconds; the default is 100 bars, capped at 1,000. The last bar may still be forming. Historical access depends on entitlements and availability.

Which stock price adjustments are supported?

A-shares, Hong Kong and US stocks support adjust=none (default), forward and backward. Record the query time and adjustment mode for archives or backtests; adjusted historical prices can change with corporate actions or data updates.

Code Examples

REST queries

Use documented symbols as examples; confirm current availability and account permissions in the catalog. Replace YOUR_API_KEY locally; never publish a real key in browser code.

Find symbols
curl --fail-with-body -H "X-API-Key: YOUR_API_KEY" \
  "https://api.tickdb.ai/v1/symbols/available?market=US&type=stock&limit=100&offset=0"
Quote snapshot
curl --fail-with-body -H "X-API-Key: YOUR_API_KEY" \
  "https://api.tickdb.ai/v1/market/ticker?symbols=AAPL.US&type=stock"
Daily bars
curl --fail-with-body -H "X-API-Key: YOUR_API_KEY" \
  "https://api.tickdb.ai/v1/market/kline?symbol=AAPL.US&type=stock&interval=1d&limit=100&adjust=none"

Free is a 7-day trial for selected instruments, with quotes and permitted bar queries. It does not allow start_time/end_time historical ranges. Depth, trades and specified historical ranges require the appropriate entitlements; check the current plan for symbols and quotas.

Quick Start

# pip install websocket-client
import websocket
import json

api_key = 'your_api_key_here'
ws_url = f'wss://api.tickdb.ai/v1/realtime?api_key={api_key}'

def on_open(ws):
    ws.send(json.dumps({
        'cmd': 'subscribe',
        'data': {
            'channel': 'ticker',
            'symbols': ['AAPL.US', 'TSLA.US', 'MSFT.US']
        }
    }))

def on_message(ws, message):
    data = json.loads(message)
    print('Received:', data)

ws = websocket.WebSocketApp(ws_url, on_open=on_open, on_message=on_message)
ws.run_forever()

Full documentation available at API Documentation

Choosing a US stock market data API

Compare sessions, feed coverage and book depth. After-hours and overnight are distinct sessions; timestamp precision is not a latency guarantee.

Provider Live data / SessionsDepth / ResearchAccess / Cost modelBest fit
TickDB Multi-market data and research
REST / WebSocket with pre-market, regular, post-market and overnight session information; availability varies by instrument.
Book, trades, candles, intraday and company research. The current standard US route provides best bid/ask; depth depends on entitlements.
API key, no trading account; REST / WebSocket / Skill / MCP / CLI. Free trial; plan-based access.
Session monitoring, US/HK dual-listing analysis, unified terminals and AI research.
Massive Formerly Polygon.io · US market data
WebSocket pre-market, regular and after-hours data; verify overnight separately.
Trades, NBBO quotes, aggregate bars and LULD; crypto L2 is not US stock L2.
API key; product-specific real-time and business plans.
Teams building specialized US market data products.
Alpaca Market data and trading API
WebSocket with separately entitled IEX, SIP, delayed SIP, BOATS and overnight feeds.
Trades, quotes and bars, alongside trading accounts.
API key; full-market and overnight rights depend on feed and plan.
Developers connecting market data, orders and accounts.
Alpha Vantage Query and technical indicator API
Primarily REST; real-time, delayed and extended-hours US data depend on endpoint and entitlement.
Time series, technical indicators and fundamentals.
API key; free quotas and paid entitlements.
Low-frequency research, indicators and education.

Use Cases

Quant Backtesting

Analyze historical candlesticks for strategy validation and parameter optimization.

Trading Terminal

Ticker, depth and trade channels for powering custom market-data interfaces.

Cross-market Monitoring

Subscribe to US-listed Chinese ADRs and HK stocks simultaneously to monitor price spreads.

Choose Your Plan

All paid plans support monthly / quarterly / semi-annual / annual billing. Prices below are annual (20% off)

Free is a 7-day trial for selected instruments, with quotes and permitted bar queries. It does not allow start_time/end_time historical ranges. Depth, trades and specified historical ranges require the appropriate entitlements; check the current plan for symbols and quotas.

🔥 Save 20% Annually

Free

Free 7-Day Trial

 

  • Selected symbols*
  • 5 concurrent subscriptions
  • Real-time quotes
  • Real-time K-line
  • 1 WebSocket connection
  • 30 req/min API calls
  • Email support
Start Free
-20%

Starter

$99/mo
$79 /mo

Billed annually $950

  • All symbols
  • 50 full-market subscriptions
  • Real-time quotes
  • Real-time K-line
  • Real-time order book
  • Real-time trades
  • 1 year historical data
  • 1 WebSocket connection
  • 60 req/min API calls
  • Basic financial data
  • Email support
Subscribe Now
-20%
Most Popular

Professional

$299/mo
$239 /mo

Billed annually $2870

  • All symbols
  • 300 full-market subscriptions
  • Real-time quotes
  • Real-time K-line
  • Real-time order book
  • Real-time trades
  • 3 years historical data
  • 3 WebSocket connections
  • 600 req/min API calls
  • Professional financial data
  • News data
  • Telegram support
Subscribe Now
-20%

All US-Shares

$699/mo
$559 /mo

Billed annually $6710

  • All symbols
  • Full-market queries and subscriptions
  • Additional 3000 full-market subscriptions
  • Real-time quotes
  • Real-time K-line
  • Real-time order book
  • Real-time trades
  • 5 years historical data
  • 5 WebSocket connections
  • 1500 req/min API calls
  • Professional financial data
  • News data
  • Telegram support
Subscribe Now
-20%

Enterprise

$899/mo
$719 /mo

Billed annually $8630

  • All symbols
  • Full-market queries and subscriptions
  • Additional 5000 full-market subscriptions
  • Real-time quotes
  • Real-time K-line
  • Real-time order book
  • Real-time trades
  • 10 years historical data
  • 10 WebSocket connections
  • 1800 req/min API calls
  • Professional financial data
  • News data
  • Telegram support
Subscribe Now

FAQ

What are US stock trading hours, including extended sessions and daylight saving time?

Regular trading is 09:30–16:00 US Eastern Time on normal trading days. Nasdaq premarket is 04:00–09:30 and after-hours is 16:00–20:00 ET. In Beijing time, regular trading is 21:30–04:00 the next day during US daylight saving time, or 22:30–05:00 during standard time. Weekends and exchange holidays are normally closed, with early closes on some dates. Overnight sessions depend on the venue and instrument and are distinct from after-hours; TickDB coverage varies by symbol.

Official trading rules

Does US stock data include event timestamps?

Yes. Ticker, depth and trades responses include 13-digit millisecond event timestamps. End-to-end latency varies by session, upstream data and client network.

Which US exchanges are covered?

NYSE, NASDAQ, AMEX, NYSE Arca and BATS — approximately 14,169 symbols in total.

How does TickDB compare to Massive (formerly Polygon.io)?

Consider Massive for specialized US feeds, Alpaca for data and trading, and Alpha Vantage for indicator queries. TickDB suits cross-market monitoring and research, with extended sessions subject to instrument coverage.

How do I get started?

Sign up for a free API Key, then connect via WebSocket at wss://api.tickdb.ai/v1/realtime to subscribe to real-time US stock data.

How do I get stock prices and historical stock data?

Use ticker for a quote snapshot, WebSocket for ongoing updates, and the K-line endpoint for periodic open, high, low, close and volume. Historical bars are not historical tick-by-tick trades.

How are premarket, after-hours and overnight quotes identified?

REST returns pre_market_quote, post_market_quote and overnight_quote when supported and available. WebSocket trade_session appears in extended sessions as pre_market, post_market or overnight. Availability varies by instrument.

How do I query historical bars?

Bars support 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 1d, 1w and 1M: lowercase m means minutes, uppercase M means months. start_time/end_time use milliseconds; the default is 100 bars, capped at 1,000. The last bar may still be forming. Historical access depends on entitlements and availability.

Which stock price adjustments are supported?

A-shares, Hong Kong and US stocks support adjust=none (default), forward and backward. Record the query time and adjustment mode for archives or backtests; adjusted historical prices can change with corporate actions or data updates.

What data is included in the free trial?

Free is a 7-day trial for selected instruments, with quotes and permitted bar queries. It does not allow start_time/end_time historical ranges. Depth, trades and specified historical ranges require the appropriate entitlements; check the current plan for symbols and quotas.

Start Streaming Real-time Market Data

Sign up for a free API Key. WebSocket real-time streaming. Get started in minutes.