Guides
Recipes
Five reads against the live routes. Each one uses the client on the Python page. Samples on the group pages are the captured responses.
1. SPX expiries, then the weekly walls
Resolve the alias w1 from the expiry list, then ask for primary levels. method defaults to cumulative if you omit it.
expiries = api.post("/api/v1/discovery/expiries", {"symbol": "SPX"}) weekly = next( row for row in expiries["data"]["items"] if "w1" in row["aliases"] ) levels = api.post("/api/v1/gamma/key-levels/primary", { "symbol": "SPX", "expiry": "w1", }) print(weekly["expiration_date"], levels["data"]["items"][0]["levels"]["HVL"])
2. Today’s 0DTE box
The latest box always has eod, pre, and open. A session that was not stored is null, not a missing key. The four numbers are box edges, not a quote. Live refresh, the 0DTE capture times, and the past-box route are the data-clock glossary entry. The response has no meta.notes.
box = api.post("/api/v1/range/0dte-box", {"symbols": ["SPX"]}) latest = box["data"]["items"][0]["latest"] print(latest["target_date"], latest["widest"])
3. IV rank for a few names
iv = api.post("/api/v1/volatility/iv-metrics", { "symbols": ["SPX", "QQQ", "IWM"], }) for row in iv["data"]["items"]: print(row["symbol"], row["iv_rank"], row["ivx_avg"])
4. Walk the benchmark pages
Pass benchmarks as a JSON array, for example ["SPY","QQQ"], to keep only the blocks you need. A comma-separated string is 422. The best fit still compares all five. A page is up to 200 rows; follow next_cursor.
seen = 0 body = {"symbols": ["AAPL", "SPX"], "benchmarks": ["SPY", "QQQ"]} for page in api.pages("/api/v1/fundamentals/benchmark-correlation", body): seen += page["meta"]["count"] print(seen, page["meta"]["total"])
5. Price change today, then the same symbol's past days
The current row has spot_price, change_pts, change_pct, and snapshot_at. The history row has spot_price (that day’s close, on the same scale as change_pts), change_pts, and change_pct. History rows come newest day first.
now = api.post("/api/v1/technical/price-change", { "symbols": ["QQQ", "SPY"], }) for row in now["data"]["items"]: print(row["symbol"], row["spot_price"], row["change_pts"], row["change_pct"]) past = api.post("/api/v1/history/technical/price-change", { "symbol": "QQQ", }) print(past["data"]["items"][0]["snapshot_date"])
TanukiTrade API and MCP. Derived options analytics for your code and for agents. Not investment advice. tanukitrade.com