Read-only tastytrade brokerage data (accounts, instruments, market metrics, live quotes) for SQL
Brings the tastytrade brokerage API into DuckDB as table functions, so account and market data can be joined, filtered and aggregated like any table.
What it covers. Your accounts and portfolio (balances, positions, transactions, order history and fills, margin, net-liquidating-value history), instrument reference data and option chains for equities and futures, corporate events (dividends, earnings), per-symbol market metrics and the IV term structure, the risk-free rate, and live quotes, greeks, candles, trades, daily summaries and profiles from the DXLink streamer.
Key concepts.
- Credentials come only from a DuckDB secret you create after attaching; a hosted worker holds none of its own. Scope a secret with
SCOPE 'tastytrade://<account_number>' to hold several accounts.
- Account-scoped functions span every account unless you pass
account_number => '...' or ATTACH with the account_number option.
- Symbol-keyed functions take the symbol as a positional per-row argument, so they work with a literal or as a LATERAL join over another query's rows.
- Streamer symbols (the
streamer_symbol column) key the live market-data functions; live data needs a production session with market-data entitlements.
CREATE SECRET (TYPE tastytrade, client_secret '...', refresh_token '...', is_test false);
The worker is strictly read-only: it never places or modifies orders.