Data source: Polygon.io
https://context.gnist.ai/rest/polygon/
AuthenticationAll requests require a Gnist-API-Key header (or api_key query parameter).
Free tier: 100 calls/day. Get your API key.
Tools (6)
get_quoteGet 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).
| Parameter | Type | Required | Description |
|---|---|---|---|
ticker | string | required | Ticker symbol (e.g. "AAPL", "MSFT", "TSLA"). Case-insensitive. |
{
"ticker": "example"
}get_tradesGet 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)}.
| Parameter | Type | Required | Description |
|---|---|---|---|
ticker | string | required | Ticker symbol (e.g. "AAPL"). Case-insensitive. |
date | string | required | Trade date in YYYY-MM-DD format (e.g. "2024-01-15"). |
limit | integer | optional | Maximum trades to return (default 50, max 50000). (default: 50) |
{
"ticker": "example",
"date": "example"
}get_aggsGet 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}.
| Parameter | Type | Required | Description |
|---|---|---|---|
ticker | string | required | Ticker symbol (e.g. "AAPL", "SPY", "BTC-USD"). Case-insensitive. |
multiplier | integer | required | Size of the aggregate window (e.g. 1, 5, 15). |
timespan | string | required | Time unit — "minute", "hour", "day", "week", "month", "quarter", "year". |
from_date | string | required | Start date (YYYY-MM-DD). |
to_date | string | required | End date (YYYY-MM-DD). |
adjusted | boolean | optional | Whether to adjust for splits and dividends (default True). (default: true) |
limit | integer | optional | Maximum bars to return (default 120, max 50000). (default: 120) |
{
"ticker": "example",
"multiplier": 1,
"timespan": "example",
"from_date": "example",
"to_date": "example"
}get_options_chainGet 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}.
| Parameter | Type | Required | Description |
|---|---|---|---|
underlying | string | required | Underlying ticker symbol (e.g. "AAPL", "SPY"). Case-insensitive. |
expiration_date | any | optional | Filter to a specific expiration (YYYY-MM-DD). If omitted, returns all expirations. |
contract_type | any | optional | Filter by "call" or "put". If omitted, returns both. |
strike_price_gte | any | optional | Minimum strike price filter. |
strike_price_lte | any | optional | Maximum strike price filter. |
limit | integer | optional | Maximum contracts to return (default 50). (default: 50) |
{
"underlying": "example"
}search_tickersSearch 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}.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | required | Search string — company name, partial ticker, or keyword. |
market | string | optional | Market type (default "stocks"). (default: "stocks") |
active | boolean | optional | If True, only return currently active/listed tickers (default True). (default: true) |
limit | integer | optional | Maximum results to return (default 20). (default: 20) |
{
"query": "example"
}report_feedbackReport 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'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |
{
"feedback": "example"
}Quick Start
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"}'
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())