API Documentation

Build apps, bots, and integrations on top of StockMarketWizzard. The API gives you real-time market data and full programmatic control of your paper trading account.

Quick Start

  1. Sign up for a free paper trading account.
  2. Go to API Keys and create a new key. Save it — it's only shown once.
  3. Send the key as a Bearer token in the Authorization header.
Example: get a TSLA quote
curl -H "Authorization: Bearer swz_YOUR_KEY_HERE" \
  https://stockmarketwizzard.com/api/v1/stock/TSLA

Authentication

All API requests require an API key. You can pass it three ways:

  • Authorization: Bearer swz_… (recommended)
  • x-api-key: swz_…
  • ?api_key=swz_… (query param, less secure)
Scopes: Each key has one or more scopes. read grants access to all data and account-view endpoints. trade is required to place or cancel orders.

Rate Limits

Data endpoints
120
requests per minute, per key
Trading endpoints
30
orders per minute, per key

The current rate-limit budget is returned in the X-RateLimit-Remaining response header. A 429 response means you should slow down.

Market Data

Get a real-time stock quote (price, change, volume, market cap, etc.)
Historical candles (OHLCV). days: 1-3650.
Latest news articles for a symbol.
Full options chain with calls and puts.
Income, advanced metrics, and company info combined.
Search for stocks by name or ticker.
All futures contracts with live prices. Optional ?category=energy.
Top paper trading accounts ranked by equity.

Paper Trading

Cash balance, positions, and pending orders.
Detailed portfolio with positions and pending orders.
All orders (filled, pending, cancelled).
Place a new order. Supports MARKET, LIMIT, STOP, STOP_LIMIT, TRAILING_STOP.
Cancel a pending order.
Filled trade history.

Errors

Errors are returned as JSON with an error field and a standard HTTP status code.

400Invalid input
401Missing or invalid API key
403Key missing required scope
404Resource not found
429Rate limit exceeded
502Upstream data error
500Server error
Base URL: https://stockmarketwizzard.com