diff --git a/.polygon/websocket.json b/.polygon/websocket.json index 7ebc0b2..95fbefa 100644 --- a/.polygon/websocket.json +++ b/.polygon/websocket.json @@ -1,3762 +1,4706 @@ { - "openapi": "3.0.3", - "info": { - "title": "Polygon Websocket Spec", - "description": "The future of fintech.", - "version": "2.0.0" + "openapi": "3.0.3", + "info": { + "title": "Polygon Websocket Spec", + "description": "The future of fintech.", + "version": "2.0.0" + }, + "servers": [ + { + "url": "wss://socket.polygon.io", + "description": "Real-time" }, - "servers": [ + { + "url": "wss://delayed.polygon.io", + "description": "Delayed" + } + ], + "x-polygon-order": { + "stocks": { + "market": [ { - "url": "wss://socket.polygon.io", - "description": "Real-time" + "paths": [ + "/stocks/AM" + ] }, { - "url": "wss://delayed.polygon.io", - "description": "Delayed" - } - ], - "x-polygon-order": { - "stocks": { - "market": [ - { - "paths": [ - "/stocks/AM" - ] - }, - { - "paths": [ - "/stocks/A" - ] - }, - { - "paths": [ - "/stocks/T" - ] - }, - { - "paths": [ - "/stocks/Q" - ] - }, - { - "paths": [ - "/stocks/NOI" - ] - }, - { - "paths": [ - "/stocks/LULD" - ] - } - ] + "paths": [ + "/stocks/A" + ] }, - "options": { - "market": [ - { - "paths": [ - "/options/AM" - ] - }, - { - "paths": [ - "/options/A" - ] - }, - { - "paths": [ - "/options/T" - ] - }, - { - "paths": [ - "/options/Q" - ] - } - ] + { + "paths": [ + "/stocks/T" + ] }, - "fx": { - "market": [ - { - "paths": [ - "/forex/CA" - ] - }, - { - "paths": [ - "/forex/C" - ] - } - ] + { + "paths": [ + "/stocks/Q" + ] }, - "crypto": { - "market": [ - { - "paths": [ - "/crypto/XA" - ] - }, - { - "paths": [ - "/crypto/XT" - ] - }, - { - "paths": [ - "/crypto/XQ" - ] - }, - { - "paths": [ - "/crypto/XL2" - ] - } - ] + { + "paths": [ + "/stocks/NOI" + ] }, - "indices": { - "market": [ - { - "paths": [ - "/indices/AM" - ] - }, - { - "paths": [ - "/indices/V" - ] - } - ] + { + "paths": [ + "/stocks/LULD" + ] + }, + { + "paths": [ + "/launchpad/stocks/AM" + ], + "launchpad": "exclusive" + }, + { + "paths": [ + "/launchpad/stocks/LV" + ], + "launchpad": "exclusive" } + ] }, - "paths": { - "/stocks/T": { - "get": { - "summary": "Trades", - "description": "Stream real-time trades for a given stock ticker symbol.\n", - "parameters": [ - { - "name": "ticker", - "in": "query", - "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^([a-zA-Z]+)$/" - }, - "example": "*" - } - ], - "responses": { - "200": { - "description": "The WebSocket message for a trade event.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "ev": { - "enum": [ - "T" - ], - "description": "The event type." - }, - "sym": { - "type": "string", - "description": "The ticker symbol for the given stock." - }, - "x": { - "type": "integer", - "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." - }, - "i": { - "type": "string", - "description": "The trade ID." - }, - "z": { - "type": "integer", - "description": "The tape. (1 = NYSE, 2 = AMEX, 3 = Nasdaq).\n" - }, - "p": { - "type": "number", - "format": "double", - "description": "The price." - }, - "s": { - "type": "integer", - "description": "The trade size." - }, - "c": { - "type": "array", - "description": "The trade conditions. See Conditions and Indicators\" for Polygon.io's trade conditions glossary.\n", - "items": { - "type": "integer", - "description": "The ID of the condition." - } - }, - "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." - }, - "q": { - "type": "integer", - "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n" - }, - "trfi": { - "type": "integer", - "description": "The ID for the Trade Reporting Facility where the trade took place." - }, - "trft": { - "type": "integer", - "description": "The TRF (Trade Reporting Facility) Timestamp in Unix MS. \nThis is the timestamp of when the trade reporting facility received this trade.\n" - } - } - }, - "example": { - "ev": "T", - "sym": "MSFT", - "x": 4, - "i": "12345", - "z": 3, - "p": 114.125, - "s": 100, - "c": [ - 0, - 12 - ], - "t": 1536036818784, - "q": 3681328 - } - } - } - } - }, - "x-polygon-entitlement-data-type": { - "name": "trades", - "description": "Trade data" - }, - "x-polygon-entitlement-market-type": { - "name": "stocks", - "description": "Stocks data" - }, - "x-polygon-entitlement-allowed-timeframes": [ - { - "name": "delayed", - "description": "15 minute delayed data" - }, - { - "name": "realtime", - "description": "Real Time Data" - } - ] - } + "options": { + "market": [ + { + "paths": [ + "/options/AM" + ] }, - "/stocks/Q": { - "get": { - "summary": "Quotes", - "description": "Stream real-time quotes for a given stock ticker symbol.\n", - "parameters": [ - { - "name": "ticker", - "in": "query", - "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^([a-zA-Z]+)$/" - }, - "example": "*" - } - ], - "responses": { - "200": { - "description": "The WebSocket message for a quote event.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "ev": { - "enum": [ - "Q" - ], - "description": "The event type." - }, - "sym": { - "type": "string", - "description": "The ticker symbol for the given stock." - }, - "bx": { - "type": "integer", - "description": "The bid exchange ID." - }, - "bp": { - "type": "number", - "format": "double", - "description": "The bid price." - }, - "bs": { - "type": "integer", - "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price." - }, - "ax": { - "type": "integer", - "description": "The ask exchange ID." - }, - "ap": { - "type": "number", - "format": "double", - "description": "The ask price." - }, - "as": { - "type": "integer", - "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price." - }, - "c": { - "type": "integer", - "description": "The condition." - }, - "i": { - "type": "array", - "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n", - "items": { - "type": "integer", - "description": "The indicator code.\n" - } - }, - "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." - }, - "q": { - "type": "integer", - "description": "The sequence number represents the sequence in which quote events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11). Values reset after each trading session/day.\n" - }, - "z": { - "type": "integer", - "description": "The tape. (1 = NYSE, 2 = AMEX, 3 = Nasdaq)." - } - } - }, - "example": { - "ev": "Q", - "sym": "MSFT", - "bx": 4, - "bp": 114.125, - "bs": 100, - "ax": 7, - "ap": 114.128, - "as": 160, - "c": 0, - "i": [ - 604 - ], - "t": 1536036818784, - "q": 50385480, - "z": 3 - } - } - } - } - }, - "x-polygon-entitlement-data-type": { - "name": "nbbo", - "description": "NBBO data" - }, - "x-polygon-entitlement-market-type": { - "name": "stocks", - "description": "Stocks data" - }, - "x-polygon-entitlement-allowed-timeframes": [ - { - "name": "realtime", - "description": "Real Time Data" - } - ] - } + { + "paths": [ + "/options/A" + ] }, - "/stocks/A": { - "get": { - "summary": "Aggregates (Per Second)", - "description": "Stream real-time second aggregates for a given stock ticker symbol.\n", - "parameters": [ - { - "name": "ticker", - "in": "query", - "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^([a-zA-Z]+)$/" - }, - "example": "*" - } - ], - "responses": { - "200": { - "description": "The WebSocket message for a second aggregate event.", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "type": "object", - "properties": { - "ev": { - "description": "The event type." - }, - "sym": { - "type": "string", - "description": "The ticker symbol for the given stock." - }, - "v": { - "type": "integer", - "description": "The tick volume." - }, - "av": { - "type": "integer", - "description": "Today's accumulated volume." - }, - "op": { - "type": "number", - "format": "double", - "description": "Today's official opening price." - }, - "vw": { - "type": "number", - "format": "float", - "description": "The tick's volume weighted average price." - }, - "o": { - "type": "number", - "format": "double", - "description": "The opening tick price for this aggregate window." - }, - "c": { - "type": "number", - "format": "double", - "description": "The closing tick price for this aggregate window." - }, - "h": { - "type": "number", - "format": "double", - "description": "The highest tick price for this aggregate window." - }, - "l": { - "type": "number", - "format": "double", - "description": "The lowest tick price for this aggregate window." - }, - "a": { - "type": "number", - "format": "float", - "description": "Today's volume weighted average price." - }, - "z": { - "type": "integer", - "description": "The average trade size for this aggregate window." - }, - "s": { - "type": "integer", - "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." - }, - "e": { - "type": "integer", - "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." - }, - "otc": { - "type": "boolean", - "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false." - } - } - }, - { - "properties": { - "ev": { - "enum": [ - "A" - ], - "description": "The event type." - } - } - } - ] - }, - "example": { - "ev": "A", - "sym": "SPCE", - "v": 200, - "av": 8642007, - "op": 25.66, - "vw": 25.3981, - "o": 25.39, - "c": 25.39, - "h": 25.39, - "l": 25.39, - "a": 25.3714, - "z": 50, - "s": 1610144868000, - "e": 1610144869000 - } - } - } - } - }, - "x-polygon-entitlement-data-type": { - "name": "aggregates", - "description": "Aggregate data" - }, - "x-polygon-entitlement-market-type": { - "name": "stocks", - "description": "Stocks data" - }, - "x-polygon-entitlement-allowed-timeframes": [ - { - "name": "delayed", - "description": "15 minute delayed data" - }, - { - "name": "realtime", - "description": "Real Time Data" - } - ] - } + { + "paths": [ + "/options/T" + ] }, - "/stocks/AM": { - "get": { - "summary": "Aggregates (Per Minute)", - "description": "Stream real-time minute aggregates for a given stock ticker symbol.\n", - "parameters": [ - { - "name": "ticker", - "in": "query", - "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^([a-zA-Z]+)$/" - }, - "example": "*" - } - ], - "responses": { - "200": { - "description": "The WebSocket message for a minute aggregate event.", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "type": "object", - "properties": { - "ev": { - "description": "The event type." - }, - "sym": { - "type": "string", - "description": "The ticker symbol for the given stock." - }, - "v": { - "type": "integer", - "description": "The tick volume." - }, - "av": { - "type": "integer", - "description": "Today's accumulated volume." - }, - "op": { - "type": "number", - "format": "double", - "description": "Today's official opening price." - }, - "vw": { - "type": "number", - "format": "float", - "description": "The tick's volume weighted average price." - }, - "o": { - "type": "number", - "format": "double", - "description": "The opening tick price for this aggregate window." - }, - "c": { - "type": "number", - "format": "double", - "description": "The closing tick price for this aggregate window." - }, - "h": { - "type": "number", - "format": "double", - "description": "The highest tick price for this aggregate window." - }, - "l": { - "type": "number", - "format": "double", - "description": "The lowest tick price for this aggregate window." - }, - "a": { - "type": "number", - "format": "float", - "description": "Today's volume weighted average price." - }, - "z": { - "type": "integer", - "description": "The average trade size for this aggregate window." - }, - "s": { - "type": "integer", - "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." - }, - "e": { - "type": "integer", - "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." - }, - "otc": { - "type": "boolean", - "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false." - } - } - }, - { - "properties": { - "ev": { - "enum": [ - "AM" - ], - "description": "The event type." - } - } - } - ] - }, - "example": { - "ev": "AM", - "sym": "GTE", - "v": 4110, - "av": 9470157, - "op": 0.4372, - "vw": 0.4488, - "o": 0.4488, - "c": 0.4486, - "h": 0.4489, - "l": 0.4486, - "a": 0.4352, - "z": 685, - "s": 1610144640000, - "e": 1610144700000 - } - } - } - } - }, - "x-polygon-entitlement-data-type": { - "name": "aggregates", - "description": "Aggregate data" - }, - "x-polygon-entitlement-market-type": { - "name": "stocks", - "description": "Stocks data" - }, - "x-polygon-entitlement-allowed-timeframes": [ - { - "name": "delayed", - "description": "15 minute delayed data" - }, - { - "name": "realtime", - "description": "Real Time Data" - } - ] - } + { + "paths": [ + "/options/Q" + ] }, - "/stocks/LULD": { - "get": { - "summary": "Limit-Up Limit-Down (LULD)", - "description": "Stream real-time LULD events for a given stock ticker symbol.\n", - "parameters": [ - { - "name": "ticker", - "in": "query", - "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^([a-zA-Z]+)$/" - }, - "example": "*" - } - ], - "responses": { - "200": { - "description": "The WebSocket message for a LULD event.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "ev": { - "enum": [ - "LULD" - ], - "description": "The event type." - }, - "T": { - "type": "string", - "description": "The ticker symbol for the given stock." - }, - "h": { - "type": "number", - "format": "double", - "description": "The high price." - }, - "l": { - "type": "number", - "format": "double", - "description": "The low price." - }, - "i": { - "type": "array", - "description": "The Indicators.", - "items": { - "type": "integer" - } - }, - "z": { - "type": "integer", - "description": "The tape. (1 = NYSE, 2 = AMEX, 3 = Nasdaq).\n" - }, - "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." - }, - "q": { - "type": "integer", - "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n" - } - } - }, - "example": { - "ev": "LULD", - "T": "MSFT", - "h": 218.96, - "l": 198.11, - "i": [ - 21 - ], - "z": 3, - "t": 1601316752683746, - "q": 290317 - } - } - } - } - }, - "x-polygon-entitlement-data-type": { - "name": "limit-up-limit-down", - "description": "Limit-Up Limit-Down data" - }, - "x-polygon-entitlement-market-type": { - "name": "stocks", - "description": "Stocks data" - }, - "x-polygon-entitlement-allowed-timeframes": [ - { - "name": "realtime", - "description": "Real Time Data" - } - ] - } + { + "paths": [ + "/launchpad/options/AM" + ], + "launchpad": "exclusive" }, - "/stocks/NOI": { - "get": { - "summary": "Imbalances", - "description": "Stream real-time imbalance events for a given stock ticker symbol.\n", - "parameters": [ - { - "name": "ticker", - "in": "query", - "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^([a-zA-Z]+)$/" - }, - "example": "*" - } - ], - "responses": { - "200": { - "description": "The WebSocket message for an imbalance event.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "ev": { - "enum": [ - "NOI" - ], - "description": "The event type." - }, - "T": { - "type": "string", - "description": "The ticker symbol for the given stock." - }, - "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." - }, - "at": { - "type": "integer", - "description": "The time that the auction is planned to take place in the format (hour x 100) + minutes in Eastern Standard Time, \nfor example 930 would be 9:30 am EST, and 1600 would be 4:00 pm EST.\n" - }, - "a": { - "type": "string", - "description": "The auction type.\n`O` - Early Opening Auction (non-NYSE only)\n`M` - Core Opening Auction\n`H` - Reopening Auction (Halt Resume)\n`C` - Closing Auction\n`P` - Extreme Closing Imbalance (NYSE only)\n`R` - Regulatory Closing Imbalance (NYSE only)\n" - }, - "i": { - "type": "integer", - "description": "The symbol sequence." - }, - "x": { - "type": "integer", - "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." - }, - "o": { - "type": "integer", - "description": "The imbalance quantity." - }, - "p": { - "type": "integer", - "description": "The paired quantity." - }, - "b": { - "type": "number", - "format": "double", - "description": "The book clearing price." - } - } - }, - "example": { - "ev": "NOI", - "T": "NTEST.Q", - "t": 1601318039223013600, - "at": 930, - "a": "M", - "i": 44, - "x": 10, - "o": 480, - "p": 440, - "b": 25.03 - } - } - } - } - }, - "x-polygon-entitlement-data-type": { - "name": "imbalances", - "description": "Imbalances data" - }, - "x-polygon-entitlement-market-type": { - "name": "stocks", - "description": "Stocks data" - }, - "x-polygon-entitlement-allowed-timeframes": [ - { - "name": "realtime", - "description": "Real Time Data" - } - ] - } + { + "paths": [ + "/launchpad/options/LV" + ], + "launchpad": "exclusive" + } + ] + }, + "fx": { + "market": [ + { + "paths": [ + "/forex/CA" + ] }, - "/options/T": { - "get": { - "summary": "Trades", - "description": "Stream real-time trades for a given option contract.\n", - "parameters": [ - { - "name": "ticker", - "in": "query", - "description": "Specify an option contract or use * to subscribe to all option contracts.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" - }, - "example": "*" - } - ], - "responses": { - "200": { - "description": "The WebSocket message for a trade event.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "ev": { - "enum": [ - "T" - ], - "description": "The event type." - }, - "sym": { - "type": "string", - "description": "The ticker symbol for the given option contract." - }, - "x": { - "type": "integer", - "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." - }, - "p": { - "type": "number", - "format": "double", - "description": "The price." - }, - "s": { - "type": "integer", - "description": "The trade size." - }, - "c": { - "type": "array", - "description": "The trade conditions", - "items": { - "type": "integer", - "description": "The ID of the condition." - } - }, - "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." - }, - "q": { - "type": "integer", - "description": "The sequence number represents the sequence in which trade events happened. These are increasing and unique per ticker symbol, but will not always be sequential (e.g., 1, 2, 6, 9, 10, 11)." - } - } - }, - "example": { - "ev": "T", - "sym": "O:AMC210827C00037000", - "x": 65, - "p": 1.54, - "s": 1, - "c": [ - 233 - ], - "t": 1629820676333, - "q": 651921857 - } - } - } - } - }, - "x-polygon-entitlement-data-type": { - "name": "trades", - "description": "Trade data" - }, - "x-polygon-entitlement-market-type": { - "name": "options", - "description": "Options data" - }, - "x-polygon-entitlement-allowed-timeframes": [ - { - "name": "delayed", - "description": "15 minute delayed data" - }, - { - "name": "realtime", - "description": "Real Time Data" - } - ] - } + { + "paths": [ + "/forex/C" + ] }, - "/options/Q": { - "get": { - "summary": "Quotes", - "description": "Stream real-time quotes for a given option contract.\n", - "parameters": [ - { - "name": "ticker", - "in": "query", - "description": "Specify an option contract. You're only allowed to subscribe to 1,000 option contracts per connection.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" - }, - "example": "O:SPY241220P00720000" - } - ], - "responses": { - "200": { - "description": "The WebSocket message for a trade event.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "ev": { - "enum": [ - "Q" - ], - "description": "The event type." - }, - "sym": { - "type": "string", - "description": "The ticker symbol for the given option contract." - }, - "bx": { - "type": "integer", - "description": "The bid exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." - }, - "ax": { - "type": "integer", - "description": "The ask exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." - }, - "bp": { - "type": "number", - "format": "double", - "description": "The bid price." - }, - "ap": { - "type": "number", - "format": "double", - "description": "The ask price." - }, - "bs": { - "type": "integer", - "description": "The bid size." - }, - "as": { - "type": "integer", - "description": "The ask size." - }, - "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." - }, - "q": { - "type": "integer", - "description": "The sequence number represents the sequence in which trade events happened. These are increasing and unique per ticker symbol, but will not always be sequential (e.g., 1, 2, 6, 9, 10, 11)." - } - } - }, - "example": { - "ev": "Q", - "sym": "O:SPY241220P00720000", - "bx": 302, - "ax": 302, - "bp": 9.71, - "ap": 9.81, - "bs": 17, - "as": 24, - "t": 1644506128351, - "q": 844090872 - } - } - } - } - }, - "x-polygon-entitlement-data-type": { - "name": "nbbo", - "description": "NBBO data" - }, - "x-polygon-entitlement-market-type": { - "name": "options", - "description": "Options data" - }, - "x-polygon-entitlement-allowed-timeframes": [ - { - "name": "realtime", - "description": "Real Time Data" - } - ] - } + { + "paths": [ + "/launchpad/forex/AM" + ], + "launchpad": "exclusive" }, - "/options/A": { - "get": { - "summary": "Aggregates (Per Second)", - "description": "Stream real-time second aggregates for a given option contract.\n", - "parameters": [ - { - "name": "ticker", - "in": "query", - "description": "Specify an option contract or use * to subscribe to all option contracts.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" - }, - "example": "*" - } - ], - "responses": { - "200": { - "description": "The WebSocket message for a second aggregate event.", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "type": "object", - "properties": { - "ev": { - "description": "The event type." - }, - "sym": { - "type": "string", - "description": "The ticker symbol for the given option contract." - }, - "v": { - "type": "integer", - "description": "The tick volume." - }, - "av": { - "type": "integer", - "description": "Today's accumulated volume." - }, - "op": { - "type": "number", - "format": "double", - "description": "Today's official opening price." - }, - "vw": { - "type": "number", - "format": "float", - "description": "The tick's volume weighted average price." - }, - "o": { - "type": "number", - "format": "double", - "description": "The opening tick price for this aggregate window." - }, - "c": { - "type": "number", - "format": "double", - "description": "The closing tick price for this aggregate window." - }, - "h": { - "type": "number", - "format": "double", - "description": "The highest tick price for this aggregate window." - }, - "l": { - "type": "number", - "format": "double", - "description": "The lowest tick price for this aggregate window." - }, - "a": { - "type": "number", - "format": "float", - "description": "Today's volume weighted average price." - }, - "z": { - "type": "integer", - "description": "The average trade size for this aggregate window." - }, - "s": { - "type": "integer", - "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." - }, - "e": { - "type": "integer", - "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." - } - } - }, - { - "properties": { - "ev": { - "enum": [ - "A" - ], - "description": "The event type." - } - } - } - ] - }, - "example": { - "ev": "AM", - "sym": "O:ONEM220121C00025000", - "v": 2, - "av": 8, - "op": 2.2, - "vw": 2.05, - "o": 2.05, - "c": 2.05, - "h": 2.05, - "l": 2.05, - "a": 2.1312, - "z": 2, - "s": 1632419640000, - "e": 1632419700000 - } - } - } - } - }, - "x-polygon-entitlement-data-type": { - "name": "aggregates", - "description": "Aggregate data" - }, - "x-polygon-entitlement-market-type": { - "name": "options", - "description": "Options data" - }, - "x-polygon-entitlement-allowed-timeframes": [ - { - "name": "delayed", - "description": "15 minute delayed data" - }, - { - "name": "realtime", - "description": "Real Time Data" - } - ] - } + { + "paths": [ + "/launchpad/forex/LV" + ], + "launchpad": "exclusive" + } + ] + }, + "crypto": { + "market": [ + { + "paths": [ + "/crypto/XA" + ] }, - "/options/AM": { - "get": { - "summary": "Aggregates (Per Minute)", - "description": "Stream real-time minute aggregates for a given option contract.\n", - "parameters": [ - { - "name": "ticker", - "in": "query", - "description": "Specify an option contract or use * to subscribe to all option contracts.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" - }, - "example": "*" - } - ], - "responses": { - "200": { - "description": "The WebSocket message for a minute aggregate event.", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "type": "object", - "properties": { - "ev": { - "description": "The event type." - }, - "sym": { - "type": "string", - "description": "The ticker symbol for the given option contract." - }, - "v": { - "type": "integer", - "description": "The tick volume." - }, - "av": { - "type": "integer", - "description": "Today's accumulated volume." - }, - "op": { - "type": "number", - "format": "double", - "description": "Today's official opening price." - }, - "vw": { - "type": "number", - "format": "float", - "description": "The tick's volume weighted average price." - }, - "o": { - "type": "number", - "format": "double", - "description": "The opening tick price for this aggregate window." - }, - "c": { - "type": "number", - "format": "double", - "description": "The closing tick price for this aggregate window." - }, - "h": { - "type": "number", - "format": "double", - "description": "The highest tick price for this aggregate window." - }, - "l": { - "type": "number", - "format": "double", - "description": "The lowest tick price for this aggregate window." - }, - "a": { - "type": "number", - "format": "float", - "description": "Today's volume weighted average price." - }, - "z": { - "type": "integer", - "description": "The average trade size for this aggregate window." - }, - "s": { - "type": "integer", - "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." - }, - "e": { - "type": "integer", - "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." - } - } - }, - { - "properties": { - "ev": { - "enum": [ - "AM" - ], - "description": "The event type." - } - } - } - ] - }, - "example": { - "ev": "AM", - "sym": "O:ONEM220121C00025000", - "v": 2, - "av": 8, - "op": 2.2, - "vw": 2.05, - "o": 2.05, - "c": 2.05, - "h": 2.05, - "l": 2.05, - "a": 2.1312, - "z": 2, - "s": 1632419640000, - "e": 1632419700000 - } - } - } - } - }, - "x-polygon-entitlement-data-type": { - "name": "aggregates", - "description": "Aggregate data" - }, - "x-polygon-entitlement-market-type": { - "name": "options", - "description": "Options data" - }, - "x-polygon-entitlement-allowed-timeframes": [ - { - "name": "delayed", - "description": "15 minute delayed data" - }, - { - "name": "realtime", - "description": "Real Time Data" - } - ] - } + { + "paths": [ + "/crypto/XT" + ] }, - "/forex/C": { - "get": { - "summary": "Quotes", - "description": "Stream real-time forex quotes for a given forex pair.\n", - "parameters": [ - { - "name": "ticker", - "in": "query", - "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://polygon.io/docs/forex/get_v3_reference_tickers).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/" - }, - "example": "*" - } - ], - "responses": { - "200": { - "description": "The WebSocket message for a forex quote event.", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "type": "object", - "properties": { - "ev": { - "type": "string", - "description": "The event type." - }, - "p": { - "type": "string", - "description": "The current pair." - }, - "x": { - "type": "integer", - "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." - }, - "a": { - "type": "number", - "format": "double", - "description": "The ask price." - }, - "b": { - "type": "number", - "format": "double", - "description": "The bid price." - }, - "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." - } - } - }, - { - "properties": { - "ev": { - "enum": [ - "C" - ], - "description": "The event type." - } - } - } - ] - }, - "example": { - "ev": "C", - "p": "USD/CNH", - "x": "44", - "a": 6.83366, - "b": 6.83363, - "t": 1536036818784 - } - } - } - } - }, - "x-polygon-entitlement-data-type": { - "name": "nbbo", - "description": "NBBO data" - }, - "x-polygon-entitlement-market-type": { - "name": "fx", - "description": "Forex data" - }, - "x-polygon-entitlement-allowed-timeframes": [ - { - "name": "realtime", - "description": "Real Time Data" - } - ] - } + { + "paths": [ + "/crypto/XQ" + ] }, - "/forex/CA": { - "get": { - "summary": "Aggregates (Per Minute)", - "description": "Stream real-time per-minute forex aggregates for a given forex pair.\n", - "parameters": [ - { - "name": "ticker", - "in": "query", - "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://polygon.io/docs/forex/get_v3_reference_tickers).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/" - }, - "example": "*" - } - ], - "responses": { - "200": { - "description": "The WebSocket message for a forex per-minute aggregate event.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "ev": { - "type": "string", - "enum": [ - "CA" - ], - "description": "The event type." - }, - "pair": { - "type": "string", - "description": "The currency pair." - }, - "o": { - "type": "number", - "format": "double", - "description": "The open price for this aggregate window." - }, - "c": { - "type": "number", - "format": "double", - "description": "The close price for this aggregate window." - }, - "h": { - "type": "number", - "format": "double", - "description": "The high price for this aggregate window." - }, - "l": { - "type": "number", - "format": "double", - "description": "The low price for this aggregate window." - }, - "v": { - "type": "integer", - "description": "The volume of trades during this aggregate window." - }, - "s": { - "type": "integer", - "description": "The start time for this aggregate window in Unix Milliseconds." - }, - "e": { - "type": "integer", - "description": "The end time for this aggregate window in Unix Milliseconds." - } - } - }, - "example": { - "ev": "CA", - "pair": "USD/EUR", - "o": 0.8687, - "c": 0.86889, - "h": 0.86889, - "l": 0.8686, - "v": 20, - "s": 1539145740000 - } - } - } - } - }, - "x-polygon-entitlement-data-type": { - "name": "aggregates", - "description": "Aggregate data" - }, - "x-polygon-entitlement-market-type": { - "name": "fx", - "description": "Forex data" - }, - "x-polygon-entitlement-allowed-timeframes": [ - { - "name": "realtime", - "description": "Real Time Data" - } - ] - } + { + "paths": [ + "/crypto/XL2" + ] }, - "/crypto/XT": { - "get": { - "summary": "Trades", - "description": "Stream real-time crypto trades for a given crypto pair.\n", - "parameters": [ - { - "name": "ticker", - "in": "query", - "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://polygon.io/docs/crypto/get_v3_reference_tickers).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/" - }, - "example": "*" - } - ], - "responses": { - "200": { - "description": "The WebSocket message for a crypto trade event.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "ev": { - "type": "string", - "enum": [ - "XT" - ], - "description": "The event type." - }, - "pair": { - "type": "string", - "description": "The crypto pair." - }, - "p": { - "type": "number", - "format": "double", - "description": "The price." - }, - "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." - }, - "s": { - "type": "number", - "format": "double", - "description": "The size." - }, - "c": { - "type": "array", - "description": "The conditions.\n0 (or empty array): empty\n1: sellside\n2: buyside\n", - "items": { - "type": "integer", - "description": "The ID of the condition." - } - }, - "i": { - "type": "integer", - "description": "The ID of the trade (optional)." - }, - "x": { - "type": "integer", - "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" - }, - "r": { - "type": "integer", - "description": "The timestamp that the tick was received by Polygon." - } - } - }, - "example": { - "ev": "XT", - "pair": "BTC-USD", - "p": 33021.9, - "t": 1610462007425, - "s": 0.01616617, - "c": [ - 2 - ], - "i": 14272084, - "x": 3, - "r": 1610462007576 - } - } - } - } - }, - "x-polygon-entitlement-data-type": { - "name": "trades", - "description": "Trade data" - }, - "x-polygon-entitlement-market-type": { - "name": "crypto", - "description": "Crypto data" - }, - "x-polygon-entitlement-allowed-timeframes": [ - { - "name": "realtime", - "description": "Real Time Data" - } - ] - } + { + "paths": [ + "/launchpad/crypto/AM" + ], + "launchpad": "exclusive" }, - "/crypto/XQ": { - "get": { - "summary": "Quotes", - "description": "Stream real-time crypto quotes for a given crypto pair.\n", - "parameters": [ - { - "name": "ticker", - "in": "query", - "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://polygon.io/docs/crypto/get_v3_reference_tickers).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/" - }, - "example": "*" - } - ], - "responses": { - "200": { - "description": "The WebSocket message for a crypto quote event.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "ev": { - "type": "string", - "enum": [ - "XQ" - ], - "description": "The event type." - }, - "pair": { - "type": "string", - "description": "The crypto pair." - }, - "bp": { - "type": "number", - "format": "double", - "description": "The bid price." - }, - "bs": { - "type": "number", - "format": "double", - "description": "The bid size." - }, - "ap": { - "type": "number", - "format": "double", - "description": "The ask price." - }, - "as": { - "type": "number", - "format": "double", - "description": "The ask size." - }, - "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." - }, - "x": { - "type": "integer", - "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" - }, - "r": { - "type": "integer", - "description": "The timestamp that the tick was received by Polygon." - } - } - }, - "example": { - "ev": "XQ", - "pair": "BTC-USD", - "bp": 33052.79, - "bs": 0.48, - "ap": 33073.19, - "as": 0.601, - "t": 1610462411115, - "x": 1, - "r": 1610462411128 - } - } - } - } - }, - "x-polygon-entitlement-data-type": { - "name": "nbbo", - "description": "NBBO data" - }, - "x-polygon-entitlement-market-type": { - "name": "crypto", - "description": "Crypto data" - }, - "x-polygon-entitlement-allowed-timeframes": [ - { - "name": "realtime", - "description": "Real Time Data" - } - ] - } + { + "paths": [ + "/launchpad/crypto/LV" + ], + "launchpad": "exclusive" + } + ] + }, + "indices": { + "market": [ + { + "paths": [ + "/indices/AM" + ] }, - "/crypto/XL2": { - "get": { - "summary": "Level 2 Book", - "description": "Stream real-time level 2 book data for a given crypto pair.\n", - "parameters": [ - { - "name": "ticker", - "in": "query", - "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://polygon.io/docs/crypto/get_v3_reference_tickers).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/" - }, - "example": "*" - } - ], - "responses": { - "200": { - "description": "The WebSocket message for a crypto level 2 book event.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "ev": { - "type": "string", - "enum": [ - "XL2" - ], - "description": "The event type." - }, - "pair": { - "type": "string", - "description": "The crypto pair." - }, - "b": { - "type": "array", - "description": "An array of bid prices with a maximum depth of 100.", - "items": { - "type": "array", - "description": "An array where the first item is bid price and the second item is size.", - "items": { - "type": "number", - "format": "double" - } - } - }, - "a": { - "type": "array", - "description": "An array of ask prices with a maximum depth of 100.", - "items": { - "type": "array", - "description": "An array where the first item is ask price and the second item is size.", - "items": { - "type": "number", - "format": "double" - } - } - }, - "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." - }, - "x": { - "type": "integer", - "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" - }, - "r": { - "type": "integer", - "description": "The timestamp that the tick was received by Polygon." - } - } - }, - "example": { - "ev": "XL2", - "pair": "BTC-USD", - "t": 1610462411115, - "r": 1610462411128, - "x": 1, - "b": [ - [ - 33712.71, - 0.18635 - ], - [ - 33712.7, - 0.134 - ] - ], - "a": [ - [ - 33718.23, - 3.5527483 - ], - [ - 33718.24, - 0.1 - ] - ] - } - } - } + { + "paths": [ + "/indices/V" + ] + } + ] + } + }, + "paths": { + "/stocks/T": { + "get": { + "summary": "Trades", + "description": "Stream real-time trades for a given stock ticker symbol.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^([a-zA-Z]+)$/" + }, + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a trade event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ev": { + "enum": [ + "T" + ], + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given stock." + }, + "x": { + "type": "integer", + "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + }, + "i": { + "type": "string", + "description": "The trade ID." + }, + "z": { + "type": "integer", + "description": "The tape. (1 = NYSE, 2 = AMEX, 3 = Nasdaq).\n" + }, + "p": { + "type": "number", + "format": "double", + "description": "The price." + }, + "s": { + "type": "integer", + "description": "The trade size." + }, + "c": { + "type": "array", + "description": "The trade conditions. See Conditions and Indicators\" for Polygon.io's trade conditions glossary.\n", + "items": { + "type": "integer", + "description": "The ID of the condition." + } + }, + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." + }, + "q": { + "type": "integer", + "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n" + }, + "trfi": { + "type": "integer", + "description": "The ID for the Trade Reporting Facility where the trade took place." + }, + "trft": { + "type": "integer", + "description": "The TRF (Trade Reporting Facility) Timestamp in Unix MS. \nThis is the timestamp of when the trade reporting facility received this trade.\n" } + } }, - "x-polygon-entitlement-data-type": { - "name": "nbbo", - "description": "NBBO data" - }, - "x-polygon-entitlement-market-type": { - "name": "crypto", - "description": "Crypto data" - }, - "x-polygon-entitlement-allowed-timeframes": [ - { - "name": "realtime", - "description": "Real Time Data" - } - ] + "example": { + "ev": "T", + "sym": "MSFT", + "x": 4, + "i": "12345", + "z": 3, + "p": 114.125, + "s": 100, + "c": [ + 0, + 12 + ], + "t": 1536036818784, + "q": 3681328 + } + } } + } }, - "/crypto/XA": { - "get": { - "summary": "Aggregates (Per Minute)", - "description": "Stream real-time per-minute crypto aggregates for a given crypto pair.\n", - "parameters": [ - { - "name": "ticker", - "in": "query", - "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://polygon.io/docs/crypto/get_v3_reference_tickers).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/" - }, - "example": "*" - } - ], - "responses": { - "200": { - "description": "The WebSocket message for a crypto per-minute aggregate event.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "ev": { - "type": "string", - "enum": [ - "XA" - ], - "description": "The event type." - }, - "pair": { - "type": "string", - "description": "The crypto pair." - }, - "o": { - "type": "number", - "format": "double", - "description": "The open price for this aggregate window." - }, - "c": { - "type": "number", - "format": "double", - "description": "The close price for this aggregate window." - }, - "h": { - "type": "number", - "format": "double", - "description": "The high price for this aggregate window." - }, - "l": { - "type": "number", - "format": "double", - "description": "The low price for this aggregate window." - }, - "v": { - "type": "integer", - "description": "The volume of trades during this aggregate window." - }, - "s": { - "type": "integer", - "description": "The start time for this aggregate window in Unix Milliseconds." - }, - "e": { - "type": "integer", - "description": "The end time for this aggregate window in Unix Milliseconds." - }, - "vw": { - "type": "number", - "format": "double", - "description": "The volume weighted average price." - }, - "z": { - "type": "integer", - "description": "The average trade size for this aggregate window." - } - } - }, - "example": { - "ev": "XA", - "pair": "BCD-USD", - "v": 951.6112, - "vw": 0.7756, - "z": 73, - "o": 0.772, - "c": 0.784, - "h": 0.784, - "l": 0.771, - "s": 1610463240000, - "e": 1610463300000 - } - } - } - } - }, - "x-polygon-entitlement-data-type": { - "name": "aggregates", - "description": "Aggregate data" - }, - "x-polygon-entitlement-market-type": { - "name": "crypto", - "description": "Crypto data" - }, - "x-polygon-entitlement-allowed-timeframes": [ - { - "name": "realtime", - "description": "Real Time Data" - } - ] - } + "x-polygon-entitlement-data-type": { + "name": "trades", + "description": "Trade data" }, - "/indices/AM": { - "get": { - "summary": "Aggregates (Per Minute)", - "description": "Stream real-time minute aggregates for a given index ticker symbol.\n", - "parameters": [ - { - "name": "ticker", - "in": "query", - "description": "Specify an index ticker using \"I:\" prefix or use * to subscribe to all index tickers.\nYou can also use a comma separated list to subscribe to multiple index tickers.\nYou can retrieve available index tickers from our [Index Tickers API](https://polygon.io/docs/indices/get_v3_reference_tickers).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^(I:[a-zA-Z0-9]+)$/" - }, - "example": "*" - } - ], - "responses": { - "200": { - "description": "The WebSocket message for a minute aggregate event.", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "type": "object", - "properties": { - "ev": { - "description": "The event type." - }, - "sym": { - "type": "string", - "description": "The symbol representing the given index." - }, - "op": { - "type": "number", - "format": "double", - "description": "Today's official opening value." - }, - "o": { - "type": "number", - "format": "double", - "description": "The opening index value for this aggregate window." - }, - "c": { - "type": "number", - "format": "double", - "description": "The closing index value for this aggregate window." - }, - "h": { - "type": "number", - "format": "double", - "description": "The highest index value for this aggregate window." - }, - "l": { - "type": "number", - "format": "double", - "description": "The lowest index value for this aggregate window." - }, - "s": { - "type": "integer", - "description": "The timestamp of the starting index for this aggregate window in Unix Milliseconds." - }, - "e": { - "type": "integer", - "description": "The timestamp of the ending index for this aggregate window in Unix Milliseconds." - } - } - }, - { - "properties": { - "ev": { - "enum": [ - "AM" - ], - "description": "The event type." - } - } - } - ] - }, - "example": { - "ev": "AM", - "sym": "I:SPX", - "op": 3985.67, - "o": 3985.67, - "c": 3985.67, - "h": 3985.67, - "l": 3985.67, - "s": 1678220675805, - "e": 1678220675805 - } - } - } - } - }, - "x-polygon-entitlement-data-type": { - "name": "aggregates", - "description": "Aggregate data" - }, - "x-polygon-entitlement-market-type": { - "name": "indices", - "description": "Indices data" - }, - "x-polygon-entitlement-allowed-timeframes": [ - { - "name": "delayed", - "description": "15 minute delayed data" - }, - { - "name": "realtime", - "description": "Real Time Data" - } - ] - } + "x-polygon-entitlement-market-type": { + "name": "stocks", + "description": "Stocks data" }, - "/indices/V": { - "get": { - "summary": "Value", - "description": "Real-time value for a given index ticker symbol.\n", - "parameters": [ - { - "name": "ticker", - "in": "query", - "description": "Specify an index ticker using \"I:\" prefix or use * to subscribe to all index tickers.\nYou can also use a comma separated list to subscribe to multiple index tickers.\nYou can retrieve available index tickers from our [Index Tickers API](https://polygon.io/docs/indices/get_v3_reference_tickers).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^(I:[a-zA-Z0-9]+)$/" - }, - "example": "I:SPX" - } - ], - "responses": { - "200": { - "description": "The WebSocket message for a value event.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "ev": { - "type": "string", - "enum": [ - "V" - ], - "description": "The event type." - }, - "val": { - "description": "The value of the index." - }, - "T": { - "description": "The assigned ticker of the index." - }, - "t": { - "description": "The Timestamp in Unix MS." - } - } - }, - "example": { - "ev": "V", - "val": 3988.5, - "T": "I:SPX", - "t": 1678220098130 - } - } - } - } - }, - "x-polygon-entitlement-data-type": { - "name": "value", - "description": "Index value data" - }, - "x-polygon-entitlement-market-type": { - "name": "indices", - "description": "Indices data" - }, - "x-polygon-entitlement-allowed-timeframes": [ - { - "name": "delayed", - "description": "15 minute delayed data" - }, - { - "name": "realtime", - "description": "Real Time Data" - } - ] - } - } + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } }, - "components": { - "schemas": { - "Event": { - "type": "object", - "properties": { + "/stocks/Q": { + "get": { + "summary": "Quotes", + "description": "Stream real-time quotes for a given stock ticker symbol.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^([a-zA-Z]+)$/" + }, + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a quote event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { "ev": { - "enum": [ - "status" - ], - "description": "A constant denoting that this message describes a status event." + "enum": [ + "Q" + ], + "description": "The event type." }, - "message": { - "type": "string", - "description": "The descriptive message explaining this status event." + "sym": { + "type": "string", + "description": "The ticker symbol for the given stock." }, - "status": { - "type": "string" - } - } - }, - "ConnectEvent": { - "allOf": [ - { - "type": "object", - "properties": { - "ev": { - "enum": [ - "status" - ], - "description": "A constant denoting that this message describes a status event." - }, - "message": { - "type": "string", - "description": "The descriptive message explaining this status event." - }, - "status": { - "type": "string" - } - } + "bx": { + "type": "integer", + "description": "The bid exchange ID." }, - { - "title": "connect", - "properties": { - "status": { - "enum": [ - "success" - ], - "description": "The status indicating that the connection event was successful." - } - }, - "example": "{\"ev\":\"status\",\"status\":\"success\",\"message\":\"Connected Successfully\"}" - } - ] - }, - "DisconnectEvent": { - "allOf": [ - { - "type": "object", - "properties": { - "ev": { - "enum": [ - "status" - ], - "description": "A constant denoting that this message describes a status event." - }, - "message": { - "type": "string", - "description": "The descriptive message explaining this status event." - }, - "status": { - "type": "string" - } - } + "bp": { + "type": "number", + "format": "double", + "description": "The bid price." }, - { - "title": "disconnect", - "properties": { - "status": { - "enum": [ - "max_connections", - "force_disconnect", - "slow_consumer" - ], - "description": "The event that caused the WebSocket to disconnect." - } - }, - "example": "{\"ev\":\"status\",\"status\":\"max_connections\",\"message\":\"Maximum number of connections exceeded.\"}" - } - ] - }, - "AuthEvent": { - "allOf": [ - { - "type": "object", - "properties": { - "ev": { - "enum": [ - "status" - ], - "description": "A constant denoting that this message describes a status event." - }, - "message": { - "type": "string", - "description": "The descriptive message explaining this status event." - }, - "status": { - "type": "string" - } - } + "bs": { + "type": "integer", + "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price." }, - { - "title": "auth", - "properties": { - "status": { - "enum": [ - "auth_success", - "auth_timeout", - "auth_failed" - ], - "description": "The result of the authentication action." - } - }, - "example": "{\"ev\":\"status\",\"status\":\"auth_success\",\"message\":\"authenticated\"}" + "ax": { + "type": "integer", + "description": "The ask exchange ID." + }, + "ap": { + "type": "number", + "format": "double", + "description": "The ask price." + }, + "as": { + "type": "integer", + "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price." + }, + "c": { + "type": "integer", + "description": "The condition." + }, + "i": { + "type": "array", + "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n", + "items": { + "type": "integer", + "description": "The indicator code.\n" + } + }, + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." + }, + "q": { + "type": "integer", + "description": "The sequence number represents the sequence in which quote events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11). Values reset after each trading session/day.\n" + }, + "z": { + "type": "integer", + "description": "The tape. (1 = NYSE, 2 = AMEX, 3 = Nasdaq)." } - ] + } + }, + "example": { + "ev": "Q", + "sym": "MSFT", + "bx": 4, + "bp": 114.125, + "bs": 100, + "ax": 7, + "ap": 114.128, + "as": 160, + "c": 0, + "i": [ + 604 + ], + "t": 1536036818784, + "q": 50385480, + "z": 3 + } + } + } + } + }, + "x-polygon-entitlement-data-type": { + "name": "nbbo", + "description": "NBBO data" + }, + "x-polygon-entitlement-market-type": { + "name": "stocks", + "description": "Stocks data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/stocks/A": { + "get": { + "summary": "Aggregates (Per Second)", + "description": "Stream real-time second aggregates for a given stock ticker symbol.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^([a-zA-Z]+)$/" }, - "SubscribeEvent": { - "allOf": [ + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a second aggregate event.", + "content": { + "application/json": { + "schema": { + "allOf": [ { - "type": "object", - "properties": { - "ev": { - "enum": [ - "status" - ], - "description": "A constant denoting that this message describes a status event." - }, - "message": { - "type": "string", - "description": "The descriptive message explaining this status event." - }, - "status": { - "type": "string" - } + "type": "object", + "properties": { + "ev": { + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given stock." + }, + "v": { + "type": "integer", + "description": "The tick volume." + }, + "av": { + "type": "integer", + "description": "Today's accumulated volume." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening price." + }, + "vw": { + "type": "number", + "format": "float", + "description": "The tick's volume weighted average price." + }, + "o": { + "type": "number", + "format": "double", + "description": "The opening tick price for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The closing tick price for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The highest tick price for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest tick price for this aggregate window." + }, + "a": { + "type": "number", + "format": "float", + "description": "Today's volume weighted average price." + }, + "z": { + "type": "integer", + "description": "The average trade size for this aggregate window." + }, + "s": { + "type": "integer", + "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." + }, + "otc": { + "type": "boolean", + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false." } + } }, { - "title": "subscribe", - "properties": { - "status": { - "enum": [ - "success", - "auth_required", - "error" - ], - "description": "The result of a subscribe action." - } - }, - "example": "{\"ev\":\"status\",\"status\":\"success\",\"message\":\"subscribed to: T.MSFT\"}" + "properties": { + "ev": { + "enum": [ + "A" + ], + "description": "The event type." + } + } } - ] + ] + }, + "example": { + "ev": "A", + "sym": "SPCE", + "v": 200, + "av": 8642007, + "op": 25.66, + "vw": 25.3981, + "o": 25.39, + "c": 25.39, + "h": 25.39, + "l": 25.39, + "a": 25.3714, + "z": 50, + "s": 1610144868000, + "e": 1610144869000 + } + } + } + } + }, + "x-polygon-entitlement-data-type": { + "name": "aggregates", + "description": "Aggregate data" + }, + "x-polygon-entitlement-market-type": { + "name": "stocks", + "description": "Stocks data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/stocks/AM": { + "get": { + "summary": "Aggregates (Per Minute)", + "description": "Stream real-time minute aggregates for a given stock ticker symbol.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^([a-zA-Z]+)$/" }, - "UnsubscribeEvent": { - "allOf": [ + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a minute aggregate event.", + "content": { + "application/json": { + "schema": { + "allOf": [ { - "type": "object", - "properties": { - "ev": { - "enum": [ - "status" - ], - "description": "A constant denoting that this message describes a status event." - }, - "message": { - "type": "string", - "description": "The descriptive message explaining this status event." - }, - "status": { - "type": "string" - } + "type": "object", + "properties": { + "ev": { + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given stock." + }, + "v": { + "type": "integer", + "description": "The tick volume." + }, + "av": { + "type": "integer", + "description": "Today's accumulated volume." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening price." + }, + "vw": { + "type": "number", + "format": "float", + "description": "The tick's volume weighted average price." + }, + "o": { + "type": "number", + "format": "double", + "description": "The opening tick price for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The closing tick price for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The highest tick price for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest tick price for this aggregate window." + }, + "a": { + "type": "number", + "format": "float", + "description": "Today's volume weighted average price." + }, + "z": { + "type": "integer", + "description": "The average trade size for this aggregate window." + }, + "s": { + "type": "integer", + "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." + }, + "otc": { + "type": "boolean", + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false." } + } }, { - "title": "unsubscribe", - "properties": { - "status": { - "enum": [ - "success" - ], - "description": "The result of an unsubscribe action." - } - }, - "example": "{\"ev\":\"status\",\"status\":\"success\",\"message\":\"unsubscribed to: T.MSFT\"}" + "properties": { + "ev": { + "enum": [ + "AM" + ], + "description": "The event type." + } + } } - ] - }, - "Timestamp": { - "type": "integer", - "description": "The Timestamp in Unix MS." - }, - "AggsOpen": { - "type": "number", - "format": "double", - "description": "The open price for this aggregate window." - }, - "AggsClose": { - "type": "number", - "format": "double", - "description": "The close price for this aggregate window." - }, - "AggsHigh": { - "type": "number", - "format": "double", - "description": "The high price for this aggregate window." - }, - "AggsLow": { - "type": "number", - "format": "double", - "description": "The low price for this aggregate window." - }, - "AggsVolume": { - "type": "integer", - "description": "The volume of trades during this aggregate window." - }, - "AggsStartTime": { - "type": "integer", - "description": "The start time for this aggregate window in Unix Milliseconds." - }, - "AggsEndTime": { - "type": "integer", - "description": "The end time for this aggregate window in Unix Milliseconds." + ] + }, + "example": { + "ev": "AM", + "sym": "GTE", + "v": 4110, + "av": 9470157, + "op": 0.4372, + "vw": 0.4488, + "o": 0.4488, + "c": 0.4486, + "h": 0.4489, + "l": 0.4486, + "a": 0.4352, + "z": 685, + "s": 1610144640000, + "e": 1610144700000 + } + } + } + } + }, + "x-polygon-entitlement-data-type": { + "name": "aggregates", + "description": "Aggregate data" + }, + "x-polygon-entitlement-market-type": { + "name": "stocks", + "description": "Stocks data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/stocks/LULD": { + "get": { + "summary": "Limit-Up Limit-Down (LULD)", + "description": "Stream real-time LULD events for a given stock ticker symbol.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^([a-zA-Z]+)$/" }, - "StockTradeEvent": { - "type": "object", - "properties": { + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a LULD event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { "ev": { - "enum": [ - "T" - ], - "description": "The event type." + "enum": [ + "LULD" + ], + "description": "The event type." }, - "sym": { - "type": "string", - "description": "The ticker symbol for the given stock." + "T": { + "type": "string", + "description": "The ticker symbol for the given stock." }, - "x": { - "type": "integer", - "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + "h": { + "type": "number", + "format": "double", + "description": "The high price." + }, + "l": { + "type": "number", + "format": "double", + "description": "The low price." }, "i": { - "type": "string", - "description": "The trade ID." + "type": "array", + "description": "The Indicators.", + "items": { + "type": "integer" + } }, "z": { - "type": "integer", - "description": "The tape. (1 = NYSE, 2 = AMEX, 3 = Nasdaq).\n" - }, - "p": { - "type": "number", - "format": "double", - "description": "The price." - }, - "s": { - "type": "integer", - "description": "The trade size." - }, - "c": { - "type": "array", - "description": "The trade conditions. See Conditions and Indicators\" for Polygon.io's trade conditions glossary.\n", - "items": { - "type": "integer", - "description": "The ID of the condition." - } + "type": "integer", + "description": "The tape. (1 = NYSE, 2 = AMEX, 3 = Nasdaq).\n" }, "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." + "type": "integer", + "description": "The Timestamp in Unix MS." }, "q": { - "type": "integer", - "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n" - }, - "trfi": { - "type": "integer", - "description": "The ID for the Trade Reporting Facility where the trade took place." - }, - "trft": { - "type": "integer", - "description": "The TRF (Trade Reporting Facility) Timestamp in Unix MS. \nThis is the timestamp of when the trade reporting facility received this trade.\n" + "type": "integer", + "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n" } + } + }, + "example": { + "ev": "LULD", + "T": "MSFT", + "h": 218.96, + "l": 198.11, + "i": [ + 21 + ], + "z": 3, + "t": 1601316752683746, + "q": 290317 } + } + } + } + }, + "x-polygon-entitlement-data-type": { + "name": "limit-up-limit-down", + "description": "Limit-Up Limit-Down data" + }, + "x-polygon-entitlement-market-type": { + "name": "stocks", + "description": "Stocks data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/stocks/NOI": { + "get": { + "summary": "Imbalances", + "description": "Stream real-time imbalance events for a given stock ticker symbol.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^([a-zA-Z]+)$/" }, - "StockQuoteEvent": { - "type": "object", - "properties": { + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for an imbalance event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { "ev": { - "enum": [ - "Q" - ], - "description": "The event type." - }, - "sym": { - "type": "string", - "description": "The ticker symbol for the given stock." - }, - "bx": { - "type": "integer", - "description": "The bid exchange ID." - }, - "bp": { - "type": "number", - "format": "double", - "description": "The bid price." + "enum": [ + "NOI" + ], + "description": "The event type." }, - "bs": { - "type": "integer", - "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price." - }, - "ax": { - "type": "integer", - "description": "The ask exchange ID." + "T": { + "type": "string", + "description": "The ticker symbol for the given stock." }, - "ap": { - "type": "number", - "format": "double", - "description": "The ask price." + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." }, - "as": { - "type": "integer", - "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price." + "at": { + "type": "integer", + "description": "The time that the auction is planned to take place in the format (hour x 100) + minutes in Eastern Standard Time, \nfor example 930 would be 9:30 am EST, and 1600 would be 4:00 pm EST.\n" }, - "c": { - "type": "integer", - "description": "The condition." + "a": { + "type": "string", + "description": "The auction type.\n`O` - Early Opening Auction (non-NYSE only)\n`M` - Core Opening Auction\n`H` - Reopening Auction (Halt Resume)\n`C` - Closing Auction\n`P` - Extreme Closing Imbalance (NYSE only)\n`R` - Regulatory Closing Imbalance (NYSE only)\n" }, "i": { - "type": "array", - "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n", - "items": { - "type": "integer", - "description": "The indicator code.\n" - } + "type": "integer", + "description": "The symbol sequence." }, - "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." + "x": { + "type": "integer", + "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." }, - "q": { - "type": "integer", - "description": "The sequence number represents the sequence in which quote events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11). Values reset after each trading session/day.\n" + "o": { + "type": "integer", + "description": "The imbalance quantity." }, - "z": { - "type": "integer", - "description": "The tape. (1 = NYSE, 2 = AMEX, 3 = Nasdaq)." + "p": { + "type": "integer", + "description": "The paired quantity." + }, + "b": { + "type": "number", + "format": "double", + "description": "The book clearing price." } + } + }, + "example": { + "ev": "NOI", + "T": "NTEST.Q", + "t": 1601318039223013600, + "at": 930, + "a": "M", + "i": 44, + "x": 10, + "o": 480, + "p": 440, + "b": 25.03 } + } + } + } + }, + "x-polygon-entitlement-data-type": { + "name": "imbalances", + "description": "Imbalances data" + }, + "x-polygon-entitlement-market-type": { + "name": "stocks", + "description": "Stocks data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/launchpad/stocks/AM": { + "get": { + "summary": "Aggregates (Per Minute)", + "description": "Stream real-time minute aggregates for a given stock ticker symbol.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^([a-zA-Z]+)$/" }, - "StockBaseAggregateEvent": { - "type": "object", - "properties": { + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a minute aggregate event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { "ev": { - "description": "The event type." + "description": "The event type." }, "sym": { - "type": "string", - "description": "The ticker symbol for the given stock." + "type": "string", + "description": "The ticker symbol for the given stock." }, "v": { - "type": "integer", - "description": "The tick volume." + "type": "integer", + "description": "The tick volume." }, "av": { - "type": "integer", - "description": "Today's accumulated volume." + "type": "integer", + "description": "Today's accumulated volume." }, "op": { - "type": "number", - "format": "double", - "description": "Today's official opening price." + "type": "number", + "format": "double", + "description": "Today's official opening price." }, "vw": { - "type": "number", - "format": "float", - "description": "The tick's volume weighted average price." + "type": "number", + "format": "float", + "description": "The volume-weighted average value for the aggregate window." }, "o": { - "type": "number", - "format": "double", - "description": "The opening tick price for this aggregate window." + "type": "number", + "format": "double", + "description": "The open price for the symbol in the given time period." }, "c": { - "type": "number", - "format": "double", - "description": "The closing tick price for this aggregate window." + "type": "number", + "format": "double", + "description": "The close price for the symbol in the given time period." }, "h": { - "type": "number", - "format": "double", - "description": "The highest tick price for this aggregate window." + "type": "number", + "format": "double", + "description": "The highest price for the symbol in the given time period." }, "l": { - "type": "number", - "format": "double", - "description": "The lowest tick price for this aggregate window." + "type": "number", + "format": "double", + "description": "The lowest price for the symbol in the given time period." }, "a": { - "type": "number", - "format": "float", - "description": "Today's volume weighted average price." + "type": "number", + "format": "float", + "description": "Today's volume weighted average price." }, "z": { - "type": "integer", - "description": "The average trade size for this aggregate window." + "type": "integer", + "description": "The average trade size for this aggregate window." }, "s": { - "type": "integer", - "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." + "type": "integer", + "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." }, "e": { + "type": "integer", + "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." + } + } + }, + "example": { + "ev": "AM", + "sym": "GTE", + "v": 4110, + "av": 9470157, + "op": 0.4372, + "vw": 0.4488, + "o": 0.4488, + "c": 0.4486, + "h": 0.4489, + "l": 0.4486, + "a": 0.4352, + "z": 685, + "s": 1610144640000, + "e": 1610144700000 + } + } + } + } + }, + "x-polygon-entitlement-data-type": { + "name": "aggregates", + "description": "Aggregate data" + }, + "x-polygon-entitlement-market-type": { + "name": "stocks", + "description": "Stocks data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/launchpad/stocks/LV": { + "get": { + "summary": "Value", + "description": "Real-time value for a given stock ticker symbol.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^([a-zA-Z]+)$/" + }, + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a value event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "LV" + ], + "description": "The event type." + }, + "val": { + "description": "The current value of the security." + }, + "sym": { + "description": "The ticker symbol for the given security." + }, + "t": { + "description": "The nanosecond timestamp." + } + } + }, + "example": { + "ev": "LV", + "val": 3988.5, + "sym": "AAPL", + "t": 1678220098130 + } + } + } + } + }, + "x-polygon-entitlement-data-type": { + "name": "value", + "description": "Value data" + }, + "x-polygon-entitlement-market-type": { + "name": "stocks", + "description": "Stocks data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/options/T": { + "get": { + "summary": "Trades", + "description": "Stream real-time trades for a given option contract.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify an option contract or use * to subscribe to all option contracts.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" + }, + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a trade event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ev": { + "enum": [ + "T" + ], + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given option contract." + }, + "x": { + "type": "integer", + "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + }, + "p": { + "type": "number", + "format": "double", + "description": "The price." + }, + "s": { + "type": "integer", + "description": "The trade size." + }, + "c": { + "type": "array", + "description": "The trade conditions", + "items": { "type": "integer", - "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." + "description": "The ID of the condition." + } + }, + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." + }, + "q": { + "type": "integer", + "description": "The sequence number represents the sequence in which trade events happened. These are increasing and unique per ticker symbol, but will not always be sequential (e.g., 1, 2, 6, 9, 10, 11)." + } + } + }, + "example": { + "ev": "T", + "sym": "O:AMC210827C00037000", + "x": 65, + "p": 1.54, + "s": 1, + "c": [ + 233 + ], + "t": 1629820676333, + "q": 651921857 + } + } + } + } + }, + "x-polygon-entitlement-data-type": { + "name": "trades", + "description": "Trade data" + }, + "x-polygon-entitlement-market-type": { + "name": "options", + "description": "Options data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/options/Q": { + "get": { + "summary": "Quotes", + "description": "Stream real-time quotes for a given option contract.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify an option contract. You're only allowed to subscribe to 1,000 option contracts per connection.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" + }, + "example": "O:SPY241220P00720000" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a trade event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ev": { + "enum": [ + "Q" + ], + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given option contract." + }, + "bx": { + "type": "integer", + "description": "The bid exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + }, + "ax": { + "type": "integer", + "description": "The ask exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + }, + "bp": { + "type": "number", + "format": "double", + "description": "The bid price." + }, + "ap": { + "type": "number", + "format": "double", + "description": "The ask price." + }, + "bs": { + "type": "integer", + "description": "The bid size." }, - "otc": { - "type": "boolean", - "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false." + "as": { + "type": "integer", + "description": "The ask size." + }, + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." + }, + "q": { + "type": "integer", + "description": "The sequence number represents the sequence in which trade events happened. These are increasing and unique per ticker symbol, but will not always be sequential (e.g., 1, 2, 6, 9, 10, 11)." } + } + }, + "example": { + "ev": "Q", + "sym": "O:SPY241220P00720000", + "bx": 302, + "ax": 302, + "bp": 9.71, + "ap": 9.81, + "bs": 17, + "as": 24, + "t": 1644506128351, + "q": 844090872 } + } + } + } + }, + "x-polygon-entitlement-data-type": { + "name": "nbbo", + "description": "NBBO data" + }, + "x-polygon-entitlement-market-type": { + "name": "options", + "description": "Options data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/options/A": { + "get": { + "summary": "Aggregates (Per Second)", + "description": "Stream real-time second aggregates for a given option contract.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify an option contract or use * to subscribe to all option contracts.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" }, - "StockSecondAggregateEvent": { - "allOf": [ + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a second aggregate event.", + "content": { + "application/json": { + "schema": { + "allOf": [ { - "type": "object", - "properties": { - "ev": { - "description": "The event type." - }, - "sym": { - "type": "string", - "description": "The ticker symbol for the given stock." - }, - "v": { - "type": "integer", - "description": "The tick volume." - }, - "av": { - "type": "integer", - "description": "Today's accumulated volume." - }, - "op": { - "type": "number", - "format": "double", - "description": "Today's official opening price." - }, - "vw": { - "type": "number", - "format": "float", - "description": "The tick's volume weighted average price." - }, - "o": { - "type": "number", - "format": "double", - "description": "The opening tick price for this aggregate window." - }, - "c": { - "type": "number", - "format": "double", - "description": "The closing tick price for this aggregate window." - }, - "h": { - "type": "number", - "format": "double", - "description": "The highest tick price for this aggregate window." - }, - "l": { - "type": "number", - "format": "double", - "description": "The lowest tick price for this aggregate window." - }, - "a": { - "type": "number", - "format": "float", - "description": "Today's volume weighted average price." - }, - "z": { - "type": "integer", - "description": "The average trade size for this aggregate window." - }, - "s": { - "type": "integer", - "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." - }, - "e": { - "type": "integer", - "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." - }, - "otc": { - "type": "boolean", - "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false." - } + "type": "object", + "properties": { + "ev": { + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given option contract." + }, + "v": { + "type": "integer", + "description": "The tick volume." + }, + "av": { + "type": "integer", + "description": "Today's accumulated volume." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening price." + }, + "vw": { + "type": "number", + "format": "float", + "description": "The tick's volume weighted average price." + }, + "o": { + "type": "number", + "format": "double", + "description": "The opening tick price for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The closing tick price for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The highest tick price for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest tick price for this aggregate window." + }, + "a": { + "type": "number", + "format": "float", + "description": "Today's volume weighted average price." + }, + "z": { + "type": "integer", + "description": "The average trade size for this aggregate window." + }, + "s": { + "type": "integer", + "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." } + } }, { - "properties": { - "ev": { - "enum": [ - "A" - ], - "description": "The event type." - } + "properties": { + "ev": { + "enum": [ + "A" + ], + "description": "The event type." } + } } - ] + ] + }, + "example": { + "ev": "AM", + "sym": "O:ONEM220121C00025000", + "v": 2, + "av": 8, + "op": 2.2, + "vw": 2.05, + "o": 2.05, + "c": 2.05, + "h": 2.05, + "l": 2.05, + "a": 2.1312, + "z": 2, + "s": 1632419640000, + "e": 1632419700000 + } + } + } + } + }, + "x-polygon-entitlement-data-type": { + "name": "aggregates", + "description": "Aggregate data" + }, + "x-polygon-entitlement-market-type": { + "name": "options", + "description": "Options data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/options/AM": { + "get": { + "summary": "Aggregates (Per Minute)", + "description": "Stream real-time minute aggregates for a given option contract.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify an option contract or use * to subscribe to all option contracts.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" }, - "StockMinuteAggregateEvent": { - "allOf": [ + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a minute aggregate event.", + "content": { + "application/json": { + "schema": { + "allOf": [ { - "type": "object", - "properties": { - "ev": { - "description": "The event type." - }, - "sym": { - "type": "string", - "description": "The ticker symbol for the given stock." - }, - "v": { - "type": "integer", - "description": "The tick volume." - }, - "av": { - "type": "integer", - "description": "Today's accumulated volume." - }, - "op": { - "type": "number", - "format": "double", - "description": "Today's official opening price." - }, - "vw": { - "type": "number", - "format": "float", - "description": "The tick's volume weighted average price." - }, - "o": { - "type": "number", - "format": "double", - "description": "The opening tick price for this aggregate window." - }, - "c": { - "type": "number", - "format": "double", - "description": "The closing tick price for this aggregate window." - }, - "h": { - "type": "number", - "format": "double", - "description": "The highest tick price for this aggregate window." - }, - "l": { - "type": "number", - "format": "double", - "description": "The lowest tick price for this aggregate window." - }, - "a": { - "type": "number", - "format": "float", - "description": "Today's volume weighted average price." - }, - "z": { - "type": "integer", - "description": "The average trade size for this aggregate window." - }, - "s": { - "type": "integer", - "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." - }, - "e": { - "type": "integer", - "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." - }, - "otc": { - "type": "boolean", - "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false." - } + "type": "object", + "properties": { + "ev": { + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given option contract." + }, + "v": { + "type": "integer", + "description": "The tick volume." + }, + "av": { + "type": "integer", + "description": "Today's accumulated volume." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening price." + }, + "vw": { + "type": "number", + "format": "float", + "description": "The tick's volume weighted average price." + }, + "o": { + "type": "number", + "format": "double", + "description": "The opening tick price for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The closing tick price for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The highest tick price for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest tick price for this aggregate window." + }, + "a": { + "type": "number", + "format": "float", + "description": "Today's volume weighted average price." + }, + "z": { + "type": "integer", + "description": "The average trade size for this aggregate window." + }, + "s": { + "type": "integer", + "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." } + } }, { - "properties": { - "ev": { - "enum": [ - "AM" - ], - "description": "The event type." - } + "properties": { + "ev": { + "enum": [ + "AM" + ], + "description": "The event type." } + } } - ] + ] + }, + "example": { + "ev": "AM", + "sym": "O:ONEM220121C00025000", + "v": 2, + "av": 8, + "op": 2.2, + "vw": 2.05, + "o": 2.05, + "c": 2.05, + "h": 2.05, + "l": 2.05, + "a": 2.1312, + "z": 2, + "s": 1632419640000, + "e": 1632419700000 + } + } + } + } + }, + "x-polygon-entitlement-data-type": { + "name": "aggregates", + "description": "Aggregate data" + }, + "x-polygon-entitlement-market-type": { + "name": "options", + "description": "Options data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/launchpad/options/AM": { + "get": { + "summary": "Aggregates (Per Minute)", + "description": "Stream real-time minute aggregates for a given option contract.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify an option contract. You're only allowed to subscribe to 1,000 option contracts per connection.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" }, - "StockLULDEvent": { - "type": "object", - "properties": { + "example": "O:SPY241220P00720000" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a minute aggregate event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { "ev": { - "enum": [ - "LULD" - ], - "description": "The event type." - }, - "T": { - "type": "string", - "description": "The ticker symbol for the given stock." + "description": "The event type." }, - "h": { - "type": "number", - "format": "double", - "description": "The high price." - }, - "l": { - "type": "number", - "format": "double", - "description": "The low price." - }, - "i": { - "type": "array", - "description": "The Indicators.", - "items": { - "type": "integer" - } + "sym": { + "type": "string", + "description": "The ticker symbol for the given stock." }, - "z": { - "type": "integer", - "description": "The tape. (1 = NYSE, 2 = AMEX, 3 = Nasdaq).\n" + "v": { + "type": "integer", + "description": "The tick volume." }, - "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." + "av": { + "type": "integer", + "description": "Today's accumulated volume." }, - "q": { - "type": "integer", - "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n" - } - } - }, - "StockImbalanceEvent": { - "type": "object", - "properties": { - "ev": { - "enum": [ - "NOI" - ], - "description": "The event type." + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening price." }, - "T": { - "type": "string", - "description": "The ticker symbol for the given stock." + "vw": { + "type": "number", + "format": "float", + "description": "The volume-weighted average value for the aggregate window." }, - "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." + "o": { + "type": "number", + "format": "double", + "description": "The open price for the symbol in the given time period." }, - "at": { - "type": "integer", - "description": "The time that the auction is planned to take place in the format (hour x 100) + minutes in Eastern Standard Time, \nfor example 930 would be 9:30 am EST, and 1600 would be 4:00 pm EST.\n" + "c": { + "type": "number", + "format": "double", + "description": "The close price for the symbol in the given time period." }, - "a": { - "type": "string", - "description": "The auction type.\n`O` - Early Opening Auction (non-NYSE only)\n`M` - Core Opening Auction\n`H` - Reopening Auction (Halt Resume)\n`C` - Closing Auction\n`P` - Extreme Closing Imbalance (NYSE only)\n`R` - Regulatory Closing Imbalance (NYSE only)\n" + "h": { + "type": "number", + "format": "double", + "description": "The highest price for the symbol in the given time period." }, - "i": { - "type": "integer", - "description": "The symbol sequence." + "l": { + "type": "number", + "format": "double", + "description": "The lowest price for the symbol in the given time period." }, - "x": { - "type": "integer", - "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + "a": { + "type": "number", + "format": "float", + "description": "Today's volume weighted average price." }, - "o": { - "type": "integer", - "description": "The imbalance quantity." + "z": { + "type": "integer", + "description": "The average trade size for this aggregate window." }, - "p": { - "type": "integer", - "description": "The paired quantity." + "s": { + "type": "integer", + "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." }, - "b": { - "type": "number", - "format": "double", - "description": "The book clearing price." + "e": { + "type": "integer", + "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." } + } + }, + "example": { + "ev": "AM", + "sym": "O:ONEM220121C00025000", + "v": 2, + "av": 8, + "op": 2.2, + "vw": 2.05, + "o": 2.05, + "c": 2.05, + "h": 2.05, + "l": 2.05, + "a": 2.1312, + "z": 1, + "s": 1632419640000, + "e": 1632419700000 } + } + } + } + }, + "x-polygon-entitlement-data-type": { + "name": "aggregates", + "description": "Aggregate data" + }, + "x-polygon-entitlement-market-type": { + "name": "options", + "description": "Options data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/launchpad/options/LV": { + "get": { + "summary": "Value", + "description": "Real-time value for a given options ticker symbol.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify an option contract. You're only allowed to subscribe to 1,000 option contracts per connection.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" }, - "StockSymbol": { - "type": "string", - "description": "The ticker symbol for the given stock." - }, - "StockTape": { - "type": "integer", - "description": "The tape. (1 = NYSE, 2 = AMEX, 3 = Nasdaq).\n" - }, - "StockExchangeID": { - "type": "integer", - "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." - }, - "OptionTradeEvent": { - "type": "object", - "properties": { + "example": "O:SPY241220P00720000" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a value event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { "ev": { - "enum": [ - "T" - ], - "description": "The event type." - }, - "sym": { - "type": "string", - "description": "The ticker symbol for the given option contract." - }, - "x": { - "type": "integer", - "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." - }, - "p": { - "type": "number", - "format": "double", - "description": "The price." + "type": "string", + "enum": [ + "LV" + ], + "description": "The event type." }, - "s": { - "type": "integer", - "description": "The trade size." + "val": { + "description": "The current value of the security." }, - "c": { - "type": "array", - "description": "The trade conditions", - "items": { - "type": "integer", - "description": "The ID of the condition." - } + "sym": { + "description": "The ticker symbol for the given security." }, "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." + "description": "The nanosecond timestamp." + } + } + }, + "example": { + "ev": "LV", + "val": 7.2, + "sym": "O:TSLA210903C00700000", + "t": 1401715883806000000 + } + } + } + } + }, + "x-polygon-entitlement-data-type": { + "name": "value", + "description": "Value data" + }, + "x-polygon-entitlement-market-type": { + "name": "options", + "description": "Options data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/forex/C": { + "get": { + "summary": "Quotes", + "description": "Stream real-time forex quotes for a given forex pair.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://polygon.io/docs/forex/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/" + }, + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a forex quote event.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "ev": { + "type": "string", + "description": "The event type." + }, + "p": { + "type": "string", + "description": "The current pair." + }, + "x": { + "type": "integer", + "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + }, + "a": { + "type": "number", + "format": "double", + "description": "The ask price." + }, + "b": { + "type": "number", + "format": "double", + "description": "The bid price." + }, + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." + } + } }, - "q": { - "type": "integer", - "description": "The sequence number represents the sequence in which trade events happened. These are increasing and unique per ticker symbol, but will not always be sequential (e.g., 1, 2, 6, 9, 10, 11)." + { + "properties": { + "ev": { + "enum": [ + "C" + ], + "description": "The event type." + } + } } + ] + }, + "example": { + "ev": "C", + "p": "USD/CNH", + "x": "44", + "a": 6.83366, + "b": 6.83363, + "t": 1536036818784 } + } + } + } + }, + "x-polygon-entitlement-data-type": { + "name": "nbbo", + "description": "NBBO data" + }, + "x-polygon-entitlement-market-type": { + "name": "fx", + "description": "Forex data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/forex/CA": { + "get": { + "summary": "Aggregates (Per Minute)", + "description": "Stream real-time per-minute forex aggregates for a given forex pair.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://polygon.io/docs/forex/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/" }, - "OptionQuoteEvent": { - "type": "object", - "properties": { + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a forex per-minute aggregate event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { "ev": { - "enum": [ - "Q" - ], - "description": "The event type." + "type": "string", + "enum": [ + "CA" + ], + "description": "The event type." }, - "sym": { - "type": "string", - "description": "The ticker symbol for the given option contract." - }, - "bx": { - "type": "integer", - "description": "The bid exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + "pair": { + "type": "string", + "description": "The currency pair." }, - "ax": { - "type": "integer", - "description": "The ask exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + "o": { + "type": "number", + "format": "double", + "description": "The open price for this aggregate window." }, - "bp": { - "type": "number", - "format": "double", - "description": "The bid price." + "c": { + "type": "number", + "format": "double", + "description": "The close price for this aggregate window." }, - "ap": { - "type": "number", - "format": "double", - "description": "The ask price." + "h": { + "type": "number", + "format": "double", + "description": "The high price for this aggregate window." }, - "bs": { - "type": "integer", - "description": "The bid size." + "l": { + "type": "number", + "format": "double", + "description": "The low price for this aggregate window." }, - "as": { - "type": "integer", - "description": "The ask size." + "v": { + "type": "integer", + "description": "The volume of trades during this aggregate window." }, - "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." + "s": { + "type": "integer", + "description": "The start time for this aggregate window in Unix Milliseconds." }, - "q": { - "type": "integer", - "description": "The sequence number represents the sequence in which trade events happened. These are increasing and unique per ticker symbol, but will not always be sequential (e.g., 1, 2, 6, 9, 10, 11)." + "e": { + "type": "integer", + "description": "The end time for this aggregate window in Unix Milliseconds." } + } + }, + "example": { + "ev": "CA", + "pair": "USD/EUR", + "o": 0.8687, + "c": 0.86889, + "h": 0.86889, + "l": 0.8686, + "v": 20, + "s": 1539145740000 } + } + } + } + }, + "x-polygon-entitlement-data-type": { + "name": "aggregates", + "description": "Aggregate data" + }, + "x-polygon-entitlement-market-type": { + "name": "fx", + "description": "Forex data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/launchpad/forex/AM": { + "get": { + "summary": "Aggregates (Per Minute)", + "description": "Stream real-time per-minute forex aggregates for a given forex pair.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://polygon.io/docs/forex/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/" }, - "OptionBaseAggregateEvent": { - "type": "object", - "properties": { + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a minute aggregate event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { "ev": { - "description": "The event type." + "description": "The event type." }, "sym": { - "type": "string", - "description": "The ticker symbol for the given option contract." + "type": "string", + "description": "The ticker symbol for the given stock." }, "v": { - "type": "integer", - "description": "The tick volume." + "type": "integer", + "description": "The tick volume." }, "av": { - "type": "integer", - "description": "Today's accumulated volume." + "type": "integer", + "description": "Today's accumulated volume." }, "op": { - "type": "number", - "format": "double", - "description": "Today's official opening price." + "type": "number", + "format": "double", + "description": "Today's official opening price." }, "vw": { - "type": "number", - "format": "float", - "description": "The tick's volume weighted average price." + "type": "number", + "format": "float", + "description": "The volume-weighted average value for the aggregate window." }, "o": { - "type": "number", - "format": "double", - "description": "The opening tick price for this aggregate window." + "type": "number", + "format": "double", + "description": "The open price for the symbol in the given time period." }, "c": { - "type": "number", - "format": "double", - "description": "The closing tick price for this aggregate window." + "type": "number", + "format": "double", + "description": "The close price for the symbol in the given time period." }, "h": { - "type": "number", - "format": "double", - "description": "The highest tick price for this aggregate window." + "type": "number", + "format": "double", + "description": "The highest price for the symbol in the given time period." }, "l": { - "type": "number", - "format": "double", - "description": "The lowest tick price for this aggregate window." + "type": "number", + "format": "double", + "description": "The lowest price for the symbol in the given time period." }, "a": { - "type": "number", - "format": "float", - "description": "Today's volume weighted average price." + "type": "number", + "format": "float", + "description": "Today's volume weighted average price." }, "z": { - "type": "integer", - "description": "The average trade size for this aggregate window." + "type": "integer", + "description": "The average trade size for this aggregate window." }, "s": { - "type": "integer", - "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." + "type": "integer", + "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." }, "e": { - "type": "integer", - "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." + "type": "integer", + "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." } + } + }, + "example": { + "ev": "AM", + "sym": "C:USD-EUR", + "v": 4110, + "av": 9470157, + "op": 0.9272, + "vw": 0.9288, + "o": 0.9288, + "c": 0.9286, + "h": 0.9289, + "l": 0.9206, + "a": 0.9352, + "z": 685, + "s": 1610144640000, + "e": 1610144700000 } + } + } + } + }, + "x-polygon-entitlement-data-type": { + "name": "aggregates", + "description": "Aggregate data" + }, + "x-polygon-entitlement-market-type": { + "name": "fx", + "description": "Forex data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/launchpad/forex/LV": { + "get": { + "summary": "Value", + "description": "Real-time value for a given forex ticker symbol.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://polygon.io/docs/forex/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/" }, - "OptionSecondAggregateEvent": { - "allOf": [ - { - "type": "object", - "properties": { - "ev": { - "description": "The event type." - }, - "sym": { - "type": "string", - "description": "The ticker symbol for the given option contract." - }, - "v": { - "type": "integer", - "description": "The tick volume." - }, - "av": { - "type": "integer", - "description": "Today's accumulated volume." - }, - "op": { - "type": "number", - "format": "double", - "description": "Today's official opening price." - }, - "vw": { - "type": "number", - "format": "float", - "description": "The tick's volume weighted average price." - }, - "o": { - "type": "number", - "format": "double", - "description": "The opening tick price for this aggregate window." - }, - "c": { - "type": "number", - "format": "double", - "description": "The closing tick price for this aggregate window." - }, - "h": { - "type": "number", - "format": "double", - "description": "The highest tick price for this aggregate window." - }, - "l": { - "type": "number", - "format": "double", - "description": "The lowest tick price for this aggregate window." - }, - "a": { - "type": "number", - "format": "float", - "description": "Today's volume weighted average price." - }, - "z": { - "type": "integer", - "description": "The average trade size for this aggregate window." - }, - "s": { - "type": "integer", - "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." - }, - "e": { - "type": "integer", - "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." - } - } - }, - { - "properties": { - "ev": { - "enum": [ - "A" - ], - "description": "The event type." - } - } - } - ] - }, - "OptionMinuteAggregateEvent": { - "allOf": [ - { - "type": "object", - "properties": { - "ev": { - "description": "The event type." - }, - "sym": { - "type": "string", - "description": "The ticker symbol for the given option contract." - }, - "v": { - "type": "integer", - "description": "The tick volume." - }, - "av": { - "type": "integer", - "description": "Today's accumulated volume." - }, - "op": { - "type": "number", - "format": "double", - "description": "Today's official opening price." - }, - "vw": { - "type": "number", - "format": "float", - "description": "The tick's volume weighted average price." - }, - "o": { - "type": "number", - "format": "double", - "description": "The opening tick price for this aggregate window." - }, - "c": { - "type": "number", - "format": "double", - "description": "The closing tick price for this aggregate window." - }, - "h": { - "type": "number", - "format": "double", - "description": "The highest tick price for this aggregate window." - }, - "l": { - "type": "number", - "format": "double", - "description": "The lowest tick price for this aggregate window." - }, - "a": { - "type": "number", - "format": "float", - "description": "Today's volume weighted average price." - }, - "z": { - "type": "integer", - "description": "The average trade size for this aggregate window." - }, - "s": { - "type": "integer", - "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." - }, - "e": { - "type": "integer", - "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." - } - } - }, - { - "properties": { - "ev": { - "enum": [ - "AM" - ], - "description": "The event type." - } - } - } - ] - }, - "OptionSymbol": { - "type": "string", - "description": "The ticker symbol for the given option contract." - }, - "ForexBaseQuoteEvent": { - "type": "object", - "properties": { + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a value event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { "ev": { - "type": "string", - "description": "The event type." - }, - "p": { - "type": "string", - "description": "The current pair." - }, - "x": { - "type": "integer", - "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + "type": "string", + "enum": [ + "LV" + ], + "description": "The event type." }, - "a": { - "type": "number", - "format": "double", - "description": "The ask price." + "val": { + "description": "The current value of the security." }, - "b": { - "type": "number", - "format": "double", - "description": "The bid price." + "sym": { + "description": "The ticker symbol for the given security." }, "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." + "description": "The nanosecond timestamp." } + } + }, + "example": { + "ev": "LV", + "val": 1.0631, + "sym": "C:EURUSD", + "t": 1678220098130 } + } + } + } + }, + "x-polygon-entitlement-data-type": { + "name": "value", + "description": "Value data" + }, + "x-polygon-entitlement-market-type": { + "name": "fx", + "description": "Forex data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/crypto/XT": { + "get": { + "summary": "Trades", + "description": "Stream real-time crypto trades for a given crypto pair.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://polygon.io/docs/crypto/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/" }, - "ForexQuoteEvent": { - "allOf": [ - { - "type": "object", - "properties": { - "ev": { - "type": "string", - "description": "The event type." - }, - "p": { - "type": "string", - "description": "The current pair." - }, - "x": { - "type": "integer", - "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." - }, - "a": { - "type": "number", - "format": "double", - "description": "The ask price." - }, - "b": { - "type": "number", - "format": "double", - "description": "The bid price." - }, - "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." - } - } - }, - { - "properties": { - "ev": { - "enum": [ - "C" - ], - "description": "The event type." - } - } - } - ] - }, - "ForexAggregateEvent": { - "type": "object", - "properties": { + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a crypto trade event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { "ev": { - "type": "string", - "enum": [ - "CA" - ], - "description": "The event type." + "type": "string", + "enum": [ + "XT" + ], + "description": "The event type." }, "pair": { - "type": "string", - "description": "The currency pair." + "type": "string", + "description": "The crypto pair." }, - "o": { - "type": "number", - "format": "double", - "description": "The open price for this aggregate window." - }, - "c": { - "type": "number", - "format": "double", - "description": "The close price for this aggregate window." + "p": { + "type": "number", + "format": "double", + "description": "The price." }, - "h": { - "type": "number", - "format": "double", - "description": "The high price for this aggregate window." + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." }, - "l": { - "type": "number", - "format": "double", - "description": "The low price for this aggregate window." + "s": { + "type": "number", + "format": "double", + "description": "The size." }, - "v": { + "c": { + "type": "array", + "description": "The conditions.\n0 (or empty array): empty\n1: sellside\n2: buyside\n", + "items": { "type": "integer", - "description": "The volume of trades during this aggregate window." + "description": "The ID of the condition." + } }, - "s": { - "type": "integer", - "description": "The start time for this aggregate window in Unix Milliseconds." + "i": { + "type": "integer", + "description": "The ID of the trade (optional)." }, - "e": { - "type": "integer", - "description": "The end time for this aggregate window in Unix Milliseconds." + "x": { + "type": "integer", + "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" + }, + "r": { + "type": "integer", + "description": "The timestamp that the tick was received by Polygon." } + } + }, + "example": { + "ev": "XT", + "pair": "BTC-USD", + "p": 33021.9, + "t": 1610462007425, + "s": 0.01616617, + "c": [ + 2 + ], + "i": 14272084, + "x": 3, + "r": 1610462007576 } + } + } + } + }, + "x-polygon-entitlement-data-type": { + "name": "trades", + "description": "Trade data" + }, + "x-polygon-entitlement-market-type": { + "name": "crypto", + "description": "Crypto data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/crypto/XQ": { + "get": { + "summary": "Quotes", + "description": "Stream real-time crypto quotes for a given crypto pair.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://polygon.io/docs/crypto/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/" }, - "CryptoQuoteEvent": { - "type": "object", - "properties": { + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a crypto quote event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { "ev": { - "type": "string", - "enum": [ - "XQ" - ], - "description": "The event type." + "type": "string", + "enum": [ + "XQ" + ], + "description": "The event type." }, "pair": { - "type": "string", - "description": "The crypto pair." + "type": "string", + "description": "The crypto pair." }, "bp": { - "type": "number", - "format": "double", - "description": "The bid price." + "type": "number", + "format": "double", + "description": "The bid price." }, "bs": { - "type": "number", - "format": "double", - "description": "The bid size." + "type": "number", + "format": "double", + "description": "The bid size." }, "ap": { - "type": "number", - "format": "double", - "description": "The ask price." + "type": "number", + "format": "double", + "description": "The ask price." }, "as": { - "type": "number", - "format": "double", - "description": "The ask size." + "type": "number", + "format": "double", + "description": "The ask size." }, "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." + "type": "integer", + "description": "The Timestamp in Unix MS." }, "x": { - "type": "integer", - "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" + "type": "integer", + "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" }, "r": { - "type": "integer", - "description": "The timestamp that the tick was received by Polygon." + "type": "integer", + "description": "The timestamp that the tick was received by Polygon." } + } + }, + "example": { + "ev": "XQ", + "pair": "BTC-USD", + "bp": 33052.79, + "bs": 0.48, + "ap": 33073.19, + "as": 0.601, + "t": 1610462411115, + "x": 1, + "r": 1610462411128 } + } + } + } + }, + "x-polygon-entitlement-data-type": { + "name": "nbbo", + "description": "NBBO data" + }, + "x-polygon-entitlement-market-type": { + "name": "crypto", + "description": "Crypto data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/crypto/XL2": { + "get": { + "summary": "Level 2 Book", + "description": "Stream real-time level 2 book data for a given crypto pair.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://polygon.io/docs/crypto/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/" }, - "CryptoTradeEvent": { - "type": "object", - "properties": { + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a crypto level 2 book event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { "ev": { - "type": "string", - "enum": [ - "XT" - ], - "description": "The event type." + "type": "string", + "enum": [ + "XL2" + ], + "description": "The event type." }, "pair": { - "type": "string", - "description": "The crypto pair." - }, - "p": { - "type": "number", - "format": "double", - "description": "The price." - }, - "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." + "type": "string", + "description": "The crypto pair." }, - "s": { - "type": "number", - "format": "double", - "description": "The size." + "b": { + "type": "array", + "description": "An array of bid prices with a maximum depth of 100.", + "items": { + "type": "array", + "description": "An array where the first item is bid price and the second item is size.", + "items": { + "type": "number", + "format": "double" + } + } }, - "c": { + "a": { + "type": "array", + "description": "An array of ask prices with a maximum depth of 100.", + "items": { "type": "array", - "description": "The conditions.\n0 (or empty array): empty\n1: sellside\n2: buyside\n", + "description": "An array where the first item is ask price and the second item is size.", "items": { - "type": "integer", - "description": "The ID of the condition." + "type": "number", + "format": "double" } + } }, - "i": { - "type": "integer", - "description": "The ID of the trade (optional)." + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." }, "x": { - "type": "integer", - "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" + "type": "integer", + "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" }, "r": { - "type": "integer", - "description": "The timestamp that the tick was received by Polygon." + "type": "integer", + "description": "The timestamp that the tick was received by Polygon." } + } + }, + "example": { + "ev": "XL2", + "pair": "BTC-USD", + "t": 1610462411115, + "r": 1610462411128, + "x": 1, + "b": [ + [ + 33712.71, + 0.18635 + ], + [ + 33712.7, + 0.134 + ] + ], + "a": [ + [ + 33718.23, + 3.5527483 + ], + [ + 33718.24, + 0.1 + ] + ] } + } + } + } + }, + "x-polygon-entitlement-data-type": { + "name": "nbbo", + "description": "NBBO data" + }, + "x-polygon-entitlement-market-type": { + "name": "crypto", + "description": "Crypto data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/crypto/XA": { + "get": { + "summary": "Aggregates (Per Minute)", + "description": "Stream real-time per-minute crypto aggregates for a given crypto pair.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://polygon.io/docs/crypto/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/" }, - "CryptoAggregateEvent": { - "type": "object", - "properties": { + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a crypto per-minute aggregate event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { "ev": { - "type": "string", - "enum": [ - "XA" - ], - "description": "The event type." + "type": "string", + "enum": [ + "XA" + ], + "description": "The event type." }, "pair": { - "type": "string", - "description": "The crypto pair." + "type": "string", + "description": "The crypto pair." }, "o": { - "type": "number", - "format": "double", - "description": "The open price for this aggregate window." + "type": "number", + "format": "double", + "description": "The open price for this aggregate window." }, "c": { - "type": "number", - "format": "double", - "description": "The close price for this aggregate window." + "type": "number", + "format": "double", + "description": "The close price for this aggregate window." }, "h": { - "type": "number", - "format": "double", - "description": "The high price for this aggregate window." + "type": "number", + "format": "double", + "description": "The high price for this aggregate window." }, "l": { - "type": "number", - "format": "double", - "description": "The low price for this aggregate window." + "type": "number", + "format": "double", + "description": "The low price for this aggregate window." }, "v": { - "type": "integer", - "description": "The volume of trades during this aggregate window." + "type": "integer", + "description": "The volume of trades during this aggregate window." }, "s": { - "type": "integer", - "description": "The start time for this aggregate window in Unix Milliseconds." + "type": "integer", + "description": "The start time for this aggregate window in Unix Milliseconds." }, "e": { - "type": "integer", - "description": "The end time for this aggregate window in Unix Milliseconds." + "type": "integer", + "description": "The end time for this aggregate window in Unix Milliseconds." }, "vw": { - "type": "number", - "format": "double", - "description": "The volume weighted average price." - }, - "z": { - "type": "integer", - "description": "The average trade size for this aggregate window." - } - } - }, - "CryptoL2BookEvent": { - "type": "object", - "properties": { - "ev": { - "type": "string", - "enum": [ - "XL2" - ], - "description": "The event type." - }, - "pair": { - "type": "string", - "description": "The crypto pair." - }, - "b": { - "type": "array", - "description": "An array of bid prices with a maximum depth of 100.", - "items": { - "type": "array", - "description": "An array where the first item is bid price and the second item is size.", - "items": { - "type": "number", - "format": "double" - } - } - }, - "a": { - "type": "array", - "description": "An array of ask prices with a maximum depth of 100.", - "items": { - "type": "array", - "description": "An array where the first item is ask price and the second item is size.", - "items": { - "type": "number", - "format": "double" - } - } - }, - "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." - }, - "x": { - "type": "integer", - "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" - }, - "r": { - "type": "integer", - "description": "The timestamp that the tick was received by Polygon." + "type": "number", + "format": "double", + "description": "The volume weighted average price." + }, + "z": { + "type": "integer", + "description": "The average trade size for this aggregate window." } + } + }, + "example": { + "ev": "XA", + "pair": "BCD-USD", + "v": 951.6112, + "vw": 0.7756, + "z": 73, + "o": 0.772, + "c": 0.784, + "h": 0.784, + "l": 0.771, + "s": 1610463240000, + "e": 1610463300000 } + } + } + } + }, + "x-polygon-entitlement-data-type": { + "name": "aggregates", + "description": "Aggregate data" + }, + "x-polygon-entitlement-market-type": { + "name": "crypto", + "description": "Crypto data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/launchpad/crypto/AM": { + "get": { + "summary": "Aggregates (Per Minute)", + "description": "Stream real-time per-minute crypto aggregates for a given crypto pair.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://polygon.io/docs/crypto/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/" }, - "CryptoPair": { - "type": "string", - "description": "The crypto pair." - }, - "CryptoExchangeID": { - "type": "integer", - "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" - }, - "CryptoReceivedTimestamp": { - "type": "integer", - "description": "The timestamp that the tick was received by Polygon." - }, - "IndicesBaseAggregateEvent": { - "type": "object", - "properties": { + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a minute aggregate event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { "ev": { - "description": "The event type." + "description": "The event type." }, "sym": { - "type": "string", - "description": "The symbol representing the given index." + "type": "string", + "description": "The ticker symbol for the given stock." + }, + "v": { + "type": "integer", + "description": "The tick volume." + }, + "av": { + "type": "integer", + "description": "Today's accumulated volume." }, "op": { - "type": "number", - "format": "double", - "description": "Today's official opening value." + "type": "number", + "format": "double", + "description": "Today's official opening price." + }, + "vw": { + "type": "number", + "format": "float", + "description": "The volume-weighted average value for the aggregate window." }, "o": { - "type": "number", - "format": "double", - "description": "The opening index value for this aggregate window." + "type": "number", + "format": "double", + "description": "The open price for the symbol in the given time period." }, "c": { - "type": "number", - "format": "double", - "description": "The closing index value for this aggregate window." + "type": "number", + "format": "double", + "description": "The close price for the symbol in the given time period." }, "h": { - "type": "number", - "format": "double", - "description": "The highest index value for this aggregate window." + "type": "number", + "format": "double", + "description": "The highest price for the symbol in the given time period." }, "l": { - "type": "number", - "format": "double", - "description": "The lowest index value for this aggregate window." + "type": "number", + "format": "double", + "description": "The lowest price for the symbol in the given time period." + }, + "a": { + "type": "number", + "format": "float", + "description": "Today's volume weighted average price." + }, + "z": { + "type": "integer", + "description": "The average trade size for this aggregate window." }, "s": { - "type": "integer", - "description": "The timestamp of the starting index for this aggregate window in Unix Milliseconds." + "type": "integer", + "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." }, "e": { - "type": "integer", - "description": "The timestamp of the ending index for this aggregate window in Unix Milliseconds." + "type": "integer", + "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." + } + } + }, + "example": { + "ev": "AM", + "sym": "X:BTC-USD", + "v": 951.6112, + "av": 738.6112, + "op": 26503.8, + "vw": 26503.8, + "o": 27503.8, + "c": 27203.8, + "h": 27893.8, + "l": 26503.8, + "a": 26503.8, + "z": 10, + "s": 1610463240000, + "e": 1610463300000 + } + } + } + } + }, + "x-polygon-entitlement-data-type": { + "name": "aggregates", + "description": "Aggregate data" + }, + "x-polygon-entitlement-market-type": { + "name": "crypto", + "description": "Crypto data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/launchpad/crypto/LV": { + "get": { + "summary": "Value", + "description": "Real-time value for a given crypto ticker symbol.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://polygon.io/docs/crypto/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/" + }, + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a value event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "LV" + ], + "description": "The event type." + }, + "val": { + "description": "The current value of the security." + }, + "sym": { + "description": "The ticker symbol for the given security." + }, + "t": { + "description": "The nanosecond timestamp." } + } + }, + "example": { + "ev": "LV", + "val": 33021.9, + "sym": "X:BTC-USD", + "t": 1610462007425 } + } + } + } + }, + "x-polygon-entitlement-data-type": { + "name": "value", + "description": "Value data" + }, + "x-polygon-entitlement-market-type": { + "name": "crypto", + "description": "Crypto data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/indices/AM": { + "get": { + "summary": "Aggregates (Per Minute)", + "description": "Stream real-time minute aggregates for a given index ticker symbol.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify an index ticker using \"I:\" prefix or use * to subscribe to all index tickers.\nYou can also use a comma separated list to subscribe to multiple index tickers.\nYou can retrieve available index tickers from our [Index Tickers API](https://polygon.io/docs/indices/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(I:[a-zA-Z0-9]+)$/" }, - "IndicesMinuteAggregateEvent": { - "allOf": [ + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a minute aggregate event.", + "content": { + "application/json": { + "schema": { + "allOf": [ { - "type": "object", - "properties": { - "ev": { - "description": "The event type." - }, - "sym": { - "type": "string", - "description": "The symbol representing the given index." - }, - "op": { - "type": "number", - "format": "double", - "description": "Today's official opening value." - }, - "o": { - "type": "number", - "format": "double", - "description": "The opening index value for this aggregate window." - }, - "c": { - "type": "number", - "format": "double", - "description": "The closing index value for this aggregate window." - }, - "h": { - "type": "number", - "format": "double", - "description": "The highest index value for this aggregate window." - }, - "l": { - "type": "number", - "format": "double", - "description": "The lowest index value for this aggregate window." - }, - "s": { - "type": "integer", - "description": "The timestamp of the starting index for this aggregate window in Unix Milliseconds." - }, - "e": { - "type": "integer", - "description": "The timestamp of the ending index for this aggregate window in Unix Milliseconds." - } + "type": "object", + "properties": { + "ev": { + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The symbol representing the given index." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening value." + }, + "o": { + "type": "number", + "format": "double", + "description": "The opening index value for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The closing index value for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The highest index value for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest index value for this aggregate window." + }, + "s": { + "type": "integer", + "description": "The timestamp of the starting index for this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The timestamp of the ending index for this aggregate window in Unix Milliseconds." } + } }, { - "properties": { - "ev": { - "enum": [ - "AM" - ], - "description": "The event type." - } + "properties": { + "ev": { + "enum": [ + "AM" + ], + "description": "The event type." } + } } - ] + ] + }, + "example": { + "ev": "AM", + "sym": "I:SPX", + "op": 3985.67, + "o": 3985.67, + "c": 3985.67, + "h": 3985.67, + "l": 3985.67, + "s": 1678220675805, + "e": 1678220675805 + } + } + } + } + }, + "x-polygon-entitlement-data-type": { + "name": "aggregates", + "description": "Aggregate data" + }, + "x-polygon-entitlement-market-type": { + "name": "indices", + "description": "Indices data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/indices/V": { + "get": { + "summary": "Value", + "description": "Real-time value for a given index ticker symbol.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify an index ticker using \"I:\" prefix or use * to subscribe to all index tickers.\nYou can also use a comma separated list to subscribe to multiple index tickers.\nYou can retrieve available index tickers from our [Index Tickers API](https://polygon.io/docs/indices/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(I:[a-zA-Z0-9]+)$/" }, - "IndicesValueEvent": { - "type": "object", - "properties": { + "example": "I:SPX" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a value event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { "ev": { - "type": "string", - "enum": [ - "V" - ], - "description": "The event type." + "type": "string", + "enum": [ + "V" + ], + "description": "The event type." }, "val": { - "description": "The value of the index." + "description": "The value of the index." }, "T": { - "description": "The assigned ticker of the index." + "description": "The assigned ticker of the index." }, "t": { - "description": "The Timestamp in Unix MS." + "description": "The Timestamp in Unix MS." } + } + }, + "example": { + "ev": "V", + "val": 3988.5, + "T": "I:SPX", + "t": 1678220098130 } + } } + } }, - "parameters": { - "StocksTickerParam": { - "name": "ticker", - "in": "query", - "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^([a-zA-Z]+)$/" - }, - "example": "*" - }, - "OptionsTickerParam": { - "name": "ticker", - "in": "query", - "description": "Specify an option contract or use * to subscribe to all option contracts.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" - }, - "example": "*" + "x-polygon-entitlement-data-type": { + "name": "value", + "description": "Value data" + }, + "x-polygon-entitlement-market-type": { + "name": "indices", + "description": "Indices data" + }, + "x-polygon-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + } + }, + "components": { + "schemas": { + "Event": { + "type": "object", + "properties": { + "ev": { + "enum": [ + "status" + ], + "description": "A constant denoting that this message describes a status event." + }, + "message": { + "type": "string", + "description": "The descriptive message explaining this status event." + }, + "status": { + "type": "string" + } + } + }, + "ConnectEvent": { + "allOf": [ + { + "type": "object", + "properties": { + "ev": { + "enum": [ + "status" + ], + "description": "A constant denoting that this message describes a status event." + }, + "message": { + "type": "string", + "description": "The descriptive message explaining this status event." + }, + "status": { + "type": "string" + } + } + }, + { + "title": "connect", + "properties": { + "status": { + "enum": [ + "success" + ], + "description": "The status indicating that the connection event was successful." + } }, - "OptionsTickerWithoutWildcardParam": { - "name": "ticker", - "in": "query", - "description": "Specify an option contract. You're only allowed to subscribe to 1,000 option contracts per connection.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" - }, - "example": "O:SPY241220P00720000" + "example": "{\"ev\":\"status\",\"status\":\"success\",\"message\":\"Connected Successfully\"}" + } + ] + }, + "DisconnectEvent": { + "allOf": [ + { + "type": "object", + "properties": { + "ev": { + "enum": [ + "status" + ], + "description": "A constant denoting that this message describes a status event." + }, + "message": { + "type": "string", + "description": "The descriptive message explaining this status event." + }, + "status": { + "type": "string" + } + } + }, + { + "title": "disconnect", + "properties": { + "status": { + "enum": [ + "max_connections", + "force_disconnect", + "slow_consumer" + ], + "description": "The event that caused the WebSocket to disconnect." + } }, - "ForexTickerParam": { - "name": "ticker", - "in": "query", - "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://polygon.io/docs/forex/get_v3_reference_tickers).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/" - }, - "example": "*" + "example": "{\"ev\":\"status\",\"status\":\"max_connections\",\"message\":\"Maximum number of connections exceeded.\"}" + } + ] + }, + "AuthEvent": { + "allOf": [ + { + "type": "object", + "properties": { + "ev": { + "enum": [ + "status" + ], + "description": "A constant denoting that this message describes a status event." + }, + "message": { + "type": "string", + "description": "The descriptive message explaining this status event." + }, + "status": { + "type": "string" + } + } + }, + { + "title": "auth", + "properties": { + "status": { + "enum": [ + "auth_success", + "auth_timeout", + "auth_failed" + ], + "description": "The result of the authentication action." + } }, - "CryptoTickerParam": { - "name": "ticker", - "in": "query", - "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://polygon.io/docs/crypto/get_v3_reference_tickers).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/" - }, - "example": "*" + "example": "{\"ev\":\"status\",\"status\":\"auth_success\",\"message\":\"authenticated\"}" + } + ] + }, + "SubscribeEvent": { + "allOf": [ + { + "type": "object", + "properties": { + "ev": { + "enum": [ + "status" + ], + "description": "A constant denoting that this message describes a status event." + }, + "message": { + "type": "string", + "description": "The descriptive message explaining this status event." + }, + "status": { + "type": "string" + } + } + }, + { + "title": "subscribe", + "properties": { + "status": { + "enum": [ + "success", + "auth_required", + "error" + ], + "description": "The result of a subscribe action." + } }, - "IndicesIndexParam": { - "name": "ticker", - "in": "query", - "description": "Specify an index ticker using \"I:\" prefix or use * to subscribe to all index tickers.\nYou can also use a comma separated list to subscribe to multiple index tickers.\nYou can retrieve available index tickers from our [Index Tickers API](https://polygon.io/docs/indices/get_v3_reference_tickers).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^(I:[a-zA-Z0-9]+)$/" - }, - "example": "*" + "example": "{\"ev\":\"status\",\"status\":\"success\",\"message\":\"subscribed to: T.MSFT\"}" + } + ] + }, + "UnsubscribeEvent": { + "allOf": [ + { + "type": "object", + "properties": { + "ev": { + "enum": [ + "status" + ], + "description": "A constant denoting that this message describes a status event." + }, + "message": { + "type": "string", + "description": "The descriptive message explaining this status event." + }, + "status": { + "type": "string" + } + } + }, + { + "title": "unsubscribe", + "properties": { + "status": { + "enum": [ + "success" + ], + "description": "The result of an unsubscribe action." + } }, - "IndicesIndexParamWithoutWildcard": { - "name": "ticker", - "in": "query", - "description": "Specify an index ticker using \"I:\" prefix or use * to subscribe to all index tickers.\nYou can also use a comma separated list to subscribe to multiple index tickers.\nYou can retrieve available index tickers from our [Index Tickers API](https://polygon.io/docs/indices/get_v3_reference_tickers).\n", - "required": true, - "schema": { - "type": "string", - "pattern": "/^(I:[a-zA-Z0-9]+)$/" - }, - "example": "I:SPX" + "example": "{\"ev\":\"status\",\"status\":\"success\",\"message\":\"unsubscribed to: T.MSFT\"}" + } + ] + }, + "Timestamp": { + "type": "integer", + "description": "The Timestamp in Unix MS." + }, + "AggsOpen": { + "type": "number", + "format": "double", + "description": "The open price for this aggregate window." + }, + "AggsClose": { + "type": "number", + "format": "double", + "description": "The close price for this aggregate window." + }, + "AggsHigh": { + "type": "number", + "format": "double", + "description": "The high price for this aggregate window." + }, + "AggsLow": { + "type": "number", + "format": "double", + "description": "The low price for this aggregate window." + }, + "AggsVolume": { + "type": "integer", + "description": "The volume of trades during this aggregate window." + }, + "AggsStartTime": { + "type": "integer", + "description": "The start time for this aggregate window in Unix Milliseconds." + }, + "AggsEndTime": { + "type": "integer", + "description": "The end time for this aggregate window in Unix Milliseconds." + }, + "StockTradeEvent": { + "type": "object", + "properties": { + "ev": { + "enum": [ + "T" + ], + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given stock." + }, + "x": { + "type": "integer", + "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + }, + "i": { + "type": "string", + "description": "The trade ID." + }, + "z": { + "type": "integer", + "description": "The tape. (1 = NYSE, 2 = AMEX, 3 = Nasdaq).\n" + }, + "p": { + "type": "number", + "format": "double", + "description": "The price." + }, + "s": { + "type": "integer", + "description": "The trade size." + }, + "c": { + "type": "array", + "description": "The trade conditions. See Conditions and Indicators\" for Polygon.io's trade conditions glossary.\n", + "items": { + "type": "integer", + "description": "The ID of the condition." + } + }, + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." + }, + "q": { + "type": "integer", + "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n" + }, + "trfi": { + "type": "integer", + "description": "The ID for the Trade Reporting Facility where the trade took place." + }, + "trft": { + "type": "integer", + "description": "The TRF (Trade Reporting Facility) Timestamp in Unix MS. \nThis is the timestamp of when the trade reporting facility received this trade.\n" + } + } + }, + "StockQuoteEvent": { + "type": "object", + "properties": { + "ev": { + "enum": [ + "Q" + ], + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given stock." + }, + "bx": { + "type": "integer", + "description": "The bid exchange ID." + }, + "bp": { + "type": "number", + "format": "double", + "description": "The bid price." + }, + "bs": { + "type": "integer", + "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price." + }, + "ax": { + "type": "integer", + "description": "The ask exchange ID." + }, + "ap": { + "type": "number", + "format": "double", + "description": "The ask price." + }, + "as": { + "type": "integer", + "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price." + }, + "c": { + "type": "integer", + "description": "The condition." + }, + "i": { + "type": "array", + "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n", + "items": { + "type": "integer", + "description": "The indicator code.\n" + } + }, + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." + }, + "q": { + "type": "integer", + "description": "The sequence number represents the sequence in which quote events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11). Values reset after each trading session/day.\n" + }, + "z": { + "type": "integer", + "description": "The tape. (1 = NYSE, 2 = AMEX, 3 = Nasdaq)." + } + } + }, + "StockBaseAggregateEvent": { + "type": "object", + "properties": { + "ev": { + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given stock." + }, + "v": { + "type": "integer", + "description": "The tick volume." + }, + "av": { + "type": "integer", + "description": "Today's accumulated volume." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening price." + }, + "vw": { + "type": "number", + "format": "float", + "description": "The tick's volume weighted average price." + }, + "o": { + "type": "number", + "format": "double", + "description": "The opening tick price for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The closing tick price for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The highest tick price for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest tick price for this aggregate window." + }, + "a": { + "type": "number", + "format": "float", + "description": "Today's volume weighted average price." + }, + "z": { + "type": "integer", + "description": "The average trade size for this aggregate window." + }, + "s": { + "type": "integer", + "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." + }, + "otc": { + "type": "boolean", + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false." + } + } + }, + "StockSecondAggregateEvent": { + "allOf": [ + { + "type": "object", + "properties": { + "ev": { + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given stock." + }, + "v": { + "type": "integer", + "description": "The tick volume." + }, + "av": { + "type": "integer", + "description": "Today's accumulated volume." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening price." + }, + "vw": { + "type": "number", + "format": "float", + "description": "The tick's volume weighted average price." + }, + "o": { + "type": "number", + "format": "double", + "description": "The opening tick price for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The closing tick price for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The highest tick price for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest tick price for this aggregate window." + }, + "a": { + "type": "number", + "format": "float", + "description": "Today's volume weighted average price." + }, + "z": { + "type": "integer", + "description": "The average trade size for this aggregate window." + }, + "s": { + "type": "integer", + "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." + }, + "otc": { + "type": "boolean", + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false." + } + } + }, + { + "properties": { + "ev": { + "enum": [ + "A" + ], + "description": "The event type." + } + } + } + ] + }, + "StockMinuteAggregateEvent": { + "allOf": [ + { + "type": "object", + "properties": { + "ev": { + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given stock." + }, + "v": { + "type": "integer", + "description": "The tick volume." + }, + "av": { + "type": "integer", + "description": "Today's accumulated volume." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening price." + }, + "vw": { + "type": "number", + "format": "float", + "description": "The tick's volume weighted average price." + }, + "o": { + "type": "number", + "format": "double", + "description": "The opening tick price for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The closing tick price for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The highest tick price for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest tick price for this aggregate window." + }, + "a": { + "type": "number", + "format": "float", + "description": "Today's volume weighted average price." + }, + "z": { + "type": "integer", + "description": "The average trade size for this aggregate window." + }, + "s": { + "type": "integer", + "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." + }, + "otc": { + "type": "boolean", + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false." + } + } + }, + { + "properties": { + "ev": { + "enum": [ + "AM" + ], + "description": "The event type." + } + } + } + ] + }, + "StockLULDEvent": { + "type": "object", + "properties": { + "ev": { + "enum": [ + "LULD" + ], + "description": "The event type." + }, + "T": { + "type": "string", + "description": "The ticker symbol for the given stock." + }, + "h": { + "type": "number", + "format": "double", + "description": "The high price." + }, + "l": { + "type": "number", + "format": "double", + "description": "The low price." + }, + "i": { + "type": "array", + "description": "The Indicators.", + "items": { + "type": "integer" + } + }, + "z": { + "type": "integer", + "description": "The tape. (1 = NYSE, 2 = AMEX, 3 = Nasdaq).\n" + }, + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." + }, + "q": { + "type": "integer", + "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n" + } + } + }, + "StockImbalanceEvent": { + "type": "object", + "properties": { + "ev": { + "enum": [ + "NOI" + ], + "description": "The event type." + }, + "T": { + "type": "string", + "description": "The ticker symbol for the given stock." + }, + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." + }, + "at": { + "type": "integer", + "description": "The time that the auction is planned to take place in the format (hour x 100) + minutes in Eastern Standard Time, \nfor example 930 would be 9:30 am EST, and 1600 would be 4:00 pm EST.\n" + }, + "a": { + "type": "string", + "description": "The auction type.\n`O` - Early Opening Auction (non-NYSE only)\n`M` - Core Opening Auction\n`H` - Reopening Auction (Halt Resume)\n`C` - Closing Auction\n`P` - Extreme Closing Imbalance (NYSE only)\n`R` - Regulatory Closing Imbalance (NYSE only)\n" + }, + "i": { + "type": "integer", + "description": "The symbol sequence." + }, + "x": { + "type": "integer", + "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + }, + "o": { + "type": "integer", + "description": "The imbalance quantity." + }, + "p": { + "type": "integer", + "description": "The paired quantity." + }, + "b": { + "type": "number", + "format": "double", + "description": "The book clearing price." + } + } + }, + "StockSymbol": { + "type": "string", + "description": "The ticker symbol for the given stock." + }, + "StockTape": { + "type": "integer", + "description": "The tape. (1 = NYSE, 2 = AMEX, 3 = Nasdaq).\n" + }, + "StockExchangeID": { + "type": "integer", + "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + }, + "OptionTradeEvent": { + "type": "object", + "properties": { + "ev": { + "enum": [ + "T" + ], + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given option contract." + }, + "x": { + "type": "integer", + "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + }, + "p": { + "type": "number", + "format": "double", + "description": "The price." + }, + "s": { + "type": "integer", + "description": "The trade size." + }, + "c": { + "type": "array", + "description": "The trade conditions", + "items": { + "type": "integer", + "description": "The ID of the condition." + } + }, + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." + }, + "q": { + "type": "integer", + "description": "The sequence number represents the sequence in which trade events happened. These are increasing and unique per ticker symbol, but will not always be sequential (e.g., 1, 2, 6, 9, 10, 11)." + } + } + }, + "OptionQuoteEvent": { + "type": "object", + "properties": { + "ev": { + "enum": [ + "Q" + ], + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given option contract." + }, + "bx": { + "type": "integer", + "description": "The bid exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + }, + "ax": { + "type": "integer", + "description": "The ask exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + }, + "bp": { + "type": "number", + "format": "double", + "description": "The bid price." + }, + "ap": { + "type": "number", + "format": "double", + "description": "The ask price." + }, + "bs": { + "type": "integer", + "description": "The bid size." + }, + "as": { + "type": "integer", + "description": "The ask size." + }, + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." + }, + "q": { + "type": "integer", + "description": "The sequence number represents the sequence in which trade events happened. These are increasing and unique per ticker symbol, but will not always be sequential (e.g., 1, 2, 6, 9, 10, 11)." + } + } + }, + "OptionBaseAggregateEvent": { + "type": "object", + "properties": { + "ev": { + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given option contract." + }, + "v": { + "type": "integer", + "description": "The tick volume." + }, + "av": { + "type": "integer", + "description": "Today's accumulated volume." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening price." + }, + "vw": { + "type": "number", + "format": "float", + "description": "The tick's volume weighted average price." + }, + "o": { + "type": "number", + "format": "double", + "description": "The opening tick price for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The closing tick price for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The highest tick price for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest tick price for this aggregate window." + }, + "a": { + "type": "number", + "format": "float", + "description": "Today's volume weighted average price." + }, + "z": { + "type": "integer", + "description": "The average trade size for this aggregate window." + }, + "s": { + "type": "integer", + "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." + } + } + }, + "OptionSecondAggregateEvent": { + "allOf": [ + { + "type": "object", + "properties": { + "ev": { + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given option contract." + }, + "v": { + "type": "integer", + "description": "The tick volume." + }, + "av": { + "type": "integer", + "description": "Today's accumulated volume." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening price." + }, + "vw": { + "type": "number", + "format": "float", + "description": "The tick's volume weighted average price." + }, + "o": { + "type": "number", + "format": "double", + "description": "The opening tick price for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The closing tick price for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The highest tick price for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest tick price for this aggregate window." + }, + "a": { + "type": "number", + "format": "float", + "description": "Today's volume weighted average price." + }, + "z": { + "type": "integer", + "description": "The average trade size for this aggregate window." + }, + "s": { + "type": "integer", + "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." + } + } + }, + { + "properties": { + "ev": { + "enum": [ + "A" + ], + "description": "The event type." + } + } + } + ] + }, + "OptionMinuteAggregateEvent": { + "allOf": [ + { + "type": "object", + "properties": { + "ev": { + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given option contract." + }, + "v": { + "type": "integer", + "description": "The tick volume." + }, + "av": { + "type": "integer", + "description": "Today's accumulated volume." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening price." + }, + "vw": { + "type": "number", + "format": "float", + "description": "The tick's volume weighted average price." + }, + "o": { + "type": "number", + "format": "double", + "description": "The opening tick price for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The closing tick price for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The highest tick price for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest tick price for this aggregate window." + }, + "a": { + "type": "number", + "format": "float", + "description": "Today's volume weighted average price." + }, + "z": { + "type": "integer", + "description": "The average trade size for this aggregate window." + }, + "s": { + "type": "integer", + "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." + } + } + }, + { + "properties": { + "ev": { + "enum": [ + "AM" + ], + "description": "The event type." + } + } + } + ] + }, + "OptionSymbol": { + "type": "string", + "description": "The ticker symbol for the given option contract." + }, + "ForexBaseQuoteEvent": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "description": "The event type." + }, + "p": { + "type": "string", + "description": "The current pair." + }, + "x": { + "type": "integer", + "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + }, + "a": { + "type": "number", + "format": "double", + "description": "The ask price." + }, + "b": { + "type": "number", + "format": "double", + "description": "The bid price." + }, + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." + } + } + }, + "ForexQuoteEvent": { + "allOf": [ + { + "type": "object", + "properties": { + "ev": { + "type": "string", + "description": "The event type." + }, + "p": { + "type": "string", + "description": "The current pair." + }, + "x": { + "type": "integer", + "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + }, + "a": { + "type": "number", + "format": "double", + "description": "The ask price." + }, + "b": { + "type": "number", + "format": "double", + "description": "The bid price." + }, + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." + } + } + }, + { + "properties": { + "ev": { + "enum": [ + "C" + ], + "description": "The event type." + } + } + } + ] + }, + "ForexAggregateEvent": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "CA" + ], + "description": "The event type." + }, + "pair": { + "type": "string", + "description": "The currency pair." + }, + "o": { + "type": "number", + "format": "double", + "description": "The open price for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The close price for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The high price for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The low price for this aggregate window." + }, + "v": { + "type": "integer", + "description": "The volume of trades during this aggregate window." + }, + "s": { + "type": "integer", + "description": "The start time for this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The end time for this aggregate window in Unix Milliseconds." + } + } + }, + "CryptoQuoteEvent": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "XQ" + ], + "description": "The event type." + }, + "pair": { + "type": "string", + "description": "The crypto pair." + }, + "bp": { + "type": "number", + "format": "double", + "description": "The bid price." + }, + "bs": { + "type": "number", + "format": "double", + "description": "The bid size." + }, + "ap": { + "type": "number", + "format": "double", + "description": "The ask price." + }, + "as": { + "type": "number", + "format": "double", + "description": "The ask size." + }, + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." + }, + "x": { + "type": "integer", + "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" + }, + "r": { + "type": "integer", + "description": "The timestamp that the tick was received by Polygon." + } + } + }, + "CryptoTradeEvent": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "XT" + ], + "description": "The event type." + }, + "pair": { + "type": "string", + "description": "The crypto pair." + }, + "p": { + "type": "number", + "format": "double", + "description": "The price." + }, + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." + }, + "s": { + "type": "number", + "format": "double", + "description": "The size." + }, + "c": { + "type": "array", + "description": "The conditions.\n0 (or empty array): empty\n1: sellside\n2: buyside\n", + "items": { + "type": "integer", + "description": "The ID of the condition." + } + }, + "i": { + "type": "integer", + "description": "The ID of the trade (optional)." + }, + "x": { + "type": "integer", + "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" + }, + "r": { + "type": "integer", + "description": "The timestamp that the tick was received by Polygon." + } + } + }, + "CryptoAggregateEvent": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "XA" + ], + "description": "The event type." + }, + "pair": { + "type": "string", + "description": "The crypto pair." + }, + "o": { + "type": "number", + "format": "double", + "description": "The open price for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The close price for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The high price for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The low price for this aggregate window." + }, + "v": { + "type": "integer", + "description": "The volume of trades during this aggregate window." + }, + "s": { + "type": "integer", + "description": "The start time for this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The end time for this aggregate window in Unix Milliseconds." + }, + "vw": { + "type": "number", + "format": "double", + "description": "The volume weighted average price." + }, + "z": { + "type": "integer", + "description": "The average trade size for this aggregate window." + } + } + }, + "CryptoL2BookEvent": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "XL2" + ], + "description": "The event type." + }, + "pair": { + "type": "string", + "description": "The crypto pair." + }, + "b": { + "type": "array", + "description": "An array of bid prices with a maximum depth of 100.", + "items": { + "type": "array", + "description": "An array where the first item is bid price and the second item is size.", + "items": { + "type": "number", + "format": "double" + } + } + }, + "a": { + "type": "array", + "description": "An array of ask prices with a maximum depth of 100.", + "items": { + "type": "array", + "description": "An array where the first item is ask price and the second item is size.", + "items": { + "type": "number", + "format": "double" + } + } + }, + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." + }, + "x": { + "type": "integer", + "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" + }, + "r": { + "type": "integer", + "description": "The timestamp that the tick was received by Polygon." + } + } + }, + "CryptoPair": { + "type": "string", + "description": "The crypto pair." + }, + "CryptoExchangeID": { + "type": "integer", + "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" + }, + "CryptoReceivedTimestamp": { + "type": "integer", + "description": "The timestamp that the tick was received by Polygon." + }, + "IndicesBaseAggregateEvent": { + "type": "object", + "properties": { + "ev": { + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The symbol representing the given index." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening value." + }, + "o": { + "type": "number", + "format": "double", + "description": "The opening index value for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The closing index value for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The highest index value for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest index value for this aggregate window." + }, + "s": { + "type": "integer", + "description": "The timestamp of the starting index for this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The timestamp of the ending index for this aggregate window in Unix Milliseconds." + } + } + }, + "IndicesMinuteAggregateEvent": { + "allOf": [ + { + "type": "object", + "properties": { + "ev": { + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The symbol representing the given index." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening value." + }, + "o": { + "type": "number", + "format": "double", + "description": "The opening index value for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The closing index value for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The highest index value for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest index value for this aggregate window." + }, + "s": { + "type": "integer", + "description": "The timestamp of the starting index for this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The timestamp of the ending index for this aggregate window in Unix Milliseconds." + } } + }, + { + "properties": { + "ev": { + "enum": [ + "AM" + ], + "description": "The event type." + } + } + } + ] + }, + "IndicesValueEvent": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "V" + ], + "description": "The event type." + }, + "val": { + "description": "The value of the index." + }, + "T": { + "description": "The assigned ticker of the index." + }, + "t": { + "description": "The Timestamp in Unix MS." + } + } + }, + "LaunchpadWebsocketMinuteAggregateEvent": { + "type": "object", + "properties": { + "ev": { + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given stock." + }, + "v": { + "type": "integer", + "description": "The tick volume." + }, + "av": { + "type": "integer", + "description": "Today's accumulated volume." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening price." + }, + "vw": { + "type": "number", + "format": "float", + "description": "The volume-weighted average value for the aggregate window." + }, + "o": { + "type": "number", + "format": "double", + "description": "The open price for the symbol in the given time period." + }, + "c": { + "type": "number", + "format": "double", + "description": "The close price for the symbol in the given time period." + }, + "h": { + "type": "number", + "format": "double", + "description": "The highest price for the symbol in the given time period." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest price for the symbol in the given time period." + }, + "a": { + "type": "number", + "format": "float", + "description": "Today's volume weighted average price." + }, + "z": { + "type": "integer", + "description": "The average trade size for this aggregate window." + }, + "s": { + "type": "integer", + "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." + } + } + }, + "LaunchpadWebsocketValueEvent": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "LV" + ], + "description": "The event type." + }, + "val": { + "description": "The current value of the security." + }, + "sym": { + "description": "The ticker symbol for the given security." + }, + "t": { + "description": "The nanosecond timestamp." + } } + } + }, + "parameters": { + "StocksTickerParam": { + "name": "ticker", + "in": "query", + "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^([a-zA-Z]+)$/" + }, + "example": "*" + }, + "OptionsTickerParam": { + "name": "ticker", + "in": "query", + "description": "Specify an option contract or use * to subscribe to all option contracts.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" + }, + "example": "*" + }, + "OptionsTickerWithoutWildcardParam": { + "name": "ticker", + "in": "query", + "description": "Specify an option contract. You're only allowed to subscribe to 1,000 option contracts per connection.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" + }, + "example": "O:SPY241220P00720000" + }, + "ForexTickerParam": { + "name": "ticker", + "in": "query", + "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://polygon.io/docs/forex/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/" + }, + "example": "*" + }, + "CryptoTickerParam": { + "name": "ticker", + "in": "query", + "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://polygon.io/docs/crypto/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/" + }, + "example": "*" + }, + "IndicesIndexParam": { + "name": "ticker", + "in": "query", + "description": "Specify an index ticker using \"I:\" prefix or use * to subscribe to all index tickers.\nYou can also use a comma separated list to subscribe to multiple index tickers.\nYou can retrieve available index tickers from our [Index Tickers API](https://polygon.io/docs/indices/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(I:[a-zA-Z0-9]+)$/" + }, + "example": "*" + }, + "IndicesIndexParamWithoutWildcard": { + "name": "ticker", + "in": "query", + "description": "Specify an index ticker using \"I:\" prefix or use * to subscribe to all index tickers.\nYou can also use a comma separated list to subscribe to multiple index tickers.\nYou can retrieve available index tickers from our [Index Tickers API](https://polygon.io/docs/indices/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(I:[a-zA-Z0-9]+)$/" + }, + "example": "I:SPX" + } } -} \ No newline at end of file + } +}