{"openapi":"3.1.0","info":{"title":"Strasmore no-key market data API","version":"1.0.0","description":"Read-only ClickHouse SQL over US stock and options market data with no key and no signup. Limits: 500 rows and 20s per query, history from 2025-01-01. The same data with a key: https://api.strasmore.com/docs. MCP: https://ai.strasmore.com/mcp.","contact":{"email":"terminal@strasmore.com"},"termsOfService":"https://www.strasmore.com/terms/"},"servers":[{"url":"https://ai.strasmore.com"}],"paths":{"/api/demo/sql":{"get":{"operationId":"runSql","summary":"Run one read-only SELECT","parameters":[{"name":"sql","in":"query","required":true,"schema":{"type":"string"},"description":"One ClickHouse SELECT; tables as global_markets.<table>.","example":"SELECT date, close FROM global_markets.stocks_daily_aggs WHERE ticker = 'AAPL' ORDER BY date DESC LIMIT 5"}],"responses":{"200":{"description":"Rows, the limits that applied, and a `plan` line saying what a paid plan would add.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Refused or failed; `error`, `error_code` and a repair hint. A refusal a plan fixes names it (`upgrade_plan`, `checkout_url`)."},"402":{"description":"Every date asked for lies before the free history window (HISTORY_WINDOW_EXCEEDED); names the plan that reads it."},"429":{"description":"Per-IP rate limit; see Retry-After."}}},"post":{"operationId":"runSqlPost","summary":"Run one read-only SELECT (body)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sql"],"properties":{"sql":{"type":"string"}}},"example":{"sql":"SELECT date, close FROM global_markets.stocks_daily_aggs WHERE ticker = 'AAPL' ORDER BY date DESC LIMIT 5"}}}},"responses":{"200":{"description":"Rows, the limits that applied, and a `plan` line saying what a paid plan would add.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Refused or failed; `error`, `error_code` and a repair hint. A refusal a plan fixes names it (`upgrade_plan`, `checkout_url`)."},"402":{"description":"Every date asked for lies before the free history window (HISTORY_WINDOW_EXCEEDED); names the plan that reads it."},"429":{"description":"Per-IP rate limit; see Retry-After."}}}},"/api/demo/schema":{"get":{"operationId":"getSchema","summary":"Every table and column this no-key access can query","responses":{"200":{"description":"Tables, columns, which need a paid plan, and history columns.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/demo/catalog":{"get":{"operationId":"getCatalog","summary":"Pre-built questions, and how to ask your own","responses":{"200":{"description":"The catalogue.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/demo/options/contracts":{"get":{"operationId":"listOptionContracts","summary":"Option contracts quoted on a date","description":"Every contract with at least one quote in the regular session on `date`, with its expiry, type and strike read out of the OCC ticker.","parameters":[{"name":"underlying","in":"query","schema":{"type":"string"},"description":"US equity or ETF symbol. Required unless `contract` is given.","example":"SPY"},{"name":"date","in":"query","schema":{"type":"string"},"description":"Trading date, YYYY-MM-DD. Required.","example":"2026-10-06"},{"name":"contract","in":"query","schema":{"type":"string"},"description":"One OCC option ticker, as the tape stores it. Replaces every filter.","example":"O:SPY261016C00500000"},{"name":"expiry_from","in":"query","schema":{"type":"string"},"description":"Earliest expiry to include, YYYY-MM-DD."},{"name":"expiry_to","in":"query","schema":{"type":"string"},"description":"Latest expiry to include, YYYY-MM-DD."},{"name":"type","in":"query","schema":{"type":"string"},"description":"call or put."},{"name":"strike_min","in":"query","schema":{"type":"number"},"description":"Lowest strike to include."},{"name":"strike_max","in":"query","schema":{"type":"number"},"description":"Highest strike to include."},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"The `next_cursor` of the previous page."},{"name":"format","in":"query","schema":{"type":"string"},"description":"csv for the same columns as CSV; JSON otherwise."}],"responses":{"200":{"description":"A page of rows, the window this access reads, and the SQL it came from.","content":{"application/json":{"schema":{"type":"object","properties":{"request":{"type":"object"},"columns":{"type":"array","items":{"type":"string"}},"rows":{"type":"array","items":{"type":"object"}},"row_count":{"type":"integer"},"truncated":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true},"tape_window":{"type":"object"},"sql":{"type":"string"}}}}}},"400":{"description":"Refused or failed; `error`, `error_code` and a repair hint. A refusal a plan fixes names it (`upgrade_plan`, `checkout_url`)."},"402":{"description":"Every date asked for lies before the free history window (HISTORY_WINDOW_EXCEEDED); names the plan that reads it."},"429":{"description":"Per-IP rate limit; see Retry-After."}}}},"/v1/demo/options/quote-snapshots":{"get":{"operationId":"getOptionQuoteSnapshots","summary":"A clean NBBO per contract every N seconds","description":"One row per contract per interval bucket from 09:30 to 16:00 ET: the last valid quote at or before the bucket's end (both sides quoted (bid_size > 0 and ask_size > 0), neither price negative, and ask_price >= bid_price), carried forward across buckets with no update. Without a key: one contract, or an expiry range of at most 31 days.","parameters":[{"name":"underlying","in":"query","schema":{"type":"string"},"description":"US equity or ETF symbol. Required unless `contract` is given.","example":"SPY"},{"name":"date","in":"query","schema":{"type":"string"},"description":"Trading date, YYYY-MM-DD. Required.","example":"2026-10-06"},{"name":"interval","in":"query","schema":{"type":"integer"},"description":"Bucket length in seconds, 1-3600. Default 60.","example":60},{"name":"contract","in":"query","schema":{"type":"string"},"description":"One OCC option ticker, as the tape stores it. Replaces every filter.","example":"O:SPY261016C00500000"},{"name":"expiry_from","in":"query","schema":{"type":"string"},"description":"Earliest expiry to include, YYYY-MM-DD."},{"name":"expiry_to","in":"query","schema":{"type":"string"},"description":"Latest expiry to include, YYYY-MM-DD."},{"name":"type","in":"query","schema":{"type":"string"},"description":"call or put."},{"name":"strike_min","in":"query","schema":{"type":"number"},"description":"Lowest strike to include."},{"name":"strike_max","in":"query","schema":{"type":"number"},"description":"Highest strike to include."},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"The `next_cursor` of the previous page."},{"name":"format","in":"query","schema":{"type":"string"},"description":"csv for the same columns as CSV; JSON otherwise."}],"responses":{"200":{"description":"A page of rows, the window this access reads, and the SQL it came from.","content":{"application/json":{"schema":{"type":"object","properties":{"request":{"type":"object"},"columns":{"type":"array","items":{"type":"string"}},"rows":{"type":"array","items":{"type":"object"}},"row_count":{"type":"integer"},"truncated":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true},"tape_window":{"type":"object"},"sql":{"type":"string"}}}}}},"400":{"description":"Refused or failed; `error`, `error_code` and a repair hint. A refusal a plan fixes names it (`upgrade_plan`, `checkout_url`)."},"402":{"description":"Every date asked for lies before the free history window (HISTORY_WINDOW_EXCEEDED); names the plan that reads it."},"429":{"description":"Per-IP rate limit; see Retry-After."}}}}},"components":{"schemas":{"Result":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"string"}},"rows":{"type":"array","items":{"type":"object"}},"row_count":{"type":"integer"},"truncated":{"type":"boolean"},"limits":{"type":"object"},"window":{"type":"object","description":"History-window facts, when a window applied."},"plan":{"type":"object","properties":{"line":{"type":"string"}}}}}}}}