Developer docs

Your first call in minutes

Swap in your API key and base URL and keep using the Polygon SDK you already know.

What each plan includes:
Starter — data delayed about 15 minutes, 5 years of historical bars, no trades/quotes or financials.
Advanced — real-time data, 20+ years of historical bars, plus trades, quotes (NBBO), financials and WebSocket streaming.
Options — US options contracts, chain snapshots with Greeks and implied volatility, bars, trades and quotes, 5+ years of history. Buy it alone or add it to a stocks plan; both share one API key.
Endpoints outside your plan return 404, and requests beyond your plan's history window return 403. We never silently return partial data.

Quick start

Install the Python SDK and create a client:

pip install polygon-api-client

from polygon import RESTClient

client = RESTClient(
    api_key="mh_live_your_key",
    base="https://marilux.dev"
)

Authentication

Send your key as a Bearer token (recommended), or as the apiKey query parameter for compatibility.

curl "https://marilux.dev/v2/aggs/ticker/AAPL/prev" \
  -H "Authorization: Bearer mh_live_your_key"

Import into Postman

Every REST endpoint, parameter and response schema is described in our OpenAPI 3.1 file. Import it into your API client, add your key, and you can try each endpoint without writing code.

  • Postman: Import → Link, paste https://marilux.dev/openapi.json
  • Insomnia / Bruno / Hoppscotch: import the same URL as an OpenAPI spec
  • Choose Bearer Token auth and paste your API key

You can also hand the file to Cursor, Claude or another AI coding tool, or generate a typed client with openapi-generator. Field descriptions in the spec are currently in Chinese; the field names match the Polygon API.

Contents

  • Stocks endpoints: Bars, snapshots, reference data and corporate actions for US stocks and ETFs; Advanced adds trades, quotes, financials and short data.
  • WebSocket streaming: Advanced only: real-time trades and quotes over WebSocket, using the same protocol as Polygon.
  • Options data: Contracts, chain snapshots with Greeks, IV and open interest, options bars, trades and quotes.
  • Flat Files: Full-market daily and minute bars packaged per trading day — the fast way to load a backtest database.
  • Headers & limits: How calls, rate, concurrency and traffic quotas are counted, and how to read them from response headers.
  • Errors: What each status code and error message means, and what to do about it.