{"openapi":"3.0.3","info":{"title":"Gnist Context — Polygon (Market Data)","description":"Market data — stock prices, options, forex, and crypto from Polygon.io.\n\n- **MCP endpoint:** `https://context.gnist.ai/mcp/polygon/`\n- **Toolkit page:** `/toolkits/polygon`\n- **Full API spec:** `/api/openapi.json`\n- **Get an API key:** `/signup`","version":"1.0.0","contact":{"name":"GnistAI","url":"https://gnist.ai"}},"servers":[{"url":"https://context.gnist.ai","description":"Production"}],"paths":{"/rest/polygon/get_quote":{"post":{"tags":["Finance"],"summary":"get_quote","description":"Get the latest quote snapshot for a US equity ticker.\n\nReturns real-time (or 15-minute delayed on free tier) bid/ask, last trade,\nintraday OHLCV, and day-over-day change for a single ticker.\n\nArgs:\n    ticker: Ticker symbol (e.g. \"AAPL\", \"MSFT\", \"TSLA\"). Case-insensitive.\n\nReturns:\n    ticker, name, last_price, bid, ask, open, high, low, close, volume,\n    vwap, prev_close, change, change_pct, updated (Unix nanoseconds).","operationId":"polygon_get_quote","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"ticker":{"description":"Ticker symbol (e.g. \"AAPL\", \"MSFT\", \"TSLA\"). Case-insensitive.","type":"string"}},"required":["ticker"],"type":"object"}}}}}},"/rest/polygon/get_trades":{"post":{"tags":["Finance"],"summary":"get_trades","description":"Get recent trade ticks for a US equity ticker on a specific date.\n\nReturns individual trade executions with price, size, exchange, and\ntrade conditions. Useful for microstructure analysis, VWAP calculations,\nand understanding intraday price action.\n\nArgs:\n    ticker: Ticker symbol (e.g. \"AAPL\"). Case-insensitive.\n    date: Trade date in YYYY-MM-DD format (e.g. \"2024-01-15\").\n    limit: Maximum trades to return (default 50, max 50000).\n\nReturns:\n    ticker, date, count, and trades list of {timestamp (Unix ns), price, size,\n    exchange (int code), conditions (list of condition codes)}.","operationId":"polygon_get_trades","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"ticker":{"description":"Ticker symbol (e.g. \"AAPL\"). Case-insensitive.","type":"string"},"date":{"description":"Trade date in YYYY-MM-DD format (e.g. \"2024-01-15\").","type":"string"},"limit":{"default":50,"description":"Maximum trades to return (default 50, max 50000).","type":"integer"}},"required":["ticker","date"],"type":"object"}}}}}},"/rest/polygon/get_aggs":{"post":{"tags":["Finance"],"summary":"get_aggs","description":"Get OHLCV aggregate bars for a ticker over a date range.\n\nRetrieves candlestick/bar data at any granularity from 1-minute to annual.\nUse for charting, technical analysis, trend identification, and backtesting.\n\nTimespans: \"minute\", \"hour\", \"day\", \"week\", \"month\", \"quarter\", \"year\"\n\nExamples:\n- get_aggs(\"AAPL\", 1, \"day\", \"2024-01-01\", \"2024-03-31\") — daily bars for Q1 2024\n- get_aggs(\"MSFT\", 5, \"minute\", \"2024-01-15\", \"2024-01-15\") — 5-min bars for one day\n- get_aggs(\"SPY\", 1, \"week\", \"2023-01-01\", \"2024-01-01\") — weekly bars for 2023\n\nArgs:\n    ticker: Ticker symbol (e.g. \"AAPL\", \"SPY\", \"BTC-USD\"). Case-insensitive.\n    multiplier: Size of the aggregate window (e.g. 1, 5, 15).\n    timespan: Time unit — \"minute\", \"hour\", \"day\", \"week\", \"month\", \"quarter\", \"year\".\n    from_date: Start date (YYYY-MM-DD).\n    to_date: End date (YYYY-MM-DD).\n    adjusted: Whether to adjust for splits and dividends (default True).\n    limit: Maximum bars to return (default 120, max 50000).\n\nReturns:\n    ticker, multiplier, timespan, adjusted, count, and bars list of\n    {timestamp (Unix ms), open, high, low, close, volume, vwap, transactions}.","operationId":"polygon_get_aggs","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"ticker":{"description":"Ticker symbol (e.g. \"AAPL\", \"SPY\", \"BTC-USD\"). Case-insensitive.","type":"string"},"multiplier":{"description":"Size of the aggregate window (e.g. 1, 5, 15).","type":"integer"},"timespan":{"description":"Time unit — \"minute\", \"hour\", \"day\", \"week\", \"month\", \"quarter\", \"year\".","type":"string"},"from_date":{"description":"Start date (YYYY-MM-DD).","type":"string"},"to_date":{"description":"End date (YYYY-MM-DD).","type":"string"},"adjusted":{"default":true,"description":"Whether to adjust for splits and dividends (default True).","type":"boolean"},"limit":{"default":120,"description":"Maximum bars to return (default 120, max 50000).","type":"integer"}},"required":["ticker","multiplier","timespan","from_date","to_date"],"type":"object"}}}}}},"/rest/polygon/get_options_chain":{"post":{"tags":["Finance"],"summary":"get_options_chain","description":"Get the options chain snapshot for an underlying equity ticker.\n\nReturns options contracts with strike, expiration, implied volatility,\nopen interest, and Greeks (delta, gamma, theta, vega). Use for options\nanalysis, hedging decisions, and volatility surface exploration.\n\nNote: Options data requires a paid Polygon.io subscription (Starter or above).\n\nArgs:\n    underlying: Underlying ticker symbol (e.g. \"AAPL\", \"SPY\"). Case-insensitive.\n    expiration_date: Filter to a specific expiration (YYYY-MM-DD). If omitted, returns all expirations.\n    contract_type: Filter by \"call\" or \"put\". If omitted, returns both.\n    strike_price_gte: Minimum strike price filter.\n    strike_price_lte: Maximum strike price filter.\n    limit: Maximum contracts to return (default 50).\n\nReturns:\n    underlying, count, and contracts list of {ticker, contract_type, strike_price,\n    expiration_date, exercise_style, implied_volatility, open_interest, delta,\n    gamma, theta, vega, last_price, volume}.","operationId":"polygon_get_options_chain","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"underlying":{"description":"Underlying ticker symbol (e.g. \"AAPL\", \"SPY\"). Case-insensitive.","type":"string"},"expiration_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Filter to a specific expiration (YYYY-MM-DD). If omitted, returns all expirations."},"contract_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Filter by \"call\" or \"put\". If omitted, returns both."},"strike_price_gte":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Minimum strike price filter."},"strike_price_lte":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Maximum strike price filter."},"limit":{"default":50,"description":"Maximum contracts to return (default 50).","type":"integer"}},"required":["underlying"],"type":"object"}}}}}},"/rest/polygon/search_tickers":{"post":{"tags":["Finance"],"summary":"search_tickers","description":"Search for ticker symbols and company names on Polygon.io.\n\nUse this to find the correct ticker symbol when you know a company name\nbut not its symbol, or to explore what's available in a given market.\n\nMarkets: \"stocks\" (US equities), \"crypto\" (cryptocurrency), \"fx\" (forex),\n         \"otc\" (OTC/pink sheets), \"indices\" (market indices)\n\nExamples:\n- search_tickers(\"Apple\") — find AAPL and related tickers\n- search_tickers(\"bitcoin\", market=\"crypto\") — find BTC crypto pairs\n- search_tickers(\"EUR\", market=\"fx\") — find EUR currency pairs\n- search_tickers(\"S&P 500\", market=\"indices\") — find S&P 500 index\n\nArgs:\n    query: Search string — company name, partial ticker, or keyword.\n    market: Market type (default \"stocks\").\n    active: If True, only return currently active/listed tickers (default True).\n    limit: Maximum results to return (default 20).\n\nReturns:\n    count and tickers list of {ticker, name, market, locale, type,\n    currency, primary_exchange, active}.","operationId":"polygon_search_tickers","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"query":{"description":"Search string — company name, partial ticker, or keyword.","type":"string"},"market":{"default":"stocks","description":"Market type (default \"stocks\").","type":"string"},"active":{"default":true,"description":"If True, only return currently active/listed tickers (default True).","type":"boolean"},"limit":{"default":20,"description":"Maximum results to return (default 20).","type":"integer"}},"required":["query"],"type":"object"}}}}}},"/rest/polygon/report_feedback":{"post":{"tags":["Finance"],"summary":"report_feedback","description":"Report a bug, feature request, or general feedback for this data source.\n\nUse this when something doesn't work as expected, when you'd like\na new feature, or when you have suggestions for improvement.\n\nArgs:\n    feedback: Describe the issue or suggestion.\n    feedback_type: One of 'bug', 'feature_request', or 'general'.","operationId":"polygon_report_feedback","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"feedback":{"type":"string"},"feedback_type":{"default":"general","type":"string"}},"required":["feedback"],"type":"object"}}}}}}},"tags":[{"name":"Finance","description":"Data sources: Finance"}],"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"gnist-api-key","description":"API key passed via request header."},"ApiKeyQuery":{"type":"apiKey","in":"query","name":"gnist_api_key","description":"API key passed via query parameter."}}}}