GnistAI GnistAI
Log in

Polygon (Market Data)

Market data — stock prices, options, forex, and crypto from Polygon.io.

Overview   |   MCP Docs   |   API Docs   |   OpenAPI   |   Playground   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 6 tools tools 6 6 Finance

Data source: Polygon.io

MCP MCP Protocol

Endpoint https://context.gnist.ai/mcp/polygon/
claude_desktop_config.json
{
  "mcpServers": {
    "gnist-polygon": {
      "url": "https://context.gnist.ai/mcp/polygon/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}
Shell
curl -X POST "https://context.gnist.ai/mcp/polygon/" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_quote", "arguments": {"ticker": "example"}}}'

API REST API

API Root https://context.gnist.ai/rest/polygon/

6 endpoints available:

Shell
curl "https://context.gnist.ai/rest/polygon/get_quote?ticker=example" \
  -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx

resp = httpx.get(
    "https://context.gnist.ai/rest/polygon/get_quote",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    params={
        "ticker": "example"
},
)
print(resp.json())

OpenAPI Spec  ·  Full API Docs

CLI Command Line

Command gc polygon

CLI documentation will be available when the GnistAI SDK is published.

Install
pip install gnistai

Available Tools (6)

get_quote
Get the latest quote snapshot for a US equity ticker.
ParameterTypeRequiredDescription
tickerstringrequiredTicker symbol (e.g. "AAPL", "MSFT", "TSLA"). Case-insensitive.
get_trades
Get recent trade ticks for a US equity ticker on a specific date.
ParameterTypeRequiredDescription
tickerstringrequiredTicker symbol (e.g. "AAPL"). Case-insensitive.
datestringrequiredTrade date in YYYY-MM-DD format (e.g. "2024-01-15").
limitintegeroptionalMaximum trades to return (default 50, max 50000). (default: 50)
get_aggs
Get OHLCV aggregate bars for a ticker over a date range.
ParameterTypeRequiredDescription
tickerstringrequiredTicker symbol (e.g. "AAPL", "SPY", "BTC-USD"). Case-insensitive.
multiplierintegerrequiredSize of the aggregate window (e.g. 1, 5, 15).
timespanstringrequiredTime unit — "minute", "hour", "day", "week", "month", "quarter", "year".
from_datestringrequiredStart date (YYYY-MM-DD).
to_datestringrequiredEnd date (YYYY-MM-DD).
adjustedbooleanoptionalWhether to adjust for splits and dividends (default True). (default: true)
limitintegeroptionalMaximum bars to return (default 120, max 50000). (default: 120)
get_options_chain
Get the options chain snapshot for an underlying equity ticker.
ParameterTypeRequiredDescription
underlyingstringrequiredUnderlying ticker symbol (e.g. "AAPL", "SPY"). Case-insensitive.
expiration_dateanyoptionalFilter to a specific expiration (YYYY-MM-DD). If omitted, returns all expirations.
contract_typeanyoptionalFilter by "call" or "put". If omitted, returns both.
strike_price_gteanyoptionalMinimum strike price filter.
strike_price_lteanyoptionalMaximum strike price filter.
limitintegeroptionalMaximum contracts to return (default 50). (default: 50)
search_tickers
Search for ticker symbols and company names on Polygon.io.
ParameterTypeRequiredDescription
querystringrequiredSearch string — company name, partial ticker, or keyword.
marketstringoptionalMarket type (default "stocks"). (default: "stocks")
activebooleanoptionalIf True, only return currently active/listed tickers (default True). (default: true)
limitintegeroptionalMaximum results to return (default 20). (default: 20)
report_feedback
Report a bug, feature request, or general feedback for this data source.
ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")

Related