Finance
Data source: Polygon.io
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"}}}'
REST API
API Root
https://context.gnist.ai/rest/polygon/
6 endpoints available:
GET /rest/polygon/get_quoteGET /rest/polygon/get_tradesGET /rest/polygon/get_aggsGET /rest/polygon/get_options_chainGET /rest/polygon/search_tickersGET /rest/polygon/report_feedback
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())
Command Line
Command
gc polygon
CLI documentation will be available when the GnistAI SDK is published.
Install
pip install gnistai
Available Tools (6)
get_quoteGet the latest quote snapshot for a US equity ticker.
| Parameter | Type | Required | Description |
|---|---|---|---|
ticker | string | required | Ticker symbol (e.g. "AAPL", "MSFT", "TSLA"). Case-insensitive. |
get_tradesGet recent trade ticks for a US equity ticker on a specific date.
| 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) |
get_aggsGet OHLCV aggregate bars for a ticker over a date range.
| 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) |
get_options_chainGet the options chain snapshot for an underlying equity ticker.
| 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) |
search_tickersSearch for ticker symbols and company names on Polygon.io.
| 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) |
report_feedbackReport a bug, feature request, or general feedback for this data source.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |