Home
Polygon
Polygon Websocket Subscribe Example
Polygon Websocket Subscribe Example
Finance Fintech Market Data Stocks Options Forex Crypto Indices Futures WebSockets Real-Time Historical Public APIs
Polygon Websocket Subscribe Example is an example object payload from Polygon, with 3 top-level fields. It illustrates the shape of data this provider's APIs accept or return.
Top-level fields
scenario url messages
Example Payload
{
"scenario": "Connect, authenticate, and subscribe on the Polygon Stocks WebSocket cluster.",
"url": "wss://socket.polygon.io/stocks",
"messages": [
{ "direction": "send", "payload": { "action": "auth", "params": "YOUR_POLYGON_API_KEY" } },
{ "direction": "receive", "payload": [{ "ev": "status", "status": "auth_success", "message": "authenticated" }] },
{ "direction": "send", "payload": { "action": "subscribe", "params": "T.AAPL,Q.AAPL,A.AAPL" } },
{ "direction": "receive", "payload": [{ "ev": "status", "status": "success", "message": "subscribed to: T.AAPL,Q.AAPL,A.AAPL" }] },
{ "direction": "receive", "payload": [
{ "ev": "T", "sym": "AAPL", "x": 4, "i": "12345", "p": 192.31, "s": 100, "c": [12], "t": 1748476801234 },
{ "ev": "Q", "sym": "AAPL", "bx": 11, "bp": 192.30, "bs": 200, "ax": 12, "ap": 192.32, "as": 150, "t": 1748476801240 },
{ "ev": "A", "sym": "AAPL", "v": 5400, "vw": 192.305, "o": 192.30, "c": 192.31, "h": 192.34, "l": 192.28, "s": 1748476740000, "e": 1748476800000 }
]}
]
}
Every example here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for examples
4 MCP tools reach this
find_examplesBrowse and filter every example in the catalog.
apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
resolveTurn a domain, URL or GitHub org into the provider it belongs to.
find_cohortsEvery scored population of providers in the catalog.
All 92 tools →
Call it yourself
curl for this page
This example
curl "https://apis.io/api/v1/examples/polygon-websocket-subscribe-example"
All examples
curl "https://apis.io/api/v1/examples?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms .
A second provider on the same verified email joins the account you already have.