Open
Description
A diff between this client library's spec and our hosted spec was found. The client may need an update to match any changes in our API. See the diff below:
--- https://raw.githubusercontent.com/polygon-io/client-jvm/master/.polygon/websocket.json
+++ https://api.polygon.io/specs/websocket.json
@@ -208,6 +208,30 @@
]
}
]
+ },
+ "futures": {
+ "market": [
+ {
+ "paths": [
+ "/futures/AM"
+ ]
+ },
+ {
+ "paths": [
+ "/futures/A"
+ ]
+ },
+ {
+ "paths": [
+ "/futures/T"
+ ]
+ },
+ {
+ "paths": [
+ "/futures/Q"
+ ]
+ }
+ ]
}
},
"paths": {
@@ -3694,6 +3718,490 @@
}
]
}
+ },
+ "/futures/T": {
+ "get": {
+ "summary": "Trades",
+ "description": "Stream real-time trades for a given future ticker symbol.\n",
+ "parameters": [
+ {
+ "name": "ticker",
+ "in": "query",
+ "description": "Specify a future ticker or use * to subscribe to all future tickers.\nYou can also use a comma separated list to subscribe to multiple future tickers.\nYou can retrieve available future tickers from our [Futures Tickers API](https://polygon.io/docs/futures/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 future."
+ },
+ "p": {
+ "type": "number",
+ "format": "double",
+ "description": "The price of a trade."
+ },
+ "s": {
+ "type": "integer",
+ "description": "The trade size."
+ },
+ "t": {
+ "type": "integer",
+ "description": "The SIP 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": "T",
+ "sym": "ESZ4",
+ "z": 3,
+ "p": 606450,
+ "s": 100,
+ "t": 1734103628363,
+ "q": 32599300
+ }
+ }
+ }
+ }
+ },
+ "x-polygon-entitlement-data-type": {
+ "name": "trades",
+ "description": "Trade data"
+ },
+ "x-polygon-entitlement-market-type": {
+ "name": "futures",
+ "description": "Futures data"
+ },
+ "x-polygon-entitlement-allowed-timeframes": [
+ {
+ "name": "futuresdelayed",
+ "description": "10 minute delayed data"
+ },
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
+ },
+ "/futures/Q": {
+ "get": {
+ "summary": "Quotes",
+ "description": "Stream real-time quotes for a given future ticker symbol.\n",
+ "parameters": [
+ {
+ "name": "ticker",
+ "in": "query",
+ "description": "Specify a future ticker or use * to subscribe to all future tickers.\nYou can also use a comma separated list to subscribe to multiple future tickers.\nYou can retrieve available future tickers from our [Futures Tickers API](https://polygon.io/docs/futures/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 future."
+ },
+ "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."
+ },
+ "bt": {
+ "type": "integer",
+ "description": "The timestamp when the bid was submitted to the exchange."
+ },
+ "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."
+ },
+ "at": {
+ "type": "integer",
+ "description": "The timestamp when the ask was submitted to the exchange."
+ },
+ "t": {
+ "type": "integer",
+ "description": "The SIP timestamp in Unix MS."
+ }
+ }
+ },
+ "example": {
+ "ev": "Q",
+ "sym": "ESZ4",
+ "bx": 4,
+ "bp": 114.125,
+ "bs": 100,
+ "bt": 1734103628360,
+ "ap": 114.128,
+ "as": 160,
+ "at": 1734103628350,
+ "t": 1536036818784
+ }
+ }
+ }
+ }
+ },
+ "x-polygon-entitlement-data-type": {
+ "name": "nbbo",
+ "description": "NBBO data"
+ },
+ "x-polygon-entitlement-market-type": {
+ "name": "futures",
+ "description": "Futures data"
+ },
+ "x-polygon-entitlement-allowed-timeframes": [
+ {
+ "name": "futuresdelayed",
+ "description": "10 minute delayed data"
+ },
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
+ },
+ "/futures/A": {
+ "get": {
+ "summary": "Aggregates (Per Second)",
+ "description": "Stream real-time second aggregates for a given future ticker symbol.\n",
+ "parameters": [
+ {
+ "name": "ticker",
+ "in": "query",
+ "description": "Specify a future ticker or use * to subscribe to all future tickers.\nYou can also use a comma separated list to subscribe to multiple future tickers.\nYou can retrieve available future tickers from our [Futures Tickers API](https://polygon.io/docs/futures/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 start timestamp of this aggregate window in Unix Milliseconds."
+ },
+ "e": {
+ "type": "integer",
+ "description": "The end timestamp of 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": "6CH5",
+ "v": 1,
+ "av": 0,
+ "op": 6994,
+ "vw": 6989.5,
+ "o": 6989.5,
+ "c": 6995,
+ "h": 6995,
+ "l": 6989.5,
+ "a": 6989.5,
+ "z": 1,
+ "s": 1734717060000,
+ "e": 1734717120000
+ }
+ }
+ }
+ }
+ },
+ "x-polygon-entitlement-data-type": {
+ "name": "aggregates",
+ "description": "Aggregate data"
+ },
+ "x-polygon-entitlement-market-type": {
+ "name": "futures",
+ "description": "Futures data"
+ },
+ "x-polygon-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
+ },
+ "/futures/AM": {
+ "get": {
+ "summary": "Aggregates (Per Minute)",
+ "description": "Stream real-time minute aggregates for a given future ticker symbol.\n",
+ "parameters": [
+ {
+ "name": "ticker",
+ "in": "query",
+ "description": "Specify a future ticker or use * to subscribe to all future tickers.\nYou can also use a comma separated list to subscribe to multiple future tickers.\nYou can retrieve available future tickers from our [Futures Tickers API](https://polygon.io/docs/futures/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 start timestamp of this aggregate window in Unix Milliseconds."
+ },
+ "e": {
+ "type": "integer",
+ "description": "The end timestamp of 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": "6CH5",
+ "v": 91,
+ "av": 0,
+ "op": 6994,
+ "vw": 6994.7473,
+ "o": 6994.5,
+ "c": 6995,
+ "h": 6995,
+ "l": 6994.5,
+ "a": 6994.5,
+ "z": 100,
+ "s": 1734717060000,
+ "e": 1734717120000
+ }
+ }
+ }
+ }
+ },
+ "x-polygon-entitlement-data-type": {
+ "name": "aggregates",
+ "description": "Aggregate data"
+ },
+ "x-polygon-entitlement-market-type": {
+ "name": "futures",
+ "description": "Futures data"
+ },
+ "x-polygon-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
}
},
"components": {
@@ -4724,6 +5232,10 @@
"type": "string",
"description": "The ticker symbol for the given option contract."
},
+ "FutureSymbol": {
+ "type": "string",
+ "description": "The ticker symbol for the given future."
+ },
"ForexBaseQuoteEvent": {
"type": "object",
"properties": {
@@ -5464,6 +5976,320 @@
"description": "The nanosecond timestamp."
}
}
+ },
+ "FutureTradeEvent": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "enum": [
+ "T"
+ ],
+ "description": "The event type."
+ },
+ "sym": {
+ "type": "string",
+ "description": "The ticker symbol for the given future."
+ },
+ "p": {
+ "type": "number",
+ "format": "double",
+ "description": "The price of a trade."
+ },
+ "s": {
+ "type": "integer",
+ "description": "The trade size."
+ },
+ "t": {
+ "type": "integer",
+ "description": "The SIP 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"
+ }
+ }
+ },
+ "FutureQuoteEvent": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "enum": [
+ "Q"
+ ],
+ "description": "The event type."
+ },
+ "sym": {
+ "type": "string",
+ "description": "The ticker symbol for the given future."
+ },
+ "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."
+ },
+ "bt": {
+ "type": "integer",
+ "description": "The timestamp when the bid was submitted to the exchange."
+ },
+ "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."
+ },
+ "at": {
+ "type": "integer",
+ "description": "The timestamp when the ask was submitted to the exchange."
+ },
+ "t": {
+ "type": "integer",
+ "description": "The SIP timestamp in Unix MS."
+ }
+ }
+ },
+ "FutureBaseAggregateEvent": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "description": "The event type."
+ },
+ "sym": {
+ "type": "string",
+ "description": "The ticker symbol for the given future."
+ },
+ "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 start timestamp of this aggregate window in Unix Milliseconds."
+ },
+ "e": {
+ "type": "integer",
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
+ }
+ }
+ },
+ "FutureSecondAggregateEvent": {
+ "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 start timestamp of this aggregate window in Unix Milliseconds."
+ },
+ "e": {
+ "type": "integer",
+ "description": "The end timestamp of 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."
+ }
+ }
+ }
+ ]
+ },
+ "FutureMinuteAggregateEvent": {
+ "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 start timestamp of this aggregate window in Unix Milliseconds."
+ },
+ "e": {
+ "type": "integer",
+ "description": "The end timestamp of 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."
+ }
+ }
+ }
+ ]
}
},
"parameters": {
@@ -5543,7 +6369,18 @@
"pattern": "/^(I:[a-zA-Z0-9]+)$/"
},
"example": "I:SPX"
+ },
+ "FuturesTickerParam": {
+ "name": "ticker",
+ "in": "query",
+ "description": "Specify a future ticker or use * to subscribe to all future tickers.\nYou can also use a comma separated list to subscribe to multiple future tickers.\nYou can retrieve available future tickers from our [Futures Tickers API](https://polygon.io/docs/futures/get_v3_reference_tickers).\n",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "/^([a-zA-Z]+)$/"
+ },
+ "example": "*"
}
}
}
-}
\ No newline at end of file
+}