query_market_data
Execute SQL queries to analyze loaded market data, including price history and options chains, for financial research and decision-making.
Instructions
Run SQL query against loaded market data (price_history and options tables). First use load_price_history or load_option_chain to load data, then query it. Only SELECT queries are allowed. Use get_data_schema to see table schemas and example queries.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sql": "<sql>"
},
"name": "query_market_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | SQL SELECT query to run against loaded market data. Available tables: 'price_history' (OHLCV data) and 'options' (option chain with Greeks). Only SELECT queries are allowed. |