GnistAI GnistAI
Log in

Polygon (Market Data)

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

Overview   |   MCP   |   REST API   |   OpenAPI   |   CLI   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 6 tools tools 6 6 type: api wrapper type type api wrapper api wrapper lifecycle: maintained lifecycle lifecycle maintained maintained Finance

Data source: Polygon.io

REST Bridge Endpoint https://context.gnist.ai/rest/polygon/
Authentication

All requests require a Gnist-API-Key header (or api_key query parameter).

Free tier: 100 calls/day. Get your API key.

Tools (6)

get_quote

Get the latest quote snapshot for a US equity ticker.

Returns real-time (or 15-minute delayed on free tier) bid/ask, last trade,
intraday OHLCV, and day-over-day change for a single ticker.

Args:
ticker: Ticker symbol (e.g. "AAPL", "MSFT", "TSLA"). Case-insensitive.

Returns:
ticker, name, last_price, bid, ask, open, high, low, close, volume,
vwap, prev_close, change, change_pct, updated (Unix nanoseconds).

ParameterTypeRequiredDescription
tickerstringrequiredTicker symbol (e.g. "AAPL", "MSFT", "TSLA"). Case-insensitive.
Request Body
{
  "ticker": "example"
}
get_trades

Get recent trade ticks for a US equity ticker on a specific date.

Returns individual trade executions with price, size, exchange, and
trade conditions. Useful for microstructure analysis, VWAP calculations,
and understanding intraday price action.

Args:
ticker: Ticker symbol (e.g. "AAPL"). Case-insensitive.
date: Trade date in YYYY-MM-DD format (e.g. "2024-01-15").
limit: Maximum trades to return (default 50, max 50000).

Returns:
ticker, date, count, and trades list of {timestamp (Unix ns), price, size,
exchange (int code), conditions (list of condition codes)}.

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)
Request Body
{
  "ticker": "example",
  "date": "example"
}
get_aggs

Get OHLCV aggregate bars for a ticker over a date range.

Retrieves candlestick/bar data at any granularity from 1-minute to annual.
Use for charting, technical analysis, trend identification, and backtesting.

Timespans: "minute", "hour", "day", "week", "month", "quarter", "year"

Examples:
- get_aggs("AAPL", 1, "day", "2024-01-01", "2024-03-31") — daily bars for Q1 2024
- get_aggs("MSFT", 5, "minute", "2024-01-15", "2024-01-15") — 5-min bars for one day
- get_aggs("SPY", 1, "week", "2023-01-01", "2024-01-01") — weekly bars for 2023

Args:
ticker: Ticker symbol (e.g. "AAPL", "SPY", "BTC-USD"). Case-insensitive.
multiplier: Size of the aggregate window (e.g. 1, 5, 15).
timespan: Time unit — "minute", "hour", "day", "week", "month", "quarter", "year".
from_date: Start date (YYYY-MM-DD).
to_date: End date (YYYY-MM-DD).
adjusted: Whether to adjust for splits and dividends (default True).
limit: Maximum bars to return (default 120, max 50000).

Returns:
ticker, multiplier, timespan, adjusted, count, and bars list of
{timestamp (Unix ms), open, high, low, close, volume, vwap, transactions}.

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)
Request Body
{
  "ticker": "example",
  "multiplier": 1,
  "timespan": "example",
  "from_date": "example",
  "to_date": "example"
}
get_options_chain

Get the options chain snapshot for an underlying equity ticker.

Returns options contracts with strike, expiration, implied volatility,
open interest, and Greeks (delta, gamma, theta, vega). Use for options
analysis, hedging decisions, and volatility surface exploration.

Note: Options data requires a paid Polygon.io subscription (Starter or above).

Args:
underlying: Underlying ticker symbol (e.g. "AAPL", "SPY"). Case-insensitive.
expiration_date: Filter to a specific expiration (YYYY-MM-DD). If omitted, returns all expirations.
contract_type: Filter by "call" or "put". If omitted, returns both.
strike_price_gte: Minimum strike price filter.
strike_price_lte: Maximum strike price filter.
limit: Maximum contracts to return (default 50).

Returns:
underlying, count, and contracts list of {ticker, contract_type, strike_price,
expiration_date, exercise_style, implied_volatility, open_interest, delta,
gamma, theta, vega, last_price, volume}.

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)
Request Body
{
  "underlying": "example"
}
search_tickers

Search for ticker symbols and company names on Polygon.io.

Use this to find the correct ticker symbol when you know a company name
but not its symbol, or to explore what's available in a given market.

Markets: "stocks" (US equities), "crypto" (cryptocurrency), "fx" (forex),
"otc" (OTC/pink sheets), "indices" (market indices)

Examples:
- search_tickers("Apple") — find AAPL and related tickers
- search_tickers("bitcoin", market="crypto") — find BTC crypto pairs
- search_tickers("EUR", market="fx") — find EUR currency pairs
- search_tickers("S&P 500", market="indices") — find S&P 500 index

Args:
query: Search string — company name, partial ticker, or keyword.
market: Market type (default "stocks").
active: If True, only return currently active/listed tickers (default True).
limit: Maximum results to return (default 20).

Returns:
count and tickers list of {ticker, name, market, locale, type,
currency, primary_exchange, active}.

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)
Request Body
{
  "query": "example"
}
report_feedback

Report a bug, feature request, or general feedback for this data source.

Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.

Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")
Request Body
{
  "feedback": "example"
}

Quick Start

Shell
curl -X POST "https://context.gnist.ai/rest/polygon/get_quote" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"ticker": "example"}'
Python
import httpx

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

Related Toolkits (Finance)

Resources