From 4f9a626d858e3a423d902d9bdcfe7bd2baddd0c4 Mon Sep 17 00:00:00 2001
From: anthony johnson <114414459+antdjohns@users.noreply.github.com>
Date: Tue, 30 May 2023 18:36:31 -0700
Subject: [PATCH 1/4] Adding WS support for Launchpad
---
src/main/kotlin/io/polygon/kotlin/sdk/Version.kt | 2 +-
.../kotlin/sdk/websocket/PolygonWebSocketClient.kt | 1 +
.../sdk/websocket/PolygonWebSocketMessage.kt | 14 ++++++++++++++
.../sdk/websocket/PolygonWebSocketSubscription.kt | 5 +++++
4 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/Version.kt b/src/main/kotlin/io/polygon/kotlin/sdk/Version.kt
index 1e3ba66..43b3baf 100644
--- a/src/main/kotlin/io/polygon/kotlin/sdk/Version.kt
+++ b/src/main/kotlin/io/polygon/kotlin/sdk/Version.kt
@@ -1,6 +1,6 @@
package io.polygon.kotlin.sdk
object Version {
- const val name = "v4.3.0"
+ const val name = "v4.4.0"
const val userAgent = "Polygon.io JVM Client/$name"
}
diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/websocket/PolygonWebSocketClient.kt b/src/main/kotlin/io/polygon/kotlin/sdk/websocket/PolygonWebSocketClient.kt
index afc3f3f..b74c41e 100644
--- a/src/main/kotlin/io/polygon/kotlin/sdk/websocket/PolygonWebSocketClient.kt
+++ b/src/main/kotlin/io/polygon/kotlin/sdk/websocket/PolygonWebSocketClient.kt
@@ -227,6 +227,7 @@ constructor(
"XS" -> serializer.decodeFromJsonElement(CryptoMessage.ConsolidatedQuote.serializer(), frame)
"XL2" -> serializer.decodeFromJsonElement(CryptoMessage.Level2Tick.serializer(), frame)
"V" -> serializer.decodeFromJsonElement(IndicesMessage.Value.serializer(), frame)
+ "LV" -> serializer.decodeFromJsonElement(LaunchpadMessage.LaunchpadValue.serializer(), frame)
else -> RawMessage(frame.toString().toByteArray())
}
collector.add(message)
diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/websocket/PolygonWebSocketMessage.kt b/src/main/kotlin/io/polygon/kotlin/sdk/websocket/PolygonWebSocketMessage.kt
index 4ae6843..fe0aebf 100644
--- a/src/main/kotlin/io/polygon/kotlin/sdk/websocket/PolygonWebSocketMessage.kt
+++ b/src/main/kotlin/io/polygon/kotlin/sdk/websocket/PolygonWebSocketMessage.kt
@@ -176,4 +176,18 @@ sealed class PolygonWebSocketMessage {
@SerialName("t") val exchangeTimestampMillis: Long? = null
) : IndicesMessage()
}
+
+ sealed class LaunchpadMessage : PolygonWebSocketMessage() {
+ /**
+ * Note: Launchpad use the "AM" event type for Aggregates and thus return a StocksMessage.Aggregate
+ */
+
+ @Serializable
+ data class LaunchpadValue(
+ @SerialName("ev") val eventType: String? = null,
+ @SerialName("val") val value: Double? = null,
+ @SerialName("sym") val symbol: String? = null,
+ @SerialName("s") val timestampMillis: Long? = null
+ ) : LaunchpadMessage()
+ }
}
\ No newline at end of file
diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/websocket/PolygonWebSocketSubscription.kt b/src/main/kotlin/io/polygon/kotlin/sdk/websocket/PolygonWebSocketSubscription.kt
index 9b11d5e..31a88be 100644
--- a/src/main/kotlin/io/polygon/kotlin/sdk/websocket/PolygonWebSocketSubscription.kt
+++ b/src/main/kotlin/io/polygon/kotlin/sdk/websocket/PolygonWebSocketSubscription.kt
@@ -52,6 +52,11 @@ sealed class PolygonWebSocketChannel(val prefix: String) {
object Value : Indices("V")
}
+ sealed class Launchpad(channelPrefix: String) : PolygonWebSocketChannel(channelPrefix) {
+ object Aggregates : Stocks("AM")
+ object Value : Launchpad("LV")
+ }
+
/**
* Use this if there's a new channel that this SDK doesn't fully support yet
*/
From 59cbda2fd37c405ca73a3dbf317d12abee20a151 Mon Sep 17 00:00:00 2001
From: anthony johnson <114414459+antdjohns@users.noreply.github.com>
Date: Wed, 31 May 2023 08:26:30 -0700
Subject: [PATCH 2/4] spec updates
---
.polygon/rest.json | 59630 +++++++++++++++++++-------------------
.polygon/websocket.json | 323 +-
2 files changed, 30747 insertions(+), 29206 deletions(-)
diff --git a/.polygon/rest.json b/.polygon/rest.json
index 03c3bea..245d787 100644
--- a/.polygon/rest.json
+++ b/.polygon/rest.json
@@ -1,30026 +1,31420 @@
{
- "components": {
- "parameters": {
- "AggregateAdjusted": {
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "type": "boolean"
- }
- },
- "AggregateDate": {
- "description": "The beginning date for the aggregate window.",
- "example": "2023-01-09",
- "in": "path",
- "name": "date",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- "AggregateLimitMax50000": {
- "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on\n\u003ca href=\"https://polygon.io/blog/aggs-api-updates/\" target=\"_blank\" alt=\"Aggregate Data API Improvements\"\u003eAggregate Data API Improvements\u003c/a\u003e.\n",
- "example": 120,
- "in": "query",
- "name": "limit",
- "schema": {
- "type": "integer"
- }
- },
- "AggregateMultiplier": {
- "description": "The size of the timespan multiplier.",
- "example": 1,
- "in": "path",
- "name": "multiplier",
- "required": true,
- "schema": {
- "type": "integer"
- }
- },
- "AggregateSort": {
- "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
- "example": "asc",
- "in": "query",
- "name": "sort",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ]
- }
- },
- "AggregateTimeFrom": {
- "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2023-01-09",
- "in": "path",
- "name": "from",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- "AggregateTimeTo": {
- "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2023-01-09",
- "in": "path",
- "name": "to",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- "AggregateTimespan": {
- "description": "The size of the time window.",
- "example": "day",
- "in": "path",
- "name": "timespan",
- "required": true,
- "schema": {
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- "CryptoTickerPathParam": {
- "description": "The ticker symbol of the currency pair.",
- "example": "X:BTCUSD",
- "in": "path",
- "name": "cryptoTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- "ForexTickerPathParam": {
- "description": "The ticker symbol of the currency pair.",
- "example": "C:EURUSD",
- "in": "path",
- "name": "forexTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- "GeneralTickerPathParam": {
- "description": "The ticker symbol of the asset.",
- "example": "AAPL",
- "in": "path",
- "name": "ticker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- "IncludeOTC": {
- "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n",
- "in": "query",
- "name": "include_otc",
- "schema": {
- "type": "boolean"
- }
- },
- "IndicesAggregateTimeFrom": {
- "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2023-03-10",
- "in": "path",
- "name": "from",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- "IndicesAggregateTimeTo": {
- "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2023-03-10",
- "in": "path",
- "name": "to",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- "IndicesTickerPathParam": {
- "description": "The ticker symbol of Index.",
- "example": "I:SPX",
- "in": "path",
- "name": "indicesTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- "LimitMax10000": {
- "description": "Limit the size of the response, max 10000.",
- "example": 100,
- "in": "query",
- "name": "limit",
- "schema": {
- "type": "integer"
- }
- },
- "LimitMax50000": {
- "description": "Limit the size of the response, max 50000 and default 5000.",
- "example": 10,
- "in": "query",
- "name": "limit",
- "schema": {
- "type": "integer"
- }
- },
- "LimitNoMax": {
- "description": "Limit the number of results.\n",
- "example": 5,
- "in": "query",
- "name": "limit",
- "schema": {
- "type": "integer"
- }
- },
- "OptionsTickerPathParam": {
- "description": "The ticker symbol of the options contract.",
- "example": "O:SPY251219C00650000",
- "in": "path",
- "name": "optionsTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- "ReverseOrder": {
- "description": "Reverse the order of the results.\n",
- "example": true,
- "in": "query",
- "name": "reverse",
- "schema": {
- "type": "boolean"
- }
- },
- "SnapshotDirection": {
- "description": "The direction of the snapshot results to return.\n",
- "example": "gainers",
- "in": "path",
- "name": "direction",
- "required": true,
- "schema": {
- "enum": [
- "gainers",
- "losers"
- ],
- "type": "string"
- }
- },
- "StocksTickerPathParam": {
- "description": "The ticker symbol of the stock/equity.",
- "example": "AAPL",
- "in": "path",
- "name": "stocksTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- "TickersQueryParam": {
- "description": "A comma separated list of tickers to get snapshots for.",
- "in": "query",
- "name": "tickers",
- "schema": {
- "items": {
- "type": "string"
- },
- "type": "array"
- }
- }
- },
- "responses": {
- "Conflict": {
- "description": "Parameter is invalid or incorrect."
- },
- "DefaultError": {
- "description": "Unexpected error"
- },
- "NotFound": {
- "description": "The specified resource was not found"
- },
- "Unauthorized": {
- "description": "Unauthorized - Check our API Key and account status"
- }
- },
- "schemas": {
- "Adjusted": {
- "description": "Whether or not this response was adjusted for splits.",
- "type": "boolean"
- },
- "AskExchangeId": {
- "allOf": [
- {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- {
- "description": "Ask Exchange Id"
- }
- ]
- },
- "AskPrice": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "AskSize": {
- "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.",
- "type": "integer"
- },
- "BidExchangeId": {
- "allOf": [
- {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- {
- "description": "Bid Exchange Id"
- }
- ]
- },
- "BidPrice": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "BidSize": {
- "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.",
- "type": "integer"
- },
- "Close": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "CloseIndices": {
- "description": "The close value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "Company": {
- "properties": {
- "active": {
- "description": "Indicates if the security is actively listed. If false, this means the company is no longer listed and cannot be traded.",
- "type": "boolean"
- },
- "bloomberg": {
- "description": "The Bloomberg guid for the symbol.",
- "type": "string"
- },
- "ceo": {
- "description": "The name of the company's current CEO.",
- "type": "string"
- },
- "cik": {
- "description": "The official CIK guid used for SEC database/filings.",
- "type": "string"
- },
- "country": {
- "description": "The country in which the company is registered.",
- "type": "string"
- },
- "description": {
- "description": "A description of the company and what they do/offer.",
- "type": "string"
- },
- "employees": {
- "description": "The approximate number of employees for the company.",
- "type": "integer"
- },
- "exchange": {
- "description": "The symbol's primary exchange.",
- "type": "string"
- },
- "exchangeSymbol": {
- "description": "The exchange code (id) of the symbol's primary exchange.",
- "type": "string"
- },
- "figi": {
- "description": "The OpenFigi project guid for the symbol. (\u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://openfigi.com/\"\u003ehttps://openfigi.com/\u003c/a\u003e)",
- "type": "string"
- },
- "hq_address": {
- "description": "The street address for the company's headquarters.",
- "type": "string"
- },
- "hq_country": {
- "description": "The country in which the company's headquarters is located.",
- "type": "string"
- },
- "hq_state": {
- "description": "The state in which the company's headquarters is located.",
- "type": "string"
- },
- "industry": {
- "description": "The industry in which the company operates.",
- "type": "string"
- },
- "lei": {
- "description": "The Legal Entity Identifier (LEI) guid for the symbol. (\u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Legal_Entity_Identifier\"\u003ehttps://en.wikipedia.org/wiki/Legal_Entity_Identifier\u003c/a\u003e)",
- "type": "string"
- },
- "listdate": {
- "description": "The date that the symbol was listed on the exchange.",
- "format": "date",
- "type": "string"
- },
- "logo": {
- "description": "The URL of the entity's logo.",
- "type": "string"
- },
- "marketcap": {
- "description": "The current market cap for the company.",
- "type": "integer"
- },
- "name": {
- "description": "The name of the company/entity.",
- "type": "string"
- },
- "phone": {
- "description": "The phone number for the company. This is usually a corporate contact number.",
- "type": "string"
- },
- "sector": {
- "description": "The sector of the indsutry in which the symbol operates.",
- "type": "string"
- },
- "sic": {
- "description": "Standard Industrial Classification (SIC) id for the symbol. (\u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Standard_Industrial_Classification\"\u003ehttps://en.wikipedia.org/wiki/Legal_Entity_Identifier\u003c/a\u003e)",
- "type": "integer"
- },
- "similar": {
- "description": "A list of ticker symbols for similar companies.",
- "items": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
+ "components": {
+ "parameters": {
+ "AggregateAdjusted": {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
},
- "type": "array"
- },
- "symbol": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "tags": {
- "items": {
- "description": "A list of words related to the company.",
- "type": "string"
+ "AggregateDate": {
+ "description": "The beginning date for the aggregate window.",
+ "example": "2023-01-09",
+ "in": "path",
+ "name": "date",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
},
- "type": "array"
- },
- "type": {
- "description": "The type or class of the security. (\u003ca alt=\"Full List of Ticker Types\" href=\"https://polygon.io/docs/stocks/get_v3_reference_tickers_types\"\u003eFull List of Ticker Types\u003c/a\u003e)",
- "type": "string"
- },
- "updated": {
- "description": "The last time this company record was updated.",
- "format": "date",
- "type": "string"
- },
- "url": {
- "description": "The URL of the company's website",
- "type": "string"
- }
- },
- "type": "object"
- },
- "ConditionTypeMap": {
- "properties": {
- "condition": {
- "description": "Polygon.io's mapping for condition codes. For more information, see our \u003ca href=\"https://polygon.io/glossary/us/stocks/trade-conditions\" alt=\"Trade Conditions Glossary\" target=\"_blank\"\u003eTrade Conditions Glossary\u003c/a\u003e.\n",
- "type": "string"
- }
- },
- "type": "object"
- },
- "Conditions": {
- "description": "A list of condition codes.\n",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
- "type": "integer"
- },
- "type": "array"
- },
- "Count": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "CryptoExchange": {
- "items": {
- "properties": {
- "id": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
+ "AggregateLimitMax50000": {
+ "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on\nAggregate Data API Improvements.\n",
+ "example": 120,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
},
- "market": {
- "description": "Market data type this exchange contains ( crypto only currently )",
- "type": "string"
+ "AggregateMultiplier": {
+ "description": "The size of the timespan multiplier.",
+ "example": 1,
+ "in": "path",
+ "name": "multiplier",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
},
- "name": {
- "description": "Name of the exchange",
- "type": "string"
+ "AggregateSort": {
+ "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
+ "example": "asc",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ]
+ }
},
- "type": {
- "description": "Type of exchange feed",
- "type": "string"
+ "AggregateTimeFrom": {
+ "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-01-09",
+ "in": "path",
+ "name": "from",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
},
- "url": {
- "description": "URL of this exchange",
- "type": "string"
- }
- },
- "required": [
- "id",
- "type",
- "market",
- "name",
- "url"
- ],
- "type": "object"
- },
- "type": "array"
- },
- "CryptoGroupedResults": {
- "properties": {
- "results": {
- "items": {
- "properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
+ "AggregateTimeTo": {
+ "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-01-09",
+ "in": "path",
+ "name": "to",
+ "required": true,
+ "schema": {
+ "type": "string"
}
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "t",
- "T"
- ],
- "type": "object"
},
- "type": "array"
- }
- },
- "type": "object"
- },
- "CryptoHistoricTrades": {
- "properties": {
- "day": {
- "description": "The date that was evaluated from the request.",
- "format": "date",
- "type": "string"
- },
- "map": {
- "description": "A map for shortened result keys.",
- "type": "object"
- },
- "msLatency": {
- "description": "The milliseconds of latency for the query results.",
- "type": "integer"
- },
- "symbol": {
- "description": "The symbol pair that was evaluated from the request.",
- "type": "string"
- },
- "ticks": {
- "items": {
- "properties": {
- "c": {
- "description": "A list of condition codes.\n",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
- "type": "integer"
- },
- "type": "array"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The size of a trade (also known as volume).\n",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
- "type": "integer"
+ "AggregateTimespan": {
+ "description": "The size of the time window.",
+ "example": "day",
+ "in": "path",
+ "name": "timespan",
+ "required": true,
+ "schema": {
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
+ "type": "string"
}
- },
- "required": [
- "p",
- "s",
- "x",
- "c",
- "t",
- "i"
- ],
- "type": "object"
},
- "type": "array"
- }
- },
- "required": [
- "day",
- "map",
- "msLatency",
- "symbol",
- "ticks"
- ],
- "type": "object"
- },
- "CryptoLastTrade": {
- "properties": {
- "last": {
- "properties": {
- "conditions": {
- "description": "A list of condition codes.\n",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
- "type": "integer"
- },
- "type": "array"
- },
- "exchange": {
- "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
- "type": "integer"
- },
- "price": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "size": {
- "description": "The size of a trade (also known as volume).\n",
- "format": "double",
- "type": "number"
- },
- "timestamp": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- }
+ "CryptoTickerPathParam": {
+ "description": "The ticker symbol of the currency pair.",
+ "example": "X:BTCUSD",
+ "in": "path",
+ "name": "cryptoTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
},
- "required": [
- "conditions",
- "exchange",
- "price",
- "size",
- "timestamp"
- ],
- "type": "object"
- },
- "symbol": {
- "description": "The symbol pair that was evaluated from the request.",
- "type": "string"
- }
- },
- "required": [
- "symbol"
- ],
- "type": "object"
- },
- "CryptoOpenClose": {
- "properties": {
- "close": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "closingTrades": {
- "items": {
- "properties": {
- "c": {
- "description": "A list of condition codes.\n",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "ForexTickerPathParam": {
+ "description": "The ticker symbol of the currency pair.",
+ "example": "C:EURUSD",
+ "in": "path",
+ "name": "forexTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "GeneralTickerPathParam": {
+ "description": "The ticker symbol of the asset.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "ticker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "IncludeOTC": {
+ "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n",
+ "in": "query",
+ "name": "include_otc",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ "IndicesAggregateTimeFrom": {
+ "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-03-10",
+ "in": "path",
+ "name": "from",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "IndicesAggregateTimeTo": {
+ "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-03-10",
+ "in": "path",
+ "name": "to",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "IndicesTickerPathParam": {
+ "description": "The ticker symbol of Index.",
+ "example": "I:DJI",
+ "in": "path",
+ "name": "indicesTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "LimitMax10000": {
+ "description": "Limit the size of the response, max 10000.",
+ "example": 100,
+ "in": "query",
+ "name": "limit",
+ "schema": {
"type": "integer"
- },
- "type": "array"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The size of a trade (also known as volume).\n",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
- "type": "integer"
}
- },
- "required": [
- "p",
- "s",
- "x",
- "c",
- "t",
- "i"
- ],
- "type": "object"
},
- "type": "array"
- },
- "day": {
- "description": "The date requested.",
- "format": "date",
- "type": "string"
- },
- "isUTC": {
- "description": "Whether or not the timestamps are in UTC timezone.",
- "type": "boolean"
- },
- "open": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "openTrades": {
- "items": {
- "properties": {
- "c": {
- "description": "A list of condition codes.\n",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "LimitMax50000": {
+ "description": "Limit the size of the response, max 50000 and default 5000.",
+ "example": 10,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ "LimitNoMax": {
+ "description": "Limit the number of results.\n",
+ "example": 5,
+ "in": "query",
+ "name": "limit",
+ "schema": {
"type": "integer"
- },
- "type": "array"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The size of a trade (also known as volume).\n",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
- "type": "integer"
}
- },
- "required": [
- "p",
- "s",
- "x",
- "c",
- "t",
- "i"
- ],
- "type": "object"
},
- "type": "array"
- },
- "symbol": {
- "description": "The symbol pair that was evaluated from the request.",
- "type": "string"
- }
+ "OptionsTickerPathParam": {
+ "description": "The ticker symbol of the options contract.",
+ "example": "O:SPY251219C00650000",
+ "in": "path",
+ "name": "optionsTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "ReverseOrder": {
+ "description": "Reverse the order of the results.\n",
+ "example": true,
+ "in": "query",
+ "name": "reverse",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ "SnapshotDirection": {
+ "description": "The direction of the snapshot results to return.\n",
+ "example": "gainers",
+ "in": "path",
+ "name": "direction",
+ "required": true,
+ "schema": {
+ "enum": [
+ "gainers",
+ "losers"
+ ],
+ "type": "string"
+ }
+ },
+ "StocksTickerPathParam": {
+ "description": "The ticker symbol of the stock/equity.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "stocksTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "TickersQueryParam": {
+ "description": "A comma separated list of tickers to get snapshots for.",
+ "in": "query",
+ "name": "tickers",
+ "schema": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ }
},
- "required": [
- "symbol",
- "isUTC",
- "day",
- "open",
- "close",
- "openTrades",
- "closingTrades"
- ],
- "type": "object"
- },
- "CryptoSnapshotMinute": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
+ "responses": {
+ "Conflict": {
+ "description": "Parameter is invalid or incorrect."
+ },
+ "DefaultError": {
+ "description": "Unexpected error"
+ },
+ "NotFound": {
+ "description": "The specified resource was not found"
+ },
+ "Unauthorized": {
+ "description": "Unauthorized - Check our API Key and account status"
+ }
},
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "CryptoSnapshotTicker": {
- "properties": {
- "ticker": {
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "lastTrade": {
+ "schemas": {
+ "Adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "AskExchangeId": {
"allOf": [
- {
- "description": "The most recent trade for this ticker."
- },
- {
- "properties": {
- "c": {
- "description": "The trade conditions.",
- "items": {
- "type": "integer"
- },
- "type": "array"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The size (volume) of the trade.",
- "type": "number"
- },
- "t": {
- "description": "The millisecond accuracy timestamp. This is the timestamp of when the trade was generated at the exchange.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
+ {
+ "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
"type": "integer"
- }
},
- "required": [
- "c",
- "i",
- "p",
- "s",
- "t",
- "x"
- ],
- "type": "object"
- }
+ {
+ "description": "Ask Exchange Id"
+ }
]
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "todaysChange": {
- "description": "The value of the change the from previous day.",
- "format": "double",
- "type": "number"
- },
- "todaysChangePerc": {
- "description": "The percentage change since the previous day.",
+ },
+ "AskPrice": {
+ "description": "The ask price.",
"format": "double",
"type": "number"
- },
- "updated": {
- "description": "The last updated timestamp.",
+ },
+ "AskSize": {
+ "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.",
"type": "integer"
- }
},
- "required": [
- "day",
- "lastTrade",
- "min",
- "prevDay",
- "ticker",
- "todaysChange",
- "todaysChangePerc",
- "updated"
- ],
- "type": "object"
- }
- },
- "type": "object"
- },
- "CryptoSnapshotTickerFullBook": {
- "properties": {
- "data": {
- "properties": {
- "askCount": {
- "description": "The combined total number of asks in the book.",
- "format": "double",
- "type": "number"
- },
- "asks": {
- "items": {
- "properties": {
- "p": {
- "description": "The price of this book level.",
- "format": "double",
- "type": "number"
+ "BidExchangeId": {
+ "allOf": [
+ {
+ "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
},
- "x": {
- "description": "A map of the exchange ID to number of shares at this price level.\n\u003cbr /\u003e\n\u003cbr /\u003e\n**Example:**\n\u003cbr /\u003e\n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n\u003cbr /\u003e\n\u003cbr /\u003e\nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n",
- "type": "object"
+ {
+ "description": "Bid Exchange Id"
}
- },
- "required": [
- "p",
- "x"
- ],
- "type": "object"
- },
- "type": "array"
- },
- "bidCount": {
- "description": "The combined total number of bids in the book.",
+ ]
+ },
+ "BidPrice": {
+ "description": "The bid price.",
"format": "double",
"type": "number"
- },
- "bids": {
- "items": {
- "properties": {
- "p": {
- "description": "The price of this book level.",
- "format": "double",
- "type": "number"
- },
- "x": {
- "description": "A map of the exchange ID to number of shares at this price level.\n\u003cbr /\u003e\n\u003cbr /\u003e\n**Example:**\n\u003cbr /\u003e\n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n\u003cbr /\u003e\n\u003cbr /\u003e\nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n",
- "type": "object"
- }
- },
- "required": [
- "p",
- "x"
- ],
- "type": "object"
- },
- "type": "array"
- },
- "spread": {
- "description": "The difference between the best bid and the best ask price accross exchanges.",
+ },
+ "BidSize": {
+ "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.",
+ "type": "integer"
+ },
+ "Close": {
+ "description": "The close price for the symbol in the given time period.",
"format": "double",
"type": "number"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "updated": {
- "description": "The last updated timestamp.",
- "type": "integer"
- }
},
- "required": [
- "ticker",
- "bids",
- "asks",
- "bidCount",
- "askCount",
- "spread",
- "updated"
- ],
- "type": "object"
- }
- },
- "type": "object"
- },
- "CryptoSnapshotTickers": {
- "properties": {
- "tickers": {
- "items": {
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "CloseIndices": {
+ "description": "The close value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "Company": {
+ "properties": {
+ "active": {
+ "description": "Indicates if the security is actively listed. If false, this means the company is no longer listed and cannot be traded.",
+ "type": "boolean"
},
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "bloomberg": {
+ "description": "The Bloomberg guid for the symbol.",
+ "type": "string"
},
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "ceo": {
+ "description": "The name of the company's current CEO.",
+ "type": "string"
},
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "cik": {
+ "description": "The official CIK guid used for SEC database/filings.",
+ "type": "string"
},
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "country": {
+ "description": "The country in which the company is registered.",
+ "type": "string"
},
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "lastTrade": {
- "allOf": [
- {
- "description": "The most recent trade for this ticker."
+ "description": {
+ "description": "A description of the company and what they do/offer.",
+ "type": "string"
},
- {
- "properties": {
- "c": {
- "description": "The trade conditions.",
- "items": {
- "type": "integer"
- },
- "type": "array"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The size (volume) of the trade.",
- "type": "number"
- },
- "t": {
- "description": "The millisecond accuracy timestamp. This is the timestamp of when the trade was generated at the exchange.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
- "type": "integer"
- }
- },
- "required": [
- "c",
- "i",
- "p",
- "s",
- "t",
- "x"
- ],
- "type": "object"
- }
- ]
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "employees": {
+ "description": "The approximate number of employees for the company.",
+ "type": "integer"
},
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "exchange": {
+ "description": "The symbol's primary exchange.",
+ "type": "string"
},
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "exchangeSymbol": {
+ "description": "The exchange code (id) of the symbol's primary exchange.",
+ "type": "string"
},
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "figi": {
+ "description": "The OpenFigi project guid for the symbol. (https://openfigi.com/)",
+ "type": "string"
},
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "hq_address": {
+ "description": "The street address for the company's headquarters.",
+ "type": "string"
},
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "hq_country": {
+ "description": "The country in which the company's headquarters is located.",
+ "type": "string"
},
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "hq_state": {
+ "description": "The state in which the company's headquarters is located.",
+ "type": "string"
},
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "industry": {
+ "description": "The industry in which the company operates.",
+ "type": "string"
},
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "lei": {
+ "description": "The Legal Entity Identifier (LEI) guid for the symbol. (https://en.wikipedia.org/wiki/Legal_Entity_Identifier)",
+ "type": "string"
},
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "listdate": {
+ "description": "The date that the symbol was listed on the exchange.",
+ "format": "date",
+ "type": "string"
},
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "todaysChange": {
- "description": "The value of the change the from previous day.",
- "format": "double",
- "type": "number"
- },
- "todaysChangePerc": {
- "description": "The percentage change since the previous day.",
- "format": "double",
- "type": "number"
- },
- "updated": {
- "description": "The last updated timestamp.",
- "type": "integer"
- }
- },
- "required": [
- "day",
- "lastTrade",
- "min",
- "prevDay",
- "ticker",
- "todaysChange",
- "todaysChangePerc",
- "updated"
- ],
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "CryptoTick": {
- "properties": {
- "c": {
- "description": "A list of condition codes.\n",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
- "type": "integer"
- },
- "type": "array"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The size of a trade (also known as volume).\n",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
- "type": "integer"
- }
- },
- "required": [
- "p",
- "s",
- "x",
- "c",
- "t",
- "i"
- ],
- "type": "object"
- },
- "CryptoTradeExchange": {
- "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
- "type": "integer"
- },
- "Date": {
- "oneOf": [
- {
- "format": "date-time",
- "type": "string"
- },
- {
- "format": "date",
- "type": "string"
- }
- ]
- },
- "Exchange": {
- "items": {
- "properties": {
- "code": {
- "description": "A unique identifier for the exchange internal to Polygon.io. This is not an industry code or ISO standard.",
- "type": "string"
- },
- "id": {
- "description": "The ID of the exchange.",
- "type": "number"
- },
- "market": {
- "description": "The market data type that this exchange contains.",
- "type": "string"
- },
- "mic": {
- "description": "The Market Identification Code or MIC as defined in ISO 10383 (\u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Market_Identifier_Code\"\u003ehttps://en.wikipedia.org/wiki/Market_Identifier_Code\u003c/a\u003e).",
- "type": "string"
- },
- "name": {
- "description": "The name of the exchange.",
- "type": "string"
- },
- "tape": {
- "description": "The tape id of the exchange.",
- "type": "string"
- },
- "type": {
- "description": "The type of exchange.\n- TRF = Trade Reporting Facility\n- exchange = Reporting exchange on the tape\n",
- "type": "string"
- }
- },
- "type": "object"
- },
- "type": "array"
- },
- "ExchangeId": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- "Financial": {
- "properties": {
- "cashChange": {
- "example": 7202000000,
- "type": "integer"
- },
- "cashFlow": {
- "example": 28293000000,
- "type": "integer"
- },
- "costOfRevenue": {
- "example": 54381000000,
- "type": "integer"
- },
- "currentAssets": {
- "example": 143810000000,
- "type": "integer"
- },
- "currentCash": {
- "example": 27491000000,
- "type": "integer"
- },
- "currentDebt": {
- "example": 18478000000,
- "type": "integer"
- },
- "grossProfit": {
- "example": 33912000000,
- "type": "integer"
- },
- "netIncome": {
- "example": 20065000000,
- "type": "integer"
- },
- "operatingExpense": {
- "example": 7638000000,
- "type": "integer"
- },
- "operatingGainsLosses": {
- "type": "number"
- },
- "operatingIncome": {
- "example": 26274000000,
- "type": "integer"
- },
- "operatingRevenue": {
- "example": 88293000000,
- "type": "integer"
- },
- "reportDate": {
- "description": "Report Date",
- "example": "2017-12-31T00:00:00.000Z",
- "format": "date-time",
- "type": "string"
- },
- "reportDateStr": {
- "description": "Report date as non date format",
- "example": "2017-12-31",
- "type": "string"
- },
- "researchAndDevelopment": {
- "example": 3407000000,
- "type": "integer"
- },
- "shareholderEquity": {
- "example": 140199000000,
- "type": "integer"
- },
- "symbol": {
- "description": "Stock Symbol",
- "example": "AAPL",
- "type": "string"
- },
- "totalAssets": {
- "example": 406794000000,
- "type": "integer"
- },
- "totalCash": {
- "example": 77153000000,
- "type": "integer"
- },
- "totalDebt": {
- "example": 122400000000,
- "type": "integer"
- },
- "totalLiabilities": {
- "example": 266595000000,
- "type": "integer"
- },
- "totalRevenue": {
- "example": 88293000000,
- "type": "integer"
- }
- },
- "required": [
- "symbol",
- "reportDate",
- "reportDateStr"
- ],
- "type": "object"
- },
- "Financials": {
- "description": "Financials",
- "properties": {
- "EBITDAMargin": {
- "format": "double",
- "type": "number"
- },
- "accumulatedOtherComprehensiveIncome": {
- "type": "integer"
- },
- "accumulatedRetainedEarningsDeficit": {
- "type": "integer"
- },
- "assetTurnover": {
- "type": "integer"
- },
- "assets": {
- "type": "integer"
- },
- "assetsAverage": {
- "type": "integer"
- },
- "assetsCurrent": {
- "type": "integer"
- },
- "assetsNonCurrent": {
- "type": "integer"
- },
- "averageEquity": {
- "type": "integer"
- },
- "bookValuePerShare": {
- "format": "double",
- "type": "number"
- },
- "calendarDate": {
- "example": "2019-03-31",
- "format": "date-time",
- "type": "string"
- },
- "capitalExpenditure": {
- "type": "integer"
- },
- "cashAndEquivalents": {
- "type": "integer"
- },
- "cashAndEquivalentsUSD": {
- "type": "integer"
- },
- "consolidatedIncome": {
- "type": "integer"
- },
- "costOfRevenue": {
- "type": "integer"
- },
- "currentLiabilities": {
- "type": "integer"
- },
- "currentRatio": {
- "format": "double",
- "type": "number"
- },
- "debt": {
- "type": "integer"
- },
- "debtCurrent": {
- "type": "integer"
- },
- "debtNonCurrent": {
- "type": "integer"
- },
- "debtToEquityRatio": {
- "format": "double",
- "type": "number"
- },
- "debtUSD": {
- "type": "integer"
- },
- "deferredRevenue": {
- "type": "integer"
- },
- "deposits": {
- "type": "integer"
- },
- "depreciationAmortizationAndAccretion": {
- "type": "integer"
- },
- "dividendYield": {
- "type": "integer"
- },
- "dividendsPerBasicCommonShare": {
- "type": "integer"
- },
- "earningBeforeInterestTaxes": {
- "type": "integer"
- },
- "earningBeforeInterestTaxesUSD": {
- "type": "integer"
- },
- "earningsBeforeInterestTaxesDepreciationAmortization": {
- "type": "integer"
- },
- "earningsBeforeInterestTaxesDepreciationAmortizationUSD": {
- "type": "integer"
- },
- "earningsBeforeTax": {
- "type": "integer"
- },
- "earningsPerBasicShare": {
- "format": "double",
- "type": "number"
- },
- "earningsPerBasicShareUSD": {
- "format": "double",
- "type": "number"
- },
- "earningsPerDilutedShare": {
- "format": "double",
- "type": "number"
- },
- "effectOfExchangeRateChangesOnCash": {
- "type": "integer"
- },
- "enterpriseValue": {
- "type": "integer"
- },
- "enterpriseValueOverEBIT": {
- "type": "integer"
- },
- "enterpriseValueOverEBITDA": {
- "format": "double",
- "type": "number"
- },
- "foreignCurrencyUSDExchangeRate": {
- "type": "integer"
- },
- "freeCashFlow": {
- "type": "integer"
- },
- "freeCashFlowPerShare": {
- "format": "double",
- "type": "number"
- },
- "goodwillAndIntangibleAssets": {
- "type": "integer"
- },
- "grossMargin": {
- "format": "double",
- "type": "number"
- },
- "grossProfit": {
- "type": "integer"
- },
- "incomeTaxExpense": {
- "type": "integer"
- },
- "interestExpense": {
- "type": "integer"
- },
- "inventory": {
- "type": "integer"
- },
- "investedCapital": {
- "type": "integer"
- },
- "investedCapitalAverage": {
- "type": "integer"
- },
- "investments": {
- "type": "integer"
- },
- "investmentsCurrent": {
- "type": "integer"
- },
- "investmentsNonCurrent": {
- "type": "integer"
- },
- "issuanceDebtSecurities": {
- "type": "integer"
- },
- "issuanceEquityShares": {
- "type": "integer"
- },
- "liabilitiesNonCurrent": {
- "type": "integer"
- },
- "marketCapitalization": {
- "type": "integer"
- },
- "netCashFlow": {
- "type": "integer"
- },
- "netCashFlowBusinessAcquisitionsDisposals": {
- "type": "integer"
- },
- "netCashFlowFromFinancing": {
- "type": "integer"
- },
- "netCashFlowFromInvesting": {
- "type": "integer"
- },
- "netCashFlowFromOperations": {
- "type": "integer"
- },
- "netCashFlowInvestmentAcquisitionsDisposals": {
- "type": "integer"
- },
- "netIncome": {
- "type": "integer"
- },
- "netIncomeCommonStock": {
- "type": "integer"
- },
- "netIncomeCommonStockUSD": {
- "type": "integer"
- },
- "netIncomeToNonControllingInterests": {
- "type": "integer"
- },
- "netLossIncomeFromDiscontinuedOperations": {
- "type": "integer"
- },
- "operatingExpenses": {
- "type": "integer"
- },
- "operatingIncome": {
- "type": "integer"
- },
- "paymentDividendsOtherCashDistributions": {
- "type": "integer"
- },
- "payoutRatio": {
- "type": "integer"
- },
- "period": {
- "description": "Reporting period.",
- "enum": [
- "Q",
- "T",
- "QA",
- "TA",
- "Y",
- "YA"
- ],
- "example": "Q",
- "type": "string"
- },
- "preferredDividendsIncomeStatementImpact": {
- "type": "integer"
- },
- "priceEarnings": {
- "format": "double",
- "type": "number"
- },
- "priceSales": {
- "format": "double",
- "type": "number"
- },
- "priceToBookValue": {
- "format": "double",
- "type": "number"
- },
- "priceToEarningsRatio": {
- "format": "double",
- "type": "number"
- },
- "priceToSalesRatio": {
- "format": "double",
- "type": "number"
- },
- "profitMargin": {
- "format": "double",
- "type": "number"
- },
- "propertyPlantEquipmentNet": {
- "type": "integer"
- },
- "reportPeriod": {
- "example": "2019-03-31",
- "format": "date-time",
- "type": "string"
- },
- "researchAndDevelopmentExpense": {
- "type": "integer"
- },
- "returnOnAverageAssets": {
- "type": "integer"
- },
- "returnOnAverageEquity": {
- "type": "integer"
- },
- "returnOnInvestedCapital": {
- "type": "integer"
- },
- "returnOnSales": {
- "format": "double",
- "type": "number"
- },
- "revenues": {
- "type": "integer"
- },
- "revenuesUSD": {
- "type": "integer"
- },
- "salesPerShare": {
- "format": "double",
- "type": "number"
- },
- "sellingGeneralAndAdministrativeExpense": {
- "type": "integer"
- },
- "shareBasedCompensation": {
- "type": "integer"
- },
- "shareFactor": {
- "type": "integer"
- },
- "sharePriceAdjustedClose": {
- "format": "double",
- "type": "number"
- },
- "shareholdersEquity": {
- "type": "integer"
- },
- "shareholdersEquityUSD": {
- "type": "integer"
- },
- "shares": {
- "type": "integer"
- },
- "tangibleAssetValue": {
- "type": "integer"
- },
- "tangibleAssetsBookValuePerShare": {
- "format": "double",
- "type": "number"
- },
- "taxAssets": {
- "type": "integer"
- },
- "taxLiabilities": {
- "type": "integer"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "totalLiabilities": {
- "type": "integer"
- },
- "tradeAndNonTradePayables": {
- "type": "integer"
- },
- "tradeAndNonTradeReceivables": {
- "type": "integer"
- },
- "updated": {
- "example": "1999-03-28",
- "format": "date-time",
- "type": "string"
- },
- "weightedAverageShares": {
- "type": "integer"
- },
- "weightedAverageSharesDiluted": {
- "type": "integer"
- },
- "workingCapital": {
- "type": "integer"
- }
- },
- "required": [
- "ticker",
- "exDate",
- "paymentDate",
- "ratio",
- "tofactor",
- "forfactor"
- ],
- "type": "object"
- },
- "ForexConversion": {
- "properties": {
- "converted": {
- "description": "The result of the conversion.",
- "format": "double",
- "type": "number"
- },
- "from": {
- "description": "The \"from\" currency symbol.",
- "type": "string"
- },
- "initialAmount": {
- "description": "The amount to convert.",
- "format": "double",
- "type": "number"
- },
- "last": {
- "properties": {
- "ask": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "bid": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "exchange": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/forex/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- "timestamp": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- }
- },
- "required": [
- "ask",
- "bid",
- "exchange",
- "timestamp"
- ],
- "type": "object"
- },
- "to": {
- "description": "The \"to\" currency symbol.",
- "type": "string"
- }
- },
- "required": [
- "from",
- "to",
- "initialAmount",
- "converted"
- ],
- "type": "object"
- },
- "ForexExchangeId": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/forex/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- "ForexGroupedResults": {
- "properties": {
- "results": {
- "items": {
- "properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "t",
- "T"
- ],
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "ForexHistoricTrades": {
- "properties": {
- "day": {
- "description": "The date that was evaluated from the request.",
- "format": "date",
- "type": "string"
- },
- "map": {
- "description": "A map for shortened result keys.",
- "type": "object"
- },
- "msLatency": {
- "description": "The milliseconds of latency for the query results.",
- "type": "integer"
- },
- "pair": {
- "description": "The currency pair that was evaluated from the request.",
- "type": "string"
- },
- "ticks": {
- "items": {
- "properties": {
- "a": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "b": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/forex/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- }
- },
- "required": [
- "a",
- "b",
- "x",
- "t"
- ],
- "type": "object"
- },
- "type": "array"
- }
- },
- "required": [
- "day",
- "map",
- "msLatency",
- "pair",
- "ticks"
- ],
- "type": "object"
- },
- "ForexPairLastQuote": {
- "properties": {
- "last": {
- "properties": {
- "ask": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "bid": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "exchange": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/forex/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- "timestamp": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- }
- },
- "required": [
- "ask",
- "bid",
- "exchange",
- "timestamp"
- ],
- "type": "object"
- },
- "symbol": {
- "description": "The symbol pair that was evaluated from the request.",
- "type": "string"
- }
- },
- "required": [
- "symbol"
- ],
- "type": "object"
- },
- "ForexPreviousClose": {
- "properties": {
- "results": {
- "items": {
- "properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "T",
- "v",
- "o",
- "c",
- "h",
- "l",
- "t"
- ],
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "ForexSnapshotLastQuote": {
- "properties": {
- "a": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "b": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The millisecond accuracy timestamp of the quote.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID on which this quote happened.",
- "type": "integer"
- }
- },
- "required": [
- "a",
- "b",
- "t",
- "x"
- ],
- "type": "object"
- },
- "ForexSnapshotPrevDay": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "ForexSnapshotTicker": {
- "properties": {
- "ticker": {
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v"
- ],
- "type": "object"
- },
- "lastQuote": {
- "description": "The most recent quote for this ticker.",
- "properties": {
- "a": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "b": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The millisecond accuracy timestamp of the quote.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID on which this quote happened.",
- "type": "integer"
- }
- },
- "required": [
- "a",
- "b",
- "t",
- "x"
- ],
- "type": "object"
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v"
- ],
- "type": "object"
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "todaysChange": {
- "description": "The value of the change the from previous day.",
- "format": "double",
- "type": "number"
- },
- "todaysChangePerc": {
- "description": "The percentage change since the previous day.",
- "format": "double",
- "type": "number"
- },
- "updated": {
- "description": "The last updated timestamp.",
- "type": "integer"
- }
- },
- "required": [
- "day",
- "lastQuote",
- "min",
- "prevDay",
- "ticker",
- "todaysChange",
- "todaysChangePerc",
- "updated"
- ],
- "type": "object"
- }
- },
- "type": "object"
- },
- "ForexSnapshotTickers": {
- "properties": {
- "tickers": {
- "items": {
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "logo": {
+ "description": "The URL of the entity's logo.",
+ "type": "string"
},
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "marketcap": {
+ "description": "The current market cap for the company.",
+ "type": "integer"
},
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "name": {
+ "description": "The name of the company/entity.",
+ "type": "string"
},
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "phone": {
+ "description": "The phone number for the company. This is usually a corporate contact number.",
+ "type": "string"
},
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v"
- ],
- "type": "object"
- },
- "lastQuote": {
- "description": "The most recent quote for this ticker.",
- "properties": {
- "a": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
+ "sector": {
+ "description": "The sector of the indsutry in which the symbol operates.",
+ "type": "string"
},
- "b": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
+ "sic": {
+ "description": "Standard Industrial Classification (SIC) id for the symbol. (https://en.wikipedia.org/wiki/Legal_Entity_Identifier)",
+ "type": "integer"
},
- "t": {
- "description": "The millisecond accuracy timestamp of the quote.",
- "type": "integer"
+ "similar": {
+ "description": "A list of ticker symbols for similar companies.",
+ "items": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "type": "array"
},
- "x": {
- "description": "The exchange ID on which this quote happened.",
- "type": "integer"
- }
- },
- "required": [
- "a",
- "b",
- "t",
- "x"
- ],
- "type": "object"
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "symbol": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
},
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "tags": {
+ "items": {
+ "description": "A list of words related to the company.",
+ "type": "string"
+ },
+ "type": "array"
},
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "type": {
+ "description": "The type or class of the security. (Full List of Ticker Types)",
+ "type": "string"
},
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "updated": {
+ "description": "The last time this company record was updated.",
+ "format": "date",
+ "type": "string"
},
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "url": {
+ "description": "The URL of the company's website",
+ "type": "string"
}
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v"
- ],
- "type": "object"
},
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "todaysChange": {
- "description": "The value of the change the from previous day.",
- "format": "double",
- "type": "number"
- },
- "todaysChangePerc": {
- "description": "The percentage change since the previous day.",
- "format": "double",
- "type": "number"
- },
- "updated": {
- "description": "The last updated timestamp.",
- "type": "integer"
- }
- },
- "required": [
- "day",
- "lastQuote",
- "min",
- "prevDay",
- "ticker",
- "todaysChange",
- "todaysChangePerc",
- "updated"
- ],
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "ForexTickerResults": {
- "properties": {
- "results": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "t"
- ],
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "High": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "HighIndices": {
- "description": "The highest value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "IndexAggsBase": {
- "properties": {
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status",
- "queryCount",
- "resultsCount",
- "request_id"
- ],
- "type": "object"
- },
- "Indicators": {
- "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n",
- "items": {
- "description": "The indicator code.\n",
- "type": "integer"
- },
- "type": "array"
- },
- "IndicesGroupedResults": {
- "properties": {
- "results": {
- "items": {
- "properties": {
- "c": {
- "description": "The close value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "t"
- ],
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "IndicesOpenClose": {
- "properties": {
- "afterHours": {
- "description": "The close value of the ticker symbol in after hours trading.",
- "format": "double",
- "type": "number"
- },
- "close": {
- "description": "The close value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "from": {
- "description": "The requested date.",
- "format": "date",
- "type": "string"
- },
- "high": {
- "description": "The highest value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "low": {
- "description": "The lowest value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "open": {
- "description": "The open value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "preMarket": {
- "description": "The open value of the ticker symbol in pre-market trading.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- },
- "symbol": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- "required": [
- "status",
- "from",
- "symbol",
- "open",
- "high",
- "low",
- "close"
- ],
- "type": "object"
- },
- "IndicesTickerResults": {
- "properties": {
- "results": {
- "items": {
- "properties": {
- "c": {
- "description": "The close value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "t"
- ],
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "Locales": {
- "properties": {
- "results": {
- "items": {
- "properties": {
- "locale": {
- "description": "An abbreviated country name.",
- "type": "string"
- },
- "name": {
- "description": "The name of the country.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "Low": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "LowIndices": {
- "description": "The lowest value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "Map": {
- "description": "A mapping of the keys returned in the results to their descriptive name and data types.",
- "properties": {
- "key": {
- "description": "A dynamic key from the results set",
- "properties": {
- "name": {
- "description": "The descriptive name of this results key",
- "type": "string"
- },
- "type": {
- "description": "The data type of this results key",
- "enum": [
- "string",
- "int",
- "int64",
- "float64"
- ],
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "type": "object"
- },
- "MarketHoliday": {
- "items": {
- "properties": {
- "close": {
- "description": "The market close time on the holiday (if it's not closed).",
- "format": "date-time",
- "type": "string"
- },
- "date": {
- "description": "The date of the holiday.",
- "format": "date",
- "type": "string"
+ "type": "object"
},
- "exchange": {
- "description": "Which market the record is for.",
- "type": "string"
+ "ConditionTypeMap": {
+ "properties": {
+ "condition": {
+ "description": "Polygon.io's mapping for condition codes. For more information, see our Trade Conditions Glossary.\n",
+ "type": "string"
+ }
+ },
+ "type": "object"
},
- "name": {
- "description": "The name of the holiday.",
- "type": "string"
+ "Conditions": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
},
- "open": {
- "description": "The market open time on the holiday (if it's not closed).",
- "format": "date-time",
- "type": "string"
+ "Count": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
},
- "status": {
- "description": "The status of the market on the holiday.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "type": "array"
- },
- "MarketStatus": {
- "properties": {
- "afterHours": {
- "description": "Whether or not the market is in post-market hours.",
- "type": "boolean"
- },
- "currencies": {
- "properties": {
- "crypto": {
- "description": "The status of the crypto market.",
- "type": "string"
- },
- "fx": {
- "description": "The status of the forex market.",
- "type": "string"
- }
+ "CryptoExchange": {
+ "items": {
+ "properties": {
+ "id": {
+ "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "market": {
+ "description": "Market data type this exchange contains ( crypto only currently )",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the exchange",
+ "type": "string"
+ },
+ "type": {
+ "description": "Type of exchange feed",
+ "type": "string"
+ },
+ "url": {
+ "description": "URL of this exchange",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "type",
+ "market",
+ "name",
+ "url"
+ ],
+ "type": "object"
+ },
+ "type": "array"
},
- "type": "object"
- },
- "earlyHours": {
- "description": "Whether or not the market is in pre-market hours.",
- "type": "boolean"
- },
- "exchanges": {
- "properties": {
- "nasdaq": {
- "description": "The status of the Nasdaq market.",
- "type": "string"
- },
- "nyse": {
- "description": "The status of the NYSE market.",
- "type": "string"
- },
- "otc": {
- "description": "The status of the OTC market.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "market": {
- "description": "The status of the market as a whole.",
- "type": "string"
- },
- "serverTime": {
- "description": "The current time of the server.",
- "format": "date-time",
- "type": "string"
- }
- },
- "type": "object"
- },
- "Markets": {
- "properties": {
- "results": {
- "description": "A list of supported markets.",
- "items": {
- "properties": {
- "desc": {
- "description": "A description of the market.",
- "type": "string"
- },
- "market": {
- "description": "The name of the market.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "MsLatency": {
- "description": "The milliseconds of latency for the query results.",
- "type": "integer"
- },
- "News": {
- "items": {
- "properties": {
- "image": {
- "description": "A URL of the image for the news article, if found.",
- "type": "string"
- },
- "keywords": {
- "description": "A list of common keywords related to the news article.",
- "items": {
- "description": "Common keywords of the news article.",
- "type": "string"
- },
- "type": "array"
- },
- "source": {
- "description": "The publication source of the article.",
- "type": "string"
- },
- "summary": {
- "description": "A summary of the news article.",
- "type": "string"
- },
- "symbols": {
- "description": "A list of ticker symbols relating to the article.",
- "items": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "type": "array"
- },
- "timestamp": {
- "description": "The timestamp of the news article.",
- "format": "date-time",
- "type": "string"
- },
- "title": {
- "description": "The title of the news article.",
- "type": "string"
- },
- "url": {
- "description": "A direct link to the news article from its source publication.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "type": "array"
- },
- "NumberOfItems": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "OTC": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "Open": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "OpenIndices": {
- "description": "The open value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "PaginationHooksBase": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "Price": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "QueryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
- },
- "RatingSection": {
- "properties": {
- "current": {
- "description": "Analyst Rating at current month",
- "example": 0,
- "type": "number"
- },
- "month1": {
- "description": "Analyst Ratings at 1 month in the future",
- "example": 1,
- "type": "number"
- },
- "month2": {
- "description": "Analyst Ratings at 2 month in the future",
- "example": 3,
- "type": "number"
- },
- "month3": {
- "description": "Analyst Ratings at 3 month in the future",
- "example": 4,
- "type": "number"
- },
- "month4": {
- "description": "Analyst Ratings at 4 month in the future",
- "example": 3,
- "type": "number"
- },
- "month5": {
- "description": "Analyst Ratings at 5 month in the future",
- "example": 2,
- "type": "number"
- }
- },
- "required": [
- "month1",
- "month2",
- "month3",
- "current"
- ],
- "type": "object"
- },
- "RequestID": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "RequestIdBase": {
- "properties": {
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- }
- },
- "required": [
- "request_id"
- ],
- "type": "object"
- },
- "SequenceNumber": {
- "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",
- "format": "int64",
- "type": "integer"
- },
- "Size": {
- "description": "The size of a trade (also known as volume).\n",
- "format": "double",
- "type": "number"
- },
- "SnapshotOHLCV": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v"
- ],
- "type": "object"
- },
- "SnapshotOHLCVVW": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "SnapshotOHLCVVWOtc": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "StandardBase": {
- "allOf": [
- {
- "properties": {
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- }
- },
- "required": [
- "request_id"
- ],
- "type": "object"
- },
- {
- "properties": {
- "count": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status"
- ],
- "type": "object"
- }
- ]
- },
- "Status": {
- "description": "The status of this request's response.",
- "type": "string"
- },
- "StatusBase": {
- "properties": {
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status"
- ],
- "type": "object"
- },
- "StatusCountBase": {
- "properties": {
- "count": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status"
- ],
- "type": "object"
- },
- "StockSymbol": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "StocksGroupedResults": {
- "properties": {
- "results": {
- "items": {
- "properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "t",
- "v",
- "T"
- ],
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "StocksOpenClose": {
- "properties": {
- "afterHours": {
- "description": "The close price of the ticker symbol in after hours trading.",
- "format": "double",
- "type": "number"
- },
- "close": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "from": {
- "description": "The requested date.",
- "format": "date",
- "type": "string"
- },
- "high": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "low": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "open": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "preMarket": {
- "description": "The open price of the ticker symbol in pre-market trading.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- },
- "symbol": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "volume": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "status",
- "from",
- "symbol",
- "open",
- "high",
- "low",
- "close",
- "volume"
- ],
- "type": "object"
- },
- "StocksSnapshotLastQuote": {
- "properties": {
- "P": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "S": {
- "description": "The ask size in lots.",
- "type": "integer"
- },
- "p": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The bid size in lots.",
- "type": "integer"
- },
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- }
- },
- "required": [
- "p",
- "s",
- "P",
- "S",
- "t"
- ],
- "type": "object"
- },
- "StocksSnapshotMinute": {
- "properties": {
- "av": {
- "description": "The accumulated volume.",
- "type": "integer"
- },
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "av",
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "StocksSnapshotMinuteOTC": {
- "properties": {
- "av": {
- "description": "The accumulated volume.",
- "type": "integer"
- },
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "av",
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "StocksSnapshotTicker": {
- "properties": {
- "ticker": {
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "lastQuote": {
- "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
+ "CryptoGroupedResults": {
"properties": {
- "P": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "S": {
- "description": "The ask size in lots.",
- "type": "integer"
- },
- "p": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The bid size in lots.",
- "type": "integer"
- },
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- }
+ "results": {
+ "items": {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t",
+ "T"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
},
- "required": [
- "p",
- "s",
- "P",
- "S",
- "t"
- ],
"type": "object"
- },
- "lastTrade": {
- "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.",
+ },
+ "CryptoHistoricTrades": {
"properties": {
- "c": {
- "description": "The trade conditions.",
- "items": {
- "type": "integer"
+ "day": {
+ "description": "The date that was evaluated from the request.",
+ "format": "date",
+ "type": "string"
},
- "type": "array"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The size (volume) of the trade.",
- "type": "integer"
- },
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- }
- },
- "required": [
- "c",
- "i",
- "p",
- "s",
- "t",
- "x"
- ],
- "type": "object"
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "properties": {
- "av": {
- "description": "The accumulated volume.",
- "type": "integer"
- },
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
+ "map": {
+ "description": "A map for shortened result keys.",
+ "type": "object"
+ },
+ "msLatency": {
+ "description": "The milliseconds of latency for the query results.",
+ "type": "integer"
+ },
+ "symbol": {
+ "description": "The symbol pair that was evaluated from the request.",
+ "type": "string"
+ },
+ "ticks": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size of a trade (also known as volume).\n",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "p",
+ "s",
+ "x",
+ "c",
+ "t",
+ "i"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
},
"required": [
- "av",
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
+ "day",
+ "map",
+ "msLatency",
+ "symbol",
+ "ticks"
],
"type": "object"
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
+ },
+ "CryptoLastTrade": {
"properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
+ "last": {
+ "properties": {
+ "conditions": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "exchange": {
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "type": "integer"
+ },
+ "price": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "size": {
+ "description": "The size of a trade (also known as volume).\n",
+ "format": "double",
+ "type": "number"
+ },
+ "timestamp": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "conditions",
+ "exchange",
+ "price",
+ "size",
+ "timestamp"
+ ],
+ "type": "object"
+ },
+ "symbol": {
+ "description": "The symbol pair that was evaluated from the request.",
+ "type": "string"
+ }
},
"required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
+ "symbol"
],
"type": "object"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "todaysChange": {
- "description": "The value of the change the from previous day.",
- "format": "double",
- "type": "number"
- },
- "todaysChangePerc": {
- "description": "The percentage change since the previous day.",
- "format": "double",
- "type": "number"
- },
- "updated": {
- "description": "The last updated timestamp.",
- "type": "integer"
- }
},
- "type": "object"
- }
- },
- "type": "object"
- },
- "StocksSnapshotTickers": {
- "properties": {
- "tickers": {
- "items": {
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "lastQuote": {
- "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
- "properties": {
- "P": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "S": {
- "description": "The ask size in lots.",
- "type": "integer"
- },
- "p": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
+ "CryptoOpenClose": {
+ "properties": {
+ "close": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "s": {
- "description": "The bid size in lots.",
- "type": "integer"
- },
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- }
- },
- "required": [
- "p",
- "s",
- "P",
- "S",
- "t"
- ],
- "type": "object"
- },
- "lastTrade": {
- "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.",
- "properties": {
- "c": {
- "description": "The trade conditions.",
- "items": {
- "type": "integer"
- },
- "type": "array"
+ "closingTrades": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size of a trade (also known as volume).\n",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "p",
+ "s",
+ "x",
+ "c",
+ "t",
+ "i"
+ ],
+ "type": "object"
+ },
+ "type": "array"
},
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
+ "day": {
+ "description": "The date requested.",
+ "format": "date",
+ "type": "string"
},
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
+ "isUTC": {
+ "description": "Whether or not the timestamps are in UTC timezone.",
+ "type": "boolean"
},
- "s": {
- "description": "The size (volume) of the trade.",
- "type": "integer"
+ "open": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
+ "openTrades": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size of a trade (also known as volume).\n",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "p",
+ "s",
+ "x",
+ "c",
+ "t",
+ "i"
+ ],
+ "type": "object"
+ },
+ "type": "array"
},
- "x": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
+ "symbol": {
+ "description": "The symbol pair that was evaluated from the request.",
+ "type": "string"
}
- },
- "required": [
- "c",
- "i",
- "p",
- "s",
- "t",
- "x"
- ],
- "type": "object"
},
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "properties": {
- "av": {
- "description": "The accumulated volume.",
- "type": "integer"
- },
+ "required": [
+ "symbol",
+ "isUTC",
+ "day",
+ "open",
+ "close",
+ "openTrades",
+ "closingTrades"
+ ],
+ "type": "object"
+ },
+ "CryptoSnapshotMinute": {
+ "properties": {
"c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
"h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
"l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "av",
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
},
"o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
},
"v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
"vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
}
- },
- "required": [
+ },
+ "required": [
"o",
"h",
"l",
"c",
"v",
- "vw"
- ],
- "type": "object"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "todaysChange": {
- "description": "The value of the change the from previous day.",
- "format": "double",
- "type": "number"
- },
- "todaysChangePerc": {
- "description": "The percentage change since the previous day.",
- "format": "double",
- "type": "number"
- },
- "updated": {
- "description": "The last updated timestamp.",
- "type": "integer"
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "StocksTickerResultsOTC": {
- "properties": {
- "results": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "t"
- ],
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "StocksV2Base": {
- "properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "f": {
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
- "type": "integer"
- },
- "q": {
- "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",
- "format": "int64",
- "type": "integer"
- },
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- },
- "y": {
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
- "type": "integer"
- }
- },
- "required": [
- "T",
- "t",
- "y",
- "f",
- "q"
- ],
- "type": "object"
- },
- "StocksV2NBBO": {
- "allOf": [
- {
- "properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "f": {
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
- "type": "integer"
- },
- "q": {
- "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",
- "format": "int64",
- "type": "integer"
- },
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- },
- "y": {
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
- "type": "integer"
- }
- },
- "required": [
- "T",
- "t",
- "y",
- "f",
- "q"
- ],
- "type": "object"
- },
- {
- "properties": {
- "P": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "S": {
- "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.",
- "type": "integer"
- },
- "X": {
- "allOf": [
- {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- {
- "description": "Ask Exchange Id"
- }
- ]
- },
- "c": {
- "description": "A list of condition codes.\n",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
- "type": "integer"
- },
- "type": "array"
- },
- "i": {
- "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n",
- "items": {
- "description": "The indicator code.\n",
- "type": "integer"
- },
- "type": "array"
- },
- "p": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "s": {
- "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.",
- "type": "integer"
- },
- "x": {
- "allOf": [
- {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- {
- "description": "Bid Exchange Id"
- }
- ]
- },
- "z": {
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n",
- "type": "integer"
- }
- },
- "required": [
- "c",
- "i",
- "p",
- "s",
- "x",
- "P",
- "S",
- "X",
- "z"
- ],
- "type": "object"
- }
- ]
- },
- "StocksV2NBBOs": {
- "properties": {
- "results": {
- "items": {
- "allOf": [
- {
- "properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "f": {
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
- "type": "integer"
- },
- "q": {
- "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",
- "format": "int64",
- "type": "integer"
- },
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- },
- "y": {
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
- "type": "integer"
- }
- },
- "required": [
- "T",
+ "vw",
"t",
- "y",
- "f",
- "q"
- ],
- "type": "object"
- },
- {
- "properties": {
- "P": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "S": {
- "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.",
- "type": "integer"
- },
- "X": {
- "allOf": [
- {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- {
- "description": "Ask Exchange Id"
- }
- ]
- },
- "c": {
- "description": "A list of condition codes.\n",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
- "type": "integer"
- },
- "type": "array"
- },
- "i": {
- "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n",
- "items": {
- "description": "The indicator code.\n",
- "type": "integer"
- },
- "type": "array"
- },
- "p": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "s": {
- "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.",
- "type": "integer"
- },
- "x": {
- "allOf": [
- {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- {
- "description": "Bid Exchange Id"
- }
- ]
- },
- "z": {
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n",
- "type": "integer"
- }
- },
- "required": [
- "c",
- "i",
- "p",
- "s",
- "x",
- "P",
- "S",
- "X",
- "z"
- ],
- "type": "object"
- }
- ]
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "StocksV2Trade": {
- "allOf": [
- {
- "properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "f": {
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
- "type": "integer"
- },
- "q": {
- "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",
- "format": "int64",
- "type": "integer"
- },
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- },
- "y": {
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
- "type": "integer"
- }
- },
- "required": [
- "T",
- "t",
- "y",
- "f",
- "q"
- ],
- "type": "object"
- },
- {
- "properties": {
- "c": {
- "description": "A list of condition codes.\n",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
- "type": "integer"
- },
- "type": "array"
- },
- "e": {
- "description": "The trade correction indicator.\n",
- "type": "integer"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "r": {
- "description": "The ID for the Trade Reporting Facility where the trade took place.\n",
- "type": "integer"
- },
- "s": {
- "description": "The size of a trade (also known as volume).\n",
- "format": "double",
- "type": "number"
- },
- "x": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- "z": {
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n",
- "type": "integer"
- }
- },
- "required": [
- "c",
- "i",
- "p",
- "s",
- "e",
- "x",
- "r",
- "z"
- ],
- "type": "object"
- }
- ]
- },
- "StocksV2Trades": {
- "properties": {
- "results": {
- "items": {
- "allOf": [
- {
- "properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "f": {
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
- "type": "integer"
- },
- "q": {
- "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",
- "format": "int64",
- "type": "integer"
- },
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- },
- "y": {
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
- "type": "integer"
- }
- },
- "required": [
- "T",
- "t",
- "y",
- "f",
- "q"
- ],
- "type": "object"
- },
- {
- "properties": {
- "c": {
- "description": "A list of condition codes.\n",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
- "type": "integer"
- },
- "type": "array"
- },
- "e": {
- "description": "The trade correction indicator.\n",
- "type": "integer"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "r": {
- "description": "The ID for the Trade Reporting Facility where the trade took place.\n",
- "type": "integer"
- },
- "s": {
- "description": "The size of a trade (also known as volume).\n",
- "format": "double",
- "type": "number"
- },
- "x": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- "z": {
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n",
- "type": "integer"
- }
- },
- "required": [
- "c",
- "i",
- "p",
- "s",
- "e",
- "x",
- "r",
- "z"
- ],
- "type": "object"
- }
- ]
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "SymbolPair": {
- "description": "The symbol pair that was evaluated from the request.",
- "type": "string"
- },
- "Tape": {
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n",
- "type": "integer"
- },
- "TickerBase": {
- "properties": {
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- "required": [
- "ticker"
- ],
- "type": "object"
- },
- "TickerResults": {
- "properties": {
- "results": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "t"
- ],
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "TickerSymbol": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "Timestamp": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "TimestampExchange": {
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
- "type": "integer"
- },
- "TimestampSIP": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- },
- "TimestampTRF": {
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
- "type": "integer"
- },
- "TodaysChange": {
- "description": "The value of the change the from previous day.",
- "format": "double",
- "type": "number"
- },
- "TodaysChangePerc": {
- "description": "The percentage change since the previous day.",
- "format": "double",
- "type": "number"
- },
- "TradeDetailsMapItem": {
- "properties": {
- "name": {
- "description": "Name of the trade detail item",
- "type": "string"
- },
- "type": {
- "description": "Actual type of the trade detail item",
- "type": "string"
- }
- },
- "type": "object"
- },
- "TradeExchange": {
- "description": "The exchange that this trade happened on.",
- "type": "integer"
- },
- "TradeId": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "Updated": {
- "description": "The last updated timestamp.",
- "type": "integer"
- },
- "V1LastBase": {
- "properties": {
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- },
- "symbol": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- "required": [
- "symbol",
- "status",
- "request_id"
- ],
- "type": "object"
- },
- "V2AggsBase": {
- "properties": {
- "adjusted": {
- "description": "Whether or not this response was adjusted for splits.",
- "type": "boolean"
- },
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status",
- "adjusted",
- "queryCount",
- "resultsCount",
- "request_id"
- ],
- "type": "object"
- },
- "V2LastBase": {
- "properties": {
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status",
- "request_id"
- ],
- "type": "object"
- },
- "V2TicksBase": {
- "properties": {
- "db_latency": {
- "description": "Latency in milliseconds for the query results from the database.",
- "type": "integer"
- },
- "results_count": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "success": {
- "description": "Whether or not this query was executed successfully.",
- "type": "boolean"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "Volume": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "VolumeWeight": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "securitySchemes": {
- "apiKey": {
- "in": "query",
- "name": "apiKey",
- "type": "apiKey"
- }
- }
- },
- "info": {
- "description": "The future of fintech.",
- "title": "Polygon API",
- "version": "1.0.0"
- },
- "openapi": "3.0.3",
- "paths": {
- "/v1/conversion/{from}/{to}": {
- "get": {
- "description": "Get currency conversions using the latest market conversion rates. Note than you can convert in both directions. For example USD to CAD or CAD to USD.",
- "operationId": "RealTimeCurrencyConversion",
- "parameters": [
- {
- "description": "The \"from\" symbol of the pair.",
- "example": "AUD",
- "in": "path",
- "name": "from",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The \"to\" symbol of the pair.",
- "example": "USD",
- "in": "path",
- "name": "to",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The amount to convert, with a decimal.",
- "example": 100,
- "in": "query",
- "name": "amount",
- "required": true,
- "schema": {
- "default": 100,
- "type": "number"
- }
- },
- {
- "description": "The decimal precision of the conversion. Defaults to 2 which is 2 decimal places accuracy.",
- "example": 2,
- "in": "query",
- "name": "precision",
- "schema": {
- "default": 2,
- "enum": [
- 0,
- 1,
- 2,
- 3,
- 4
- ],
- "type": "integer"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "converted": 73.14,
- "from": "AUD",
- "initialAmount": 100,
- "last": {
- "ask": 1.3673344,
- "bid": 1.3672596,
- "exchange": 48,
- "timestamp": 1605555313000
- },
- "status": "success",
- "to": "USD"
- },
- "schema": {
- "properties": {
- "converted": {
- "description": "The result of the conversion.",
- "format": "double",
- "type": "number"
- },
- "from": {
- "description": "The \"from\" currency symbol.",
- "type": "string"
- },
- "initialAmount": {
- "description": "The amount to convert.",
- "format": "double",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- },
- "last": {
- "properties": {
- "ask": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "bid": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "exchange": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/forex/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- "timestamp": {
- "description": "The Unix millisecond timestamp.",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMilliseconds",
- "path": "github.com/polygon-io/ptime"
- }
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "LastQuoteCurrencies"
- }
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- },
- "symbol": {
- "description": "The symbol pair that was evaluated from the request.",
- "type": "string"
- },
- "to": {
- "description": "The \"to\" currency symbol.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "ask,bid,exchange,timestamp\n1.3673344,1.3672596,48,1605555313000\n",
- "schema": {
- "type": "string"
- }
- }
+ "n"
+ ],
+ "type": "object"
},
- "description": "The last tick for this currency pair, plus the converted amount for the requested amount."
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Real-time Currency Conversion",
- "tags": [
- "fx:conversion"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "NBBO data",
- "name": "nbbo"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Forex data",
- "name": "fx"
- }
- }
- },
- "/v1/historic/crypto/{from}/{to}/{date}": {
- "get": {
- "description": "Get historic trade ticks for a cryptocurrency pair.\n",
- "parameters": [
- {
- "description": "The \"from\" symbol of the crypto pair.",
- "example": "BTC",
- "in": "path",
- "name": "from",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The \"to\" symbol of the crypto pair.",
- "example": "USD",
- "in": "path",
- "name": "to",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The date/day of the historic ticks to retrieve.",
- "example": "2020-10-14",
- "in": "path",
- "name": "date",
- "required": true,
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "The timestamp offset, used for pagination. This is the offset at which to start the results. Using the `timestamp` of the last result as the offset will give you the next page of results.\n",
- "in": "query",
- "name": "offset",
- "schema": {
- "type": "integer"
- }
- },
- {
- "description": "Limit the size of the response, max 10000.",
- "example": 100,
- "in": "query",
- "name": "limit",
- "schema": {
- "type": "integer"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "day": "2020-10-14T00:00:00.000Z",
- "map": {
- "c": "conditions",
- "p": "price",
- "s": "size",
- "t": "timestamp",
- "x": "exchange"
- },
- "msLatency": 1,
- "status": "success",
- "symbol": "BTC-USD",
- "ticks": [
- {
- "c": [
- 2
- ],
- "p": 15482.89,
- "s": 0.00188217,
- "t": 1604880000067,
- "x": 1
- },
- {
- "c": [
- 2
- ],
- "p": 15482.11,
- "s": 0.00161739,
- "t": 1604880000167,
- "x": 1
- }
- ],
- "type": "crypto"
- },
- "schema": {
- "allOf": [
- {
- "description": "The status of this request's response.",
- "type": "string"
- },
- {
- "properties": {
- "day": {
- "description": "The date that was evaluated from the request.",
- "format": "date",
- "type": "string"
- },
- "map": {
- "description": "A map for shortened result keys.",
- "type": "object"
- },
- "msLatency": {
- "description": "The milliseconds of latency for the query results.",
- "type": "integer"
- },
- "symbol": {
- "description": "The symbol pair that was evaluated from the request.",
- "type": "string"
- },
- "ticks": {
- "items": {
- "properties": {
- "c": {
- "description": "A list of condition codes.\n",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
- "type": "integer"
+ "CryptoSnapshotTicker": {
+ "properties": {
+ "ticker": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
},
- "type": "array"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "lastTrade": {
+ "allOf": [
+ {
+ "description": "The most recent trade for this ticker."
+ },
+ {
+ "properties": {
+ "c": {
+ "description": "The trade conditions.",
+ "items": {
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size (volume) of the trade.",
+ "type": "number"
+ },
+ "t": {
+ "description": "The millisecond accuracy timestamp. This is the timestamp of when the trade was generated at the exchange.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "c",
+ "i",
+ "p",
+ "s",
+ "t",
+ "x"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw",
+ "t",
+ "n"
+ ],
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
"type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ },
+ "todaysChange": {
+ "description": "The value of the change from the previous day.",
"format": "double",
"type": "number"
- },
- "s": {
- "description": "The size of a trade (also known as volume).\n",
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
"format": "double",
"type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
- "type": "integer"
- }
},
- "required": [
- "p",
- "s",
- "x",
- "c",
- "t",
- "i"
- ],
- "type": "object"
- },
- "type": "array"
- }
- },
- "required": [
- "day",
- "map",
- "msLatency",
- "symbol",
- "ticks"
- ],
- "type": "object"
- }
- ]
- }
- }
- },
- "description": "An array of crypto trade ticks."
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Historic Crypto Trades",
- "tags": [
- "crypto:trades"
- ],
- "x-polygon-deprecation": {
- "date": 1654056060000,
- "replaces": {
- "name": "Trades v3",
- "path": "get_v3_trades__cryptoticker"
- }
- },
- "x-polygon-entitlement-data-type": {
- "description": "Trade data",
- "name": "trades"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Crypto data",
- "name": "crypto"
- }
- }
- },
- "/v1/historic/forex/{from}/{to}/{date}": {
- "get": {
- "description": "Get historic ticks for a forex currency pair.\n",
- "parameters": [
- {
- "description": "The \"from\" symbol of the currency pair.\n\nExample: For **USD/JPY** the `from` would be **USD**.\n",
- "example": "AUD",
- "in": "path",
- "name": "from",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The \"to\" symbol of the currency pair.\n\nExample: For **USD/JPY** the `to` would be **JPY**.\n",
- "example": "USD",
- "in": "path",
- "name": "to",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The date/day of the historic ticks to retrieve.",
- "example": "2020-10-14",
- "in": "path",
- "name": "date",
- "required": true,
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "The timestamp offset, used for pagination. This is the offset at which to start the results. Using the `timestamp` of the last result as the offset will give you the next page of results.\n",
- "in": "query",
- "name": "offset",
- "schema": {
- "type": "integer"
- }
- },
- {
- "description": "Limit the size of the response, max 10000.",
- "example": 100,
- "in": "query",
- "name": "limit",
- "schema": {
- "type": "integer"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "day": "2020-10-14",
- "map": {
- "ap": "ask",
- "bp": "bid",
- "t": "timestamp"
- },
- "msLatency": "0",
- "pair": "AUD/USD",
- "status": "success",
- "ticks": [
- {
- "ap": 0.71703,
- "bp": 0.71701,
- "t": 1602633600000,
- "x": 48
- },
- {
- "ap": 0.71703,
- "bp": 0.717,
- "t": 1602633600000,
- "x": 48
- },
- {
- "ap": 0.71702,
- "bp": 0.717,
- "t": 1602633600000,
- "x": 48
- }
- ],
- "type": "forex"
- },
- "schema": {
- "allOf": [
- {
- "properties": {
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status"
- ],
- "type": "object"
- },
- {
- "properties": {
- "day": {
- "description": "The date that was evaluated from the request.",
- "format": "date",
- "type": "string"
- },
- "map": {
- "description": "A map for shortened result keys.",
- "type": "object"
- },
- "msLatency": {
- "description": "The milliseconds of latency for the query results.",
- "type": "integer"
- },
- "pair": {
- "description": "The currency pair that was evaluated from the request.",
- "type": "string"
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
},
- "ticks": {
- "items": {
- "properties": {
- "a": {
- "description": "The ask price.",
+ "required": [
+ "day",
+ "lastTrade",
+ "min",
+ "prevDay",
+ "ticker",
+ "todaysChange",
+ "todaysChangePerc",
+ "updated"
+ ],
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "CryptoSnapshotTickerFullBook": {
+ "properties": {
+ "data": {
+ "properties": {
+ "askCount": {
+ "description": "The combined total number of asks in the book.",
"format": "double",
"type": "number"
- },
- "b": {
- "description": "The bid price.",
+ },
+ "asks": {
+ "items": {
+ "properties": {
+ "p": {
+ "description": "The price of this book level.",
+ "format": "double",
+ "type": "number"
+ },
+ "x": {
+ "description": "A map of the exchange ID to number of shares at this price level.\n
\n
\n**Example:**\n
\n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n
\n
\nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n",
+ "type": "object"
+ }
+ },
+ "required": [
+ "p",
+ "x"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "bidCount": {
+ "description": "The combined total number of bids in the book.",
"format": "double",
"type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/forex/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- }
},
- "required": [
- "a",
- "b",
- "x",
- "t"
- ],
- "type": "object"
- },
- "type": "array"
- }
- },
- "required": [
- "day",
- "map",
- "msLatency",
- "pair",
- "ticks"
- ],
- "type": "object"
- }
- ]
- }
- }
- },
- "description": "An array of forex ticks"
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Historic Forex Ticks",
- "tags": [
- "fx:trades"
- ],
- "x-polygon-deprecation": {
- "date": 1654056060000,
- "replaces": {
- "name": "Quotes (BBO) v3",
- "path": "get_v3_quotes__fxticker"
- }
- },
- "x-polygon-entitlement-data-type": {
- "description": "NBBO data",
- "name": "nbbo"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Forex data",
- "name": "fx"
- }
- }
- },
- "/v1/indicators/ema/{cryptoTicker}": {
- "get": {
- "description": "Get the exponential moving average (EMA) for a ticker symbol over a given time range.",
- "operationId": "CryptoEMA",
- "parameters": [
- {
- "description": "The ticker symbol for which to get exponential moving average (EMA) data.",
- "example": "X:BTC-USD",
- "in": "path",
- "name": "cryptoTicker",
- "required": true,
- "schema": {
- "type": "string"
- },
- "x-polygon-go-id": "Ticker"
- },
- {
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "The size of the aggregate time window.",
- "example": "day",
- "in": "query",
- "name": "timespan",
- "schema": {
- "default": "day",
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "The window size used to calculate the exponential moving average (EMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
- "example": 50,
- "in": "query",
- "name": "window",
- "schema": {
- "default": 50,
- "type": "integer"
- }
- },
- {
- "description": "The price in the aggregate which will be used to calculate the exponential moving average. i.e. 'close' will result in using close prices to \ncalculate the exponential moving average (EMA).",
- "example": "close",
- "in": "query",
- "name": "series_type",
- "schema": {
- "default": "close",
- "enum": [
- "open",
- "high",
- "low",
- "close"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
- "in": "query",
- "name": "expand_underlying",
- "schema": {
- "default": false,
- "type": "boolean"
- }
- },
- {
- "description": "The order in which to return the results, ordered by timestamp.",
- "example": "desc",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 5000",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "maximum": 5000,
- "type": "integer"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v1/indicators/ema/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": {
- "underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25"
- },
- "values": [
- {
- "timestamp": 1517562000016,
- "value": 140.139
- }
- ]
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "results": {
- "properties": {
- "underlying": {
- "properties": {
- "aggregates": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "format": "float",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "float",
- "type": "number"
- }
+ "bids": {
+ "items": {
+ "properties": {
+ "p": {
+ "description": "The price of this book level.",
+ "format": "double",
+ "type": "number"
+ },
+ "x": {
+ "description": "A map of the exchange ID to number of shares at this price level.\n
\n
\n**Example:**\n
\n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n
\n
\nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n",
+ "type": "object"
+ }
+ },
+ "required": [
+ "p",
+ "x"
+ ],
+ "type": "object"
},
- "required": [
- "v",
- "vw",
- "o",
- "c",
- "h",
- "l",
- "t",
- "n"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
+ "type": "array"
+ },
+ "spread": {
+ "description": "The difference between the best bid and the best ask price across exchanges.",
+ "format": "double",
+ "type": "number"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
},
- "url": {
- "description": "The URL which can be used to request the underlying aggregates used in this request.",
- "type": "string"
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
}
- },
- "type": "object"
},
- "values": {
- "items": {
+ "required": [
+ "ticker",
+ "bids",
+ "asks",
+ "bidCount",
+ "askCount",
+ "spread",
+ "updated"
+ ],
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "CryptoSnapshotTickers": {
+ "properties": {
+ "tickers": {
+ "items": {
"properties": {
- "timestamp": {
- "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "value": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "lastTrade": {
+ "allOf": [
+ {
+ "description": "The most recent trade for this ticker."
+ },
+ {
+ "properties": {
+ "c": {
+ "description": "The trade conditions.",
+ "items": {
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size (volume) of the trade.",
+ "type": "number"
+ },
+ "t": {
+ "description": "The millisecond accuracy timestamp. This is the timestamp of when the trade was generated at the exchange.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "c",
+ "i",
+ "p",
+ "s",
+ "t",
+ "x"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw",
+ "t",
+ "n"
+ ],
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change from the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
}
- }
},
+ "required": [
+ "day",
+ "lastTrade",
+ "min",
+ "prevDay",
+ "ticker",
+ "todaysChange",
+ "todaysChangePerc",
+ "updated"
+ ],
"type": "object"
- },
- "type": "array"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "EMAResults"
- }
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ },
+ "type": "array"
}
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664164800000,297389,,0,,0,0,0,0,0,false,1664164800000,19846.01135387188\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664078400000,78936,,0,,0,0,0,0,0,false,1664078400000,19902.65703099573\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664064000000,78936,,0,,0,0,0,0,0,false,1664064000000,19948.29976695474\nX:BTCUSD,15457.24362826,19317.486,0,19529.04,19475.84,19651.2772302,18846.67,1664409600000,191936,,0,,0,0,0,0,0,false,1664409600000,19751.714760699124\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664337600000,225076,,0,,0,0,0,0,0,false,1664337600000,19762.974955013375\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664251200000,183075,,0,,0,0,0,0,0,false,1664251200000,19791.86053850303\nX:BTCUSD,2868.09828007,19069.8521,0,19210.31,18925.87,19400,18805.1,1663992000000,58721,,0,,0,0,0,0,0,false,1663992000000,19995.805471728403\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664323200000,225076,,0,,0,0,0,0,0,false,1664323200000,19777.128890923308\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664236800000,183075,,0,,0,0,0,0,0,false,1664236800000,19818.394438033767\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664150400000,297389,,0,,0,0,0,0,0,false,1664150400000,19873.767735662568\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Exponential Moving Average (EMA) data for each period."
- }
- },
- "summary": "Exponential Moving Average (EMA)",
- "tags": [
- "crpyto:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Crypto data",
- "name": "crypto"
- }
- },
- "x-polygon-ignore": true
- },
- "/v1/indicators/ema/{fxTicker}": {
- "get": {
- "description": "Get the exponential moving average (EMA) for a ticker symbol over a given time range.",
- "operationId": "ForexEMA",
- "parameters": [
- {
- "description": "The ticker symbol for which to get exponential moving average (EMA) data.",
- "example": "C:EUR-USD",
- "in": "path",
- "name": "fxTicker",
- "required": true,
- "schema": {
- "type": "string"
- },
- "x-polygon-go-id": "Ticker"
- },
- {
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "The size of the aggregate time window.",
- "example": "day",
- "in": "query",
- "name": "timespan",
- "schema": {
- "default": "day",
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not the aggregates used to calculate the exponential moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "default": true,
- "type": "boolean"
- }
- },
- {
- "description": "The window size used to calculate the exponential moving average (EMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
- "example": 50,
- "in": "query",
- "name": "window",
- "schema": {
- "default": 50,
- "type": "integer"
- }
- },
- {
- "description": "The price in the aggregate which will be used to calculate the exponential moving average. i.e. 'close' will result in using close prices to \ncalculate the exponential moving average (EMA).",
- "example": "close",
- "in": "query",
- "name": "series_type",
- "schema": {
- "default": "close",
- "enum": [
- "open",
- "high",
- "low",
- "close"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
- "in": "query",
- "name": "expand_underlying",
- "schema": {
- "default": false,
- "type": "boolean"
- }
- },
- {
- "description": "The order in which to return the results, ordered by timestamp.",
- "example": "desc",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 5000",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "maximum": 5000,
- "type": "integer"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v1/indicators/ema/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": {
- "underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25"
- },
- "values": [
- {
- "timestamp": 1517562000016,
- "value": 140.139
- }
- ]
- },
- "status": "OK"
},
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "type": "object"
+ },
+ "CryptoTick": {
+ "properties": {
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
},
- "results": {
- "properties": {
- "underlying": {
- "properties": {
- "aggregates": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "format": "float",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "float",
- "type": "number"
- }
- },
- "required": [
- "v",
- "vw",
- "o",
- "c",
- "h",
- "l",
- "t",
- "n"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
- },
- "url": {
- "description": "The URL which can be used to request the underlying aggregates used in this request.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "values": {
- "items": {
- "properties": {
- "timestamp": {
- "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "value": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "EMAResults"
- }
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664323200000,685,,0,,0,0,0,0,0,false,1664323200000,1.4915199239999994\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664164800000,550,,0,,0,0,0,0,0,false,1664164800000,1.4863299679999997\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664078400000,10,,0,,0,0,0,0,0,false,1664078400000,1.4826388699999997\nC:USDAUD,686,1.5442,0,1.53763,1.5404,1.5526022,1.537279,1664409600000,686,,0,,0,0,0,0,0,false,1664409600000,1.4942168479999998\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664251200000,536,,0,,0,0,0,0,0,false,1664251200000,1.4900704799999993\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664236800000,536,,0,,0,0,0,0,0,false,1664236800000,1.4882634499999994\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664150400000,550,,0,,0,0,0,0,0,false,1664150400000,1.4845906159999998\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664064000000,10,,0,,0,0,0,0,0,false,1664064000000,1.4809719239999999\nC:USDAUD,1,1.5314,0,1.5313936,1.5313936,1.5313936,1.5313936,1663977600000,1,,0,,0,0,0,0,0,false,1663977600000,1.4794745239999998\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664337600000,685,,0,,0,0,0,0,0,false,1664337600000,1.4928357579999996\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Exponential Moving Average (EMA) data for each period."
- }
- },
- "summary": "Exponential Moving Average (EMA)",
- "tags": [
- "fx:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Forex data",
- "name": "fx"
- }
- },
- "x-polygon-ignore": true
- },
- "/v1/indicators/ema/{indicesTicker}": {
- "get": {
- "description": "Get the exponential moving average (EMA) for a ticker symbol over a given time range.",
- "operationId": "IndicesEMA",
- "parameters": [
- {
- "description": "The ticker symbol for which to get exponential moving average (EMA) data.",
- "example": "I:SPX",
- "in": "path",
- "name": "indicesTicker",
- "required": true,
- "schema": {
- "type": "string"
- },
- "x-polygon-go-id": "Ticker"
- },
- {
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "The size of the aggregate time window.",
- "example": "day",
- "in": "query",
- "name": "timespan",
- "schema": {
- "default": "day",
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not the aggregates used to calculate the exponential moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "default": true,
- "type": "boolean"
- }
- },
- {
- "description": "The window size used to calculate the exponential moving average (EMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
- "example": 50,
- "in": "query",
- "name": "window",
- "schema": {
- "default": 50,
- "type": "integer"
- }
- },
- {
- "description": "The value in the aggregate which will be used to calculate the exponential moving average. i.e. 'close' will result in using close values to \ncalculate the exponential moving average (EMA).",
- "example": "close",
- "in": "query",
- "name": "series_type",
- "schema": {
- "default": "close",
- "enum": [
- "open",
- "high",
- "low",
- "close"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
- "in": "query",
- "name": "expand_underlying",
- "schema": {
- "default": false,
- "type": "boolean"
- }
- },
- {
- "description": "The order in which to return the results, ordered by timestamp.",
- "example": "desc",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 5000",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "maximum": 5000,
- "type": "integer"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v1/indicators/ema/I:SPX?cursor=YWRqdXN0ZWQ9dHJ1ZSZhcD0lN0IlMjJ2JTIyJTNBMCUyQyUyMm8lMjIlM0EwJTJDJTIyYyUyMiUzQTQwNDcuNDEwMDAwMDAwMDAwMyUyQyUyMmglMjIlM0EwJTJDJTIybCUyMiUzQTAlMkMlMjJ0JTIyJTNBMTY3ODA4MjQwMDAwMCU3RCZhcz0mZXhwYW5kX3VuZGVybHlpbmc9ZmFsc2UmbGltaXQ9MTAmb3JkZXI9ZGVzYyZzZXJpZXNfdHlwZT1jbG9zZSZ0aW1lc3Bhbj1kYXkmdGltZXN0YW1wLmx0PTE2NzgxNjUyMDAwMDAmd2luZG93PTU",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": {
- "underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/I:SPX/range/1/day/1063281600000/1678726291180?limit=35\u0026sort=desc"
- },
- "values": [
- {
- "timestamp": 1678165200000,
- "value": 4033.086001449211
- }
- ]
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "s": {
+ "description": "The size of a trade (also known as volume).\n",
+ "format": "double",
+ "type": "number"
},
- "results": {
- "properties": {
- "underlying": {
- "properties": {
- "aggregates": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "format": "float",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "float",
- "type": "number"
- }
- },
- "required": [
- "v",
- "vw",
- "o",
- "c",
- "h",
- "l",
- "t",
- "n"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
- },
- "url": {
- "description": "The URL which can be used to request the underlying aggregates used in this request.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "values": {
- "items": {
- "properties": {
- "timestamp": {
- "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "value": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "EMAResults"
- }
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "type": "integer"
}
- },
- "type": "object"
- }
- }
- },
- "description": "Exponential Moving Average (EMA) data for each period."
- }
- },
- "summary": "Exponential Moving Average (EMA)",
- "tags": [
- "indices:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Indices data",
- "name": "indices"
- }
- },
- "x-polygon-ignore": true
- },
- "/v1/indicators/ema/{optionsTicker}": {
- "get": {
- "description": "Get the exponential moving average (EMA) for a ticker symbol over a given time range.",
- "operationId": "OptionsEMA",
- "parameters": [
- {
- "description": "The ticker symbol for which to get exponential moving average (EMA) data.",
- "example": "O:SPY241220P00720000",
- "in": "path",
- "name": "optionsTicker",
- "required": true,
- "schema": {
- "type": "string"
+ },
+ "required": [
+ "p",
+ "s",
+ "x",
+ "c",
+ "t",
+ "i"
+ ],
+ "type": "object"
},
- "x-polygon-go-id": "Ticker"
- },
- {
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
+ "CryptoTradeExchange": {
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "type": "integer"
},
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "The size of the aggregate time window.",
- "example": "day",
- "in": "query",
- "name": "timespan",
- "schema": {
- "default": "day",
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not the aggregates used to calculate the exponential moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "default": true,
- "type": "boolean"
- }
- },
- {
- "description": "The window size used to calculate the exponential moving average (EMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
- "example": 50,
- "in": "query",
- "name": "window",
- "schema": {
- "default": 50,
- "type": "integer"
- }
- },
- {
- "description": "The price in the aggregate which will be used to calculate the exponential moving average. i.e. 'close' will result in using close prices to \ncalculate the exponential moving average (EMA).",
- "example": "close",
- "in": "query",
- "name": "series_type",
- "schema": {
- "default": "close",
- "enum": [
- "open",
- "high",
- "low",
- "close"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
- "in": "query",
- "name": "expand_underlying",
- "schema": {
- "default": false,
- "type": "boolean"
- }
- },
- {
- "description": "The order in which to return the results, ordered by timestamp.",
- "example": "desc",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 5000",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "maximum": 5000,
- "type": "integer"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v1/indicators/ema/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": {
- "underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25"
- },
- "values": [
- {
- "timestamp": 1517562000016,
- "value": 140.139
- }
- ]
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "Date": {
+ "oneOf": [
+ {
+ "format": "date-time",
+ "type": "string"
},
- "results": {
- "properties": {
- "underlying": {
- "properties": {
- "aggregates": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "format": "float",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "float",
- "type": "number"
- }
- },
- "required": [
- "v",
- "vw",
- "o",
- "c",
- "h",
- "l",
- "t",
- "n"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
- },
- "url": {
- "description": "The URL which can be used to request the underlying aggregates used in this request.",
- "type": "string"
- }
- },
- "type": "object"
+ {
+ "format": "date",
+ "type": "string"
+ }
+ ]
+ },
+ "Exchange": {
+ "items": {
+ "properties": {
+ "code": {
+ "description": "A unique identifier for the exchange internal to Polygon.io. This is not an industry code or ISO standard.",
+ "type": "string"
},
- "values": {
- "items": {
- "properties": {
- "timestamp": {
- "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "value": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- }
- },
- "type": "object"
- },
- "type": "array"
+ "id": {
+ "description": "The ID of the exchange.",
+ "type": "number"
+ },
+ "market": {
+ "description": "The market data type that this exchange contains.",
+ "type": "string"
+ },
+ "mic": {
+ "description": "The Market Identification Code or MIC as defined in ISO 10383 (https://en.wikipedia.org/wiki/Market_Identifier_Code).",
+ "type": "string"
+ },
+ "name": {
+ "description": "The name of the exchange.",
+ "type": "string"
+ },
+ "tape": {
+ "description": "The tape id of the exchange.",
+ "type": "string"
+ },
+ "type": {
+ "description": "The type of exchange.\n- TRF = Trade Reporting Facility\n- exchange = Reporting exchange on the tape\n",
+ "type": "string"
}
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "EMAResults"
- }
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649217600000,1,,0,,0,0,0,0,0,false,1649217600000,286.1730473491824 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649131200000,1,,0,,0,0,0,0,0,false,1649131200000,285.60990642465924 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649044800000,1,,0,,0,0,0,0,0,false,1649044800000,285.023780156278 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648785600000,1,,0,,0,0,0,0,0,false,1648785600000,284.4137303667383 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648526400000,1,,0,,0,0,0,0,0,false,1648526400000,282.43007426223943 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649304000000,1,,0,,0,0,0,0,0,false,1649304000000,286.7141043158811 O:SPY241220P00720000,2,270.49,0,270.49,270.49,270.49,270.49,1649390400000,1,,0,,0,0,0,0,0,false,1649390400000,286.0778649309446 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648699200000,1,,0,,0,0,0,0,0,false,1648699200000,283.77878058578887 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648612800000,1,,0,,0,0,0,0,0,false,1648612800000,283.11791448724966 O:SPY241220P00720000,3,277.8267,0,277.82,277.83,277.83,277.82,1649649600000,2,,0,,0,0,0,0,0,false,1649649600000,285.7544192473781",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Exponential Moving Average (EMA) data for each period."
- }
- },
- "summary": "Exponential Moving Average (EMA)",
- "tags": [
- "options:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Options data",
- "name": "options"
- }
- },
- "x-polygon-ignore": true
- },
- "/v1/indicators/ema/{stockTicker}": {
- "get": {
- "description": "Get the exponential moving average (EMA) for a ticker symbol over a given time range.",
- "operationId": "EMA",
- "parameters": [
- {
- "description": "The ticker symbol for which to get exponential moving average (EMA) data.",
- "example": "AAPL",
- "in": "path",
- "name": "stockTicker",
- "required": true,
- "schema": {
- "type": "string"
+ "type": "object"
+ },
+ "type": "array"
},
- "x-polygon-go-id": "Ticker"
- },
- {
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
+ "ExchangeId": {
+ "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
},
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "The size of the aggregate time window.",
- "example": "day",
- "in": "query",
- "name": "timespan",
- "schema": {
- "default": "day",
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not the aggregates used to calculate the exponential moving average are adjusted for splits. By default, aggregates are adjusted. Set this to false to get results that are NOT adjusted for splits.",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "default": true,
- "type": "boolean"
- }
- },
- {
- "description": "The window size used to calculate the exponential moving average (EMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
- "example": 50,
- "in": "query",
- "name": "window",
- "schema": {
- "default": 50,
- "type": "integer"
- }
- },
- {
- "description": "The price in the aggregate which will be used to calculate the exponential moving average. i.e. 'close' will result in using close prices to \ncalculate the exponential moving average (EMA).",
- "example": "close",
- "in": "query",
- "name": "series_type",
- "schema": {
- "default": "close",
- "enum": [
- "open",
- "high",
- "low",
- "close"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
- "in": "query",
- "name": "expand_underlying",
- "schema": {
- "default": false,
- "type": "boolean"
- }
- },
- {
- "description": "The order in which to return the results, ordered by timestamp.",
- "example": "desc",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 5000",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "maximum": 5000,
- "type": "integer"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v1/indicators/ema/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": {
- "underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25"
- },
- "values": [
- {
- "timestamp": 1517562000016,
- "value": 140.139
- }
- ]
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ "Financial": {
+ "properties": {
+ "cashChange": {
+ "example": 7202000000,
+ "type": "integer"
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "cashFlow": {
+ "example": 28293000000,
+ "type": "integer"
},
- "results": {
- "properties": {
- "underlying": {
- "properties": {
- "aggregates": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "format": "float",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "float",
- "type": "number"
- }
- },
- "required": [
- "v",
- "vw",
- "o",
- "c",
- "h",
- "l",
- "t",
- "n"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
- },
- "url": {
- "description": "The URL which can be used to request the underlying aggregates used in this request.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "values": {
- "items": {
- "properties": {
- "timestamp": {
- "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "value": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "EMAResults"
- }
+ "costOfRevenue": {
+ "example": 54381000000,
+ "type": "integer"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nAAPL,8.1599225E+07,152.5505,0,149.31,154.48,154.56,149.1,1663560000000,671961,,0,,0,0,0,0,0,false,1663560000000,163.17972071441582\nAAPL,8.4461761E+07,152.1354,0,152.74,151.76,154.72,149.945,1664251200000,683781,,0,,0,0,0,0,0,false,1664251200000,160.92194334973746\nAAPL,9.3308449E+07,156.1877,0,157.34,153.72,158.61,153.6,1663732800000,712645,,0,,0,0,0,0,0,false,1663732800000,162.5721451116157\nAAPL,1.07691097E+08,156.1317,0,153.4,156.9,158.08,153.08,1663646400000,792177,,0,,0,0,0,0,0,false,1663646400000,162.93345715698777\nAAPL,9.6031641E+07,150.0222,0,151.19,150.43,151.47,148.56,1663905600000,766888,,0,,0,0,0,0,0,false,1663905600000,161.72552880161066\nAAPL,8.6651514E+07,152.5709,0,152.38,152.74,154.47,150.91,1663819200000,686866,,0,,0,0,0,0,0,false,1663819200000,162.18657079351314\nAAPL,1.64879031E+08,150.2387,0,151.21,150.7,151.35,148.37,1663300800000,850358,,0,,0,0,0,0,0,false,1663300800000,163.53481135582055\nAAPL,1.27842348E+08,142.9013,0,146.1,142.48,146.72,140.68,1664424000000,1061605,,0,,0,0,0,0,0,false,1664424000000,159.78118646009983\nAAPL,1.46755122E+08,147.599,0,147.64,149.84,150.6414,144.84,1664337600000,1140818,,0,,0,0,0,0,0,false,1664337600000,160.48735733602226\nAAPL,9.3339409E+07,151.5222,0,149.66,150.77,153.7701,149.64,1664164800000,747666,,0,,0,0,0,0,0,false,1664164800000,161.29590022115534\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Exponential Moving Average (EMA) data for each period."
- }
- },
- "summary": "Exponential Moving Average (EMA)",
- "tags": [
- "stocks:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
- }
- }
- },
- "/v1/indicators/macd/{cryptoTicker}": {
- "get": {
- "description": "Get moving average convergence/divergence (MACD) data for a ticker symbol over a given time range.",
- "operationId": "CryptoMACD",
- "parameters": [
- {
- "description": "The ticker symbol for which to get MACD data.",
- "example": "X:BTC-USD",
- "in": "path",
- "name": "cryptoTicker",
- "required": true,
- "schema": {
- "type": "string"
- },
- "x-polygon-go-id": "Ticker"
- },
- {
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "The size of the aggregate time window.",
- "example": "day",
- "in": "query",
- "name": "timespan",
- "schema": {
- "default": "day",
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "The short window size used to calculate MACD data.",
- "example": 12,
- "in": "query",
- "name": "short_window",
- "schema": {
- "default": 12,
- "type": "integer"
- }
- },
- {
- "description": "The long window size used to calculate MACD data.",
- "example": 26,
- "in": "query",
- "name": "long_window",
- "schema": {
- "default": 26,
- "type": "integer"
- }
- },
- {
- "description": "The window size used to calculate the MACD signal line.",
- "example": 9,
- "in": "query",
- "name": "signal_window",
- "schema": {
- "default": 9,
- "type": "integer"
- }
- },
- {
- "description": "The price in the aggregate which will be used to calculate MACD data. i.e. 'close' will result in using close prices to \ncalculate the MACD.",
- "example": "close",
- "in": "query",
- "name": "series_type",
- "schema": {
- "default": "close",
- "enum": [
- "open",
- "high",
- "low",
- "close"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
- "in": "query",
- "name": "expand_underlying",
- "schema": {
- "default": false,
- "type": "boolean"
- }
- },
- {
- "description": "The order in which to return the results, ordered by timestamp.",
- "example": "desc",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 5000",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "maximum": 5000,
- "type": "integer"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v1/indicators/macd/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": {
- "underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25"
- },
- "values": [
- {
- "histogram": 38.3801666667,
- "signal": 106.9811666667,
- "timestamp": 1517562000016,
- "value": 145.3613333333
- },
- {
- "histogram": 41.098859136,
- "signal": 102.7386283473,
- "timestamp": 1517562001016,
- "value": 143.8374874833
- }
- ]
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ "currentAssets": {
+ "example": 143810000000,
+ "type": "integer"
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "currentCash": {
+ "example": 27491000000,
+ "type": "integer"
},
- "results": {
- "properties": {
- "underlying": {
- "properties": {
- "aggregates": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "format": "float",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "float",
- "type": "number"
- }
- },
- "required": [
- "v",
- "vw",
- "o",
- "c",
- "h",
- "l",
- "t",
- "n"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
- },
- "url": {
- "description": "The URL which can be used to request the underlying aggregates used in this request.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "values": {
- "items": {
- "properties": {
- "histogram": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- },
- "signal": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- },
- "timestamp": {
- "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "value": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "MACDResults"
- }
+ "currentDebt": {
+ "example": 18478000000,
+ "type": "integer"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value,signal,histogram\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664323200000,225076,,0,,0,0,0,0,0,false,1664323200000,-200.79662915774315,-281.5009533935604,80.70432423581724\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664236800000,183075,,0,,0,0,0,0,0,false,1664236800000,-264.55324270273195,-316.4388906203941,51.88564791766214\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664150400000,297389,,0,,0,0,0,0,0,false,1664150400000,-317.75700272815084,-339.5909474061525,21.83394467800167\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664078400000,78936,,0,,0,0,0,0,0,false,1664078400000,-350.23805379084297,-345.0494335756529,-5.188620215190042\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664064000000,78936,,0,,0,0,0,0,0,false,1664064000000,-347.75055091027025,-343.7522785218554,-3.9982723884148754\nX:BTCUSD,2868.09828007,19069.8521,0,19210.31,18925.87,19400,18805.1,1663992000000,58721,,0,,0,0,0,0,0,false,1663992000000,-339.51740285673077,-342.7527104247516,3.2353075680208576\nX:BTCUSD,11337.77105153,19346.509,0,19527.23,19487.24,19640,18846.95,1664409600000,142239,,0,,0,0,0,0,0,false,1664409600000,-130.70646519456568,-232.81921860513586,102.11275341057018\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664337600000,225076,,0,,0,0,0,0,0,false,1664337600000,-165.73322121465026,-258.3474069577784,92.61418574312813\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664251200000,183075,,0,,0,0,0,0,0,false,1664251200000,-242.62960978099727,-301.6770344525147,59.04742467151743\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664164800000,297389,,0,,0,0,0,0,0,false,1664164800000,-288.68772337443806,-329.4103025998096,40.72257922537153\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Moving Average Convergence/Divergence (MACD) data for each period."
- }
- },
- "summary": "Moving Average Convergence/Divergence (MACD)",
- "tags": [
- "crypto:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Crypto data",
- "name": "crypto"
- }
- },
- "x-polygon-ignore": true
- },
- "/v1/indicators/macd/{fxTicker}": {
- "get": {
- "description": "Get moving average convergence/divergence (MACD) data for a ticker symbol over a given time range.",
- "operationId": "ForexMACD",
- "parameters": [
- {
- "description": "The ticker symbol for which to get MACD data.",
- "example": "C:EUR-USD",
- "in": "path",
- "name": "fxTicker",
- "required": true,
- "schema": {
- "type": "string"
- },
- "x-polygon-go-id": "Ticker"
- },
- {
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "The size of the aggregate time window.",
- "example": "day",
- "in": "query",
- "name": "timespan",
- "schema": {
- "default": "day",
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not the aggregates used to calculate the MACD are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "default": true,
- "type": "boolean"
- }
- },
- {
- "description": "The short window size used to calculate MACD data.",
- "example": 12,
- "in": "query",
- "name": "short_window",
- "schema": {
- "default": 12,
- "type": "integer"
- }
- },
- {
- "description": "The long window size used to calculate MACD data.",
- "example": 26,
- "in": "query",
- "name": "long_window",
- "schema": {
- "default": 26,
- "type": "integer"
- }
- },
- {
- "description": "The window size used to calculate the MACD signal line.",
- "example": 9,
- "in": "query",
- "name": "signal_window",
- "schema": {
- "default": 9,
- "type": "integer"
- }
- },
- {
- "description": "The price in the aggregate which will be used to calculate the MACD. i.e. 'close' will result in using close prices to \ncalculate the MACD.",
- "example": "close",
- "in": "query",
- "name": "series_type",
- "schema": {
- "default": "close",
- "enum": [
- "open",
- "high",
- "low",
- "close"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
- "in": "query",
- "name": "expand_underlying",
- "schema": {
- "default": false,
- "type": "boolean"
- }
- },
- {
- "description": "The order in which to return the results, ordered by timestamp.",
- "example": "desc",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 5000",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "maximum": 5000,
- "type": "integer"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v1/indicators/macd/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": {
- "underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25"
- },
- "values": [
- {
- "histogram": 38.3801666667,
- "signal": 106.9811666667,
- "timestamp": 1517562000016,
- "value": 145.3613333333
- },
- {
- "histogram": 41.098859136,
- "signal": 102.7386283473,
- "timestamp": 1517562001016,
- "value": 143.8374874833
- }
- ]
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ "grossProfit": {
+ "example": 33912000000,
+ "type": "integer"
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "netIncome": {
+ "example": 20065000000,
+ "type": "integer"
},
- "results": {
- "properties": {
- "underlying": {
- "properties": {
- "aggregates": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "format": "float",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "float",
- "type": "number"
- }
- },
- "required": [
- "v",
- "vw",
- "o",
- "c",
- "h",
- "l",
- "t",
- "n"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
- },
- "url": {
- "description": "The URL which can be used to request the underlying aggregates used in this request.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "values": {
- "items": {
- "properties": {
- "histogram": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- },
- "signal": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- },
- "timestamp": {
- "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "value": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "MACDResults"
- }
+ "operatingExpense": {
+ "example": 7638000000,
+ "type": "integer"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ "operatingGainsLosses": {
+ "type": "number"
+ },
+ "operatingIncome": {
+ "example": 26274000000,
+ "type": "integer"
+ },
+ "operatingRevenue": {
+ "example": 88293000000,
+ "type": "integer"
+ },
+ "reportDate": {
+ "description": "Report Date",
+ "example": "2017-12-31T00:00:00.000Z",
+ "format": "date-time",
+ "type": "string"
+ },
+ "reportDateStr": {
+ "description": "Report date as non date format",
+ "example": "2017-12-31",
+ "type": "string"
+ },
+ "researchAndDevelopment": {
+ "example": 3407000000,
+ "type": "integer"
+ },
+ "shareholderEquity": {
+ "example": 140199000000,
+ "type": "integer"
+ },
+ "symbol": {
+ "description": "Stock Symbol",
+ "example": "AAPL",
+ "type": "string"
+ },
+ "totalAssets": {
+ "example": 406794000000,
+ "type": "integer"
+ },
+ "totalCash": {
+ "example": 77153000000,
+ "type": "integer"
+ },
+ "totalDebt": {
+ "example": 122400000000,
+ "type": "integer"
+ },
+ "totalLiabilities": {
+ "example": 266595000000,
+ "type": "integer"
+ },
+ "totalRevenue": {
+ "example": 88293000000,
+ "type": "integer"
}
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value,signal,histogram\nC:USDAUD,687,1.5442,0,1.53763,1.5386983,1.5526022,1.537279,1664409600000,687,,0,,0,0,0,0,0,false,1664409600000,0.0160095063995076,0.016240853664654657,-0.0002313472651470569\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664251200000,536,,0,,0,0,0,0,0,false,1664251200000,0.019060448457087098,0.015690709670065223,0.0033697387870218753\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664164800000,550,,0,,0,0,0,0,0,false,1664164800000,0.017190795754692623,0.013971241529748895,0.003219554224943728\nC:USDAUD,1,1.5314,0,1.5313936,1.5313936,1.5313936,1.5313936,1663977600000,1,,0,,0,0,0,0,0,false,1663977600000,0.014349509127189686,0.010792069356789809,0.0035574397703998766\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664337600000,685,,0,,0,0,0,0,0,false,1664337600000,0.0169083298713677,0.016298690480941423,0.0006096393904262767\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664323200000,685,,0,,0,0,0,0,0,false,1664323200000,0.017968564486413374,0.016146280633334852,0.001822283853078522\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664236800000,536,,0,,0,0,0,0,0,false,1664236800000,0.018356408747553177,0.014848274973309752,0.0035081337742434247\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664150400000,550,,0,,0,0,0,0,0,false,1664150400000,0.016441299960100686,0.01316635297351296,0.0032749469865877255\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664078400000,10,,0,,0,0,0,0,0,false,1664078400000,0.015245524601038118,0.012347616226866026,0.002897908374172092\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664064000000,10,,0,,0,0,0,0,0,false,1664064000000,0.014947418239455779,0.011623139133323003,0.0033242791061327756\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Moving Average Convergence/Divergence (MACD) data for each period."
- }
- },
- "summary": "Moving Average Convergence/Divergence (MACD)",
- "tags": [
- "fx:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Forex data",
- "name": "fx"
- }
- },
- "x-polygon-ignore": true
- },
- "/v1/indicators/macd/{indicesTicker}": {
- "get": {
- "description": "Get moving average convergence/divergence (MACD) for a ticker symbol over a given time range.",
- "operationId": "IndicesMACD",
- "parameters": [
- {
- "description": "The ticker symbol for which to get MACD data.",
- "example": "I:SPX",
- "in": "path",
- "name": "indicesTicker",
- "required": true,
- "schema": {
- "type": "string"
- },
- "x-polygon-go-id": "Ticker"
- },
- {
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "The size of the aggregate time window.",
- "example": "day",
- "in": "query",
- "name": "timespan",
- "schema": {
- "default": "day",
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not the aggregates used to calculate the MACD are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "default": true,
- "type": "boolean"
- }
- },
- {
- "description": "The short window size used to calculate MACD data.",
- "example": 12,
- "in": "query",
- "name": "short_window",
- "schema": {
- "default": 12,
- "type": "integer"
- }
- },
- {
- "description": "The long window size used to calculate MACD data.",
- "example": 26,
- "in": "query",
- "name": "long_window",
- "schema": {
- "default": 26,
- "type": "integer"
- }
- },
- {
- "description": "The window size used to calculate the MACD signal line.",
- "example": 9,
- "in": "query",
- "name": "signal_window",
- "schema": {
- "default": 9,
- "type": "integer"
- }
- },
- {
- "description": "The value in the aggregate which will be used to calculate the MACD. i.e. 'close' will result in using close values to \ncalculate the MACD.",
- "example": "close",
- "in": "query",
- "name": "series_type",
- "schema": {
- "default": "close",
- "enum": [
- "open",
- "high",
- "low",
- "close"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
- "in": "query",
- "name": "expand_underlying",
- "schema": {
- "default": false,
- "type": "boolean"
- }
- },
- {
- "description": "The order in which to return the results, ordered by timestamp.",
- "example": "desc",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 5000",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "maximum": 5000,
- "type": "integer"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v1/indicators/macd/I:SPX?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": {
- "underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/I:SPX/range/1/day/1063281600000/1678726155743?limit=129\u0026sort=desc"
- },
- "values": [
- {
- "histogram": 10.897861258863195,
- "signal": -25.314340901212,
- "timestamp": 1678168800000,
- "value": -14.416479642348804
- },
- {
- "histogram": 15.308854617117138,
- "signal": -28.038806215927796,
- "timestamp": 1678165200000,
- "value": -12.729951598810658
- }
- ]
- },
- "status": "OK"
},
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ "required": [
+ "symbol",
+ "reportDate",
+ "reportDateStr"
+ ],
+ "type": "object"
+ },
+ "Financials": {
+ "description": "Financials",
+ "properties": {
+ "EBITDAMargin": {
+ "format": "double",
+ "type": "number"
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "accumulatedOtherComprehensiveIncome": {
+ "type": "integer"
},
- "results": {
- "properties": {
- "underlying": {
- "properties": {
- "aggregates": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "format": "float",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "float",
- "type": "number"
- }
- },
- "required": [
- "v",
- "vw",
- "o",
- "c",
- "h",
- "l",
- "t",
- "n"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
- },
- "url": {
- "description": "The URL which can be used to request the underlying aggregates used in this request.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "values": {
- "items": {
- "properties": {
- "histogram": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- },
- "signal": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- },
- "timestamp": {
- "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "value": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "MACDResults"
- }
+ "accumulatedRetainedEarningsDeficit": {
+ "type": "integer"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- }
- },
- "description": "Moving Average Convergence/Divergence (MACD) data for each period."
- }
- },
- "summary": "Moving Average Convergence/Divergence (MACD)",
- "tags": [
- "indices:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Indices data",
- "name": "indices"
- }
- },
- "x-polygon-ignore": true
- },
- "/v1/indicators/macd/{optionsTicker}": {
- "get": {
- "description": "Get moving average convergence/divergence (MACD) for a ticker symbol over a given time range.",
- "operationId": "OptionsMACD",
- "parameters": [
- {
- "description": "The ticker symbol for which to get MACD data.",
- "example": "O:SPY241220P00720000",
- "in": "path",
- "name": "optionsTicker",
- "required": true,
- "schema": {
- "type": "string"
- },
- "x-polygon-go-id": "Ticker"
- },
- {
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "The size of the aggregate time window.",
- "example": "day",
- "in": "query",
- "name": "timespan",
- "schema": {
- "default": "day",
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not the aggregates used to calculate the MACD are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "default": true,
- "type": "boolean"
- }
- },
- {
- "description": "The short window size used to calculate MACD data.",
- "example": 12,
- "in": "query",
- "name": "short_window",
- "schema": {
- "default": 12,
- "type": "integer"
- }
- },
- {
- "description": "The long window size used to calculate MACD data.",
- "example": 26,
- "in": "query",
- "name": "long_window",
- "schema": {
- "default": 26,
- "type": "integer"
- }
- },
- {
- "description": "The window size used to calculate the MACD signal line.",
- "example": 9,
- "in": "query",
- "name": "signal_window",
- "schema": {
- "default": 9,
- "type": "integer"
- }
- },
- {
- "description": "The price in the aggregate which will be used to calculate the MACD. i.e. 'close' will result in using close prices to \ncalculate the MACD.",
- "example": "close",
- "in": "query",
- "name": "series_type",
- "schema": {
- "default": "close",
- "enum": [
- "open",
- "high",
- "low",
- "close"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
- "in": "query",
- "name": "expand_underlying",
- "schema": {
- "default": false,
- "type": "boolean"
- }
- },
- {
- "description": "The order in which to return the results, ordered by timestamp.",
- "example": "desc",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 5000",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "maximum": 5000,
- "type": "integer"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v1/indicators/macd/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": {
- "underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25"
- },
- "values": [
- {
- "histogram": 38.3801666667,
- "signal": 106.9811666667,
- "timestamp": 1517562000016,
- "value": 145.3613333333
- },
- {
- "histogram": 41.098859136,
- "signal": 102.7386283473,
- "timestamp": 1517562001016,
- "value": 143.8374874833
- }
- ]
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ "assetTurnover": {
+ "type": "integer"
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "assets": {
+ "type": "integer"
},
- "results": {
- "properties": {
- "underlying": {
- "properties": {
- "aggregates": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "format": "float",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "float",
- "type": "number"
- }
- },
- "required": [
- "v",
- "vw",
- "o",
- "c",
- "h",
- "l",
- "t",
- "n"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
- },
- "url": {
- "description": "The URL which can be used to request the underlying aggregates used in this request.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "values": {
- "items": {
- "properties": {
- "histogram": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- },
- "signal": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- },
- "timestamp": {
- "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "value": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "MACDResults"
- }
+ "assetsAverage": {
+ "type": "integer"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value,signal,histogram\nO:SPY241220P00720000,3,277.8267,0,277.82,277.83,277.83,277.82,1649649600000,2,,0,,0,0,0,0,0,false,1649649600000,-0.05105556065990413,3.5771695836806834,-3.6282251443405875\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649304000000,1,,0,,0,0,0,0,0,false,1649304000000,4.047960862047148,5.247666286053219,-1.199705424006071\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648785600000,1,,0,,0,0,0,0,0,false,1648785600000,5.255380647906861,6.466477305754766,-1.2110966578479045\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648699200000,1,,0,,0,0,0,0,0,false,1648699200000,5.591072756938104,6.769251470216741,-1.178178713278637\nO:SPY241220P00720000,2,270.49,0,270.49,270.49,270.49,270.49,1649390400000,1,,0,,0,0,0,0,0,false,1649390400000,1.4304642046162712,4.48422586976583,-3.053761665149559\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649217600000,1,,0,,0,0,0,0,0,false,1649217600000,4.32835898317461,5.547592642054737,-1.2192336588801274\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649131200000,1,,0,,0,0,0,0,0,false,1649131200000,4.623290999840208,5.852401056774768,-1.2291100569345605\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649044800000,1,,0,,0,0,0,0,0,false,1649044800000,4.932483632022979,6.159678571008409,-1.2271949389854298\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648612800000,1,,0,,0,0,0,0,0,false,1648612800000,5.93821326327344,7.063796148536399,-1.1255828852629595\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648526400000,1,,0,,0,0,0,0,0,false,1648526400000,6.294916771166584,7.345191869852139,-1.050275098685555\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Moving Average Convergence/Divergence (MACD) data for each period."
- }
- },
- "summary": "Moving Average Convergence/Divergence (MACD)",
- "tags": [
- "options:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Options data",
- "name": "options"
- }
- },
- "x-polygon-ignore": true
- },
- "/v1/indicators/macd/{stockTicker}": {
- "get": {
- "description": "Get moving average convergence/divergence (MACD) data for a ticker symbol over a given time range.",
- "operationId": "MACD",
- "parameters": [
- {
- "description": "The ticker symbol for which to get MACD data.",
- "example": "AAPL",
- "in": "path",
- "name": "stockTicker",
- "required": true,
- "schema": {
- "type": "string"
- },
- "x-polygon-go-id": "Ticker"
- },
- {
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "The size of the aggregate time window.",
- "example": "day",
- "in": "query",
- "name": "timespan",
- "schema": {
- "default": "day",
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not the aggregates used to calculate the MACD are adjusted for splits. By default, aggregates are adjusted. Set this to false to get results that are NOT adjusted for splits.",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "default": true,
- "type": "boolean"
- }
- },
- {
- "description": "The short window size used to calculate MACD data.",
- "example": 12,
- "in": "query",
- "name": "short_window",
- "schema": {
- "default": 12,
- "type": "integer"
- }
- },
- {
- "description": "The long window size used to calculate MACD data.",
- "example": 26,
- "in": "query",
- "name": "long_window",
- "schema": {
- "default": 26,
- "type": "integer"
- }
- },
- {
- "description": "The window size used to calculate the MACD signal line.",
- "example": 9,
- "in": "query",
- "name": "signal_window",
- "schema": {
- "default": 9,
- "type": "integer"
- }
- },
- {
- "description": "The price in the aggregate which will be used to calculate the MACD. i.e. 'close' will result in using close prices to \ncalculate the MACD.",
- "example": "close",
- "in": "query",
- "name": "series_type",
- "schema": {
- "default": "close",
- "enum": [
- "open",
- "high",
- "low",
- "close"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
- "in": "query",
- "name": "expand_underlying",
- "schema": {
- "default": false,
- "type": "boolean"
- }
- },
- {
- "description": "The order in which to return the results, ordered by timestamp.",
- "example": "desc",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 5000",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "maximum": 5000,
- "type": "integer"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v1/indicators/macd/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": {
- "underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25"
- },
- "values": [
- {
- "histogram": 38.3801666667,
- "signal": 106.9811666667,
- "timestamp": 1517562000016,
- "value": 145.3613333333
- },
- {
- "histogram": 41.098859136,
- "signal": 102.7386283473,
- "timestamp": 1517562001016,
- "value": 143.8374874833
- }
- ]
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ "assetsCurrent": {
+ "type": "integer"
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "assetsNonCurrent": {
+ "type": "integer"
},
- "results": {
- "properties": {
- "underlying": {
- "properties": {
- "aggregates": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "format": "float",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "float",
- "type": "number"
- }
- },
- "required": [
- "v",
- "vw",
- "o",
- "c",
- "h",
- "l",
- "t",
- "n"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
- },
- "url": {
- "description": "The URL which can be used to request the underlying aggregates used in this request.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "values": {
- "items": {
- "properties": {
- "histogram": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- },
- "signal": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- },
- "timestamp": {
- "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "value": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "MACDResults"
- }
+ "averageEquity": {
+ "type": "integer"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value,signal,histogram\nAAPL,1.27842348E+08,142.9013,0,146.1,142.48,146.72,140.68,1664424000000,1061605,,0,,0,0,0,0,0,false,1664424000000,-5.413804946923619,-3.8291158739479005,-1.5846890729757188\nAAPL,8.4461761E+07,152.1354,0,152.74,151.76,154.72,149.945,1664251200000,683781,,0,,0,0,0,0,0,false,1664251200000,-4.63165683097526,-3.098305244715017,-1.5333515862602427\nAAPL,9.3339409E+07,151.5222,0,149.66,150.77,153.7701,149.64,1664164800000,747666,,0,,0,0,0,0,0,false,1664164800000,-4.581291216131007,-2.7149673481499565,-1.86632386798105\nAAPL,9.3308449E+07,156.1877,0,157.34,153.72,158.61,153.6,1663732800000,712645,,0,,0,0,0,0,0,false,1663732800000,-3.6311474313744156,-1.1648824074663984,-2.4662650239080173\nAAPL,1.64879031E+08,150.2387,0,151.21,150.7,151.35,148.37,1663300800000,850358,,0,,0,0,0,0,0,false,1663300800000,-2.533545758578896,0.9308104167079131,-3.464356175286809\nAAPL,1.46755122E+08,147.599,0,147.64,149.84,150.6414,144.84,1664337600000,1140818,,0,,0,0,0,0,0,false,1664337600000,-4.771497049659786,-3.432943605703971,-1.3385534439558149\nAAPL,9.6031641E+07,150.0222,0,151.19,150.43,151.47,148.56,1663905600000,766888,,0,,0,0,0,0,0,false,1663905600000,-4.349569413677017,-2.2483863811546936,-2.1011830325223233\nAAPL,8.6651514E+07,152.5709,0,152.38,152.74,154.47,150.91,1663819200000,686866,,0,,0,0,0,0,0,false,1663819200000,-3.9559234852549707,-1.7230906230241128,-2.232832862230858\nAAPL,1.07691097E+08,156.1317,0,153.4,156.9,158.08,153.08,1663646400000,792177,,0,,0,0,0,0,0,false,1663646400000,-3.2635802145105117,-0.548316151489394,-2.7152640630211176\nAAPL,8.1599225E+07,152.5505,0,149.31,154.48,154.56,149.1,1663560000000,671961,,0,,0,0,0,0,0,false,1663560000000,-3.070742345502225,0.13049986426588545,-3.2012422097681106\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Moving Average Convergence/Divergence (MACD) data for each period."
- }
- },
- "summary": "Moving Average Convergence/Divergence (MACD)",
- "tags": [
- "stocks:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
- }
- }
- },
- "/v1/indicators/rsi/{cryptoTicker}": {
- "get": {
- "description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.",
- "operationId": "CryptoRSI",
- "parameters": [
- {
- "description": "The ticker symbol for which to get relative strength index (RSI) data.",
- "example": "X:BTC-USD",
- "in": "path",
- "name": "cryptoTicker",
- "required": true,
- "schema": {
- "type": "string"
- },
- "x-polygon-go-id": "Ticker"
- },
- {
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "The size of the aggregate time window.",
- "example": "day",
- "in": "query",
- "name": "timespan",
- "schema": {
- "default": "day",
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "The window size used to calculate the relative strength index (RSI). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
- "example": 14,
- "in": "query",
- "name": "window",
- "schema": {
- "default": 14,
- "type": "integer"
- }
- },
- {
- "description": "The price in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close prices to \ncalculate the relative strength index (RSI).",
- "example": "close",
- "in": "query",
- "name": "series_type",
- "schema": {
- "default": "close",
- "enum": [
- "open",
- "high",
- "low",
- "close"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
- "in": "query",
- "name": "expand_underlying",
- "schema": {
- "default": false,
- "type": "boolean"
- }
- },
- {
- "description": "The order in which to return the results, ordered by timestamp.",
- "example": "desc",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 5000",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "maximum": 5000,
- "type": "integer"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v1/indicators/rsi/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": {
- "underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25"
- },
- "values": [
- {
- "timestamp": 1517562000016,
- "value": 140.139
- }
- ]
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ "bookValuePerShare": {
+ "format": "double",
+ "type": "number"
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "calendarDate": {
+ "example": "2019-03-31",
+ "format": "date-time",
+ "type": "string"
},
- "results": {
- "properties": {
- "underlying": {
- "properties": {
- "aggregates": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "format": "float",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "float",
- "type": "number"
- }
- },
- "required": [
- "v",
- "vw",
- "o",
- "c",
- "h",
- "l",
- "t",
- "n"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
- },
- "url": {
- "description": "The URL which can be used to request the underlying aggregates used in this request.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "values": {
- "items": {
- "properties": {
- "timestamp": {
- "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "value": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "RSIResults"
- }
+ "capitalExpenditure": {
+ "type": "integer"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nX:BTCUSD,15457.24362826,19317.486,0,19529.04,19475.84,19651.2772302,18846.67,1664409600000,191936,,0,,0,0,0,0,0,false,1664409600000,52.040915721136884\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664251200000,183075,,0,,0,0,0,0,0,false,1664251200000,44.813590401722564\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664236800000,183075,,0,,0,0,0,0,0,false,1664236800000,44.813590401722564\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664164800000,297389,,0,,0,0,0,0,0,false,1664164800000,45.22751170711286\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664150400000,297389,,0,,0,0,0,0,0,false,1664150400000,45.22751170711286\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664078400000,78936,,0,,0,0,0,0,0,false,1664078400000,37.361825384231004\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664064000000,78936,,0,,0,0,0,0,0,false,1664064000000,37.361825384231004\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664337600000,225076,,0,,0,0,0,0,0,false,1664337600000,50.74235333598462\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664323200000,225076,,0,,0,0,0,0,0,false,1664323200000,50.74235333598462\nX:BTCUSD,2868.09828007,19069.8521,0,19210.31,18925.87,19400,18805.1,1663992000000,58721,,0,,0,0,0,0,0,false,1663992000000,39.159457782344376\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Relative strength index data for each period."
- }
- },
- "summary": "Relative Strength Index (RSI)",
- "tags": [
- "crpyto:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Crypto data",
- "name": "crypto"
- }
- },
- "x-polygon-ignore": true
- },
- "/v1/indicators/rsi/{fxTicker}": {
- "get": {
- "description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.",
- "operationId": "ForexRSI",
- "parameters": [
- {
- "description": "The ticker symbol for which to get relative strength index (RSI) data.",
- "example": "C:EUR-USD",
- "in": "path",
- "name": "fxTicker",
- "required": true,
- "schema": {
- "type": "string"
- },
- "x-polygon-go-id": "Ticker"
- },
- {
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "The size of the aggregate time window.",
- "example": "day",
- "in": "query",
- "name": "timespan",
- "schema": {
- "default": "day",
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not the aggregates used to calculate the relative strength index are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "default": true,
- "type": "boolean"
- }
- },
- {
- "description": "The window size used to calculate the relative strength index (RSI).",
- "example": 14,
- "in": "query",
- "name": "window",
- "schema": {
- "default": 14,
- "type": "integer"
- }
- },
- {
- "description": "The price in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close prices to \ncalculate the relative strength index (RSI).",
- "example": "close",
- "in": "query",
- "name": "series_type",
- "schema": {
- "default": "close",
- "enum": [
- "open",
- "high",
- "low",
- "close"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
- "in": "query",
- "name": "expand_underlying",
- "schema": {
- "default": false,
- "type": "boolean"
- }
- },
- {
- "description": "The order in which to return the results, ordered by timestamp.",
- "example": "desc",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 5000",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "maximum": 5000,
- "type": "integer"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v1/indicators/rsi/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": {
- "underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25"
- },
- "values": [
- {
- "timestamp": 1517562000016,
- "value": 140.139
- }
- ]
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ "cashAndEquivalents": {
+ "type": "integer"
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "cashAndEquivalentsUSD": {
+ "type": "integer"
},
- "results": {
- "properties": {
- "underlying": {
- "properties": {
- "aggregates": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "format": "float",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "float",
- "type": "number"
- }
- },
- "required": [
- "v",
- "vw",
- "o",
- "c",
- "h",
- "l",
- "t",
- "n"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
- },
- "url": {
- "description": "The URL which can be used to request the underlying aggregates used in this request.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "values": {
- "items": {
- "properties": {
- "timestamp": {
- "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "value": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "RSIResults"
- }
+ "consolidatedIncome": {
+ "type": "integer"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nC:USDAUD,686,1.5442,0,1.53763,1.5404,1.5526022,1.537279,1664409600000,686,,0,,0,0,0,0,0,false,1664409600000,65.97230488287764\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664164800000,550,,0,,0,0,0,0,0,false,1664164800000,79.3273623194404\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664150400000,550,,0,,0,0,0,0,0,false,1664150400000,79.32736231944038\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664064000000,10,,0,,0,0,0,0,0,false,1664064000000,74.64770184023104\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664337600000,685,,0,,0,0,0,0,0,false,1664337600000,64.43214811875563\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664323200000,685,,0,,0,0,0,0,0,false,1664323200000,64.43214811875563\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664251200000,536,,0,,0,0,0,0,0,false,1664251200000,81.95981214984681\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664236800000,536,,0,,0,0,0,0,0,false,1664236800000,81.95981214984683\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664078400000,10,,0,,0,0,0,0,0,false,1664078400000,74.64770184023104\nC:USDAUD,1,1.5314,0,1.5313936,1.5313936,1.5313936,1.5313936,1663977600000,1,,0,,0,0,0,0,0,false,1663977600000,74.98028072374902\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Relative strength index data for each period."
- }
- },
- "summary": "Relative Strength Index (RSI)",
- "tags": [
- "fx:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Forex data",
- "name": "fx"
- }
- },
- "x-polygon-ignore": true
- },
- "/v1/indicators/rsi/{indicesTicker}": {
- "get": {
- "description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.",
- "operationId": "IndicesRSI",
- "parameters": [
- {
- "description": "The ticker symbol for which to get relative strength index (RSI) data.",
- "example": "I:SPX",
- "in": "path",
- "name": "indicesTicker",
- "required": true,
- "schema": {
- "type": "string"
- },
- "x-polygon-go-id": "Ticker"
- },
- {
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "The size of the aggregate time window.",
- "example": "day",
- "in": "query",
- "name": "timespan",
- "schema": {
- "default": "day",
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not the aggregates used to calculate the relative strength index are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "default": true,
- "type": "boolean"
- }
- },
- {
- "description": "The window size used to calculate the relative strength index (RSI).",
- "example": 14,
- "in": "query",
- "name": "window",
- "schema": {
- "default": 14,
- "type": "integer"
- }
- },
- {
- "description": "The value in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close values to \ncalculate the relative strength index (RSI).",
- "example": "close",
- "in": "query",
- "name": "series_type",
- "schema": {
- "default": "close",
- "enum": [
- "open",
- "high",
- "low",
- "close"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
- "in": "query",
- "name": "expand_underlying",
- "schema": {
- "default": false,
- "type": "boolean"
- }
- },
- {
- "description": "The order in which to return the results, ordered by timestamp.",
- "example": "desc",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 5000",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "maximum": 5000,
- "type": "integer"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v1/indicators/rsi/I:SPX?cursor=YWRqdXN0ZWQ9dHJ1ZSZhcD0lN0IlMjJ2JTIyJTNBMCUyQyUyMm8lMjIlM0EwJTJDJTIyYyUyMiUzQTQwNDcuNDEwMDAwMDAwMDAwMyUyQyUyMmglMjIlM0EwJTJDJTIybCUyMiUzQTAlMkMlMjJ0JTIyJTNBMTY3ODA4MjQwMDAwMCU3RCZhcz0mZXhwYW5kX3VuZGVybHlpbmc9ZmFsc2UmbGltaXQ9MTAmb3JkZXI9ZGVzYyZzZXJpZXNfdHlwZT1jbG9zZSZ0aW1lc3Bhbj1kYXkmdGltZXN0YW1wLmx0PTE2NzgxNjUyMDAwMDAmd2luZG93PTU",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": {
- "underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/I:SPX/range/1/day/1063281600000/1678725829099?limit=35\u0026sort=desc"
- },
- "values": [
- {
- "timestamp": 1678165200000,
- "value": 82.621486402274
- }
- ]
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ "costOfRevenue": {
+ "type": "integer"
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "currentLiabilities": {
+ "type": "integer"
},
- "results": {
- "properties": {
- "underlying": {
- "properties": {
- "aggregates": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "format": "float",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "float",
- "type": "number"
- }
- },
- "required": [
- "v",
- "vw",
- "o",
- "c",
- "h",
- "l",
- "t",
- "n"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
- },
- "url": {
- "description": "The URL which can be used to request the underlying aggregates used in this request.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "values": {
- "items": {
- "properties": {
- "timestamp": {
- "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "value": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "RSIResults"
- }
+ "currentRatio": {
+ "format": "double",
+ "type": "number"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- }
- },
- "description": "Relative Strength Index (RSI) data for each period."
- }
- },
- "summary": "Relative Strength Index (RSI)",
- "tags": [
- "indices:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Indices data",
- "name": "indices"
- }
- },
- "x-polygon-ignore": true
- },
- "/v1/indicators/rsi/{optionsTicker}": {
- "get": {
- "description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.",
- "operationId": "OptionsRSI",
- "parameters": [
- {
- "description": "The ticker symbol for which to get relative strength index (RSI) data.",
- "example": "O:SPY241220P00720000",
- "in": "path",
- "name": "optionsTicker",
- "required": true,
- "schema": {
- "type": "string"
- },
- "x-polygon-go-id": "Ticker"
- },
- {
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "The size of the aggregate time window.",
- "example": "day",
- "in": "query",
- "name": "timespan",
- "schema": {
- "default": "day",
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not the aggregates used to calculate the relative strength index are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "default": true,
- "type": "boolean"
- }
- },
- {
- "description": "The window size used to calculate the relative strength index (RSI).",
- "example": 14,
- "in": "query",
- "name": "window",
- "schema": {
- "default": 14,
- "type": "integer"
- }
- },
- {
- "description": "The price in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close prices to \ncalculate the relative strength index (RSI).",
- "example": "close",
- "in": "query",
- "name": "series_type",
- "schema": {
- "default": "close",
- "enum": [
- "open",
- "high",
- "low",
- "close"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
- "in": "query",
- "name": "expand_underlying",
- "schema": {
- "default": false,
- "type": "boolean"
- }
- },
- {
- "description": "The order in which to return the results, ordered by timestamp.",
- "example": "desc",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 5000",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "maximum": 5000,
- "type": "integer"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v1/indicators/rsi/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": {
- "underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25"
- },
- "values": [
- {
- "timestamp": 1517562000016,
- "value": 140.139
- }
- ]
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ "debt": {
+ "type": "integer"
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "debtCurrent": {
+ "type": "integer"
},
- "results": {
- "properties": {
- "underlying": {
- "properties": {
- "aggregates": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "format": "float",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "float",
- "type": "number"
- }
- },
- "required": [
- "v",
- "vw",
- "o",
- "c",
- "h",
- "l",
- "t",
- "n"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
- },
- "url": {
- "description": "The URL which can be used to request the underlying aggregates used in this request.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "values": {
- "items": {
- "properties": {
- "timestamp": {
- "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "value": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "RSIResults"
- }
+ "debtNonCurrent": {
+ "type": "integer"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nO:SPY241220P00720000,3,277.8267,0,277.82,277.83,277.83,277.82,1649649600000,2,,0,,0,0,0,0,0,false,1649649600000,30.837887188419387\nO:SPY241220P00720000,2,270.49,0,270.49,270.49,270.49,270.49,1649390400000,1,,0,,0,0,0,0,0,false,1649390400000,15.546598157051605\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648785600000,1,,0,,0,0,0,0,0,false,1648785600000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648699200000,1,,0,,0,0,0,0,0,false,1648699200000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648612800000,1,,0,,0,0,0,0,0,false,1648612800000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648526400000,1,,0,,0,0,0,0,0,false,1648526400000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649304000000,1,,0,,0,0,0,0,0,false,1649304000000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649217600000,1,,0,,0,0,0,0,0,false,1649217600000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649131200000,1,,0,,0,0,0,0,0,false,1649131200000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649044800000,1,,0,,0,0,0,0,0,false,1649044800000,88.61520575036505\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Relative Strength Index (RSI) data for each period."
- }
- },
- "summary": "Relative Strength Index (RSI)",
- "tags": [
- "options:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Options data",
- "name": "options"
- }
- },
- "x-polygon-ignore": true
- },
- "/v1/indicators/rsi/{stockTicker}": {
- "get": {
- "description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.",
- "operationId": "RSI",
- "parameters": [
- {
- "description": "The ticker symbol for which to get relative strength index (RSI) data.",
- "example": "AAPL",
- "in": "path",
- "name": "stockTicker",
- "required": true,
- "schema": {
- "type": "string"
- },
- "x-polygon-go-id": "Ticker"
- },
- {
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "The size of the aggregate time window.",
- "example": "day",
- "in": "query",
- "name": "timespan",
- "schema": {
- "default": "day",
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not the aggregates used to calculate the relative strength index are adjusted for splits. By default, aggregates are adjusted. Set this to false to get results that are NOT adjusted for splits.",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "default": true,
- "type": "boolean"
- }
- },
- {
- "description": "The window size used to calculate the relative strength index (RSI).",
- "example": 14,
- "in": "query",
- "name": "window",
- "schema": {
- "default": 14,
- "type": "integer"
- }
- },
- {
- "description": "The price in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close prices to \ncalculate the relative strength index (RSI).",
- "example": "close",
- "in": "query",
- "name": "series_type",
- "schema": {
- "default": "close",
- "enum": [
- "open",
- "high",
- "low",
- "close"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
- "in": "query",
- "name": "expand_underlying",
- "schema": {
- "default": false,
- "type": "boolean"
- }
- },
- {
- "description": "The order in which to return the results, ordered by timestamp.",
- "example": "desc",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 5000",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "maximum": 5000,
- "type": "integer"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v1/indicators/rsi/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": {
- "underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25"
- },
- "values": [
- {
- "timestamp": 1517562000016,
- "value": 140.139
- }
- ]
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ "debtToEquityRatio": {
+ "format": "double",
+ "type": "number"
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "debtUSD": {
+ "type": "integer"
},
- "results": {
- "properties": {
- "underlying": {
- "properties": {
- "aggregates": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "format": "float",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "float",
- "type": "number"
- }
- },
- "required": [
- "v",
- "vw",
- "o",
- "c",
- "h",
- "l",
- "t",
- "n"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
- },
- "url": {
- "description": "The URL which can be used to request the underlying aggregates used in this request.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "values": {
- "items": {
- "properties": {
- "timestamp": {
- "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "value": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "RSIResults"
- }
+ "deferredRevenue": {
+ "type": "integer"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nAAPL,1.27849501E+08,142.9012,0,146.1,142.48,146.72,140.68,1664424000000,1061692,,0,,0,0,0,0,0,false,1664424000000,23.065352237561996\nAAPL,1.46755122E+08,147.599,0,147.64,149.84,150.6414,144.84,1664337600000,1140818,,0,,0,0,0,0,0,false,1664337600000,29.877761913419718\nAAPL,9.3339409E+07,151.5222,0,149.66,150.77,153.7701,149.64,1664164800000,747666,,0,,0,0,0,0,0,false,1664164800000,29.58201330468151\nAAPL,8.1599225E+07,152.5505,0,149.31,154.48,154.56,149.1,1663560000000,671961,,0,,0,0,0,0,0,false,1663560000000,30.233508748331047\nAAPL,1.64879031E+08,150.2387,0,151.21,150.7,151.35,148.37,1663300800000,850358,,0,,0,0,0,0,0,false,1663300800000,19.857312489527956\nAAPL,8.4461761E+07,152.1354,0,152.74,151.76,154.72,149.945,1664251200000,683781,,0,,0,0,0,0,0,false,1664251200000,32.18008680069761\nAAPL,9.6031641E+07,150.0222,0,151.19,150.43,151.47,148.56,1663905600000,766888,,0,,0,0,0,0,0,false,1663905600000,28.71109953239781\nAAPL,8.6651514E+07,152.5709,0,152.38,152.74,154.47,150.91,1663819200000,686866,,0,,0,0,0,0,0,false,1663819200000,31.140902927103383\nAAPL,9.3308449E+07,156.1877,0,157.34,153.72,158.61,153.6,1663732800000,712645,,0,,0,0,0,0,0,false,1663732800000,32.21491128713248\nAAPL,1.07691097E+08,156.1317,0,153.4,156.9,158.08,153.08,1663646400000,792177,,0,,0,0,0,0,0,false,1663646400000,35.950871523070575\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Relative strength Index data for each period."
- }
- },
- "summary": "Relative Strength Index (RSI)",
- "tags": [
- "stocks:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
- }
- }
- },
- "/v1/indicators/sma/{cryptoTicker}": {
- "get": {
- "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.",
- "operationId": "CryptoSMA",
- "parameters": [
- {
- "description": "The ticker symbol for which to get simple moving average (SMA) data.",
- "example": "X:BTC-USD",
- "in": "path",
- "name": "cryptoTicker",
- "required": true,
- "schema": {
- "type": "string"
- },
- "x-polygon-go-id": "Ticker"
- },
- {
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "The size of the aggregate time window.",
- "example": "day",
- "in": "query",
- "name": "timespan",
- "schema": {
- "default": "day",
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
- "example": 50,
- "in": "query",
- "name": "window",
- "schema": {
- "default": 50,
- "type": "integer"
- }
- },
- {
- "description": "The price in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close prices to \ncalculate the simple moving average (SMA).",
- "example": "close",
- "in": "query",
- "name": "series_type",
- "schema": {
- "default": "close",
- "enum": [
- "open",
- "high",
- "low",
- "close"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
- "in": "query",
- "name": "expand_underlying",
- "schema": {
- "default": false,
- "type": "boolean"
- }
- },
- {
- "description": "The order in which to return the results, ordered by timestamp.",
- "example": "desc",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 5000",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "maximum": 5000,
- "type": "integer"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v1/indicators/sma/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": {
- "underlying": {
- "aggregates": [
- {
- "c": 75.0875,
- "h": 75.15,
- "l": 73.7975,
- "n": 1,
- "o": 74.06,
- "t": 1577941200000,
- "v": 135647456,
- "vw": 74.6099
- },
- {
- "c": 74.3575,
- "h": 75.145,
- "l": 74.125,
- "n": 1,
- "o": 74.2875,
- "t": 1578027600000,
- "v": 146535512,
- "vw": 74.7026
- }
- ],
- "url": "https://api.polygon.io/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25"
- },
- "values": [
- {
- "timestamp": 1517562000016,
- "value": 140.139
- }
- ]
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ "deposits": {
+ "type": "integer"
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "depreciationAmortizationAndAccretion": {
+ "type": "integer"
},
- "results": {
- "properties": {
- "underlying": {
- "properties": {
- "aggregates": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "format": "float",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "float",
- "type": "number"
- }
- },
- "required": [
- "v",
- "vw",
- "o",
- "c",
- "h",
- "l",
- "t",
- "n"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
- },
- "url": {
- "description": "The URL which can be used to request the underlying aggregates used in this request.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "values": {
- "items": {
- "properties": {
- "timestamp": {
- "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "value": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "SMAResults"
- }
+ "dividendYield": {
+ "type": "integer"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664164800000,297389,,0,,0,0,0,0,0,false,1664164800000,19846.01135387188\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664078400000,78936,,0,,0,0,0,0,0,false,1664078400000,19902.65703099573\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664064000000,78936,,0,,0,0,0,0,0,false,1664064000000,19948.29976695474\nX:BTCUSD,15457.24362826,19317.486,0,19529.04,19475.84,19651.2772302,18846.67,1664409600000,191936,,0,,0,0,0,0,0,false,1664409600000,19751.714760699124\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664337600000,225076,,0,,0,0,0,0,0,false,1664337600000,19762.974955013375\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664251200000,183075,,0,,0,0,0,0,0,false,1664251200000,19791.86053850303\nX:BTCUSD,2868.09828007,19069.8521,0,19210.31,18925.87,19400,18805.1,1663992000000,58721,,0,,0,0,0,0,0,false,1663992000000,19995.805471728403\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664323200000,225076,,0,,0,0,0,0,0,false,1664323200000,19777.128890923308\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664236800000,183075,,0,,0,0,0,0,0,false,1664236800000,19818.394438033767\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664150400000,297389,,0,,0,0,0,0,0,false,1664150400000,19873.767735662568\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Simple Moving Average (SMA) data for each period."
- }
- },
- "summary": "Simple Moving Average (SMA)",
- "tags": [
- "crpyto:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Crypto data",
- "name": "crypto"
- }
- },
- "x-polygon-ignore": true
- },
- "/v1/indicators/sma/{fxTicker}": {
- "get": {
- "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.",
- "operationId": "ForexSMA",
- "parameters": [
- {
- "description": "The ticker symbol for which to get simple moving average (SMA) data.",
- "example": "C:EUR-USD",
- "in": "path",
- "name": "fxTicker",
- "required": true,
- "schema": {
- "type": "string"
- },
- "x-polygon-go-id": "Ticker"
- },
- {
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "The size of the aggregate time window.",
- "example": "day",
- "in": "query",
- "name": "timespan",
- "schema": {
- "default": "day",
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not the aggregates used to calculate the simple moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "default": true,
- "type": "boolean"
- }
- },
- {
- "description": "The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
- "example": 50,
- "in": "query",
- "name": "window",
- "schema": {
- "default": 50,
- "type": "integer"
- }
- },
- {
- "description": "The price in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close prices to \ncalculate the simple moving average (SMA).",
- "example": "close",
- "in": "query",
- "name": "series_type",
- "schema": {
- "default": "close",
- "enum": [
- "open",
- "high",
- "low",
- "close"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
- "in": "query",
- "name": "expand_underlying",
- "schema": {
- "default": false,
- "type": "boolean"
- }
- },
- {
- "description": "The order in which to return the results, ordered by timestamp.",
- "example": "desc",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 5000",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "maximum": 5000,
- "type": "integer"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v1/indicators/sma/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": {
- "underlying": {
- "aggregates": [
- {
- "c": 75.0875,
- "h": 75.15,
- "l": 73.7975,
- "n": 1,
- "o": 74.06,
- "t": 1577941200000,
- "v": 135647456,
- "vw": 74.6099
- },
- {
- "c": 74.3575,
- "h": 75.145,
- "l": 74.125,
- "n": 1,
- "o": 74.2875,
- "t": 1578027600000,
- "v": 146535512,
- "vw": 74.7026
- }
- ],
- "url": "https://api.polygon.io/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25"
- },
- "values": [
- {
- "timestamp": 1517562000016,
- "value": 140.139
- }
- ]
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ "dividendsPerBasicCommonShare": {
+ "type": "integer"
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "earningBeforeInterestTaxes": {
+ "type": "integer"
},
- "results": {
- "properties": {
- "underlying": {
- "properties": {
- "aggregates": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "format": "float",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "float",
- "type": "number"
- }
- },
- "required": [
- "v",
- "vw",
- "o",
- "c",
- "h",
- "l",
- "t",
- "n"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
- },
- "url": {
- "description": "The URL which can be used to request the underlying aggregates used in this request.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "values": {
- "items": {
- "properties": {
- "timestamp": {
- "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "value": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "SMAResults"
- }
+ "earningBeforeInterestTaxesUSD": {
+ "type": "integer"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664323200000,685,,0,,0,0,0,0,0,false,1664323200000,1.4915199239999994\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664164800000,550,,0,,0,0,0,0,0,false,1664164800000,1.4863299679999997\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664078400000,10,,0,,0,0,0,0,0,false,1664078400000,1.4826388699999997\nC:USDAUD,686,1.5442,0,1.53763,1.5404,1.5526022,1.537279,1664409600000,686,,0,,0,0,0,0,0,false,1664409600000,1.4942168479999998\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664251200000,536,,0,,0,0,0,0,0,false,1664251200000,1.4900704799999993\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664236800000,536,,0,,0,0,0,0,0,false,1664236800000,1.4882634499999994\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664150400000,550,,0,,0,0,0,0,0,false,1664150400000,1.4845906159999998\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664064000000,10,,0,,0,0,0,0,0,false,1664064000000,1.4809719239999999\nC:USDAUD,1,1.5314,0,1.5313936,1.5313936,1.5313936,1.5313936,1663977600000,1,,0,,0,0,0,0,0,false,1663977600000,1.4794745239999998\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664337600000,685,,0,,0,0,0,0,0,false,1664337600000,1.4928357579999996\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Simple Moving Average (SMA) data for each period."
- }
- },
- "summary": "Simple Moving Average (SMA)",
- "tags": [
- "fx:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Forex data",
- "name": "fx"
- }
- },
- "x-polygon-ignore": true
- },
- "/v1/indicators/sma/{indicesTicker}": {
- "get": {
- "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.",
- "operationId": "IndicesSMA",
- "parameters": [
- {
- "description": "The ticker symbol for which to get simple moving average (SMA) data.",
- "example": "I:SPX",
- "in": "path",
- "name": "indicesTicker",
- "required": true,
- "schema": {
- "type": "string"
- },
- "x-polygon-go-id": "Ticker"
- },
- {
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "The size of the aggregate time window.",
- "example": "day",
- "in": "query",
- "name": "timespan",
- "schema": {
- "default": "day",
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not the aggregates used to calculate the simple moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "default": true,
- "type": "boolean"
- }
- },
- {
- "description": "The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
- "example": 50,
- "in": "query",
- "name": "window",
- "schema": {
- "default": 50,
- "type": "integer"
- }
- },
- {
- "description": "The value in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close values to \ncalculate the simple moving average (SMA).",
- "example": "close",
- "in": "query",
- "name": "series_type",
- "schema": {
- "default": "close",
- "enum": [
- "open",
- "high",
- "low",
- "close"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
- "in": "query",
- "name": "expand_underlying",
- "schema": {
- "default": false,
- "type": "boolean"
- }
- },
- {
- "description": "The order in which to return the results, ordered by timestamp.",
- "example": "desc",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 5000",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "maximum": 5000,
- "type": "integer"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v1/indicators/sma/I:SPX?cursor=YWRqdXN0ZWQ9dHJ1ZSZhcD0lN0IlMjJ2JTIyJTNBMCUyQyUyMm8lMjIlM0EwJTJDJTIyYyUyMiUzQTQwNDcuNDEwMDAwMDAwMDAwMyUyQyUyMmglMjIlM0EwJTJDJTIybCUyMiUzQTAlMkMlMjJ0JTIyJTNBMTY3ODA4MjQwMDAwMCU3RCZhcz0mZXhwYW5kX3VuZGVybHlpbmc9ZmFsc2UmbGltaXQ9MTAmb3JkZXI9ZGVzYyZzZXJpZXNfdHlwZT1jbG9zZSZ0aW1lc3Bhbj1kYXkmdGltZXN0YW1wLmx0PTE2NzgxNjUyMDAwMDAmd2luZG93PTU",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": {
- "underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/I:SPX/range/1/day/1063281600000/1678725829099?limit=35\u0026sort=desc"
- },
- "values": [
- {
- "timestamp": 1678165200000,
- "value": 4035.913999999998
- }
- ]
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ "earningsBeforeInterestTaxesDepreciationAmortization": {
+ "type": "integer"
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "earningsBeforeInterestTaxesDepreciationAmortizationUSD": {
+ "type": "integer"
},
- "results": {
- "properties": {
- "underlying": {
- "properties": {
- "aggregates": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "format": "float",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "float",
- "type": "number"
- }
- },
- "required": [
- "v",
- "vw",
- "o",
- "c",
- "h",
- "l",
- "t",
- "n"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
- },
- "url": {
- "description": "The URL which can be used to request the underlying aggregates used in this request.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "values": {
- "items": {
- "properties": {
- "timestamp": {
- "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "value": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "SMAResults"
- }
+ "earningsBeforeTax": {
+ "type": "integer"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- }
- },
- "description": "Simple Moving Average (SMA) data for each period."
- }
- },
- "summary": "Simple Moving Average (SMA)",
- "tags": [
- "indices:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Indices data",
- "name": "indices"
- }
- },
- "x-polygon-ignore": true
- },
- "/v1/indicators/sma/{optionsTicker}": {
- "get": {
- "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.",
- "operationId": "OptionsSMA",
- "parameters": [
- {
- "description": "The ticker symbol for which to get simple moving average (SMA) data.",
- "example": "O:SPY241220P00720000",
- "in": "path",
- "name": "optionsTicker",
- "required": true,
- "schema": {
- "type": "string"
- },
- "x-polygon-go-id": "Ticker"
- },
- {
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "The size of the aggregate time window.",
- "example": "day",
- "in": "query",
- "name": "timespan",
- "schema": {
- "default": "day",
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not the aggregates used to calculate the simple moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "default": true,
- "type": "boolean"
- }
- },
- {
- "description": "The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
- "example": 50,
- "in": "query",
- "name": "window",
- "schema": {
- "default": 50,
- "type": "integer"
- }
- },
- {
- "description": "The price in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close prices to \ncalculate the simple moving average (SMA).",
- "example": "close",
- "in": "query",
- "name": "series_type",
- "schema": {
- "default": "close",
- "enum": [
- "open",
- "high",
- "low",
- "close"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
- "in": "query",
- "name": "expand_underlying",
- "schema": {
- "default": false,
- "type": "boolean"
- }
- },
- {
- "description": "The order in which to return the results, ordered by timestamp.",
- "example": "desc",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 5000",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "maximum": 5000,
- "type": "integer"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v1/indicators/sma/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": {
- "underlying": {
- "aggregates": [
- {
- "c": 75.0875,
- "h": 75.15,
- "l": 73.7975,
- "n": 1,
- "o": 74.06,
- "t": 1577941200000,
- "v": 135647456,
- "vw": 74.6099
- },
- {
- "c": 74.3575,
- "h": 75.145,
- "l": 74.125,
- "n": 1,
- "o": 74.2875,
- "t": 1578027600000,
- "v": 146535512,
- "vw": 74.7026
- }
- ],
- "url": "https://api.polygon.io/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25"
- },
- "values": [
- {
- "timestamp": 1517562000016,
- "value": 140.139
- }
- ]
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ "earningsPerBasicShare": {
+ "format": "double",
+ "type": "number"
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "earningsPerBasicShareUSD": {
+ "format": "double",
+ "type": "number"
},
- "results": {
- "properties": {
- "underlying": {
- "properties": {
- "aggregates": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "format": "float",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "float",
- "type": "number"
- }
- },
- "required": [
- "v",
- "vw",
- "o",
- "c",
- "h",
- "l",
- "t",
- "n"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
- },
- "url": {
- "description": "The URL which can be used to request the underlying aggregates used in this request.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "values": {
- "items": {
- "properties": {
- "timestamp": {
- "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "value": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "SMAResults"
- }
+ "earningsPerDilutedShare": {
+ "format": "double",
+ "type": "number"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649304000000,1,,0,,0,0,0,0,0,false,1649304000000,286.0121999999996\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649131200000,1,,0,,0,0,0,0,0,false,1649131200000,284.61099999999965\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648699200000,1,,0,,0,0,0,0,0,false,1648699200000,282.50919999999974\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648612800000,1,,0,,0,0,0,0,0,false,1648612800000,281.80859999999973\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648526400000,1,,0,,0,0,0,0,0,false,1648526400000,281.1079999999998\nO:SPY241220P00720000,3,277.8267,0,277.82,277.83,277.83,277.82,1649649600000,2,,0,,0,0,0,0,0,false,1649649600000,285.4949999999996\nO:SPY241220P00720000,2,270.49,0,270.49,270.49,270.49,270.49,1649390400000,1,,0,,0,0,0,0,0,false,1649390400000,285.6801999999996\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649217600000,1,,0,,0,0,0,0,0,false,1649217600000,285.31159999999966\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649044800000,1,,0,,0,0,0,0,0,false,1649044800000,283.9103999999997\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648785600000,1,,0,,0,0,0,0,0,false,1648785600000,283.2097999999997\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Simple Moving Average (SMA) data for each period."
- }
- },
- "summary": "Simple Moving Average (SMA)",
- "tags": [
- "options:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Options data",
- "name": "options"
- }
- },
- "x-polygon-ignore": true
- },
- "/v1/indicators/sma/{stockTicker}": {
- "get": {
- "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.",
- "operationId": "SMA",
- "parameters": [
- {
- "description": "The ticker symbol for which to get simple moving average (SMA) data.",
- "example": "AAPL",
- "in": "path",
- "name": "stockTicker",
- "required": true,
- "schema": {
- "type": "string"
- },
- "x-polygon-go-id": "Ticker"
- },
- {
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "The size of the aggregate time window.",
- "example": "day",
- "in": "query",
- "name": "timespan",
- "schema": {
- "default": "day",
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not the aggregates used to calculate the simple moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "default": true,
- "type": "boolean"
- }
- },
- {
- "description": "The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
- "example": 50,
- "in": "query",
- "name": "window",
- "schema": {
- "default": 50,
- "type": "integer"
- }
- },
- {
- "description": "The price in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close prices to \ncalculate the simple moving average (SMA).",
- "example": "close",
- "in": "query",
- "name": "series_type",
- "schema": {
- "default": "close",
- "enum": [
- "open",
- "high",
- "low",
- "close"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
- "in": "query",
- "name": "expand_underlying",
- "schema": {
- "default": false,
- "type": "boolean"
- }
- },
- {
- "description": "The order in which to return the results, ordered by timestamp.",
- "example": "desc",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 5000",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "maximum": 5000,
- "type": "integer"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v1/indicators/sma/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": {
- "underlying": {
- "aggregates": [
- {
- "c": 75.0875,
- "h": 75.15,
- "l": 73.7975,
- "n": 1,
- "o": 74.06,
- "t": 1577941200000,
- "v": 135647456,
- "vw": 74.6099
- },
- {
- "c": 74.3575,
- "h": 75.145,
- "l": 74.125,
- "n": 1,
- "o": 74.2875,
- "t": 1578027600000,
- "v": 146535512,
- "vw": 74.7026
- }
- ],
- "url": "https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25"
- },
- "values": [
- {
- "timestamp": 1517562000016,
- "value": 140.139
- }
- ]
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ "effectOfExchangeRateChangesOnCash": {
+ "type": "integer"
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "enterpriseValue": {
+ "type": "integer"
},
- "results": {
- "properties": {
- "underlying": {
- "properties": {
- "aggregates": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "format": "float",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "float",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "float",
- "type": "number"
- }
- },
- "required": [
- "v",
- "vw",
- "o",
- "c",
- "h",
- "l",
- "t",
- "n"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
- },
- "url": {
- "description": "The URL which can be used to request the underlying aggregates used in this request.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "values": {
- "items": {
- "properties": {
- "timestamp": {
- "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "value": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "SMAResults"
- }
+ "enterpriseValueOverEBIT": {
+ "type": "integer"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nAAPL,1.27849501E+08,142.9012,0,146.1,142.48,146.72,140.68,1664424000000,1061692,,0,,0,0,0,0,0,false,1664424000000,164.19240000000005\nAAPL,1.46755122E+08,147.599,0,147.64,149.84,150.6414,144.84,1664337600000,1140818,,0,,0,0,0,0,0,false,1664337600000,164.40360000000007\nAAPL,8.4461761E+07,152.1354,0,152.74,151.76,154.72,149.945,1664251200000,683781,,0,,0,0,0,0,0,false,1664251200000,164.42680000000007\nAAPL,9.3339409E+07,151.5222,0,149.66,150.77,153.7701,149.64,1664164800000,747666,,0,,0,0,0,0,0,false,1664164800000,164.33300000000006\nAAPL,9.3308449E+07,156.1877,0,157.34,153.72,158.61,153.6,1663732800000,712645,,0,,0,0,0,0,0,false,1663732800000,164.13680000000005\nAAPL,9.6031641E+07,150.0222,0,151.19,150.43,151.47,148.56,1663905600000,766888,,0,,0,0,0,0,0,false,1663905600000,164.32100000000005\nAAPL,8.6651514E+07,152.5709,0,152.38,152.74,154.47,150.91,1663819200000,686866,,0,,0,0,0,0,0,false,1663819200000,164.28180000000003\nAAPL,1.07691097E+08,156.1317,0,153.4,156.9,158.08,153.08,1663646400000,792177,,0,,0,0,0,0,0,false,1663646400000,163.97960000000006\nAAPL,8.1599225E+07,152.5505,0,149.31,154.48,154.56,149.1,1663560000000,671961,,0,,0,0,0,0,0,false,1663560000000,163.73900000000006\nAAPL,1.64879031E+08,150.2387,0,151.21,150.7,151.35,148.37,1663300800000,850358,,0,,0,0,0,0,0,false,1663300800000,163.59020000000007\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Simple Moving Average (SMA) data for each period."
- }
- },
- "summary": "Simple Moving Average (SMA)",
- "tags": [
- "stocks:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
- }
- }
- },
- "/v1/last/crypto/{from}/{to}": {
- "get": {
- "description": "Get the last trade tick for a cryptocurrency pair.",
- "operationId": "LastTradeCrypto",
- "parameters": [
- {
- "description": "The \"from\" symbol of the pair.",
- "example": "BTC",
- "in": "path",
- "name": "from",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The \"to\" symbol of the pair.",
- "example": "USD",
- "in": "path",
- "name": "to",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "last": {
- "conditions": [
- 1
- ],
- "exchange": 4,
- "price": 16835.42,
- "size": 0.006909,
- "timestamp": 1605560885027
- },
- "request_id": "d2d779df015fe2b7fbb8e58366610ef7",
- "status": "success",
- "symbol": "BTC-USD"
- },
- "schema": {
- "properties": {
- "last": {
- "properties": {
- "conditions": {
- "description": "A list of condition codes.",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
- "format": "int32",
- "type": "integer"
- },
- "type": "array",
- "x-polygon-go-type": {
- "name": "Int32Array"
- }
- },
- "exchange": {
- "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.",
- "type": "integer"
- },
- "price": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
- "format": "double",
- "type": "number"
- },
- "size": {
- "description": "The size of a trade (also known as volume).",
- "format": "double",
- "type": "number"
- },
- "timestamp": {
- "description": "The Unix millisecond timestamp.",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMilliseconds",
- "path": "github.com/polygon-io/ptime"
- }
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "LastTradeCrypto"
- }
+ "enterpriseValueOverEBITDA": {
+ "format": "double",
+ "type": "number"
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "foreignCurrencyUSDExchangeRate": {
+ "type": "integer"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ "freeCashFlow": {
+ "type": "integer"
},
- "symbol": {
- "description": "The symbol pair that was evaluated from the request.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "conditions,exchange,price,size,timestamp\n1,4,16835.42,0.006909,1605560885027\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "The last tick for this currency pair."
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Last Trade for a Crypto Pair",
- "tags": [
- "crypto:last:trade"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Trade data",
- "name": "trades"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Crypto data",
- "name": "crypto"
- }
- }
- },
- "/v1/last_quote/currencies/{from}/{to}": {
- "get": {
- "description": "Get the last quote tick for a forex currency pair.",
- "operationId": "LastQuoteCurrencies",
- "parameters": [
- {
- "description": "The \"from\" symbol of the pair.",
- "example": "AUD",
- "in": "path",
- "name": "from",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The \"to\" symbol of the pair.",
- "example": "USD",
- "in": "path",
- "name": "to",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "last": {
- "ask": 0.73124,
- "bid": 0.73122,
- "exchange": 48,
- "timestamp": 1605557756000
- },
- "request_id": "a73a29dbcab4613eeaf48583d3baacf0",
- "status": "success",
- "symbol": "AUD/USD"
- },
- "schema": {
- "properties": {
- "last": {
- "properties": {
- "ask": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "bid": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "exchange": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/forex/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- "timestamp": {
- "description": "The Unix millisecond timestamp.",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMilliseconds",
- "path": "github.com/polygon-io/ptime"
- }
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "LastQuoteCurrencies"
- }
+ "freeCashFlowPerShare": {
+ "format": "double",
+ "type": "number"
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "goodwillAndIntangibleAssets": {
+ "type": "integer"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ "grossMargin": {
+ "format": "double",
+ "type": "number"
},
- "symbol": {
- "description": "The symbol pair that was evaluated from the request.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "ask,bid,exchange,timestamp\n0.73124,0.73122,48,1605557756000\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "The last quote tick for this currency pair."
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Last Quote for a Currency Pair",
- "tags": [
- "fx:last:quote"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "NBBO data",
- "name": "nbbo"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Forex data",
- "name": "fx"
- }
- }
- },
- "/v1/marketstatus/now": {
- "get": {
- "description": "Get the current trading status of the exchanges and overall financial markets.\n",
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "afterHours": true,
- "currencies": {
- "crypto": "open",
- "fx": "open"
- },
- "earlyHours": false,
- "exchanges": {
- "nasdaq": "extended-hours",
- "nyse": "extended-hours",
- "otc": "closed"
- },
- "market": "extended-hours",
- "serverTime": "2020-11-10T22:37:37.000Z"
- },
- "schema": {
- "properties": {
- "afterHours": {
- "description": "Whether or not the market is in post-market hours.",
- "type": "boolean"
+ "grossProfit": {
+ "type": "integer"
},
- "currencies": {
- "properties": {
- "crypto": {
- "description": "The status of the crypto market.",
- "type": "string"
- },
- "fx": {
- "description": "The status of the forex market.",
- "type": "string"
- }
- },
- "type": "object"
+ "incomeTaxExpense": {
+ "type": "integer"
},
- "earlyHours": {
- "description": "Whether or not the market is in pre-market hours.",
- "type": "boolean"
+ "interestExpense": {
+ "type": "integer"
},
- "exchanges": {
- "properties": {
- "nasdaq": {
- "description": "The status of the Nasdaq market.",
- "type": "string"
- },
- "nyse": {
- "description": "The status of the NYSE market.",
- "type": "string"
- },
- "otc": {
- "description": "The status of the OTC market.",
- "type": "string"
- }
- },
- "type": "object"
+ "inventory": {
+ "type": "integer"
},
- "market": {
- "description": "The status of the market as a whole.",
- "type": "string"
+ "investedCapital": {
+ "type": "integer"
},
- "serverTime": {
- "description": "The current time of the server.",
- "format": "date-time",
- "type": "string"
- }
- },
- "type": "object"
- }
- }
- },
- "description": "Status of the market and each exchange"
- },
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
- },
- "404": {
- "description": "The specified resource was not found"
- },
- "409": {
- "description": "Parameter is invalid or incorrect."
- }
- },
- "summary": "Market Status",
- "tags": [
- "reference:stocks:market"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
- }
- }
- },
- "/v1/marketstatus/upcoming": {
- "get": {
- "description": "Get upcoming market holidays and their open/close times.\n",
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": [
- {
- "date": "2020-11-26T00:00:00.000Z",
- "exchange": "NYSE",
- "name": "Thanksgiving",
- "status": "closed"
- },
- {
- "date": "2020-11-26T00:00:00.000Z",
- "exchange": "NASDAQ",
- "name": "Thanksgiving",
- "status": "closed"
- },
- {
- "date": "2020-11-26T00:00:00.000Z",
- "exchange": "OTC",
- "name": "Thanksgiving",
- "status": "closed"
- },
- {
- "close": "2020-11-27T18:00:00.000Z",
- "date": "2020-11-27T00:00:00.000Z",
- "exchange": "NASDAQ",
- "name": "Thanksgiving",
- "open": "2020-11-27T14:30:00.000Z",
- "status": "early-close"
- },
- {
- "close": "2020-11-27T18:00:00.000Z",
- "date": "2020-11-27T00:00:00.000Z",
- "exchange": "NYSE",
- "name": "Thanksgiving",
- "open": "2020-11-27T14:30:00.000Z",
- "status": "early-close"
- }
- ],
- "schema": {
- "items": {
- "properties": {
- "close": {
- "description": "The market close time on the holiday (if it's not closed).",
- "format": "date-time",
- "type": "string"
- },
- "date": {
- "description": "The date of the holiday.",
- "format": "date",
- "type": "string"
- },
- "exchange": {
- "description": "Which market the record is for.",
- "type": "string"
- },
- "name": {
- "description": "The name of the holiday.",
- "type": "string"
- },
- "open": {
- "description": "The market open time on the holiday (if it's not closed).",
- "format": "date-time",
- "type": "string"
- },
- "status": {
- "description": "The status of the market on the holiday.",
- "type": "string"
- }
+ "investedCapitalAverage": {
+ "type": "integer"
},
- "type": "object"
- },
- "type": "array"
- }
- }
- },
- "description": "Holidays for each market in the near future."
- },
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
- },
- "404": {
- "description": "The specified resource was not found"
- },
- "409": {
- "description": "Parameter is invalid or incorrect."
- }
- },
- "summary": "Market Holidays",
- "tags": [
- "reference:stocks:market"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
- }
- }
- },
- "/v1/open-close/crypto/{from}/{to}/{date}": {
- "get": {
- "description": "Get the open, close prices of a cryptocurrency symbol on a certain day.\n",
- "parameters": [
- {
- "description": "The \"from\" symbol of the pair.",
- "example": "BTC",
- "in": "path",
- "name": "from",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The \"to\" symbol of the pair.",
- "example": "USD",
- "in": "path",
- "name": "to",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The date of the requested open/close in the format YYYY-MM-DD.",
- "example": "2023-01-09",
- "in": "path",
- "name": "date",
- "required": true,
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "type": "boolean"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "close": 11050.64,
- "closingTrades": [
- {
- "c": [
- 2
- ],
- "i": "973323250",
- "p": 11050.64,
- "s": 0.006128,
- "t": 1602287999795,
- "x": 4
- },
- {
- "c": [
- 1
- ],
- "i": "105717893",
- "p": 11049.4,
- "s": 0.014,
- "t": 1602287999659,
- "x": 17
- }
- ],
- "day": "2020-10-09T00:00:00.000Z",
- "isUTC": true,
- "open": 10932.44,
- "openTrades": [
- {
- "c": [
- 2
- ],
- "i": "511235746",
- "p": 10932.44,
- "s": 0.002,
- "t": 1602201600056,
- "x": 1
- },
- {
- "c": [
- 2
- ],
- "i": "511235751",
- "p": 10923.76,
- "s": 0.02,
- "t": 1602201600141,
- "x": 4
- }
- ],
- "symbol": "BTC-USD"
- },
- "schema": {
- "properties": {
- "close": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "investments": {
+ "type": "integer"
},
- "closingTrades": {
- "items": {
- "properties": {
- "c": {
- "description": "A list of condition codes.\n",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
- "type": "integer"
- },
- "type": "array"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The size of a trade (also known as volume).\n",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
- "type": "integer"
- }
- },
- "required": [
- "p",
- "s",
- "x",
- "c",
- "t",
- "i"
- ],
- "type": "object"
- },
- "type": "array"
+ "investmentsCurrent": {
+ "type": "integer"
},
- "day": {
- "description": "The date requested.",
- "format": "date",
- "type": "string"
+ "investmentsNonCurrent": {
+ "type": "integer"
},
- "isUTC": {
- "description": "Whether or not the timestamps are in UTC timezone.",
- "type": "boolean"
+ "issuanceDebtSecurities": {
+ "type": "integer"
},
- "open": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "issuanceEquityShares": {
+ "type": "integer"
},
- "openTrades": {
- "items": {
- "properties": {
- "c": {
- "description": "A list of condition codes.\n",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
- "type": "integer"
- },
- "type": "array"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The size of a trade (also known as volume).\n",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
- "type": "integer"
- }
- },
- "required": [
- "p",
- "s",
- "x",
- "c",
- "t",
- "i"
- ],
- "type": "object"
- },
- "type": "array"
+ "liabilitiesNonCurrent": {
+ "type": "integer"
},
- "symbol": {
- "description": "The symbol pair that was evaluated from the request.",
- "type": "string"
- }
- },
- "required": [
- "symbol",
- "isUTC",
- "day",
- "open",
- "close",
- "openTrades",
- "closingTrades"
- ],
- "type": "object"
- }
- },
- "text/csv": {
- "example": "isUTC,day,open,close,openTrades,closingTrades\ntrue,2020-10-09,10932.44,11050.64,\"[{\\\"s\\\":0.002,\\\"p\\\":10932.44,\\\"x\\\":1,\\\"t\\\":1602201600056,\\\"c\\\":[2],\\\"i\\\":\\\"511235746\\\"},{\\\"s\\\":0.02,\\\"p\\\":10923.76,\\\"x\\\":4,\\\"t\\\":1602201600141,\\\"c\\\":[2],\\\"i\\\":\\\"511235751\\\"}]\",\"[{\\\"s\\\":0.006128,\\\"p\\\":11050.64,\\\"x\\\":4,\\\"t\\\":1602287999795,\\\"c\\\":[2],\\\"i\\\":\\\"973323250\\\"},{\\\"s\\\":0.014,\\\"p\\\":11049.4,\\\"x\\\":17,\\\"t\\\":1602287999659,\\\"c\\\":[1],\\\"i\\\":\\\"105717893\\\"}]\"\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "The open/close of this symbol."
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Daily Open/Close",
- "tags": [
- "crypto:open-close"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Crypto data",
- "name": "crypto"
- }
- }
- },
- "/v1/open-close/{indicesTicker}/{date}": {
- "get": {
- "description": "Get the open, close and afterhours values of a index symbol on a certain date.\n",
- "parameters": [
- {
- "description": "The ticker symbol of Index.",
- "example": "I:SPX",
- "in": "path",
- "name": "indicesTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The date of the requested open/close in the format YYYY-MM-DD.",
- "example": "2023-03-10",
- "in": "path",
- "name": "date",
- "required": true,
- "schema": {
- "format": "date",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "afterHours": "4,078.49",
- "close": "4,045.64",
- "from": "2023-01-09",
- "high": "4,078.49",
- "low": "4,051.82",
- "open": "4,055.15",
- "preMarket": "4,078.49",
- "status": "OK",
- "symbol": "SPX"
- },
- "schema": {
- "properties": {
- "afterHours": {
- "description": "The close value of the ticker symbol in after hours trading.",
- "format": "double",
- "type": "number"
+ "marketCapitalization": {
+ "type": "integer"
},
- "close": {
- "description": "The close value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "netCashFlow": {
+ "type": "integer"
},
- "from": {
- "description": "The requested date.",
- "format": "date",
- "type": "string"
+ "netCashFlowBusinessAcquisitionsDisposals": {
+ "type": "integer"
},
- "high": {
- "description": "The highest value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "netCashFlowFromFinancing": {
+ "type": "integer"
},
- "low": {
- "description": "The lowest value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "netCashFlowFromInvesting": {
+ "type": "integer"
},
- "open": {
- "description": "The open value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "netCashFlowFromOperations": {
+ "type": "integer"
},
- "preMarket": {
- "description": "The open value of the ticker symbol in pre-market trading.",
- "type": "integer"
+ "netCashFlowInvestmentAcquisitionsDisposals": {
+ "type": "integer"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ "netIncome": {
+ "type": "integer"
},
- "symbol": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- "required": [
- "status",
- "from",
- "symbol",
- "open",
- "high",
- "low",
- "close"
- ],
- "type": "object"
- }
- }
- },
- "description": "The open/close of this stock symbol."
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Daily Open/Close",
- "tags": [
- "stocks:open-close"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Indices data",
- "name": "indices"
- }
- }
- },
- "/v1/open-close/{optionsTicker}/{date}": {
- "get": {
- "description": "Get the open, close and afterhours prices of an options contract on a certain date.\n",
- "parameters": [
- {
- "description": "The ticker symbol of the options contract.",
- "example": "O:SPY251219C00650000",
- "in": "path",
- "name": "optionsTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The date of the requested open/close in the format YYYY-MM-DD.",
- "example": "2023-01-09",
- "in": "path",
- "name": "date",
- "required": true,
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "type": "boolean"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "afterHours": 26.35,
- "close": 26.35,
- "from": "2023-01-09",
- "high": 26.35,
- "low": 25,
- "open": 25,
- "preMarket": 25,
- "status": "OK",
- "symbol": "O:TSLA210903C00700000",
- "volume": 2
- },
- "schema": {
- "properties": {
- "afterHours": {
- "description": "The close price of the ticker symbol in after hours trading.",
- "format": "double",
- "type": "number"
+ "netIncomeCommonStock": {
+ "type": "integer"
},
- "close": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "netIncomeCommonStockUSD": {
+ "type": "integer"
},
- "from": {
- "description": "The requested date.",
- "format": "date",
- "type": "string"
+ "netIncomeToNonControllingInterests": {
+ "type": "integer"
},
- "high": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "netLossIncomeFromDiscontinuedOperations": {
+ "type": "integer"
},
- "low": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "operatingExpenses": {
+ "type": "integer"
},
- "open": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "operatingIncome": {
+ "type": "integer"
},
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
+ "paymentDividendsOtherCashDistributions": {
+ "type": "integer"
},
- "preMarket": {
- "description": "The open price of the ticker symbol in pre-market trading.",
- "type": "integer"
+ "payoutRatio": {
+ "type": "integer"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ "period": {
+ "description": "Reporting period.",
+ "enum": [
+ "Q",
+ "T",
+ "QA",
+ "TA",
+ "Y",
+ "YA"
+ ],
+ "example": "Q",
+ "type": "string"
},
- "symbol": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
+ "preferredDividendsIncomeStatementImpact": {
+ "type": "integer"
},
- "volume": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "status",
- "from",
- "symbol",
- "open",
- "high",
- "low",
- "close",
- "volume"
- ],
- "type": "object"
- }
- },
- "text/csv": {
- "example": "from,open,high,low,close,volume,afterHours,preMarket\n2023-01-09,25,26.35,25,26.35,2,26.35,25\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "The open/close of this stock symbol."
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Daily Open/Close",
- "tags": [
- "options:open-close"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Options data",
- "name": "options"
- }
- }
- },
- "/v1/open-close/{stocksTicker}/{date}": {
- "get": {
- "description": "Get the open, close and afterhours prices of a stock symbol on a certain date.\n",
- "parameters": [
- {
- "description": "The ticker symbol of the stock/equity.",
- "example": "AAPL",
- "in": "path",
- "name": "stocksTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The date of the requested open/close in the format YYYY-MM-DD.",
- "example": "2023-01-09",
- "in": "path",
- "name": "date",
- "required": true,
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "type": "boolean"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "afterHours": 322.1,
- "close": 325.12,
- "from": "2023-01-09",
- "high": 326.2,
- "low": 322.3,
- "open": 324.66,
- "preMarket": 324.5,
- "status": "OK",
- "symbol": "AAPL",
- "volume": 26122646
- },
- "schema": {
- "properties": {
- "afterHours": {
- "description": "The close price of the ticker symbol in after hours trading.",
- "format": "double",
- "type": "number"
+ "priceEarnings": {
+ "format": "double",
+ "type": "number"
},
- "close": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "priceSales": {
+ "format": "double",
+ "type": "number"
},
- "from": {
- "description": "The requested date.",
- "format": "date",
- "type": "string"
+ "priceToBookValue": {
+ "format": "double",
+ "type": "number"
},
- "high": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "priceToEarningsRatio": {
+ "format": "double",
+ "type": "number"
},
- "low": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "priceToSalesRatio": {
+ "format": "double",
+ "type": "number"
},
- "open": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "profitMargin": {
+ "format": "double",
+ "type": "number"
},
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
+ "propertyPlantEquipmentNet": {
+ "type": "integer"
},
- "preMarket": {
- "description": "The open price of the ticker symbol in pre-market trading.",
- "type": "integer"
+ "reportPeriod": {
+ "example": "2019-03-31",
+ "format": "date-time",
+ "type": "string"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ "researchAndDevelopmentExpense": {
+ "type": "integer"
},
- "symbol": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
+ "returnOnAverageAssets": {
+ "type": "integer"
},
- "volume": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "status",
- "from",
- "symbol",
- "open",
- "high",
- "low",
- "close",
- "volume"
- ],
- "type": "object"
- }
- },
- "text/csv": {
- "example": "from,open,high,low,close,volume,afterHours,preMarket\n2023-01-09,324.66,326.2,322.3,325.12,26122646,322.1,324.5\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "The open/close of this stock symbol."
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Daily Open/Close",
- "tags": [
- "stocks:open-close"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
- }
- }
- },
- "/v1/reference/sec/filings": {
- "get": {
- "description": "List filings",
- "operationId": "ListFilings",
- "parameters": [
- {
- "description": "Query by filing type.",
- "in": "query",
- "name": "type",
- "schema": {
- "description": "Filing Type",
- "enum": [
- "10-K",
- "10-Q"
- ],
- "type": "string"
- }
- },
- {
- "description": "Query by filing date.",
- "in": "query",
- "name": "filing_date",
- "schema": {
- "description": "The date when the filing was filed in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "Query by period of report.",
- "in": "query",
- "name": "period_of_report_date",
- "schema": {
- "description": "The period of report for the filing in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "If true, query only for filings with an XBRL instance file.\nIf false, query for filings without an XBRL instance file.\nIf this parameter is not provided, query for filings with or without XBRL instance files.",
- "in": "query",
- "name": "has_xbrl",
- "schema": {
- "nullable": true,
- "type": "boolean"
- },
- "x-polygon-go-id": "HasXBRL"
- },
- {
- "description": "Query by entity company name.",
- "in": "query",
- "name": "entities.company_data.name",
- "schema": {
- "example": "Facebook Inc",
- "type": "string"
- },
- "x-polygon-filter-field": {
- "search": true
- }
- },
- {
- "description": "Query by entity company CIK.",
- "in": "query",
- "name": "entities.company_data.cik",
- "schema": {
- "description": "Central Index Key (CIK) Number",
- "type": "string"
- }
- },
- {
- "description": "Query by entity company ticker.",
- "in": "query",
- "name": "entities.company_data.ticker",
- "schema": {
- "description": "Ticker",
- "type": "string"
- }
- },
- {
- "description": "Query by entity company SIC.",
- "in": "query",
- "name": "entities.company_data.sic",
- "schema": {
- "description": "Standard Industrial Classification (SIC)",
- "type": "string"
- }
- },
- {
- "description": "Search by filing_date.",
- "in": "query",
- "name": "filing_date.gte",
- "schema": {
- "description": "The date when the filing was filed in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- }
- },
- {
- "description": "Search by filing_date.",
- "in": "query",
- "name": "filing_date.gt",
- "schema": {
- "description": "The date when the filing was filed in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- }
- },
- {
- "description": "Search by filing_date.",
- "in": "query",
- "name": "filing_date.lte",
- "schema": {
- "description": "The date when the filing was filed in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- }
- },
- {
- "description": "Search by filing_date.",
- "in": "query",
- "name": "filing_date.lt",
- "schema": {
- "description": "The date when the filing was filed in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- }
- },
- {
- "description": "Search by period_of_report_date.",
- "in": "query",
- "name": "period_of_report_date.gte",
- "schema": {
- "description": "The period of report for the filing in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- }
- },
- {
- "description": "Search by period_of_report_date.",
- "in": "query",
- "name": "period_of_report_date.gt",
- "schema": {
- "description": "The period of report for the filing in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- }
- },
- {
- "description": "Search by period_of_report_date.",
- "in": "query",
- "name": "period_of_report_date.lte",
- "schema": {
- "description": "The period of report for the filing in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- }
- },
- {
- "description": "Search by period_of_report_date.",
- "in": "query",
- "name": "period_of_report_date.lt",
- "schema": {
- "description": "The period of report for the filing in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- }
- },
- {
- "description": "Search by entities.company_data.name.",
- "in": "query",
- "name": "entities.company_data.name.search",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Order results based on the `sort` field.",
- "in": "query",
- "name": "order",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 1000.",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "example": 10,
- "maximum": 1000,
- "minimum": 1,
- "type": "integer"
- }
- },
- {
- "description": "Sort field used for ordering.",
- "in": "query",
- "name": "sort",
- "schema": {
- "default": "filing_date",
- "enum": [
- "filing_date",
- "period_of_report_date"
- ],
- "example": "filing_date",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "description": "FIXME",
- "example": {},
- "schema": {
- "properties": {
- "count": {
- "type": "integer"
+ "returnOnAverageEquity": {
+ "type": "integer"
},
- "next_url": {
- "type": "string"
+ "returnOnInvestedCapital": {
+ "type": "integer"
},
- "request_id": {
- "type": "string"
+ "returnOnSales": {
+ "format": "double",
+ "type": "number"
},
- "results": {
- "items": {
- "properties": {
- "acceptance_datetime": {
- "description": "The datetime when the filing was accepted by EDGAR in EST (format: YYYYMMDDHHMMSS)",
- "type": "string"
- },
- "accession_number": {
- "description": "Filing Accession Number",
- "type": "string"
- },
- "entities": {
- "description": "Entities related to the filing (e.g. the document filers).",
- "items": {
- "description": "A filing entity (e.g. the document filer).",
- "properties": {
- "company_data": {
- "properties": {
- "cik": {
- "description": "Central Index Key (CIK) Number",
- "type": "string"
- },
- "name": {
- "example": "Facebook Inc",
- "type": "string"
- },
- "sic": {
- "description": "Standard Industrial Classification (SIC)",
- "type": "string"
- },
- "ticker": {
- "description": "Ticker",
- "type": "string"
- }
- },
- "required": [
- "name",
- "cik",
- "sic"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "SECCompanyData",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "relation": {
- "description": "Relationship of this entity to the filing.",
- "enum": [
- "filer"
- ],
- "type": "string"
- }
- },
- "required": [
- "relation"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "SECFilingEntity",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
- },
- "files_count": {
- "description": "The number of files associated with the filing.",
- "format": "int64",
- "type": "integer"
- },
- "filing_date": {
- "description": "The date when the filing was filed in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- },
- "id": {
- "description": "Unique identifier for the filing.",
- "type": "string"
- },
- "period_of_report_date": {
- "description": "The period of report for the filing in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- },
- "source_url": {
- "description": "The source URL is a link back to the upstream source for this filing\ndocument.",
- "example": "https://www.sec.gov/Archives/edgar/data/0001326801/000132680119000037/0001326801-19-000037-index.html",
- "format": "uri",
- "type": "string"
- },
- "type": {
- "description": "Filing Type",
- "enum": [
- "10-K",
- "10-Q"
- ],
- "type": "string"
- }
- },
- "required": [
- "id",
- "accession_number",
- "type",
- "filing_date",
- "period_of_report_date",
- "files_count",
- "source_url",
- "download_url",
- "entities",
- "acceptance_datetime"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "SECFiling",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
+ "revenues": {
+ "type": "integer"
},
- "status": {
- "type": "string"
- }
- },
- "required": [
- "status",
- "request_id",
- "count",
- "results"
- ],
- "type": "object"
- }
- }
- },
- "description": "FIXME"
- }
- },
- "summary": "SEC Filings",
- "tags": [
- "reference:sec:filings"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
- },
- "x-polygon-paginate": {
- "sort": {
- "default": "filing_date",
- "enum": [
- "filing_date",
- "period_of_report_date"
- ]
- }
- }
- },
- "x-polygon-draft": true
- },
- "/v1/reference/sec/filings/{filing_id}": {
- "get": {
- "description": "Get filing",
- "operationId": "GetFiling",
- "parameters": [
- {
- "description": "Select by filing id.",
- "in": "path",
- "name": "filing_id",
- "schema": {
- "description": "Unique identifier for the filing.",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "description": "FIXME",
- "example": {},
- "schema": {
- "properties": {
- "acceptance_datetime": {
- "description": "The datetime when the filing was accepted by EDGAR in EST (format: YYYYMMDDHHMMSS)",
- "type": "string"
- },
- "accession_number": {
- "description": "Filing Accession Number",
- "type": "string"
- },
- "entities": {
- "description": "Entities related to the filing (e.g. the document filers).",
- "items": {
- "description": "A filing entity (e.g. the document filer).",
- "properties": {
- "company_data": {
- "properties": {
- "cik": {
- "description": "Central Index Key (CIK) Number",
- "type": "string"
- },
- "name": {
- "example": "Facebook Inc",
- "type": "string"
- },
- "sic": {
- "description": "Standard Industrial Classification (SIC)",
- "type": "string"
- },
- "ticker": {
- "description": "Ticker",
- "type": "string"
- }
- },
- "required": [
- "name",
- "cik",
- "sic"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "SECCompanyData",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "relation": {
- "description": "Relationship of this entity to the filing.",
- "enum": [
- "filer"
- ],
- "type": "string"
- }
- },
- "required": [
- "relation"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "SECFilingEntity",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
- },
- "files_count": {
- "description": "The number of files associated with the filing.",
- "format": "int64",
- "type": "integer"
- },
- "filing_date": {
- "description": "The date when the filing was filed in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- },
- "id": {
- "description": "Unique identifier for the filing.",
- "type": "string"
- },
- "period_of_report_date": {
- "description": "The period of report for the filing in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- },
- "source_url": {
- "description": "The source URL is a link back to the upstream source for this filing\ndocument.",
- "example": "https://www.sec.gov/Archives/edgar/data/0001326801/000132680119000037/0001326801-19-000037-index.html",
- "format": "uri",
- "type": "string"
+ "revenuesUSD": {
+ "type": "integer"
},
- "type": {
- "description": "Filing Type",
- "enum": [
- "10-K",
- "10-Q"
- ],
- "type": "string"
- }
- },
- "required": [
- "id",
- "accession_number",
- "type",
- "filing_date",
- "period_of_report_date",
- "files_count",
- "source_url",
- "download_url",
- "entities",
- "acceptance_datetime"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "SECFiling",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- }
- }
- },
- "description": "FIXME"
- }
- },
- "summary": "SEC Filing",
- "tags": [
- "reference:sec:filing"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
- }
- },
- "x-polygon-draft": true
- },
- "/v1/reference/sec/filings/{filing_id}/files": {
- "get": {
- "description": "List filing files",
- "operationId": "ListFilingFiles",
- "parameters": [
- {
- "description": "Select by filing id.",
- "in": "path",
- "name": "filing_id",
- "schema": {
- "description": "Unique identifier for the filing.",
- "type": "string"
- }
- },
- {
- "description": "Query by file sequence number.",
- "in": "query",
- "name": "sequence",
- "schema": {
- "description": "File Sequence Number",
- "format": "int64",
- "max": 999,
- "min": 1,
- "type": "integer"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "Query by file name.",
- "in": "query",
- "name": "filename",
- "schema": {
- "description": "The name for the file.",
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "Search by sequence.",
- "in": "query",
- "name": "sequence.gte",
- "schema": {
- "description": "File Sequence Number",
- "format": "int64",
- "max": 999,
- "min": 1,
- "type": "integer"
- }
- },
- {
- "description": "Search by sequence.",
- "in": "query",
- "name": "sequence.gt",
- "schema": {
- "description": "File Sequence Number",
- "format": "int64",
- "max": 999,
- "min": 1,
- "type": "integer"
- }
- },
- {
- "description": "Search by sequence.",
- "in": "query",
- "name": "sequence.lte",
- "schema": {
- "description": "File Sequence Number",
- "format": "int64",
- "max": 999,
- "min": 1,
- "type": "integer"
- }
- },
- {
- "description": "Search by sequence.",
- "in": "query",
- "name": "sequence.lt",
- "schema": {
- "description": "File Sequence Number",
- "format": "int64",
- "max": 999,
- "min": 1,
- "type": "integer"
- }
- },
- {
- "description": "Search by filename.",
- "in": "query",
- "name": "filename.gte",
- "schema": {
- "description": "The name for the file.",
- "type": "string"
- }
- },
- {
- "description": "Search by filename.",
- "in": "query",
- "name": "filename.gt",
- "schema": {
- "description": "The name for the file.",
- "type": "string"
- }
- },
- {
- "description": "Search by filename.",
- "in": "query",
- "name": "filename.lte",
- "schema": {
- "description": "The name for the file.",
- "type": "string"
- }
- },
- {
- "description": "Search by filename.",
- "in": "query",
- "name": "filename.lt",
- "schema": {
- "description": "The name for the file.",
- "type": "string"
- }
- },
- {
- "description": "Order results based on the `sort` field.",
- "in": "query",
- "name": "order",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 1000.",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "example": 10,
- "maximum": 1000,
- "minimum": 1,
- "type": "integer"
- }
- },
- {
- "description": "Sort field used for ordering.",
- "in": "query",
- "name": "sort",
- "schema": {
- "default": "sequence",
- "enum": [
- "sequence",
- "filename"
- ],
- "example": "sequence",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "description": "FIXME",
- "example": {},
- "schema": {
- "properties": {
- "count": {
- "type": "integer"
+ "salesPerShare": {
+ "format": "double",
+ "type": "number"
},
- "next_url": {
- "type": "string"
+ "sellingGeneralAndAdministrativeExpense": {
+ "type": "integer"
},
- "request_id": {
- "type": "string"
+ "shareBasedCompensation": {
+ "type": "integer"
},
- "results": {
- "items": {
- "description": "File associated with the filing.\n\nThis provides information to uniquly identify the additional data and a URL\nwhere the file may be downloaded.",
- "properties": {
- "description": {
- "description": "A description for the contents of the file.",
- "type": "string"
- },
- "filename": {
- "description": "The name for the file.",
- "type": "string"
- },
- "id": {
- "description": "An identifier unique to the filing for this data entry.",
- "example": "1",
- "type": "string"
- },
- "sequence": {
- "description": "File Sequence Number",
- "format": "int64",
- "max": 999,
- "min": 1,
- "type": "integer"
- },
- "size_bytes": {
- "description": "The size of the file in bytes.",
- "format": "int64",
- "type": "integer"
- },
- "source_url": {
- "description": "The source URL is a link back to the upstream source for this file.",
- "format": "uri",
- "type": "string"
- },
- "type": {
- "description": "The type of document contained in the file.",
- "type": "string"
- }
- },
- "required": [
- "id",
- "file",
- "description",
- "type",
- "size_bytes",
- "sequence",
- "source_url"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "SECFilingFile",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
+ "shareFactor": {
+ "type": "integer"
},
- "status": {
- "type": "string"
+ "sharePriceAdjustedClose": {
+ "format": "double",
+ "type": "number"
+ },
+ "shareholdersEquity": {
+ "type": "integer"
+ },
+ "shareholdersEquityUSD": {
+ "type": "integer"
+ },
+ "shares": {
+ "type": "integer"
+ },
+ "tangibleAssetValue": {
+ "type": "integer"
+ },
+ "tangibleAssetsBookValuePerShare": {
+ "format": "double",
+ "type": "number"
+ },
+ "taxAssets": {
+ "type": "integer"
+ },
+ "taxLiabilities": {
+ "type": "integer"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "totalLiabilities": {
+ "type": "integer"
+ },
+ "tradeAndNonTradePayables": {
+ "type": "integer"
+ },
+ "tradeAndNonTradeReceivables": {
+ "type": "integer"
+ },
+ "updated": {
+ "example": "1999-03-28",
+ "format": "date-time",
+ "type": "string"
+ },
+ "weightedAverageShares": {
+ "type": "integer"
+ },
+ "weightedAverageSharesDiluted": {
+ "type": "integer"
+ },
+ "workingCapital": {
+ "type": "integer"
}
- },
- "required": [
- "status",
- "request_id",
- "count",
- "results"
- ],
- "type": "object"
- }
- }
+ },
+ "required": [
+ "ticker",
+ "exDate",
+ "paymentDate",
+ "ratio",
+ "tofactor",
+ "forfactor"
+ ],
+ "type": "object"
},
- "description": "FIXME"
- }
- },
- "summary": "SEC Filing Files",
- "tags": [
- "reference:sec:filing:files"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
- },
- "x-polygon-paginate": {
- "sort": {
- "default": "sequence",
- "enum": [
- "sequence",
- "filename"
- ]
- }
- }
- },
- "x-polygon-draft": true
- },
- "/v1/reference/sec/filings/{filing_id}/files/{file_id}": {
- "get": {
- "description": "Get filing file",
- "operationId": "GetFilingFile",
- "parameters": [
- {
- "description": "Select by filing id.",
- "in": "path",
- "name": "filing_id",
- "schema": {
- "description": "Unique identifier for the filing.",
- "type": "string"
- }
- },
- {
- "description": "Select by file id.",
- "in": "path",
- "name": "file_id",
- "schema": {
- "description": "An identifier unique to the filing for this data entry.",
- "example": "1",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "schema": {
- "description": "File associated with the filing.\n\nThis provides information to uniquly identify the additional data and a URL\nwhere the file may be downloaded.",
- "properties": {
- "description": {
- "description": "A description for the contents of the file.",
- "type": "string"
- },
- "filename": {
- "description": "The name for the file.",
- "type": "string"
- },
- "id": {
- "description": "An identifier unique to the filing for this data entry.",
- "example": "1",
- "type": "string"
- },
- "sequence": {
- "description": "File Sequence Number",
- "format": "int64",
- "max": 999,
- "min": 1,
- "type": "integer"
- },
- "size_bytes": {
- "description": "The size of the file in bytes.",
- "format": "int64",
- "type": "integer"
- },
- "source_url": {
- "description": "The source URL is a link back to the upstream source for this file.",
- "format": "uri",
- "type": "string"
+ "ForexConversion": {
+ "properties": {
+ "converted": {
+ "description": "The result of the conversion.",
+ "format": "double",
+ "type": "number"
},
- "type": {
- "description": "The type of document contained in the file.",
- "type": "string"
- }
- },
- "required": [
- "id",
- "file",
- "description",
- "type",
- "size_bytes",
- "sequence",
- "source_url"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "SECFilingFile",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- }
- }
- },
- "description": "The file data."
- }
- },
- "summary": "SEC Filing File",
- "tags": [
- "reference:sec:filing:file"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
- }
- },
- "x-polygon-draft": true
- },
- "/v1/summaries": {
- "get": {
- "description": "Get everything needed to visualize the tick-by-tick movement of a list of tickers.",
- "operationId": "SnapshotSummary",
- "parameters": [
- {
- "description": "Comma separated list of tickers. This API currently supports Stocks/Equities, Crypto, Options, and Forex. See \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://polygon.io/docs/stocks/get_v3_reference_tickers\"\u003ethe tickers endpoint\u003c/a\u003e for more details on supported tickers. If no tickers are passed then no results will be returned.",
- "example": "NCLH,O:SPY250321C00380000,C:EURUSD,X:BTCUSD",
- "in": "query",
- "name": "ticker.any_of",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "request_id": "abc123",
- "results": [
- {
- "branding": {
- "icon_url": "https://api.polygon.io/icon.png",
- "logo_url": "https://api.polygon.io/logo.svg"
- },
- "market_status": "closed",
- "name": "Norwegian Cruise Lines",
- "price": 22.3,
- "session": {
- "change": -1.05,
- "change_percent": -4.67,
- "close": 21.4,
- "early_trading_change": -0.39,
- "early_trading_change_percent": -0.07,
- "high": 22.49,
- "late_trading_change": 1.2,
- "late_trading_change_percent": 3.92,
- "low": 21.35,
- "open": 22.49,
- "previous_close": 22.45,
- "volume": 37
- },
- "ticker": "NCLH",
- "type": "stock"
- },
- {
- "market_status": "closed",
- "name": "NCLH $5 Call",
- "options": {
- "contract_type": "call",
- "exercise_style": "american",
- "expiration_date": "2022-10-14",
- "shares_per_contract": 100,
- "strike_price": 5,
- "underlying_ticker": "NCLH"
- },
- "price": 6.6,
- "session": {
- "change": -0.05,
- "change_percent": -1.07,
- "close": 6.65,
- "early_trading_change": -0.01,
- "early_trading_change_percent": -0.03,
- "high": 7.01,
- "late_trading_change": -0.4,
- "late_trading_change_percent": -0.02,
- "low": 5.42,
- "open": 6.7,
- "previous_close": 6.71,
- "volume": 67
- },
- "ticker": "O:NCLH221014C00005000",
- "type": "options"
- },
- {
- "market_status": "open",
- "name": "Euro - United States Dollar",
- "price": 0.97989,
- "session": {
- "change": -0.0001,
- "change_percent": -0.67,
- "close": 0.97989,
- "high": 0.98999,
- "low": 0.96689,
- "open": 0.97889,
- "previous_close": 0.98001
- },
- "ticker": "C:EURUSD",
- "type": "fx"
- },
- {
- "branding": {
- "icon_url": "https://api.polygon.io/icon.png",
- "logo_url": "https://api.polygon.io/logo.svg"
- },
- "market_status": "open",
- "name": "Bitcoin - United States Dollar",
- "price": 32154.68,
- "session": {
- "change": -201.23,
- "change_percent": -0.77,
- "close": 32154.68,
- "high": 33124.28,
- "low": 28182.88,
- "open": 31129.32,
- "previous_close": 33362.18
- },
- "ticker": "X:BTCUSD",
- "type": "crypto"
- },
- {
- "error": "NOT_FOUND",
- "message": "Ticker not found.",
- "ticker": "APx"
- }
- ],
- "status": "OK"
- },
- "schema": {
- "properties": {
- "request_id": {
- "type": "string"
+ "from": {
+ "description": "The \"from\" currency symbol.",
+ "type": "string"
},
- "results": {
- "items": {
+ "initialAmount": {
+ "description": "The amount to convert.",
+ "format": "double",
+ "type": "number"
+ },
+ "last": {
"properties": {
- "branding": {
- "properties": {
- "icon_url": {
- "description": "A link to this ticker's company's icon. Icon's are generally smaller, square images that represent the company at a glance.\nNote that you must provide an API key when accessing this URL. See the \"Authentication\" section at the top of this page for more details.",
- "type": "string"
- },
- "logo_url": {
- "description": "A link to this ticker's company's logo.\nNote that you must provide an API key when accessing this URL. See the \"Authentication\" section at the top of this page for more details.",
- "type": "string"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "Branding"
- }
- },
- "error": {
- "description": "The error while looking for this ticker.",
- "type": "string"
- },
- "market_status": {
- "description": "The market status for the market that trades this ticker.",
- "type": "string"
- },
- "message": {
- "description": "The error message while looking for this ticker.",
- "type": "string"
- },
- "name": {
- "description": "Name of ticker, forex, or crypto asset.",
- "type": "string"
- },
- "options": {
- "properties": {
- "contract_type": {
- "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".",
- "enum": [
- "put",
- "call",
- "other"
- ],
- "type": "string"
- },
- "exercise_style": {
- "description": "The exercise style of this contract. See \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Option_style\"\u003ethis link\u003c/a\u003e for more details on exercise styles.",
- "enum": [
- "american",
- "european",
- "bermudan"
- ],
- "type": "string"
- },
- "expiration_date": {
- "description": "The contract's expiration date in YYYY-MM-DD format.",
- "format": "date",
- "type": "string",
- "x-polygon-go-type": {
- "name": "IDaysPolygonDateString",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "shares_per_contract": {
- "description": "The number of shares per contract for this contract.",
- "format": "double",
- "type": "number"
- },
- "strike_price": {
- "description": "The strike price of the option contract",
+ "ask": {
+ "description": "The ask price.",
"format": "double",
"type": "number"
- },
- "underlying_ticker": {
- "description": "The ticker for the option contract.",
- "type": "string"
- }
},
- "required": [
- "contract_type",
- "expiration_date",
- "exercise_style",
- "shares_per_contract",
- "strike_price",
- "underlying_ticker"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Options"
- }
- },
- "price": {
- "description": "The most up to date ticker price.",
- "format": "double",
- "type": "number"
- },
- "session": {
- "properties": {
- "change": {
- "description": "The value of the price change for the contract from the previous trading day.",
- "format": "double",
- "type": "number"
- },
- "change_percent": {
- "description": "The percent of the price change for the contract from the previous trading day.",
- "format": "double",
- "type": "number"
- },
- "close": {
- "description": "The closing price for the asset of the day.",
- "format": "double",
- "type": "number"
- },
- "early_trading_change": {
- "description": "Today’s early trading change amount, difference between price and previous close if in early trading hours, otherwise difference between last price during early trading and previous close.",
- "format": "double",
- "type": "number"
- },
- "early_trading_change_percent": {
- "description": "Today’s early trading change as a percentage.",
- "format": "double",
- "type": "number"
- },
- "high": {
- "description": "The highest price for the asset of the day.",
- "format": "double",
- "type": "number"
- },
- "late_trading_change": {
- "description": "Today’s late trading change amount, difference between price and today’s close if in late trading hours, otherwise difference between last price during late trading and today’s close.",
- "format": "double",
- "type": "number"
- },
- "late_trading_change_percent": {
- "description": "Today’s late trading change as a percentage.",
- "format": "double",
- "type": "number"
- },
- "low": {
- "description": "The lowest price for the asset of the day.",
- "format": "double",
- "type": "number"
- },
- "open": {
- "description": "The open price for the asset of the day.",
- "format": "double",
- "type": "number"
- },
- "previous_close": {
- "description": "The closing price for the asset of previous trading day.",
- "format": "double",
- "type": "number"
- },
- "volume": {
- "description": "The trading volume for the asset of the day.",
+ "bid": {
+ "description": "The bid price.",
"format": "double",
"type": "number"
- }
},
- "required": [
- "change",
- "change_percent",
- "close",
- "high",
- "low",
- "open",
- "previous_close"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Session"
+ "exchange": {
+ "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "timestamp": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
}
- },
- "ticker": {
- "description": "Ticker of asset queried.",
- "type": "string"
- },
- "type": {
- "description": "The market for this ticker of stock, crypto, fx, option.",
- "enum": [
- "stocks",
- "crypto",
- "options",
- "fx"
- ],
- "type": "string"
- }
},
"required": [
- "ticker",
- "name",
- "price",
- "branding",
- "market_status",
- "type",
- "session",
- "options"
+ "ask",
+ "bid",
+ "exchange",
+ "timestamp"
],
- "type": "object",
- "x-polygon-go-type": {
- "name": "SummaryResult"
- }
- },
- "type": "array"
+ "type": "object"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ "to": {
+ "description": "The \"to\" currency symbol.",
+ "type": "string"
}
- },
- "required": [
- "status",
- "request_id"
- ],
- "type": "object"
- }
- }
- },
- "description": "Snapshot Summary for ticker list"
- }
- },
- "summary": "Summaries",
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
- }
- }
- },
- "/v2/aggs/grouped/locale/global/market/crypto/{date}": {
- "get": {
- "description": "Get the daily open, high, low, and close (OHLC) for the entire cryptocurrency markets.\n",
- "parameters": [
- {
- "description": "The beginning date for the aggregate window.",
- "example": "2023-01-09",
- "in": "path",
- "name": "date",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "type": "boolean"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "adjusted": true,
- "queryCount": 3,
- "results": [
- {
- "T": "X:ARDRUSD",
- "c": 0.0550762,
- "h": 0.0550762,
- "l": 0.0550762,
- "n": 18388,
- "o": 0.0550762,
- "t": 1580676480000,
- "v": 2,
- "vw": 0.0551
- },
- {
- "T": "X:NGCUSD",
- "c": 0.0272983,
- "h": 0.0273733,
- "l": 0.0272983,
- "n": 18,
- "o": 0.0273733,
- "t": 1580674080000,
- "v": 4734,
- "vw": 0.0273
- },
- {
- "T": "X:ZSCUSD",
- "c": 0.00028531,
- "h": 0.00028531,
- "l": 0.00028531,
- "n": 151,
- "o": 0.00028531,
- "t": 1580671080000,
- "v": 390,
- "vw": 0.0003
- }
- ],
- "resultsCount": 3,
- "status": "OK"
},
- "schema": {
- "allOf": [
- {
- "properties": {
- "adjusted": {
- "description": "Whether or not this response was adjusted for splits.",
- "type": "boolean"
- },
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status",
- "adjusted",
- "queryCount",
- "resultsCount",
- "request_id"
- ],
- "type": "object"
- },
- {
- "properties": {
- "results": {
- "items": {
+ "required": [
+ "from",
+ "to",
+ "initialAmount",
+ "converted"
+ ],
+ "type": "object"
+ },
+ "ForexExchangeId": {
+ "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "ForexGroupedResults": {
+ "properties": {
+ "results": {
+ "items": {
"properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
},
"required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "t",
- "T"
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t",
+ "T"
],
"type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
+ },
+ "type": "array"
}
- ]
- }
- },
- "text/csv": {
- "example": "T,c,h,l,n,o,t,v,vw\nX:ARDRUSD,0.0550762,0.0550762,0.0550762,18388,0.0550762,1580676480000,2,0.0551\nX:NGCUSD,0.0272983,0.0273733,0.0272983,18,0.0273733,1580674080000,4734,0.0273\nX:ZSCUSD,0.00028531,0.00028531,0.00028531,151,0.00028531,1580671080000,390,0.0003\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "The previous day OHLC for the ticker."
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Grouped Daily (Bars)",
- "tags": [
- "crypto:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Crypto data",
- "name": "crypto"
- }
- }
- },
- "/v2/aggs/grouped/locale/global/market/fx/{date}": {
- "get": {
- "description": "Get the daily open, high, low, and close (OHLC) for the entire forex markets.\n",
- "parameters": [
- {
- "description": "The beginning date for the aggregate window.",
- "example": "2023-01-09",
- "in": "path",
- "name": "date",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "type": "boolean"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "adjusted": true,
- "queryCount": 3,
- "results": [
- {
- "T": "C:ILSCHF",
- "c": 0.2704,
- "h": 0.2706,
- "l": 0.2693,
- "n": 689,
- "o": 0.2698,
- "t": 1602719999999,
- "v": 689,
- "vw": 0.2702
- },
- {
- "T": "C:GBPCAD",
- "c": 1.71103,
- "h": 1.71642,
- "l": 1.69064,
- "n": 407324,
- "o": 1.69955,
- "t": 1602719999999,
- "v": 407324,
- "vw": 1.7062
- },
- {
- "T": "C:DKKAUD",
- "c": 0.2214,
- "h": 0.2214,
- "l": 0.2195,
- "n": 10639,
- "o": 0.22,
- "t": 1602719999999,
- "v": 10639,
- "vw": 0.2202
- }
- ],
- "resultsCount": 3,
- "status": "OK"
},
- "schema": {
- "allOf": [
- {
- "properties": {
- "adjusted": {
- "description": "Whether or not this response was adjusted for splits.",
- "type": "boolean"
- },
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status",
- "adjusted",
- "queryCount",
- "resultsCount",
- "request_id"
- ],
- "type": "object"
- },
- {
- "properties": {
- "results": {
- "items": {
+ "type": "object"
+ },
+ "ForexHistoricTrades": {
+ "properties": {
+ "day": {
+ "description": "The date that was evaluated from the request.",
+ "format": "date",
+ "type": "string"
+ },
+ "map": {
+ "description": "A map for shortened result keys.",
+ "type": "object"
+ },
+ "msLatency": {
+ "description": "The milliseconds of latency for the query results.",
+ "type": "integer"
+ },
+ "pair": {
+ "description": "The currency pair that was evaluated from the request.",
+ "type": "string"
+ },
+ "ticks": {
+ "items": {
"properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
+ "a": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "b": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ }
},
"required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "t",
- "T"
+ "a",
+ "b",
+ "x",
+ "t"
],
"type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
+ },
+ "type": "array"
}
- ]
- }
- },
- "text/csv": {
- "example": "T,c,h,l,n,o,t,v,vw\nC:ILSCHF,0.2704,0.2706,0.2693,689,0.2698,1602719999999,689,0.2702\nC:GBPCAD,1.71103,1.71642,1.69064,407324,1.69955,1602719999999,407324,1.7062\nC:DKKAUD,0.2214,0.2214,0.2195,10639,0.22,1602719999999,10639,0.2202\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Previous day OHLC for ticker"
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Grouped Daily (Bars)",
- "tags": [
- "fx:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Forex data",
- "name": "fx"
- }
- }
- },
- "/v2/aggs/grouped/locale/us/market/stocks/{date}": {
- "get": {
- "description": "Get the daily open, high, low, and close (OHLC) for the entire stocks/equities markets.\n",
- "parameters": [
- {
- "description": "The beginning date for the aggregate window.",
- "example": "2023-01-09",
- "in": "path",
- "name": "date",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n",
- "in": "query",
- "name": "include_otc",
- "schema": {
- "type": "boolean"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "adjusted": true,
- "queryCount": 3,
- "results": [
- {
- "T": "KIMpL",
- "c": 25.9102,
- "h": 26.25,
- "l": 25.91,
- "n": 74,
- "o": 26.07,
- "t": 1602705600000,
- "v": 4369,
- "vw": 26.0407
- },
- {
- "T": "TANH",
- "c": 23.4,
- "h": 24.763,
- "l": 22.65,
- "n": 1096,
- "o": 24.5,
- "t": 1602705600000,
- "v": 25933.6,
- "vw": 23.493
- },
- {
- "T": "VSAT",
- "c": 34.24,
- "h": 35.47,
- "l": 34.21,
- "n": 4966,
- "o": 34.9,
- "t": 1602705600000,
- "v": 312583,
- "vw": 34.4736
- }
- ],
- "resultsCount": 3,
- "status": "OK"
},
- "schema": {
- "allOf": [
- {
- "properties": {
- "adjusted": {
- "description": "Whether or not this response was adjusted for splits.",
- "type": "boolean"
- },
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status",
- "adjusted",
- "queryCount",
- "resultsCount",
- "request_id"
- ],
- "type": "object"
- },
- {
- "properties": {
- "results": {
- "items": {
- "properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
+ "required": [
+ "day",
+ "map",
+ "msLatency",
+ "pair",
+ "ticks"
+ ],
+ "type": "object"
+ },
+ "ForexPairLastQuote": {
+ "properties": {
+ "last": {
+ "properties": {
+ "ask": {
+ "description": "The ask price.",
"format": "double",
"type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
+ },
+ "bid": {
+ "description": "The bid price.",
"format": "double",
"type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
+ },
+ "exchange": {
+ "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
"type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
+ },
+ "timestamp": {
"description": "The Unix Msec timestamp for the start of the aggregate window.",
"type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "t",
- "v",
- "T"
- ],
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
+ }
+ },
+ "required": [
+ "ask",
+ "bid",
+ "exchange",
+ "timestamp"
+ ],
+ "type": "object"
+ },
+ "symbol": {
+ "description": "The symbol pair that was evaluated from the request.",
+ "type": "string"
}
- ]
- }
- },
- "text/csv": {
- "example": "T,c,h,l,n,o,t,v,vw\nKIMpL,25.9102,26.25,25.91,74,26.07,1602705600000,4369,26.0407\nTANH,23.4,24.763,22.65,1096,24.5,1602705600000,25933.6,23.493\nVSAT,34.24,35.47,34.21,4966,34.9,1602705600000,312583,34.4736\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Previous day OHLC for ticker"
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Grouped Daily (Bars)",
- "tags": [
- "stocks:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
- }
- }
- },
- "/v2/aggs/ticker/{cryptoTicker}/prev": {
- "get": {
- "description": "Get the previous day's open, high, low, and close (OHLC) for the specified cryptocurrency pair.\n",
- "parameters": [
- {
- "description": "The ticker symbol of the currency pair.",
- "example": "X:BTCUSD",
- "in": "path",
- "name": "cryptoTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "type": "boolean"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "adjusted": true,
- "queryCount": 1,
- "request_id": "b2170df985474b6d21a6eeccfb6bee67",
- "results": [
- {
- "T": "X:BTCUSD",
- "c": 16035.9,
- "h": 16180,
- "l": 15639.2,
- "o": 15937.1,
- "t": 1605416400000,
- "v": 95045.16897951,
- "vw": 15954.2111
- }
- ],
- "resultsCount": 1,
- "status": "OK",
- "ticker": "X:BTCUSD"
},
- "schema": {
- "allOf": [
- {
- "properties": {
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- "required": [
- "ticker"
- ],
- "type": "object"
- },
- {
- "properties": {
- "adjusted": {
- "description": "Whether or not this response was adjusted for splits.",
- "type": "boolean"
- },
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status",
- "adjusted",
- "queryCount",
- "resultsCount",
- "request_id"
- ],
- "type": "object"
- },
- {
- "properties": {
- "results": {
- "items": {
+ "required": [
+ "symbol"
+ ],
+ "type": "object"
+ },
+ "ForexPreviousClose": {
+ "properties": {
+ "results": {
+ "items": {
"properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
},
"required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "t",
- "T"
+ "T",
+ "v",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t"
],
"type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
+ },
+ "type": "array"
}
- ]
- }
- },
- "text/csv": {
- "example": "T,c,h,l,o,t,v,vw\nX:BTCUSD,16035.9,16180,15639.2,15937.1,1605416400000,95045.16897951,15954.2111\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "The previous day OHLC for a ticker."
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Previous Close",
- "tags": [
- "crypto:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Crypto data",
- "name": "crypto"
- }
- }
- },
- "/v2/aggs/ticker/{cryptoTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
- "get": {
- "description": "Get aggregate bars for a cryptocurrency pair over a given date range in custom time window sizes.\n\u003cbr /\u003e\n\u003cbr /\u003e\nFor example, if timespan = ‘minute’ and multiplier = ‘5’ then 5-minute bars will be returned.\n",
- "parameters": [
- {
- "description": "The ticker symbol of the currency pair.",
- "example": "X:BTCUSD",
- "in": "path",
- "name": "cryptoTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The size of the timespan multiplier.",
- "example": 1,
- "in": "path",
- "name": "multiplier",
- "required": true,
- "schema": {
- "type": "integer"
- }
- },
- {
- "description": "The size of the time window.",
- "example": "day",
- "in": "path",
- "name": "timespan",
- "required": true,
- "schema": {
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2023-01-09",
- "in": "path",
- "name": "from",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2023-01-09",
- "in": "path",
- "name": "to",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
- "example": "asc",
- "in": "query",
- "name": "sort",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ]
- }
- },
- {
- "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on\n\u003ca href=\"https://polygon.io/blog/aggs-api-updates/\" target=\"_blank\" alt=\"Aggregate Data API Improvements\"\u003eAggregate Data API Improvements\u003c/a\u003e.\n",
- "example": 120,
- "in": "query",
- "name": "limit",
- "schema": {
- "type": "integer"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "adjusted": true,
- "queryCount": 2,
- "request_id": "0cf72b6da685bcd386548ffe2895904a",
- "results": [
- {
- "c": 10094.75,
- "h": 10429.26,
- "l": 9490,
- "n": 1,
- "o": 9557.9,
- "t": 1590984000000,
- "v": 303067.6562332156,
- "vw": 9874.5529
- },
- {
- "c": 9492.62,
- "h": 10222.72,
- "l": 9135.68,
- "n": 1,
- "o": 10096.87,
- "t": 1591070400000,
- "v": 323339.6922892879,
- "vw": 9729.5701
- }
- ],
- "resultsCount": 2,
- "status": "OK",
- "ticker": "X:BTCUSD"
},
- "schema": {
- "allOf": [
- {
- "properties": {
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- "required": [
- "ticker"
- ],
- "type": "object"
+ "type": "object"
+ },
+ "ForexSnapshotLastQuote": {
+ "properties": {
+ "a": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
},
- {
- "properties": {
- "adjusted": {
- "description": "Whether or not this response was adjusted for splits.",
- "type": "boolean"
- },
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status",
- "adjusted",
- "queryCount",
- "resultsCount",
- "request_id"
- ],
- "type": "object"
- },
- {
- "properties": {
- "results": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "t"
- ],
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
+ "b": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The millisecond accuracy timestamp of the quote.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID on which this quote happened.",
+ "type": "integer"
}
- ]
- }
- },
- "text/csv": {
- "example": "c,h,l,n,o,t,v,vw\n10094.75,10429.26,9490,1,9557.9,1590984000000,303067.6562332156,9874.5529\n9492.62,10222.72,9135.68,1,10096.87,1591070400000,323339.6922892879,9729.5701\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Cryptocurrency Aggregates."
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Aggregates (Bars)",
- "tags": [
- "crypto:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Crypto data",
- "name": "crypto"
- }
- }
- },
- "/v2/aggs/ticker/{forexTicker}/prev": {
- "get": {
- "description": "Get the previous day's open, high, low, and close (OHLC) for the specified forex pair.\n",
- "parameters": [
- {
- "description": "The ticker symbol of the currency pair.",
- "example": "C:EURUSD",
- "in": "path",
- "name": "forexTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "type": "boolean"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "adjusted": true,
- "queryCount": 1,
- "request_id": "08ec061fb85115678d68452c0a609cb7",
- "results": [
- {
- "T": "C:EURUSD",
- "c": 1.06206,
- "h": 1.0631,
- "l": 1.0505,
- "n": 180300,
- "o": 1.05252,
- "t": 1651708799999,
- "v": 180300,
- "vw": 1.055
- }
- ],
- "resultsCount": 1,
- "status": "OK",
- "ticker": "C:EURUSD"
},
- "schema": {
- "allOf": [
- {
- "properties": {
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- "required": [
- "ticker"
- ],
- "type": "object"
+ "required": [
+ "a",
+ "b",
+ "t",
+ "x"
+ ],
+ "type": "object"
+ },
+ "ForexSnapshotPrevDay": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- {
- "properties": {
- "adjusted": {
- "description": "Whether or not this response was adjusted for splits.",
- "type": "boolean"
- },
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status",
- "adjusted",
- "queryCount",
- "resultsCount",
- "request_id"
- ],
- "type": "object"
- },
- {
- "properties": {
- "results": {
- "items": {
- "properties": {
- "T": {
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "ForexSnapshotTicker": {
+ "properties": {
+ "ticker": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v"
+ ],
+ "type": "object"
+ },
+ "lastQuote": {
+ "description": "The most recent quote for this ticker.",
+ "properties": {
+ "a": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "b": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The millisecond accuracy timestamp of the quote.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID on which this quote happened.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "a",
+ "b",
+ "t",
+ "x"
+ ],
+ "type": "object"
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "ticker": {
"description": "The exchange symbol that this item is traded under.",
"type": "string"
- },
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
+ },
+ "todaysChange": {
+ "description": "The value of the change from the previous day.",
"format": "double",
"type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
"format": "double",
"type": "number"
- }
},
- "required": [
- "T",
- "v",
- "o",
- "c",
- "h",
- "l",
- "t"
- ],
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "day",
+ "lastQuote",
+ "min",
+ "prevDay",
+ "ticker",
+ "todaysChange",
+ "todaysChangePerc",
+ "updated"
+ ],
+ "type": "object"
}
- ]
- }
- },
- "text/csv": {
- "example": "T,c,h,l,n,o,t,v,vw\nC:EURUSD,1.06206,1.0631,1.0505,180300,1.05252,1651708799999,180300,1.055\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "The previous day OHLC for the ticker."
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Previous Close",
- "tags": [
- "fx:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Forex data",
- "name": "fx"
- }
- }
- },
- "/v2/aggs/ticker/{forexTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
- "get": {
- "description": "Get aggregate bars for a forex pair over a given date range in custom time window sizes.\n\u003cbr /\u003e\n\u003cbr /\u003e\nFor example, if timespan = ‘minute’ and multiplier = ‘5’ then 5-minute bars will be returned.\n",
- "parameters": [
- {
- "description": "The ticker symbol of the currency pair.",
- "example": "C:EURUSD",
- "in": "path",
- "name": "forexTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The size of the timespan multiplier.",
- "example": 1,
- "in": "path",
- "name": "multiplier",
- "required": true,
- "schema": {
- "type": "integer"
- }
- },
- {
- "description": "The size of the time window.",
- "example": "day",
- "in": "path",
- "name": "timespan",
- "required": true,
- "schema": {
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2023-01-09",
- "in": "path",
- "name": "from",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2023-01-09",
- "in": "path",
- "name": "to",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
- "example": "asc",
- "in": "query",
- "name": "sort",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ]
- }
- },
- {
- "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on\n\u003ca href=\"https://polygon.io/blog/aggs-api-updates/\" target=\"_blank\" alt=\"Aggregate Data API Improvements\"\u003eAggregate Data API Improvements\u003c/a\u003e.\n",
- "example": 120,
- "in": "query",
- "name": "limit",
- "schema": {
- "type": "integer"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "adjusted": true,
- "queryCount": 1,
- "request_id": "79c061995d8b627b736170bc9653f15d",
- "results": [
- {
- "c": 1.17721,
- "h": 1.18305,
- "l": 1.1756,
- "n": 125329,
- "o": 1.17921,
- "t": 1626912000000,
- "v": 125329,
- "vw": 1.1789
- }
- ],
- "resultsCount": 1,
- "status": "OK",
- "ticker": "C:EURUSD"
},
- "schema": {
- "allOf": [
- {
- "properties": {
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- "required": [
- "ticker"
- ],
- "type": "object"
- },
- {
- "properties": {
- "adjusted": {
- "description": "Whether or not this response was adjusted for splits.",
- "type": "boolean"
- },
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status",
- "adjusted",
- "queryCount",
- "resultsCount",
- "request_id"
- ],
- "type": "object"
- },
- {
- "properties": {
- "results": {
- "items": {
+ "type": "object"
+ },
+ "ForexSnapshotTickers": {
+ "properties": {
+ "tickers": {
+ "items": {
"properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v"
+ ],
+ "type": "object"
+ },
+ "lastQuote": {
+ "description": "The most recent quote for this ticker.",
+ "properties": {
+ "a": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "b": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The millisecond accuracy timestamp of the quote.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID on which this quote happened.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "a",
+ "b",
+ "t",
+ "x"
+ ],
+ "type": "object"
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change from the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
},
"required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "t"
+ "day",
+ "lastQuote",
+ "min",
+ "prevDay",
+ "ticker",
+ "todaysChange",
+ "todaysChangePerc",
+ "updated"
],
"type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
+ },
+ "type": "array"
}
- ]
- }
- },
- "text/csv": {
- "example": "c,h,l,n,o,t,v,vw\n1.17721,1.18305,1.1756,125329,1.17921,1626912000000,125329,1.1789\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Forex Aggregates."
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Aggregates (Bars)",
- "tags": [
- "fx:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Forex data",
- "name": "fx"
- }
- }
- },
- "/v2/aggs/ticker/{indicesTicker}/prev": {
- "get": {
- "description": "Get the previous day's open, high, low, and close (OHLC) for the specified index.\n",
- "parameters": [
- {
- "description": "The ticker symbol of Index.",
- "example": "I:SPX",
- "in": "path",
- "name": "indicesTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "queryCount": 1,
- "request_id": "b2170df985474b6d21a6eeccfb6bee67",
- "results": [
- {
- "T": "SPX",
- "c": "4,048.42",
- "h": "4,050.00",
- "l": "3,980.31",
- "o": "4,048.26",
- "t": 1678221584688
- }
- ],
- "resultsCount": 1,
- "status": "OK",
- "ticker": "I:SPX"
},
- "schema": {
- "allOf": [
- {
- "properties": {
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- "required": [
- "ticker"
- ],
- "type": "object"
- },
- {
- "properties": {
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status",
- "queryCount",
- "resultsCount",
- "request_id"
- ],
- "type": "object"
- },
- {
- "properties": {
- "results": {
- "items": {
+ "type": "object"
+ },
+ "ForexTickerResults": {
+ "properties": {
+ "results": {
+ "items": {
"properties": {
- "c": {
- "description": "The close value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- }
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
},
"required": [
- "o",
- "h",
- "l",
- "c",
- "t"
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t"
],
"type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
+ },
+ "type": "array"
}
- ]
- }
- }
- },
- "description": "The previous day OHLC for a index."
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Previous Close",
- "tags": [
- "indices:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Indices data",
- "name": "indices"
- }
- }
- },
- "/v2/aggs/ticker/{indicesTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
- "get": {
- "description": "Get aggregate bars for an index over a given date range in custom time window sizes.\n\u003cbr /\u003e\n\u003cbr /\u003e\nFor example, if timespan = ‘minute’ and multiplier = ‘5’ then 5-minute bars will be returned.\n",
- "parameters": [
- {
- "description": "The ticker symbol of Index.",
- "example": "I:SPX",
- "in": "path",
- "name": "indicesTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The size of the timespan multiplier.",
- "example": 1,
- "in": "path",
- "name": "multiplier",
- "required": true,
- "schema": {
- "type": "integer"
- }
- },
- {
- "description": "The size of the time window.",
- "example": "day",
- "in": "path",
- "name": "timespan",
- "required": true,
- "schema": {
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2023-03-10",
- "in": "path",
- "name": "from",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2023-03-10",
- "in": "path",
- "name": "to",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
- "example": "asc",
- "in": "query",
- "name": "sort",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ]
- }
- },
- {
- "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on\n\u003ca href=\"https://polygon.io/blog/aggs-api-updates/\" target=\"_blank\" alt=\"Aggregate Data API Improvements\"\u003eAggregate Data API Improvements\u003c/a\u003e.\n",
- "example": 120,
- "in": "query",
- "name": "limit",
- "schema": {
- "type": "integer"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "queryCount": 2,
- "request_id": "0cf72b6da685bcd386548ffe2895904a",
- "results": [
- {
- "c": "4,048.42",
- "h": "4,050.00",
- "l": "3,980.31",
- "n": 1,
- "o": "4,048.26",
- "t": 1678221133236
- },
- {
- "c": "4,048.42",
- "h": "4,050.00",
- "l": "3,980.31",
- "n": 1,
- "o": "4,048.26",
- "t": 1678221139690
- }
- ],
- "resultsCount": 2,
- "status": "OK",
- "ticker": "I:SPX"
},
- "schema": {
- "allOf": [
- {
- "properties": {
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- "required": [
- "ticker"
- ],
- "type": "object"
+ "type": "object"
+ },
+ "High": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "HighIndices": {
+ "description": "The highest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "IndexAggsBase": {
+ "properties": {
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
},
- {
- "properties": {
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status",
- "queryCount",
- "resultsCount",
- "request_id"
- ],
- "type": "object"
- },
- {
- "properties": {
- "results": {
- "items": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ "Indicators": {
+ "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n",
+ "items": {
+ "description": "The indicator code.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "IndicesGroupedResults": {
+ "properties": {
+ "results": {
+ "items": {
"properties": {
- "c": {
- "description": "The close value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open value for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- }
+ "c": {
+ "description": "The close value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ }
},
"required": [
- "o",
- "h",
- "l",
- "c",
- "t"
+ "o",
+ "h",
+ "l",
+ "c",
+ "t"
],
"type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
+ },
+ "type": "array"
}
- ]
- }
- }
- },
- "description": "Index Aggregates."
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Aggregates (Bars)",
- "tags": [
- "indices:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Indices data",
- "name": "indices"
- }
- }
- },
- "/v2/aggs/ticker/{optionsTicker}/prev": {
- "get": {
- "description": "Get the previous day's open, high, low, and close (OHLC) for the specified option contract.\n",
- "parameters": [
- {
- "description": "The ticker symbol of the options contract.",
- "example": "O:SPY251219C00650000",
- "in": "path",
- "name": "optionsTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "type": "boolean"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "adjusted": true,
- "queryCount": 1,
- "request_id": "6a7e466379af0a71039d60cc78e72282",
- "results": [
- {
- "T": "O:TSLA210903C00700000",
- "c": 115.97,
- "h": 117.59,
- "l": 114.13,
- "n": 2,
- "o": 115.55,
- "t": 1605042000000,
- "v": 131704427,
- "vw": 116.3058
- }
- ],
- "resultsCount": 1,
- "status": "OK",
- "ticker": "O:TSLA210903C00700000"
},
- "schema": {
- "allOf": [
- {
- "properties": {
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- "required": [
- "ticker"
- ],
- "type": "object"
+ "type": "object"
+ },
+ "IndicesOpenClose": {
+ "properties": {
+ "afterHours": {
+ "description": "The close value of the ticker symbol in after hours trading.",
+ "format": "double",
+ "type": "number"
},
- {
- "properties": {
- "adjusted": {
- "description": "Whether or not this response was adjusted for splits.",
- "type": "boolean"
- },
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status",
- "adjusted",
- "queryCount",
- "resultsCount",
- "request_id"
- ],
- "type": "object"
- },
- {
- "properties": {
- "results": {
- "items": {
+ "close": {
+ "description": "The close value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "from": {
+ "description": "The requested date.",
+ "format": "date",
+ "type": "string"
+ },
+ "high": {
+ "description": "The highest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "low": {
+ "description": "The lowest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "open": {
+ "description": "The open value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "preMarket": {
+ "description": "The open value of the ticker symbol in pre-market trading.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ "symbol": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "from",
+ "symbol",
+ "open",
+ "high",
+ "low",
+ "close"
+ ],
+ "type": "object"
+ },
+ "IndicesTickerResults": {
+ "properties": {
+ "results": {
+ "items": {
"properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
+ "c": {
+ "description": "The close value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ }
},
"required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "t"
+ "o",
+ "h",
+ "l",
+ "c",
+ "t"
],
"type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
+ },
+ "type": "array"
}
- ]
- }
- },
- "text/csv": {
- "example": "T,c,h,l,n,o,t,v,vw\nO:TSLA210903C00700000,115.97,117.59,114.13,2,115.55,1605042000000,131704427.0,116.3058\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "The previous day OHLC for the options contract."
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Previous Close",
- "tags": [
- "options:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Options data",
- "name": "options"
- }
- }
- },
- "/v2/aggs/ticker/{optionsTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
- "get": {
- "description": "Get aggregate bars for an option contract over a given date range in custom time window sizes.\n\u003cbr /\u003e\n\u003cbr /\u003e\nFor example, if timespan = ‘minute’ and multiplier = ‘5’ then 5-minute bars will be returned.\n",
- "parameters": [
- {
- "description": "The ticker symbol of the options contract.",
- "example": "O:SPY251219C00650000",
- "in": "path",
- "name": "optionsTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The size of the timespan multiplier.",
- "example": 1,
- "in": "path",
- "name": "multiplier",
- "required": true,
- "schema": {
- "type": "integer"
- }
- },
- {
- "description": "The size of the time window.",
- "example": "day",
- "in": "path",
- "name": "timespan",
- "required": true,
- "schema": {
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2023-01-09",
- "in": "path",
- "name": "from",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2023-01-09",
- "in": "path",
- "name": "to",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
- "example": "asc",
- "in": "query",
- "name": "sort",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ]
- }
- },
- {
- "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on\n\u003ca href=\"https://polygon.io/blog/aggs-api-updates/\" target=\"_blank\" alt=\"Aggregate Data API Improvements\"\u003eAggregate Data API Improvements\u003c/a\u003e.\n",
- "example": 120,
- "in": "query",
- "name": "limit",
- "schema": {
- "type": "integer"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "adjusted": true,
- "count": 2,
- "queryCount": 2,
- "request_id": "5585acde-5085-42d6-95b2-2e388a28370a",
- "results": [
- {
- "c": 26.2,
- "h": 26.2,
- "l": 26.2,
- "n": 1,
- "o": 26.2,
- "t": 1632369600000,
- "v": 2,
- "vw": 26.2
- },
- {
- "c": 28.3,
- "h": 28.3,
- "l": 28.3,
- "n": 1,
- "o": 28.3,
- "t": 1632456000000,
- "v": 2,
- "vw": 28.3
- }
- ],
- "resultsCount": 2,
- "status": "OK",
- "ticker": "O:RDFN211119C00025000"
},
- "schema": {
- "allOf": [
- {
- "properties": {
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- "required": [
- "ticker"
- ],
- "type": "object"
- },
- {
- "properties": {
- "adjusted": {
- "description": "Whether or not this response was adjusted for splits.",
- "type": "boolean"
- },
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status",
- "adjusted",
- "queryCount",
- "resultsCount",
- "request_id"
- ],
- "type": "object"
- },
- {
- "properties": {
- "results": {
- "items": {
+ "type": "object"
+ },
+ "Locales": {
+ "properties": {
+ "results": {
+ "items": {
"properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
+ "locale": {
+ "description": "An abbreviated country name.",
+ "type": "string"
+ },
+ "name": {
+ "description": "The name of the country.",
+ "type": "string"
+ }
},
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "t"
- ],
"type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
+ },
+ "type": "array"
}
- ]
- }
- },
- "text/csv": {
- "example": "c,h,l,n,o,t,v,vw\n26.2,26.2,26.2,1,26.2,1632369600000,2,26.2\n28.3,28.3,28.3,1,28.3,1632456000000,2,28.3\n",
- "schema": {
- "type": "string"
- }
- }
+ },
+ "type": "object"
},
- "description": "Options Aggregates."
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Aggregates (Bars)",
- "tags": [
- "options:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Options data",
- "name": "options"
- }
- }
- },
- "/v2/aggs/ticker/{stocksTicker}/prev": {
- "get": {
- "description": "Get the previous day's open, high, low, and close (OHLC) for the specified stock ticker.\n",
- "parameters": [
- {
- "description": "The ticker symbol of the stock/equity.",
- "example": "AAPL",
- "in": "path",
- "name": "stocksTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "type": "boolean"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "adjusted": true,
- "queryCount": 1,
- "request_id": "6a7e466379af0a71039d60cc78e72282",
- "results": [
- {
- "T": "AAPL",
- "c": 115.97,
- "h": 117.59,
- "l": 114.13,
- "o": 115.55,
- "t": 1605042000000,
- "v": 131704427,
- "vw": 116.3058
- }
- ],
- "resultsCount": 1,
- "status": "OK",
- "ticker": "AAPL"
+ "Low": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "LowIndices": {
+ "description": "The lowest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "Map": {
+ "description": "A mapping of the keys returned in the results to their descriptive name and data types.",
+ "properties": {
+ "key": {
+ "description": "A dynamic key from the results set",
+ "properties": {
+ "name": {
+ "description": "The descriptive name of this results key",
+ "type": "string"
+ },
+ "type": {
+ "description": "The data type of this results key",
+ "enum": [
+ "string",
+ "int",
+ "int64",
+ "float64"
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
},
- "schema": {
- "allOf": [
- {
- "properties": {
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- "required": [
- "ticker"
- ],
- "type": "object"
- },
- {
- "properties": {
- "adjusted": {
- "description": "Whether or not this response was adjusted for splits.",
- "type": "boolean"
+ "type": "object"
+ },
+ "MarketHoliday": {
+ "items": {
+ "properties": {
+ "close": {
+ "description": "The market close time on the holiday (if it's not closed).",
+ "format": "date-time",
+ "type": "string"
+ },
+ "date": {
+ "description": "The date of the holiday.",
+ "format": "date",
+ "type": "string"
},
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
+ "exchange": {
+ "description": "Which market the record is for.",
+ "type": "string"
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "name": {
+ "description": "The name of the holiday.",
+ "type": "string"
},
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
+ "open": {
+ "description": "The market open time on the holiday (if it's not closed).",
+ "format": "date-time",
+ "type": "string"
},
"status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status",
- "adjusted",
- "queryCount",
- "resultsCount",
- "request_id"
- ],
- "type": "object"
- },
- {
- "properties": {
- "results": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "t"
- ],
- "type": "object"
- },
- "type": "array"
+ "description": "The status of the market on the holiday.",
+ "type": "string"
}
- },
- "type": "object"
- }
- ]
- }
- },
- "text/csv": {
- "example": "T,c,h,l,o,t,v,vw\nAAPL,115.97,117.59,114.13,115.55,1605042000000,131704427.0,116.3058\n",
- "schema": {
- "type": "string"
- }
- }
+ },
+ "type": "object"
+ },
+ "type": "array"
},
- "description": "The previous day OHLC for the ticker."
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Previous Close",
- "tags": [
- "stocks:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
- }
- }
- },
- "/v2/aggs/ticker/{stocksTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
- "get": {
- "description": "Get aggregate bars for a stock over a given date range in custom time window sizes.\n\u003cbr /\u003e\n\u003cbr /\u003e\nFor example, if timespan = ‘minute’ and multiplier = ‘5’ then 5-minute bars will be returned.\n",
- "parameters": [
- {
- "description": "The ticker symbol of the stock/equity.",
- "example": "AAPL",
- "in": "path",
- "name": "stocksTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The size of the timespan multiplier.",
- "example": 1,
- "in": "path",
- "name": "multiplier",
- "required": true,
- "schema": {
- "type": "integer"
- }
- },
- {
- "description": "The size of the time window.",
- "example": "day",
- "in": "path",
- "name": "timespan",
- "required": true,
- "schema": {
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2023-01-09",
- "in": "path",
- "name": "from",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2023-01-09",
- "in": "path",
- "name": "to",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
- "example": "asc",
- "in": "query",
- "name": "sort",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ]
- }
- },
- {
- "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on\n\u003ca href=\"https://polygon.io/blog/aggs-api-updates/\" target=\"_blank\" alt=\"Aggregate Data API Improvements\"\u003eAggregate Data API Improvements\u003c/a\u003e.\n",
- "example": 120,
- "in": "query",
- "name": "limit",
- "schema": {
- "type": "integer"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "adjusted": true,
- "next_url": "https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/1578114000000/2020-01-10?cursor=bGltaXQ9MiZzb3J0PWFzYw",
- "queryCount": 2,
- "request_id": "6a7e466379af0a71039d60cc78e72282",
- "results": [
- {
- "c": 75.0875,
- "h": 75.15,
- "l": 73.7975,
- "n": 1,
- "o": 74.06,
- "t": 1577941200000,
- "v": 135647456,
- "vw": 74.6099
- },
- {
- "c": 74.3575,
- "h": 75.145,
- "l": 74.125,
- "n": 1,
- "o": 74.2875,
- "t": 1578027600000,
- "v": 146535512,
- "vw": 74.7026
- }
- ],
- "resultsCount": 2,
- "status": "OK",
- "ticker": "AAPL"
- },
- "schema": {
- "allOf": [
- {
- "properties": {
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- "required": [
- "ticker"
- ],
- "type": "object"
+ "MarketStatus": {
+ "properties": {
+ "afterHours": {
+ "description": "Whether or not the market is in post-market hours.",
+ "type": "boolean"
},
- {
- "properties": {
- "adjusted": {
- "description": "Whether or not this response was adjusted for splits.",
- "type": "boolean"
- },
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "currencies": {
+ "properties": {
+ "crypto": {
+ "description": "The status of the crypto market.",
+ "type": "string"
+ },
+ "fx": {
+ "description": "The status of the forex market.",
+ "type": "string"
+ }
},
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
+ "type": "object"
+ },
+ "earlyHours": {
+ "description": "Whether or not the market is in pre-market hours.",
+ "type": "boolean"
+ },
+ "exchanges": {
+ "properties": {
+ "nasdaq": {
+ "description": "The status of the Nasdaq market.",
+ "type": "string"
+ },
+ "nyse": {
+ "description": "The status of the NYSE market.",
+ "type": "string"
+ },
+ "otc": {
+ "description": "The status of the OTC market.",
+ "type": "string"
+ }
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status",
- "adjusted",
- "queryCount",
- "resultsCount",
- "request_id"
- ],
- "type": "object"
- },
- {
- "properties": {
- "results": {
- "items": {
+ "type": "object"
+ },
+ "market": {
+ "description": "The status of the market as a whole.",
+ "type": "string"
+ },
+ "serverTime": {
+ "description": "The current time of the server.",
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Markets": {
+ "properties": {
+ "results": {
+ "description": "A list of supported markets.",
+ "items": {
"properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
+ "desc": {
+ "description": "A description of the market.",
+ "type": "string"
+ },
+ "market": {
+ "description": "The name of the market.",
+ "type": "string"
+ }
},
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "t"
- ],
"type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
- }
- },
- "type": "object"
+ },
+ "type": "array"
}
- ]
- }
- },
- "text/csv": {
- "example": "c,h,l,n,o,t,v,vw\n75.0875,75.15,73.7975,1,74.06,1577941200000,135647456.0,74.6099\n74.3575,75.145,74.125,1,74.2875,1578027600000,146535512.0,74.7026\n",
- "schema": {
- "type": "string"
- }
- }
+ },
+ "type": "object"
},
- "description": "Stock Aggregates."
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Aggregates (Bars)",
- "tags": [
- "stocks:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
- }
- }
- },
- "/v2/last/nbbo/{stocksTicker}": {
- "get": {
- "description": "Get the most recent NBBO (Quote) tick for a given stock.",
- "operationId": "LastQuote",
- "parameters": [
- {
- "description": "The ticker symbol of the stock/equity.",
- "example": "AAPL",
- "in": "path",
- "name": "stocksTicker",
- "required": true,
- "schema": {
- "type": "string"
+ "MsLatency": {
+ "description": "The milliseconds of latency for the query results.",
+ "type": "integer"
},
- "x-polygon-go-id": "Ticker"
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "request_id": "b84e24636301f19f88e0dfbf9a45ed5c",
- "results": {
- "P": 127.98,
- "S": 7,
- "T": "AAPL",
- "X": 19,
- "p": 127.96,
- "q": 83480742,
- "s": 1,
- "t": 1617827221349730300,
- "x": 11,
- "y": 1617827221349366000,
- "z": 3
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "results": {
- "properties": {
- "P": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "S": {
- "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.",
- "type": "integer"
- },
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "X": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- "c": {
- "description": "A list of condition codes.",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
- "format": "int32",
- "type": "integer"
- },
- "type": "array",
- "x-polygon-go-type": {
- "name": "Int32Array"
- }
- },
- "f": {
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
- "type": "integer"
- },
- "i": {
- "description": "A list of indicator codes.",
- "items": {
- "description": "The indicator codes. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).",
- "format": "int32",
- "type": "integer"
- },
- "type": "array",
- "x-polygon-go-type": {
- "name": "Int32Array"
- }
+ "News": {
+ "items": {
+ "properties": {
+ "image": {
+ "description": "A URL of the image for the news article, if found.",
+ "type": "string"
},
- "p": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
+ "keywords": {
+ "description": "A list of common keywords related to the news article.",
+ "items": {
+ "description": "Common keywords of the news article.",
+ "type": "string"
+ },
+ "type": "array"
},
- "q": {
- "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).",
- "format": "int64",
- "type": "integer"
+ "source": {
+ "description": "The publication source of the article.",
+ "type": "string"
},
- "s": {
- "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.",
- "type": "integer"
+ "summary": {
+ "description": "A summary of the news article.",
+ "type": "string"
},
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
+ "symbols": {
+ "description": "A list of ticker symbols relating to the article.",
+ "items": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "type": "array"
},
- "x": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
+ "timestamp": {
+ "description": "The timestamp of the news article.",
+ "format": "date-time",
+ "type": "string"
},
- "y": {
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
- "type": "integer"
+ "title": {
+ "description": "The title of the news article.",
+ "type": "string"
},
- "z": {
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ",
- "type": "integer"
+ "url": {
+ "description": "A direct link to the news article from its source publication.",
+ "type": "string"
}
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "LastQuoteResult"
- }
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "P,S,T,X,p,q,s,t,x,y,z\n127.98,7,AAPL,19,127.96,83480742,1,1617827221349730300,11,1617827221349366000,3\n",
- "schema": {
- "type": "string"
- }
- }
+ "type": "object"
+ },
+ "type": "array"
},
- "description": "The last NBBO tick for this stock."
- },
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
- },
- "404": {
- "description": "The specified resource was not found"
- }
- },
- "summary": "Last Quote",
- "tags": [
- "stocks:last:quote"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
- ],
- "x-polygon-entitlement-data-type": {
- "description": "NBBO data",
- "name": "nbbo"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
- }
- }
- },
- "/v2/last/trade/{optionsTicker}": {
- "get": {
- "description": "Get the most recent trade for a given options contract.",
- "operationId": "LastTradeOptions",
- "parameters": [
- {
- "description": "The ticker symbol of the options contract.",
- "example": "O:TSLA210903C00700000",
- "in": "path",
- "name": "optionsTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "request_id": "f05562305bd26ced64b98ed68b3c5d96",
- "results": {
- "T": "O:TSLA210903C00700000",
- "c": [
- 227
- ],
- "f": 1617901342969796400,
- "i": "",
- "p": 115.55,
- "q": 1325541950,
- "r": 202,
- "s": 25,
- "t": 1617901342969834000,
- "x": 312
- },
- "status": "OK"
+ "NumberOfItems": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "OTC": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "Open": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "OpenIndices": {
+ "description": "The open value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "PaginationHooksBase": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ }
},
- "schema": {
- "properties": {
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "type": "object"
+ },
+ "Price": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "QueryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "RatingSection": {
+ "properties": {
+ "current": {
+ "description": "Analyst Rating at current month",
+ "example": 0,
+ "type": "number"
},
- "results": {
- "properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "c": {
- "description": "A list of condition codes.",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
- "format": "int32",
- "type": "integer"
- },
- "type": "array",
- "x-polygon-go-type": {
- "name": "Int32Array"
- }
- },
- "e": {
- "description": "The trade correction indicator.",
- "type": "integer"
- },
- "f": {
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
- "type": "integer"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
- "format": "double",
- "type": "number"
- },
- "q": {
- "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).",
- "format": "int64",
- "type": "integer"
- },
- "r": {
- "description": "The ID for the Trade Reporting Facility where the trade took place.",
- "type": "integer"
- },
- "s": {
- "description": "The size of a trade (also known as volume).",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- "y": {
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
- "type": "integer"
- },
- "z": {
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ",
- "type": "integer"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "LastTradeResult"
- }
+ "month1": {
+ "description": "Analyst Ratings at 1 month in the future",
+ "example": 1,
+ "type": "number"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ "month2": {
+ "description": "Analyst Ratings at 2 month in the future",
+ "example": 3,
+ "type": "number"
+ },
+ "month3": {
+ "description": "Analyst Ratings at 3 month in the future",
+ "example": 4,
+ "type": "number"
+ },
+ "month4": {
+ "description": "Analyst Ratings at 4 month in the future",
+ "example": 3,
+ "type": "number"
+ },
+ "month5": {
+ "description": "Analyst Ratings at 5 month in the future",
+ "example": 2,
+ "type": "number"
}
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "T,c,f,i,p,q,r,s,t,x\nO:TSLA210903C00700000,227,1617901342969796400,,115.55,1325541950,202,25,1617901342969834000,312\n",
- "schema": {
- "type": "string"
- }
- }
+ },
+ "required": [
+ "month1",
+ "month2",
+ "month3",
+ "current"
+ ],
+ "type": "object"
},
- "description": "The last trade for this options contract."
- },
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
- },
- "404": {
- "description": "The specified resource was not found"
- }
- },
- "summary": "Last Trade",
- "tags": [
- "options:last:trade"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Trade data",
- "name": "trades"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Options data",
- "name": "options"
- }
- },
- "x-polygon-ignore": true
- },
- "/v2/last/trade/{stocksTicker}": {
- "get": {
- "description": "Get the most recent trade for a given stock.",
- "operationId": "LastTrade",
- "parameters": [
- {
- "description": "The ticker symbol of the stock/equity.",
- "example": "AAPL",
- "in": "path",
- "name": "stocksTicker",
- "required": true,
- "schema": {
- "type": "string"
+ "RequestID": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
},
- "x-polygon-go-id": "Ticker"
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "request_id": "f05562305bd26ced64b98ed68b3c5d96",
- "results": {
- "T": "AAPL",
- "c": [
- 37
- ],
- "f": 1617901342969796400,
- "i": "118749",
- "p": 129.8473,
- "q": 3135876,
- "r": 202,
- "s": 25,
- "t": 1617901342969834000,
- "x": 4,
- "y": 1617901342968000000,
- "z": 3
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
+ "RequestIdBase": {
+ "properties": {
"request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "results": {
- "properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "c": {
- "description": "A list of condition codes.",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
- "format": "int32",
- "type": "integer"
- },
- "type": "array",
- "x-polygon-go-type": {
- "name": "Int32Array"
- }
- },
- "e": {
- "description": "The trade correction indicator.",
- "type": "integer"
- },
- "f": {
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
- "type": "integer"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
- "format": "double",
- "type": "number"
- },
- "q": {
- "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).",
- "format": "int64",
- "type": "integer"
- },
- "r": {
- "description": "The ID for the Trade Reporting Facility where the trade took place.",
- "type": "integer"
- },
- "s": {
- "description": "The size of a trade (also known as volume).",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- "y": {
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
- "type": "integer"
- },
- "z": {
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ",
- "type": "integer"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "LastTradeResult"
- }
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ "description": "A request id assigned by the server.",
+ "type": "string"
}
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "T,c,f,i,p,q,r,s,t,x,y,z\nAAPL,37,1617901342969796400,118749,129.8473,3135876,202,25,1617901342969834000,4,1617901342968000000,3\n",
- "schema": {
- "type": "string"
- }
- }
+ },
+ "required": [
+ "request_id"
+ ],
+ "type": "object"
},
- "description": "The last trade for this stock."
- },
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
- },
- "404": {
- "description": "The specified resource was not found"
- }
- },
- "summary": "Last Trade",
- "tags": [
- "stocks:last:trade"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Trade data",
- "name": "trades"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
- }
- }
- },
- "/v2/reference/news": {
- "get": {
- "description": "Get the most recent news articles relating to a stock ticker symbol, including a summary of the article and a link to the original source.",
- "operationId": "ListNews",
- "parameters": [
- {
- "description": "Return results that contain this ticker.",
- "in": "query",
- "name": "ticker",
- "schema": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
+ "SequenceNumber": {
+ "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",
+ "format": "int64",
+ "type": "integer"
},
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "Return results published on, before, or after this date.",
- "in": "query",
- "name": "published_utc",
- "schema": {
- "oneOf": [
- {
- "format": "date-time",
- "type": "string"
- },
- {
- "format": "date",
- "type": "string"
- }
- ]
+ "Size": {
+ "description": "The size of a trade (also known as volume).\n",
+ "format": "double",
+ "type": "number"
},
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "Search by ticker.",
- "in": "query",
- "name": "ticker.gte",
- "schema": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- {
- "description": "Search by ticker.",
- "in": "query",
- "name": "ticker.gt",
- "schema": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- {
- "description": "Search by ticker.",
- "in": "query",
- "name": "ticker.lte",
- "schema": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- {
- "description": "Search by ticker.",
- "in": "query",
- "name": "ticker.lt",
- "schema": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- {
- "description": "Search by published_utc.",
- "in": "query",
- "name": "published_utc.gte",
- "schema": {
- "oneOf": [
- {
- "format": "date-time",
- "type": "string"
- },
- {
- "format": "date",
- "type": "string"
- }
- ]
- }
- },
- {
- "description": "Search by published_utc.",
- "in": "query",
- "name": "published_utc.gt",
- "schema": {
- "oneOf": [
- {
- "format": "date-time",
- "type": "string"
- },
- {
- "format": "date",
- "type": "string"
- }
- ]
- }
- },
- {
- "description": "Search by published_utc.",
- "in": "query",
- "name": "published_utc.lte",
- "schema": {
- "oneOf": [
- {
- "format": "date-time",
- "type": "string"
+ "SnapshotMinOHLCV": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
},
- {
- "format": "date",
- "type": "string"
- }
- ]
- }
- },
- {
- "description": "Search by published_utc.",
- "in": "query",
- "name": "published_utc.lt",
- "schema": {
- "oneOf": [
- {
- "format": "date-time",
- "type": "string"
+ "type": "object"
+ },
+ "SnapshotOHLCV": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
},
- {
- "format": "date",
- "type": "string"
- }
- ]
- }
- },
- {
- "description": "Order results based on the `sort` field.",
- "in": "query",
- "name": "order",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 1000.",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "example": 10,
- "maximum": 1000,
- "minimum": 1,
- "type": "integer"
- }
- },
- {
- "description": "Sort field used for ordering.",
- "in": "query",
- "name": "sort",
- "schema": {
- "default": "published_utc",
- "enum": [
- "published_utc"
- ],
- "example": "published_utc",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "count": 1,
- "next_url": "https://api.polygon.io:443/v2/reference/news?cursor=eyJsaW1pdCI6MSwic29ydCI6InB1Ymxpc2hlZF91dGMiLCJvcmRlciI6ImFzY2VuZGluZyIsInRpY2tlciI6e30sInB1Ymxpc2hlZF91dGMiOnsiZ3RlIjoiMjAyMS0wNC0yNiJ9LCJzZWFyY2hfYWZ0ZXIiOlsxNjE5NDA0Mzk3MDAwLG51bGxdfQ",
- "request_id": "831afdb0b8078549fed053476984947a",
- "results": [
- {
- "amp_url": "https://amp.benzinga.com/amp/content/20784086",
- "article_url": "https://www.benzinga.com/markets/cryptocurrency/21/04/20784086/cathie-wood-adds-more-coinbase-skillz-trims-square",
- "author": "Rachit Vats",
- "description": "\u003cp\u003eCathie Wood-led Ark Investment Management on Friday snapped up another 221,167 shares of the cryptocurrency exchange \u003cstrong\u003eCoinbase Global Inc \u003c/strong\u003e(NASDAQ \u003ca class=\"ticker\" href=\"https://www.benzinga.com/stock/coin#NASDAQ\"\u003eCOIN\u003c/a\u003e) worth about $64.49 million on the stock\u0026rsquo;s Friday\u0026rsquo;s dip and also its fourth-straight loss.\u003c/p\u003e\n\u003cp\u003eThe investment firm\u0026rsquo;s \u003cstrong\u003eArk Innovation ETF\u003c/strong\u003e (NYSE \u003ca class=\" ticker\" href=\"https://www.benzinga.com/stock/arkk#NYSE\"\u003eARKK\u003c/a\u003e) bought the shares of the company that closed 0.63% lower at $291.60 on Friday, giving the cryptocurrency exchange a market cap of $58.09 billion. Coinbase\u0026rsquo;s market cap has dropped from $85.8 billion on its blockbuster listing earlier this month.\u003c/p\u003e\n\u003cp\u003eThe New York-based company also added another 3,873 shares of the mobile gaming company \u003cstrong\u003eSkillz Inc\u003c/strong\u003e (NYSE \u003ca class=\" ticker\" href=\"https://www.benzinga.com/stock/sklz#NYSE\"\u003eSKLZ\u003c/a\u003e), \u003ca href=\"http://www.benzinga.com/markets/cryptocurrency/21/04/20762794/cathie-woods-ark-loads-up-another-1-2-million-shares-in-skillz-also-adds-coinbase-draftkin\" \u003ejust a day after\u003c/a\u003e snapping 1.2 million shares of the stock.\u003c/p\u003e\n \u003cp\u003eARKK bought the shares of the company which closed ...\u003c/p\u003e\u003cp\u003e\u003ca href=https://www.benzinga.com/markets/cryptocurrency/21/04/20784086/cathie-wood-adds-more-coinbase-skillz-trims-square alt=Cathie Wood Adds More Coinbase, Skillz, Trims Square\u003eFull story available on Benzinga.com\u003c/a\u003e\u003c/p\u003e",
- "id": "nJsSJJdwViHZcw5367rZi7_qkXLfMzacXBfpv-vD9UA",
- "image_url": "https://cdn2.benzinga.com/files/imagecache/og_image_social_share_1200x630/images/story/2012/andre-francois-mckenzie-auhr4gcqcce-unsplash.jpg?width=720",
- "keywords": [
- "Sector ETFs",
- "Penny Stocks",
- "Cryptocurrency",
- "Small Cap",
- "Markets",
- "Trading Ideas",
- "ETFs"
- ],
- "published_utc": "2021-04-26T02:33:17Z",
- "publisher": {
- "favicon_url": "https://s3.polygon.io/public/public/assets/news/favicons/benzinga.ico",
- "homepage_url": "https://www.benzinga.com/",
- "logo_url": "https://s3.polygon.io/public/public/assets/news/logos/benzinga.svg",
- "name": "Benzinga"
- },
- "tickers": [
- "DOCU",
- "DDD",
- "NIU",
- "ARKF",
- "NVDA",
- "SKLZ",
- "PCAR",
- "MASS",
- "PSTI",
- "SPFR",
- "TREE",
- "PHR",
- "IRDM",
- "BEAM",
- "ARKW",
- "ARKK",
- "ARKG",
- "PSTG",
- "SQ",
- "IONS",
- "SYRS"
- ],
- "title": "Cathie Wood Adds More Coinbase, Skillz, Trims Square"
- }
- ],
- "status": "OK"
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v"
+ ],
+ "type": "object"
+ },
+ "SnapshotOHLCVVW": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
},
- "schema": {
- "properties": {
- "count": {
- "description": "The total number of results for this request.",
- "type": "integer"
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "SnapshotOHLCVVWOtc": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "results": {
- "items": {
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "StandardBase": {
+ "allOf": [
+ {
"properties": {
- "amp_url": {
- "description": "The mobile friendly Accelerated Mobile Page (AMP) URL.",
- "type": "string"
- },
- "article_url": {
- "description": "A link to the news article.",
- "type": "string"
- },
- "author": {
- "description": "The article's author.",
- "type": "string"
- },
- "description": {
- "description": "A description of the article.",
- "type": "string"
- },
- "id": {
- "description": "Unique identifier for the article.",
- "type": "string"
- },
- "image_url": {
- "description": "The article's image URL.",
- "type": "string"
- },
- "keywords": {
- "description": "The keywords associated with the article (which will vary depending on\nthe publishing source).",
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "published_utc": {
- "description": "The date the article was published on.",
- "format": "date-time",
- "type": "string"
- },
- "publisher": {
- "properties": {
- "favicon_url": {
- "description": "The publisher's homepage favicon URL.",
+ "request_id": {
+ "description": "A request id assigned by the server.",
"type": "string"
- },
- "homepage_url": {
- "description": "The publisher's homepage URL.",
- "type": "string"
- },
- "logo_url": {
- "description": "The publisher's logo URL.",
- "type": "string"
- },
- "name": {
- "description": "The publisher's name.",
- "type": "string"
- }
- },
- "required": [
- "name",
- "logo_url",
- "homepage_url"
- ],
- "type": "object"
- },
- "tickers": {
- "description": "The ticker symbols associated with the article.",
- "items": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "type": "array"
- },
- "title": {
- "description": "The title of the news article.",
- "type": "string"
- }
+ }
},
"required": [
- "id",
- "publisher",
- "title",
- "author",
- "published_utc",
- "article_url",
- "tickers"
+ "request_id"
],
- "type": "object",
- "x-polygon-go-type": {
- "name": "NewsArticleMetadata",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array",
- "x-polygon-go-type": {
- "name": "ListNewsArticlesResults"
- }
+ "type": "object"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ {
+ "properties": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status"
+ ],
+ "type": "object"
}
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "id,publisher_name,publisher_homepage_url,publisher_logo_url,publisher_favicon_url,title,author,published_utc,article_url,tickers,amp_url,image_url,description,keywords\nnJsSJJdwViHZcw5367rZi7_qkXLfMzacXBfpv-vD9UA,Benzinga,https://www.benzinga.com/,https://s3.polygon.io/public/public/assets/news/logos/benzinga.svg,https://s3.polygon.io/public/public/assets/news/favicons/benzinga.ico,\"Cathie Wood Adds More Coinbase, Skillz, Trims Square\",Rachit Vats,2021-04-26T02:33:17Z,https://www.benzinga.com/markets/cryptocurrency/21/04/20784086/cathie-wood-adds-more-coinbase-skillz-trims-square,\"DOCU,DDD,NIU,ARKF,NVDA,SKLZ,PCAR,MASS,PSTI,SPFR,TREE,PHR,IRDM,BEAM,ARKW,ARKK,ARKG,PSTG,SQ,IONS,SYRS\",https://amp.benzinga.com/amp/content/20784086,https://cdn2.benzinga.com/files/imagecache/og_image_social_share_1200x630/images/story/2012/andre-francois-mckenzie-auhr4gcqcce-unsplash.jpg?width=720,\"\u003cp\u003eCathie Wood-led Ark Investment Management on Friday snapped up another 221,167 shares of the cryptocurrency exchange \u003cstrong\u003eCoinbase Global Inc \u003c/strong\u003e(NASDAQ \u003ca class=\\\"ticker\\\" href=\\\"https://www.benzinga.com/stock/coin#NASDAQ\\\"\u003eCOIN\u003c/a\u003e) worth about $64.49 million on the stock\u0026rsquo;s Friday\u0026rsquo;s dip and also its fourth-straight loss.\u003c/p\u003e \u003cp\u003eThe investment firm\u0026rsquo;s \u003cstrong\u003eArk Innovation ETF\u003c/strong\u003e (NYSE \u003ca class=\\\" ticker\\\" href=\\\"https://www.benzinga.com/stock/arkk#NYSE\\\"\u003eARKK\u003c/a\u003e) bought the shares of the company that closed 0.63% lower at $291.60 on Friday, giving the cryptocurrency exchange a market cap of $58.09 billion. Coinbase\u0026rsquo;s market cap has dropped from $85.8 billion on its blockbuster listing earlier this month.\u003c/p\u003e \u003cp\u003eThe New York-based company also added another 3,873 shares of the mobile gaming company \u003cstrong\u003eSkillz Inc\u003c/strong\u003e (NYSE \u003ca class=\\\" ticker\\\" href=\\\"https://www.benzinga.com/stock/sklz#NYSE\\\"\u003eSKLZ\u003c/a\u003e), \u003ca href=\\\"http://www.benzinga.com/markets/cryptocurrency/21/04/20762794/cathie-woods-ark-loads-up-another-1-2-million-shares-in-skillz-also-adds-coinbase-draftkin\\\" \u003ejust a day after\u003c/a\u003e snapping 1.2 million shares of the stock.\u003c/p\u003e \u003cp\u003eARKK bought the shares of the company which closed ...\u003c/p\u003e\u003cp\u003e\u003ca href=https://www.benzinga.com/markets/cryptocurrency/21/04/20784086/cathie-wood-adds-more-coinbase-skillz-trims-square alt=Cathie Wood Adds More Coinbase, Skillz, Trims Square\u003eFull story available on Benzinga.com\u003c/a\u003e\u003c/p\u003e\",\"Sector ETFs,Penny Stocks,Cryptocurrency,Small Cap,Markets,Trading Ideas,ETFs\"\n",
- "schema": {
- "type": "string"
- }
- }
+ ]
},
- "description": "An array of news articles."
- },
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
- },
- "404": {
- "description": "The specified resource was not found"
- }
- },
- "summary": "Ticker News",
- "tags": [
- "reference:news"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
- },
- "x-polygon-paginate": {
- "sort": {
- "default": "published_utc",
- "enum": [
- "published_utc"
- ],
- "limit": {
- "default": 10,
- "maximum": 1000,
- "minimum": 1
- }
- }
- }
- }
- },
- "/v2/snapshot/locale/global/markets/crypto/tickers": {
- "get": {
- "description": "Get the current minute, day, and previous day’s aggregate, as well as the last trade and quote for all traded cryptocurrency symbols.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n",
- "parameters": [
- {
- "description": "A comma separated list of tickers to get snapshots for.",
- "in": "query",
- "name": "tickers",
- "schema": {
- "items": {
+ "Status": {
+ "description": "The status of this request's response.",
"type": "string"
- },
- "type": "array"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "status": "OK",
- "tickers": [
- {
- "day": {
- "c": 0.296,
- "h": 0.59714,
- "l": 0.23706,
- "o": 0.28,
- "v": 4097699.5691991993,
- "vw": 0
- },
- "lastTrade": {
- "c": [
- 1
- ],
- "i": 413131,
- "p": 0.293,
- "s": 13.6191,
- "t": 1605292686010,
- "x": 17
- },
- "min": {
- "c": 0.296,
- "h": 0.296,
- "l": 0.294,
- "o": 0.296,
- "v": 123.4866,
- "vw": 0
- },
- "prevDay": {
- "c": 0.281,
- "h": 0.59714,
- "l": 0.23706,
- "o": 0.27,
- "v": 6070178.786154971,
- "vw": 0.4076
- },
- "ticker": "X:FSNUSD",
- "todaysChange": 0.012,
- "todaysChangePerc": 4.270463,
- "updated": 1605330008999
- }
- ]
+ },
+ "StatusBase": {
+ "properties": {
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
},
- "schema": {
- "allOf": [
- {
- "properties": {
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status"
- ],
- "type": "object"
+ "required": [
+ "status"
+ ],
+ "type": "object"
+ },
+ "StatusCountBase": {
+ "properties": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
},
- {
- "properties": {
- "tickers": {
- "items": {
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status"
+ ],
+ "type": "object"
+ },
+ "StockSymbol": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "StocksGroupedResults": {
+ "properties": {
+ "results": {
+ "items": {
"properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "properties": {
- "c": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "c": {
"description": "The close price for the symbol in the given time period.",
"format": "double",
"type": "number"
- },
- "h": {
+ },
+ "h": {
"description": "The highest price for the symbol in the given time period.",
"format": "double",
"type": "number"
- },
- "l": {
+ },
+ "l": {
"description": "The lowest price for the symbol in the given time period.",
"format": "double",
"type": "number"
- },
- "o": {
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
"description": "The open price for the symbol in the given time period.",
"format": "double",
"type": "number"
- },
- "v": {
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
"description": "The trading volume of the symbol in the given time period.",
"format": "double",
"type": "number"
- },
- "vw": {
+ },
+ "vw": {
"description": "The volume weighted average price.",
"format": "double",
"type": "number"
- }
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "t",
+ "v",
+ "T"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "StocksOpenClose": {
+ "properties": {
+ "afterHours": {
+ "description": "The close price of the ticker symbol in after hours trading.",
+ "format": "double",
+ "type": "number"
+ },
+ "close": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "from": {
+ "description": "The requested date.",
+ "format": "date",
+ "type": "string"
+ },
+ "high": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "low": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "open": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "preMarket": {
+ "description": "The open price of the ticker symbol in pre-market trading.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ "symbol": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "volume": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "status",
+ "from",
+ "symbol",
+ "open",
+ "high",
+ "low",
+ "close",
+ "volume"
+ ],
+ "type": "object"
+ },
+ "StocksSnapshotLastQuote": {
+ "properties": {
+ "P": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "S": {
+ "description": "The ask size in lots.",
+ "type": "integer"
+ },
+ "p": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The bid size in lots.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "p",
+ "s",
+ "P",
+ "S",
+ "t"
+ ],
+ "type": "object"
+ },
+ "StocksSnapshotMinute": {
+ "properties": {
+ "av": {
+ "description": "The accumulated volume.",
+ "type": "integer"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "av",
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw",
+ "t",
+ "n"
+ ],
+ "type": "object"
+ },
+ "StocksSnapshotMinuteOTC": {
+ "properties": {
+ "av": {
+ "description": "The accumulated volume.",
+ "type": "integer"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "av",
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw",
+ "t",
+ "n"
+ ],
+ "type": "object"
+ },
+ "StocksSnapshotTicker": {
+ "properties": {
+ "ticker": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
},
"required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
],
"type": "object"
- },
- "lastTrade": {
- "allOf": [
- {
- "description": "The most recent trade for this ticker."
- },
- {
- "properties": {
- "c": {
+ },
+ "lastQuote": {
+ "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
+ "properties": {
+ "P": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "S": {
+ "description": "The ask size in lots.",
+ "type": "integer"
+ },
+ "p": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The bid size in lots.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "p",
+ "s",
+ "P",
+ "S",
+ "t"
+ ],
+ "type": "object"
+ },
+ "lastTrade": {
+ "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.",
+ "properties": {
+ "c": {
"description": "The trade conditions.",
"items": {
- "type": "integer"
+ "type": "integer"
},
"type": "array"
- },
- "i": {
+ },
+ "i": {
"description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
"type": "string"
- },
- "p": {
+ },
+ "p": {
"description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
"format": "double",
"type": "number"
- },
- "s": {
+ },
+ "s": {
"description": "The size (volume) of the trade.",
- "type": "number"
- },
- "t": {
- "description": "The millisecond accuracy timestamp. This is the timestamp of when the trade was generated at the exchange.",
"type": "integer"
- },
- "x": {
- "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
"type": "integer"
- }
},
- "required": [
- "c",
- "i",
- "p",
- "s",
- "t",
- "x"
- ],
- "type": "object"
- }
- ]
- },
- "min": {
+ "x": {
+ "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "c",
+ "i",
+ "p",
+ "s",
+ "t",
+ "x"
+ ],
+ "type": "object"
+ },
+ "min": {
"description": "The most recent minute bar for this ticker.",
"properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
+ "av": {
+ "description": "The accumulated volume.",
+ "type": "integer"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
},
"required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
+ "av",
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw",
+ "t",
+ "n"
],
"type": "object"
- },
- "prevDay": {
+ },
+ "prevDay": {
"description": "The previous day's bar for this ticker.",
"properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
},
"required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
],
"type": "object"
- },
- "ticker": {
+ },
+ "ticker": {
"description": "The exchange symbol that this item is traded under.",
"type": "string"
- },
- "todaysChange": {
- "description": "The value of the change the from previous day.",
+ },
+ "todaysChange": {
+ "description": "The value of the change from the previous day.",
"format": "double",
"type": "number"
- },
- "todaysChangePerc": {
+ },
+ "todaysChangePerc": {
"description": "The percentage change since the previous day.",
"format": "double",
"type": "number"
- },
- "updated": {
+ },
+ "updated": {
"description": "The last updated timestamp.",
"type": "integer"
- }
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "StocksSnapshotTickers": {
+ "properties": {
+ "tickers": {
+ "items": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "lastQuote": {
+ "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
+ "properties": {
+ "P": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "S": {
+ "description": "The ask size in lots.",
+ "type": "integer"
+ },
+ "p": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The bid size in lots.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "p",
+ "s",
+ "P",
+ "S",
+ "t"
+ ],
+ "type": "object"
+ },
+ "lastTrade": {
+ "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.",
+ "properties": {
+ "c": {
+ "description": "The trade conditions.",
+ "items": {
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size (volume) of the trade.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "c",
+ "i",
+ "p",
+ "s",
+ "t",
+ "x"
+ ],
+ "type": "object"
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "av": {
+ "description": "The accumulated volume.",
+ "type": "integer"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "av",
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw",
+ "t",
+ "n"
+ ],
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change from the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
},
- "required": [
- "day",
- "lastTrade",
- "min",
- "prevDay",
- "ticker",
- "todaysChange",
- "todaysChangePerc",
- "updated"
- ],
"type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
+ },
+ "type": "array"
}
- ]
- }
- },
- "text/csv": {
- "example": "day_c,day_h,day_l,day_o,day_v,lastTrade_c,lastTrade_i,lastTrade_p,lastTrade_s,lastTrade_t,lastTrade_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n16260.85,16428.4,15830.4,16418.07,105008.84231068,0,\"[2]\",464569520,16242.31,0.001933,1605294230780,4,16235.1,16264.29,16129.3,16257.51,19.30791925,0,16399.24,16418.07,16399.24,16418.07,0.99167108,16402.6893\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Get current state for all tickers"
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "All Tickers",
- "tags": [
- "crypto:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Crypto data",
- "name": "crypto"
- }
- }
- },
- "/v2/snapshot/locale/global/markets/crypto/tickers/{ticker}": {
- "get": {
- "description": "Get the current minute, day, and previous day’s aggregate, as well as the last trade and quote for a single traded cryptocurrency symbol.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
- "parameters": [
- {
- "description": "Ticker of the snapshot",
- "example": "X:BTCUSD",
- "in": "path",
- "name": "ticker",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "request_id": "ad92e92ce183112c593717f00dfebd2c",
- "status": "OK",
- "ticker": {
- "day": {
- "c": 16260.85,
- "h": 16428.4,
- "l": 15830.4,
- "o": 16418.07,
- "v": 105008.84231068,
- "vw": 0
- },
- "lastTrade": {
- "c": [
- 2
- ],
- "i": "464569520",
- "p": 16242.31,
- "s": 0.001933,
- "t": 1605294230780,
- "x": 4
- },
- "min": {
- "c": 16235.1,
- "h": 16264.29,
- "l": 16129.3,
- "o": 16257.51,
- "v": 19.30791925,
- "vw": 0
- },
- "prevDay": {
- "c": 16399.24,
- "h": 16418.07,
- "l": 16399.24,
- "o": 16418.07,
- "v": 0.99167108,
- "vw": 16402.6893
- },
- "ticker": "X:BTCUSD",
- "todaysChange": -156.93,
- "todaysChangePerc": -0.956935,
- "updated": 1605330008999
- }
},
- "schema": {
- "allOf": [
- {
- "properties": {
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status"
- ],
- "type": "object"
- },
- {
- "properties": {
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- }
- },
- "required": [
- "request_id"
- ],
- "type": "object"
- },
- {
- "properties": {
- "ticker": {
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "properties": {
+ "type": "object"
+ },
+ "StocksTickerResultsOTC": {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
"c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
"h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
"l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
},
"o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
},
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "lastTrade": {
- "allOf": [
- {
- "description": "The most recent trade for this ticker."
- },
- {
- "properties": {
- "c": {
- "description": "The trade conditions.",
- "items": {
- "type": "integer"
- },
- "type": "array"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The size (volume) of the trade.",
- "type": "number"
- },
- "t": {
- "description": "The millisecond accuracy timestamp. This is the timestamp of when the trade was generated at the exchange.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
- "type": "integer"
- }
- },
- "required": [
- "c",
- "i",
- "p",
- "s",
- "t",
- "x"
- ],
- "type": "object"
- }
- ]
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
},
"v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
"vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
}
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
},
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
+ "required": [
"o",
"h",
"l",
"c",
"v",
- "vw"
- ],
- "type": "object"
+ "t"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "StocksV2Base": {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "f": {
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
+ },
+ "q": {
+ "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",
+ "format": "int64",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "y": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "T",
+ "t",
+ "y",
+ "f",
+ "q"
+ ],
+ "type": "object"
+ },
+ "StocksV2NBBO": {
+ "allOf": [
+ {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
},
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
+ "f": {
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
},
- "todaysChange": {
- "description": "The value of the change the from previous day.",
- "format": "double",
- "type": "number"
+ "q": {
+ "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",
+ "format": "int64",
+ "type": "integer"
},
- "todaysChangePerc": {
- "description": "The percentage change since the previous day.",
- "format": "double",
- "type": "number"
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
},
- "updated": {
- "description": "The last updated timestamp.",
- "type": "integer"
+ "y": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
}
- },
- "required": [
- "day",
- "lastTrade",
- "min",
- "prevDay",
- "ticker",
- "todaysChange",
- "todaysChangePerc",
- "updated"
- ],
- "type": "object"
- }
- },
- "type": "object"
- }
- ]
- }
- },
- "text/csv": {
- "example": "day_c,day_h,day_l,day_o,day_v,lastTrade_c,lastTrade_i,lastTrade_p,lastTrade_s,lastTrade_t,lastTrade_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n16260.85,16428.4,15830.4,16418.07,105008.84231068,0,\"[2]\",464569520,16242.31,0.001933,1605294230780,4,16235.1,16264.29,16129.3,16257.51,19.30791925,0,16399.24,16418.07,16399.24,16418.07,0.99167108,16402.6893\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Get current state for a ticker"
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Ticker",
- "tags": [
- "crypto:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Crypto data",
- "name": "crypto"
- }
- }
- },
- "/v2/snapshot/locale/global/markets/crypto/tickers/{ticker}/book": {
- "get": {
- "description": "Get the current level 2 book of a single ticker. This is the combined book from all of the exchanges.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
- "parameters": [
- {
- "description": "The cryptocurrency ticker.",
- "example": "X:BTCUSD",
- "in": "path",
- "name": "ticker",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "data": {
- "askCount": 593.1412981600005,
- "asks": [
- {
- "p": 11454,
- "x": {
- "2": 1
- }
- },
- {
- "p": 11455,
- "x": {
- "2": 1
- }
- }
- ],
- "bidCount": 694.951789670001,
- "bids": [
- {
- "p": 16303.17,
- "x": {
- "1": 2
- }
- },
- {
- "p": 16302.94,
- "x": {
- "1": 0.02859424,
- "6": 0.023455
- }
- }
- ],
- "spread": -4849.17,
- "ticker": "X:BTCUSD",
- "updated": 1605295074162
- },
- "status": "OK"
- },
- "schema": {
- "allOf": [
- {
- "description": "The status of this request's response.",
- "type": "string"
+ },
+ "required": [
+ "T",
+ "t",
+ "y",
+ "f",
+ "q"
+ ],
+ "type": "object"
},
{
- "properties": {
- "data": {
- "properties": {
- "askCount": {
- "description": "The combined total number of asks in the book.",
- "format": "double",
- "type": "number"
+ "properties": {
+ "P": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
},
- "asks": {
- "items": {
- "properties": {
- "p": {
- "description": "The price of this book level.",
- "format": "double",
- "type": "number"
- },
- "x": {
- "description": "A map of the exchange ID to number of shares at this price level.\n\u003cbr /\u003e\n\u003cbr /\u003e\n**Example:**\n\u003cbr /\u003e\n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n\u003cbr /\u003e\n\u003cbr /\u003e\nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n",
- "type": "object"
- }
- },
- "required": [
- "p",
- "x"
- ],
- "type": "object"
- },
- "type": "array"
+ "S": {
+ "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.",
+ "type": "integer"
},
- "bidCount": {
- "description": "The combined total number of bids in the book.",
- "format": "double",
- "type": "number"
+ "X": {
+ "allOf": [
+ {
+ "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ {
+ "description": "Ask Exchange Id"
+ }
+ ]
},
- "bids": {
- "items": {
- "properties": {
- "p": {
- "description": "The price of this book level.",
- "format": "double",
- "type": "number"
- },
- "x": {
- "description": "A map of the exchange ID to number of shares at this price level.\n\u003cbr /\u003e\n\u003cbr /\u003e\n**Example:**\n\u003cbr /\u003e\n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n\u003cbr /\u003e\n\u003cbr /\u003e\nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n",
- "type": "object"
- }
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
},
- "required": [
- "p",
- "x"
- ],
- "type": "object"
- },
- "type": "array"
+ "type": "array"
},
- "spread": {
- "description": "The difference between the best bid and the best ask price accross exchanges.",
- "format": "double",
- "type": "number"
+ "i": {
+ "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n",
+ "items": {
+ "description": "The indicator code.\n",
+ "type": "integer"
+ },
+ "type": "array"
},
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
+ "p": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
},
- "updated": {
- "description": "The last updated timestamp.",
- "type": "integer"
+ "s": {
+ "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.",
+ "type": "integer"
+ },
+ "x": {
+ "allOf": [
+ {
+ "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ {
+ "description": "Bid Exchange Id"
+ }
+ ]
+ },
+ "z": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n",
+ "type": "integer"
}
- },
- "required": [
- "ticker",
- "bids",
- "asks",
- "bidCount",
- "askCount",
- "spread",
- "updated"
- ],
- "type": "object"
- }
- },
- "type": "object"
+ },
+ "required": [
+ "c",
+ "i",
+ "p",
+ "s",
+ "x",
+ "P",
+ "S",
+ "X",
+ "z"
+ ],
+ "type": "object"
}
- ]
- }
- },
- "text/csv": {
- "example": "side,price,size,exchange\nbid,20292.97,0.01501,1\nbid,20291.93,0.00218483,1\nask,18445.61,0.22,1\nask,18463.07,0.00234104,1\nask,18464.83,0.04159475,1\n",
- "schema": {
- "type": "string"
- }
- }
+ ]
},
- "description": "Get current level 2 book for a ticker"
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Ticker Full Book (L2)",
- "tags": [
- "crypto:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Crypto data",
- "name": "crypto"
- }
- }
- },
- "/v2/snapshot/locale/global/markets/crypto/{direction}": {
- "get": {
- "description": "Get the current top 20 gainers or losers of the day in cryptocurrency markets.\n\u003cbr /\u003e\n\u003cbr /\u003e\nTop gainers are those tickers whose price has increased by the highest percentage since the previous day's close.\nTop losers are those tickers whose price has decreased by the highest percentage since the previous day's close.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
- "parameters": [
- {
- "description": "The direction of the snapshot results to return.\n",
- "example": "gainers",
- "in": "path",
- "name": "direction",
- "required": true,
- "schema": {
- "enum": [
- "gainers",
- "losers"
- ],
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "status": "OK",
- "tickers": [
- {
- "day": {
- "c": 0.0374,
- "h": 0.062377,
- "l": 0.01162,
- "o": 0.044834,
- "v": 27313165.159427017,
- "vw": 0
- },
- "lastTrade": {
- "c": [
- 2
- ],
- "i": "517478762",
- "p": 0.0374,
- "s": 499,
- "t": 1604409649544,
- "x": 2
- },
- "min": {
- "c": 0.062377,
- "h": 0.062377,
- "l": 0.062377,
- "o": 0.062377,
- "v": 35420,
- "vw": 0
- },
- "prevDay": {
- "c": 0.01162,
- "h": 0.044834,
- "l": 0.01162,
- "o": 0.044834,
- "v": 53616273.36827199,
- "vw": 0.0296
- },
- "ticker": "X:DRNUSD",
- "todaysChange": 0.02578,
- "todaysChangePerc": 221.858864,
- "updated": 1605330008999
- }
- ]
- },
- "schema": {
- "allOf": [
- {
- "description": "The status of this request's response.",
- "type": "string"
- },
- {
- "properties": {
- "tickers": {
- "items": {
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "lastTrade": {
- "allOf": [
- {
- "description": "The most recent trade for this ticker."
- },
- {
+ "StocksV2NBBOs": {
+ "properties": {
+ "results": {
+ "items": {
+ "allOf": [
+ {
"properties": {
- "c": {
- "description": "The trade conditions.",
- "items": {
- "type": "integer"
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
},
- "type": "array"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The size (volume) of the trade.",
- "type": "number"
- },
- "t": {
- "description": "The millisecond accuracy timestamp. This is the timestamp of when the trade was generated at the exchange.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
- "type": "integer"
- }
+ "f": {
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
+ },
+ "q": {
+ "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",
+ "format": "int64",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "y": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
+ }
},
"required": [
- "c",
- "i",
- "p",
- "s",
- "t",
- "x"
+ "T",
+ "t",
+ "y",
+ "f",
+ "q"
],
"type": "object"
- }
- ]
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
},
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "ticker": {
+ {
+ "properties": {
+ "P": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "S": {
+ "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.",
+ "type": "integer"
+ },
+ "X": {
+ "allOf": [
+ {
+ "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ {
+ "description": "Ask Exchange Id"
+ }
+ ]
+ },
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n",
+ "items": {
+ "description": "The indicator code.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "p": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "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.",
+ "type": "integer"
+ },
+ "x": {
+ "allOf": [
+ {
+ "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ {
+ "description": "Bid Exchange Id"
+ }
+ ]
+ },
+ "z": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "c",
+ "i",
+ "p",
+ "s",
+ "x",
+ "P",
+ "S",
+ "X",
+ "z"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "StocksV2Trade": {
+ "allOf": [
+ {
+ "properties": {
+ "T": {
"description": "The exchange symbol that this item is traded under.",
"type": "string"
- },
- "todaysChange": {
- "description": "The value of the change the from previous day.",
+ },
+ "f": {
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
+ },
+ "q": {
+ "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",
+ "format": "int64",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "y": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "T",
+ "t",
+ "y",
+ "f",
+ "q"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "e": {
+ "description": "The trade correction indicator.\n",
+ "type": "integer"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
"format": "double",
"type": "number"
- },
- "todaysChangePerc": {
- "description": "The percentage change since the previous day.",
+ },
+ "r": {
+ "description": "The ID for the Trade Reporting Facility where the trade took place.\n",
+ "type": "integer"
+ },
+ "s": {
+ "description": "The size of a trade (also known as volume).\n",
"format": "double",
"type": "number"
- },
- "updated": {
- "description": "The last updated timestamp.",
+ },
+ "x": {
+ "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
"type": "integer"
- }
},
- "required": [
- "day",
- "lastTrade",
- "min",
- "prevDay",
- "ticker",
- "todaysChange",
- "todaysChangePerc",
- "updated"
- ],
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
+ "z": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "c",
+ "i",
+ "p",
+ "s",
+ "e",
+ "x",
+ "r",
+ "z"
+ ],
+ "type": "object"
}
- ]
- }
- },
- "text/csv": {
- "example": "day_c,day_h,day_l,day_o,day_v,day_vw,lastTrade_c,lastTrade_i,lastTrade_p,lastTrade_s,lastTrade_t,lastTrade_x,day_c,day_h,day_l,day_o,day_v,day_vw,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n0.0374,0.062377,0.01162,0.044834,27313165.159427017,0,\"[2]\",517478762,0.0374,499,1604409649544,2,0.062377,0.062377,0.062377,0.062377,35420,0,0.01162,0.044834,0.01162,0.044834,53616273.36827199,0.0296\n",
- "schema": {
- "type": "string"
- }
- }
+ ]
},
- "description": "Get the current gainers / losers of the day"
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Gainers/Losers",
- "tags": [
- "crypto:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Crypto data",
- "name": "crypto"
- }
- }
- },
- "/v2/snapshot/locale/global/markets/forex/tickers": {
- "get": {
- "description": "Get the current minute, day, and previous day’s aggregate, as well as the last trade and quote for all traded forex symbols.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n",
- "parameters": [
- {
- "description": "A comma separated list of tickers to get snapshots for.",
- "in": "query",
- "name": "tickers",
- "schema": {
- "items": {
+ "StocksV2Trades": {
+ "properties": {
+ "results": {
+ "items": {
+ "allOf": [
+ {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "f": {
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
+ },
+ "q": {
+ "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",
+ "format": "int64",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "y": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "T",
+ "t",
+ "y",
+ "f",
+ "q"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "e": {
+ "description": "The trade correction indicator.\n",
+ "type": "integer"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "r": {
+ "description": "The ID for the Trade Reporting Facility where the trade took place.\n",
+ "type": "integer"
+ },
+ "s": {
+ "description": "The size of a trade (also known as volume).\n",
+ "format": "double",
+ "type": "number"
+ },
+ "x": {
+ "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "z": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "c",
+ "i",
+ "p",
+ "s",
+ "e",
+ "x",
+ "r",
+ "z"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "SymbolPair": {
+ "description": "The symbol pair that was evaluated from the request.",
"type": "string"
- },
- "type": "array"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "status": "OK",
- "tickers": [
- {
- "day": {
- "c": 0.11778221,
- "h": 0.11812263,
- "l": 0.11766631,
- "o": 0.11797149,
- "v": 77794
- },
- "lastQuote": {
- "a": 0.11780678,
- "b": 0.11777952,
- "t": 1605280919000,
- "x": 48
- },
- "min": {
- "c": 0.117769,
- "h": 0.11779633,
- "l": 0.11773698,
- "o": 0.11778,
- "v": 202
- },
- "prevDay": {
- "c": 0.11797258,
- "h": 0.11797258,
- "l": 0.11797149,
- "o": 0.11797149,
- "v": 2,
- "vw": 0
- },
- "ticker": "C:HKDCHF",
- "todaysChange": -0.00019306,
- "todaysChangePerc": -0.1636482,
- "updated": 1605280919000
- }
- ]
+ },
+ "Tape": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n",
+ "type": "integer"
+ },
+ "TickerBase": {
+ "properties": {
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
},
- "schema": {
- "allOf": [
- {
- "properties": {
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status"
- ],
- "type": "object"
- },
- {
- "properties": {
- "tickers": {
- "items": {
+ "required": [
+ "ticker"
+ ],
+ "type": "object"
+ },
+ "TickerResults": {
+ "properties": {
+ "results": {
+ "items": {
"properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "properties": {
- "c": {
+ "c": {
"description": "The close price for the symbol in the given time period.",
"format": "double",
"type": "number"
- },
- "h": {
+ },
+ "h": {
"description": "The highest price for the symbol in the given time period.",
"format": "double",
"type": "number"
- },
- "l": {
+ },
+ "l": {
"description": "The lowest price for the symbol in the given time period.",
"format": "double",
"type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- }
},
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v"
- ],
- "type": "object"
- },
- "lastQuote": {
- "description": "The most recent quote for this ticker.",
- "properties": {
- "a": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "b": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The millisecond accuracy timestamp of the quote.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID on which this quote happened.",
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
"type": "integer"
- }
},
- "required": [
- "a",
- "b",
- "t",
- "x"
- ],
- "type": "object"
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
+ "o": {
"description": "The open price for the symbol in the given time period.",
"format": "double",
"type": "number"
- },
- "v": {
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
"description": "The trading volume of the symbol in the given time period.",
"format": "double",
"type": "number"
- }
},
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v"
- ],
- "type": "object"
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
+ "vw": {
+ "description": "The volume weighted average price.",
"format": "double",
"type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "todaysChange": {
- "description": "The value of the change the from previous day.",
- "format": "double",
- "type": "number"
- },
- "todaysChangePerc": {
- "description": "The percentage change since the previous day.",
- "format": "double",
- "type": "number"
- },
- "updated": {
- "description": "The last updated timestamp.",
- "type": "integer"
- }
+ }
},
"required": [
- "day",
- "lastQuote",
- "min",
- "prevDay",
- "ticker",
- "todaysChange",
- "todaysChangePerc",
- "updated"
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t"
],
"type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
+ },
+ "type": "array"
}
- ]
- }
- },
- "text/csv": {
- "example": "day_c,day_h,day_l,day_o,day_v,lastQuote_a,lastQuote_b,lastQuote_i,lastQuote_t,lastQuote_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n1.18403,1.1906,1.18001,1.18725,83578,1.18403,1.18398,0,1606163759000,48,1.18396,1.18423,1.1838,1.18404,41,1.18724,1.18727,1.18725,1.18725,5,0\n",
- "schema": {
- "type": "string"
- }
- }
+ },
+ "type": "object"
},
- "description": "Get current state for all tickers"
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "All Tickers",
- "tags": [
- "fx:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
+ "TickerSymbol": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "Timestamp": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "TimestampExchange": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
+ },
+ "TimestampSIP": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "TimestampTRF": {
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
+ },
+ "TodaysChange": {
+ "description": "The value of the change from the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "TodaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "TradeDetailsMapItem": {
+ "properties": {
+ "name": {
+ "description": "Name of the trade detail item",
+ "type": "string"
+ },
+ "type": {
+ "description": "Actual type of the trade detail item",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "TradeExchange": {
+ "description": "The exchange that this trade happened on.",
+ "type": "integer"
+ },
+ "TradeId": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "Updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ },
+ "V1LastBase": {
+ "properties": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ "symbol": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "symbol",
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ "V2AggsBase": {
+ "properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "adjusted",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ "V2LastBase": {
+ "properties": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ "V2TicksBase": {
+ "properties": {
+ "db_latency": {
+ "description": "Latency in milliseconds for the query results from the database.",
+ "type": "integer"
+ },
+ "results_count": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "success": {
+ "description": "Whether or not this query was executed successfully.",
+ "type": "boolean"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Volume": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "VolumeWeight": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
},
- "x-polygon-entitlement-market-type": {
- "description": "Forex data",
- "name": "fx"
+ "securitySchemes": {
+ "apiKey": {
+ "in": "query",
+ "name": "apiKey",
+ "type": "apiKey"
+ }
}
- }
},
- "/v2/snapshot/locale/global/markets/forex/tickers/{ticker}": {
- "get": {
- "description": "Get the current minute, day, and previous day’s aggregate, as well as the last trade and quote for a single traded currency symbol.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
- "parameters": [
- {
- "description": "The forex ticker.",
- "example": "C:EURUSD",
- "in": "path",
- "name": "ticker",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "request_id": "ad76e76ce183002c5937a7f02dfebde4",
- "status": "OK",
- "ticker": {
- "day": {
- "c": 1.18403,
- "h": 1.1906,
- "l": 1.18001,
- "o": 1.18725,
- "v": 83578
- },
- "lastQuote": {
- "a": 1.18403,
- "b": 1.18398,
- "i": 0,
- "t": 1606163759000,
- "x": 48
- },
- "min": {
- "c": 1.18396,
- "h": 1.18423,
- "l": 1.1838,
- "o": 1.18404,
- "v": 41
- },
- "prevDay": {
- "c": 1.18724,
- "h": 1.18727,
- "l": 1.18725,
- "o": 1.18725,
- "v": 5,
- "vw": 0
- },
- "ticker": "C:EURUSD",
- "todaysChange": -0.00316,
- "todaysChangePerc": -0.27458312,
- "updated": 1606163759000
- }
- },
- "schema": {
- "allOf": [
+ "info": {
+ "description": "The future of fintech.",
+ "title": "Polygon API",
+ "version": "1.0.0"
+ },
+ "openapi": "3.0.3",
+ "paths": {
+ "/v1/conversion/{from}/{to}": {
+ "get": {
+ "description": "Get currency conversions using the latest market conversion rates. Note than you can convert in both directions. For example USD to CAD or CAD to USD.",
+ "operationId": "RealTimeCurrencyConversion",
+ "parameters": [
{
- "properties": {
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ "description": "The \"from\" symbol of the pair.",
+ "example": "AUD",
+ "in": "path",
+ "name": "from",
+ "required": true,
+ "schema": {
+ "type": "string"
}
- },
- "required": [
- "status"
- ],
- "type": "object"
},
{
- "properties": {
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "description": "The \"to\" symbol of the pair.",
+ "example": "USD",
+ "in": "path",
+ "name": "to",
+ "required": true,
+ "schema": {
+ "type": "string"
}
- },
- "required": [
- "request_id"
- ],
- "type": "object"
},
{
- "properties": {
- "ticker": {
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "description": "The amount to convert, with a decimal.",
+ "example": 100,
+ "in": "query",
+ "name": "amount",
+ "schema": {
+ "default": 1,
+ "type": "number"
+ }
+ },
+ {
+ "description": "The decimal precision of the conversion. Defaults to 2 which is 2 decimal places accuracy.",
+ "example": 2,
+ "in": "query",
+ "name": "precision",
+ "schema": {
+ "default": 2,
+ "enum": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "converted": 73.14,
+ "from": "AUD",
+ "initialAmount": 100,
+ "last": {
+ "ask": 1.3673344,
+ "bid": 1.3672596,
+ "exchange": 48,
+ "timestamp": 1605555313000
+ },
+ "status": "success",
+ "to": "USD"
},
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "schema": {
+ "properties": {
+ "converted": {
+ "description": "The result of the conversion.",
+ "format": "double",
+ "type": "number"
+ },
+ "from": {
+ "description": "The \"from\" currency symbol.",
+ "type": "string"
+ },
+ "initialAmount": {
+ "description": "The amount to convert.",
+ "format": "double",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ },
+ "last": {
+ "properties": {
+ "ask": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "bid": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "exchange": {
+ "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "timestamp": {
+ "description": "The Unix millisecond timestamp.",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMilliseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ }
+ },
+ "required": [
+ "exchange",
+ "timestamp",
+ "ask",
+ "bid"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "LastQuoteCurrencies"
+ }
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ "symbol": {
+ "description": "The symbol pair that was evaluated from the request.",
+ "type": "string"
+ },
+ "to": {
+ "description": "The \"to\" currency symbol.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id",
+ "from",
+ "to",
+ "symbol",
+ "initialAmount",
+ "converted"
+ ],
+ "type": "object"
}
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v"
- ],
- "type": "object"
},
- "lastQuote": {
- "description": "The most recent quote for this ticker.",
- "properties": {
- "a": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "b": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The millisecond accuracy timestamp of the quote.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID on which this quote happened.",
- "type": "integer"
+ "text/csv": {
+ "example": "ask,bid,exchange,timestamp\n1.3673344,1.3672596,48,1605555313000\n",
+ "schema": {
+ "type": "string"
}
- },
- "required": [
- "a",
- "b",
- "t",
- "x"
- ],
- "type": "object"
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ }
+ },
+ "description": "The last tick for this currency pair, plus the converted amount for the requested amount."
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Real-time Currency Conversion",
+ "tags": [
+ "fx:conversion"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "NBBO data",
+ "name": "nbbo"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Forex data",
+ "name": "fx"
+ }
+ }
+ },
+ "/v1/historic/crypto/{from}/{to}/{date}": {
+ "get": {
+ "description": "Get historic trade ticks for a cryptocurrency pair.\n",
+ "parameters": [
+ {
+ "description": "The \"from\" symbol of the crypto pair.",
+ "example": "BTC",
+ "in": "path",
+ "name": "from",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The \"to\" symbol of the crypto pair.",
+ "example": "USD",
+ "in": "path",
+ "name": "to",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The date/day of the historic ticks to retrieve.",
+ "example": "2020-10-14",
+ "in": "path",
+ "name": "date",
+ "required": true,
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "The timestamp offset, used for pagination. This is the offset at which to start the results. Using the `timestamp` of the last result as the offset will give you the next page of results.\n",
+ "in": "query",
+ "name": "offset",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Limit the size of the response, max 10000.",
+ "example": 100,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "day": "2020-10-14T00:00:00.000Z",
+ "map": {
+ "c": "conditions",
+ "p": "price",
+ "s": "size",
+ "t": "timestamp",
+ "x": "exchange"
+ },
+ "msLatency": 1,
+ "status": "success",
+ "symbol": "BTC-USD",
+ "ticks": [
+ {
+ "c": [
+ 2
+ ],
+ "p": 15482.89,
+ "s": 0.00188217,
+ "t": 1604880000067,
+ "x": 1
+ },
+ {
+ "c": [
+ 2
+ ],
+ "p": 15482.11,
+ "s": 0.00161739,
+ "t": 1604880000167,
+ "x": 1
+ }
+ ],
+ "type": "crypto"
},
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "schema": {
+ "allOf": [
+ {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ {
+ "properties": {
+ "day": {
+ "description": "The date that was evaluated from the request.",
+ "format": "date",
+ "type": "string"
+ },
+ "map": {
+ "description": "A map for shortened result keys.",
+ "type": "object"
+ },
+ "msLatency": {
+ "description": "The milliseconds of latency for the query results.",
+ "type": "integer"
+ },
+ "symbol": {
+ "description": "The symbol pair that was evaluated from the request.",
+ "type": "string"
+ },
+ "ticks": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size of a trade (also known as volume).\n",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "p",
+ "s",
+ "x",
+ "c",
+ "t",
+ "i"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "day",
+ "map",
+ "msLatency",
+ "symbol",
+ "ticks"
+ ],
+ "type": "object"
+ }
+ ]
}
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v"
- ],
- "type": "object"
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "todaysChange": {
- "description": "The value of the change the from previous day.",
- "format": "double",
- "type": "number"
- },
- "todaysChangePerc": {
- "description": "The percentage change since the previous day.",
- "format": "double",
- "type": "number"
- },
- "updated": {
- "description": "The last updated timestamp.",
- "type": "integer"
}
- },
- "required": [
- "day",
- "lastQuote",
- "min",
- "prevDay",
- "ticker",
- "todaysChange",
- "todaysChangePerc",
- "updated"
- ],
- "type": "object"
- }
- },
- "type": "object"
+ },
+ "description": "An array of crypto trade ticks."
+ },
+ "default": {
+ "description": "Unexpected error"
}
- ]
- }
- },
- "text/csv": {
- "example": "day_c,day_h,day_l,day_o,day_v,lastQuote_a,lastQuote_b,lastQuote_i,lastQuote_t,lastQuote_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n1.18403,1.1906,1.18001,1.18725,83578,1.18403,1.18398,0,1606163759000,48,1.18396,1.18423,1.1838,1.18404,41,1.18724,1.18727,1.18725,1.18725,5,0\n",
- "schema": {
- "type": "string"
+ },
+ "summary": "Historic Crypto Trades",
+ "tags": [
+ "crypto:trades"
+ ],
+ "x-polygon-deprecation": {
+ "date": 1654056060000,
+ "replaces": {
+ "name": "Trades v3",
+ "path": "get_v3_trades__cryptoticker"
+ }
+ },
+ "x-polygon-entitlement-data-type": {
+ "description": "Trade data",
+ "name": "trades"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
}
- }
- },
- "description": "Get current state for a ticker"
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Ticker",
- "tags": [
- "fx:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Forex data",
- "name": "fx"
- }
- }
- },
- "/v2/snapshot/locale/global/markets/forex/{direction}": {
- "get": {
- "description": "Get the current top 20 gainers or losers of the day in forex markets.\n\u003cbr /\u003e\n\u003cbr /\u003e\nTop gainers are those tickers whose price has increased by the highest percentage since the previous day's close.\nTop losers are those tickers whose price has decreased by the highest percentage since the previous day's close.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
- "parameters": [
- {
- "description": "The direction of the snapshot results to return.\n",
- "example": "gainers",
- "in": "path",
- "name": "direction",
- "required": true,
- "schema": {
- "enum": [
- "gainers",
- "losers"
- ],
- "type": "string"
}
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "status": "OK",
- "tickers": [
- {
- "day": {
- "c": 0.886156,
- "h": 0.887111,
- "l": 0.8825327,
- "o": 0.8844732,
- "v": 1041
- },
- "lastQuote": {
- "a": 0.8879606,
- "b": 0.886156,
- "t": 1605283204000,
- "x": 48
- },
- "min": {
- "c": 0.886156,
- "h": 0.886156,
- "l": 0.886156,
- "o": 0.886156,
- "v": 1
- },
- "prevDay": {
- "c": 0.8428527,
- "h": 0.889773,
- "l": 0.8428527,
- "o": 0.8848539,
- "v": 1078,
- "vw": 0
- },
- "ticker": "C:PLNILS",
- "todaysChange": 0.0433033,
- "todaysChangePerc": 5.13770674,
- "updated": 1605330008999
- }
- ]
- },
- "schema": {
- "allOf": [
+ },
+ "/v1/historic/forex/{from}/{to}/{date}": {
+ "get": {
+ "description": "Get historic ticks for a forex currency pair.\n",
+ "parameters": [
{
- "properties": {
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ "description": "The \"from\" symbol of the currency pair.\n\nExample: For **USD/JPY** the `from` would be **USD**.\n",
+ "example": "AUD",
+ "in": "path",
+ "name": "from",
+ "required": true,
+ "schema": {
+ "type": "string"
}
- },
- "required": [
- "status"
- ],
- "type": "object"
},
{
- "properties": {
- "tickers": {
- "items": {
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v"
- ],
- "type": "object"
- },
- "lastQuote": {
- "description": "The most recent quote for this ticker.",
- "properties": {
- "a": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "b": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The millisecond accuracy timestamp of the quote.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID on which this quote happened.",
- "type": "integer"
- }
- },
- "required": [
- "a",
- "b",
- "t",
- "x"
- ],
- "type": "object"
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v"
- ],
- "type": "object"
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "todaysChange": {
- "description": "The value of the change the from previous day.",
- "format": "double",
- "type": "number"
- },
- "todaysChangePerc": {
- "description": "The percentage change since the previous day.",
- "format": "double",
- "type": "number"
- },
- "updated": {
- "description": "The last updated timestamp.",
- "type": "integer"
- }
- },
- "required": [
- "day",
- "lastQuote",
- "min",
- "prevDay",
- "ticker",
- "todaysChange",
- "todaysChangePerc",
- "updated"
- ],
- "type": "object"
- },
- "type": "array"
+ "description": "The \"to\" symbol of the currency pair.\n\nExample: For **USD/JPY** the `to` would be **JPY**.\n",
+ "example": "USD",
+ "in": "path",
+ "name": "to",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The date/day of the historic ticks to retrieve.",
+ "example": "2020-10-14",
+ "in": "path",
+ "name": "date",
+ "required": true,
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "The timestamp offset, used for pagination. This is the offset at which to start the results. Using the `timestamp` of the last result as the offset will give you the next page of results.\n",
+ "in": "query",
+ "name": "offset",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Limit the size of the response, max 10000.",
+ "example": 100,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
}
- },
- "type": "object"
}
- ]
- }
- },
- "text/csv": {
- "example": {
- "tickers": "day_c,day_h,day_l,day_o,day_v,lastQuote_a,lastQuote_b,lastQuote_t,lastQuote_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n0.886156,0.887111,0.8825327,0.8844732,1041,0.8879606,0.886156,1605283204000,48,0.886156,0.886156,0.886156,0.886156,1,0.8428527,0.889773,0.8428527,0.8848539,1078,0\n"
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "day": "2020-10-14",
+ "map": {
+ "ap": "ask",
+ "bp": "bid",
+ "t": "timestamp"
+ },
+ "msLatency": "0",
+ "pair": "AUD/USD",
+ "status": "success",
+ "ticks": [
+ {
+ "ap": 0.71703,
+ "bp": 0.71701,
+ "t": 1602633600000,
+ "x": 48
+ },
+ {
+ "ap": 0.71703,
+ "bp": 0.717,
+ "t": 1602633600000,
+ "x": 48
+ },
+ {
+ "ap": 0.71702,
+ "bp": 0.717,
+ "t": 1602633600000,
+ "x": 48
+ }
+ ],
+ "type": "forex"
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "day": {
+ "description": "The date that was evaluated from the request.",
+ "format": "date",
+ "type": "string"
+ },
+ "map": {
+ "description": "A map for shortened result keys.",
+ "type": "object"
+ },
+ "msLatency": {
+ "description": "The milliseconds of latency for the query results.",
+ "type": "integer"
+ },
+ "pair": {
+ "description": "The currency pair that was evaluated from the request.",
+ "type": "string"
+ },
+ "ticks": {
+ "items": {
+ "properties": {
+ "a": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "b": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "a",
+ "b",
+ "x",
+ "t"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "day",
+ "map",
+ "msLatency",
+ "pair",
+ "ticks"
+ ],
+ "type": "object"
+ }
+ ]
+ }
+ }
+ },
+ "description": "An array of forex ticks"
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
},
- "schema": {
- "type": "string"
+ "summary": "Historic Forex Ticks",
+ "tags": [
+ "fx:trades"
+ ],
+ "x-polygon-deprecation": {
+ "date": 1654056060000,
+ "replaces": {
+ "name": "Quotes (BBO) v3",
+ "path": "get_v3_quotes__fxticker"
+ }
+ },
+ "x-polygon-entitlement-data-type": {
+ "description": "NBBO data",
+ "name": "nbbo"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Forex data",
+ "name": "fx"
}
- }
- },
- "description": "Get the current gainers / losers of the day"
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Gainers/Losers",
- "tags": [
- "fx:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Forex data",
- "name": "fx"
- }
- }
- },
- "/v2/snapshot/locale/us/markets/stocks/tickers": {
- "get": {
- "description": "Get the most up-to-date market data for all traded stock symbols.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 3:30am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n",
- "parameters": [
- {
- "description": "A comma separated list of tickers to get snapshots for.",
- "in": "query",
- "name": "tickers",
- "schema": {
- "items": {
- "type": "string"
- },
- "type": "array"
- }
- },
- {
- "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n",
- "in": "query",
- "name": "include_otc",
- "schema": {
- "type": "boolean"
}
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "count": 1,
- "status": "OK",
- "tickers": [
- {
- "day": {
- "c": 20.506,
- "h": 20.64,
- "l": 20.506,
- "o": 20.64,
- "v": 37216,
- "vw": 20.616
- },
- "lastQuote": {
- "P": 20.6,
- "S": 22,
- "p": 20.5,
- "s": 13,
- "t": 1605192959994246100
- },
- "lastTrade": {
- "c": [
- 14,
- 41
- ],
- "i": "71675577320245",
- "p": 20.506,
- "s": 2416,
- "t": 1605192894630916600,
- "x": 4
- },
- "min": {
- "av": 37216,
- "c": 20.506,
- "h": 20.506,
- "l": 20.506,
- "o": 20.506,
- "v": 5000,
- "vw": 20.5105
- },
- "prevDay": {
- "c": 20.63,
- "h": 21,
- "l": 20.5,
- "o": 20.79,
- "v": 292738,
- "vw": 20.6939
- },
- "ticker": "BCAT",
- "todaysChange": -0.124,
- "todaysChangePerc": -0.601,
- "updated": 1605192894630916600
- }
- ]
- },
- "schema": {
- "allOf": [
+ },
+ "/v1/indicators/ema/{cryptoTicker}": {
+ "get": {
+ "description": "Get the exponential moving average (EMA) for a ticker symbol over a given time range.",
+ "operationId": "CryptoEMA",
+ "parameters": [
+ {
+ "description": "The ticker symbol for which to get exponential moving average (EMA) data.",
+ "example": "X:BTCUSD",
+ "in": "path",
+ "name": "cryptoTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-go-id": "Ticker"
+ },
{
- "properties": {
- "count": {
- "description": "The total number of results for this request.",
- "type": "integer"
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ "x-polygon-filter-field": {
+ "range": true
}
- },
- "required": [
- "status"
- ],
- "type": "object"
},
{
- "properties": {
- "tickers": {
- "items": {
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "lastQuote": {
- "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
- "properties": {
- "P": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "S": {
- "description": "The ask size in lots.",
- "type": "integer"
- },
- "p": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The bid size in lots.",
- "type": "integer"
- },
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- }
- },
- "required": [
- "p",
- "s",
- "P",
- "S",
- "t"
- ],
- "type": "object"
- },
- "lastTrade": {
- "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.",
- "properties": {
- "c": {
- "description": "The trade conditions.",
- "items": {
- "type": "integer"
- },
- "type": "array"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The size (volume) of the trade.",
- "type": "integer"
- },
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- }
- },
- "required": [
- "c",
- "i",
- "p",
- "s",
- "t",
- "x"
- ],
- "type": "object"
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "properties": {
- "av": {
- "description": "The accumulated volume.",
- "type": "integer"
- },
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "av",
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "todaysChange": {
- "description": "The value of the change the from previous day.",
- "format": "double",
- "type": "number"
- },
- "todaysChangePerc": {
- "description": "The percentage change since the previous day.",
- "format": "double",
- "type": "number"
- },
- "updated": {
- "description": "The last updated timestamp.",
- "type": "integer"
- }
- },
- "type": "object"
- },
- "type": "array"
+ "description": "The size of the aggregate time window.",
+ "example": "day",
+ "in": "query",
+ "name": "timespan",
+ "schema": {
+ "default": "day",
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
+ "type": "string"
}
- },
- "type": "object"
- }
- ]
- }
- },
- "text/csv": {
- "example": "day_c,day_h,day_l,day_o,day_v,lastQuote_a,lastQuote_b,lastQuote_i,lastQuote_t,lastQuote_x,lastTrade_c,lastTrade_i,lastTrade_p,lastTrade_s,lastTrade_t,lastTrade_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n120.4229,120.53,118.81,119.62,28727868,119.725,120.47,4,120.46,8,1605195918507251817,\"[14,41]\",4046,120.47,236,1605195918306274031,10,28724441,120.4201,120.468,120.37,120.435,270796,120.4129,119.49,119.63,116.44,117.19,110597265,118.4998\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Get current state for all tickers"
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "All Tickers",
- "tags": [
- "stocks:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
- }
- }
- },
- "/v2/snapshot/locale/us/markets/stocks/tickers/{stocksTicker}": {
- "get": {
- "description": "Get the most up-to-date market data for a single traded stock ticker.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 3:30am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n",
- "parameters": [
- {
- "description": "The ticker symbol of the stock/equity.",
- "example": "AAPL",
- "in": "path",
- "name": "stocksTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "request_id": "657e430f1ae768891f018e08e03598d8",
- "status": "OK",
- "ticker": {
- "day": {
- "c": 120.4229,
- "h": 120.53,
- "l": 118.81,
- "o": 119.62,
- "v": 28727868,
- "vw": 119.725
- },
- "lastQuote": {
- "P": 120.47,
- "S": 4,
- "p": 120.46,
- "s": 8,
- "t": 1605195918507251700
- },
- "lastTrade": {
- "c": [
- 14,
- 41
- ],
- "i": "4046",
- "p": 120.47,
- "s": 236,
- "t": 1605195918306274000,
- "x": 10
- },
- "min": {
- "av": 28724441,
- "c": 120.4201,
- "h": 120.468,
- "l": 120.37,
- "o": 120.435,
- "v": 270796,
- "vw": 120.4129
- },
- "prevDay": {
- "c": 119.49,
- "h": 119.63,
- "l": 116.44,
- "o": 117.19,
- "v": 110597265,
- "vw": 118.4998
- },
- "ticker": "AAPL",
- "todaysChange": 0.98,
- "todaysChangePerc": 0.82,
- "updated": 1605195918306274000
- }
- },
- "schema": {
- "allOf": [
+ },
{
- "properties": {
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ "description": "The window size used to calculate the exponential moving average (EMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
+ "example": 50,
+ "in": "query",
+ "name": "window",
+ "schema": {
+ "default": 50,
+ "type": "integer"
}
- },
- "required": [
- "status"
- ],
- "type": "object"
},
{
- "properties": {
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "description": "The price in the aggregate which will be used to calculate the exponential moving average. i.e. 'close' will result in using close prices to \ncalculate the exponential moving average (EMA).",
+ "example": "close",
+ "in": "query",
+ "name": "series_type",
+ "schema": {
+ "default": "close",
+ "enum": [
+ "open",
+ "high",
+ "low",
+ "close"
+ ],
+ "type": "string"
}
- },
- "required": [
- "request_id"
- ],
- "type": "object"
},
{
- "properties": {
- "ticker": {
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "lastQuote": {
- "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
- "properties": {
- "P": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "S": {
- "description": "The ask size in lots.",
- "type": "integer"
- },
- "p": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The bid size in lots.",
- "type": "integer"
- },
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- }
- },
- "required": [
- "p",
- "s",
- "P",
- "S",
- "t"
- ],
- "type": "object"
- },
- "lastTrade": {
- "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.",
- "properties": {
- "c": {
- "description": "The trade conditions.",
- "items": {
- "type": "integer"
- },
- "type": "array"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The size (volume) of the trade.",
- "type": "integer"
- },
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- }
- },
- "required": [
- "c",
- "i",
- "p",
- "s",
- "t",
- "x"
- ],
- "type": "object"
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "properties": {
- "av": {
- "description": "The accumulated volume.",
- "type": "integer"
- },
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
+ "in": "query",
+ "name": "expand_underlying",
+ "schema": {
+ "default": false,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The order in which to return the results, ordered by timestamp.",
+ "example": "desc",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 5000",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "maximum": 5000,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v1/indicators/ema/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": {
+ "underlying": {
+ "url": "https://api.polygon.io/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25"
+ },
+ "values": [
+ {
+ "timestamp": 1517562000016,
+ "value": 140.139
+ }
+ ]
+ },
+ "status": "OK"
},
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "underlying": {
+ "properties": {
+ "aggregates": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "format": "float",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "float",
+ "type": "number"
+ }
+ },
+ "required": [
+ "v",
+ "vw",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t",
+ "n"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "Aggregate",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "url": {
+ "description": "The URL which can be used to request the underlying aggregates used in this request.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "values": {
+ "items": {
+ "properties": {
+ "timestamp": {
+ "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMicroseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "value": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "EMAResults"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
}
- },
- "required": [
- "av",
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
},
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
+ "text/csv": {
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664164800000,297389,,0,,0,0,0,0,0,false,1664164800000,19846.01135387188\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664078400000,78936,,0,,0,0,0,0,0,false,1664078400000,19902.65703099573\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664064000000,78936,,0,,0,0,0,0,0,false,1664064000000,19948.29976695474\nX:BTCUSD,15457.24362826,19317.486,0,19529.04,19475.84,19651.2772302,18846.67,1664409600000,191936,,0,,0,0,0,0,0,false,1664409600000,19751.714760699124\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664337600000,225076,,0,,0,0,0,0,0,false,1664337600000,19762.974955013375\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664251200000,183075,,0,,0,0,0,0,0,false,1664251200000,19791.86053850303\nX:BTCUSD,2868.09828007,19069.8521,0,19210.31,18925.87,19400,18805.1,1663992000000,58721,,0,,0,0,0,0,0,false,1663992000000,19995.805471728403\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664323200000,225076,,0,,0,0,0,0,0,false,1664323200000,19777.128890923308\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664236800000,183075,,0,,0,0,0,0,0,false,1664236800000,19818.394438033767\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664150400000,297389,,0,,0,0,0,0,0,false,1664150400000,19873.767735662568\n",
+ "schema": {
+ "type": "string"
}
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "todaysChange": {
- "description": "The value of the change the from previous day.",
- "format": "double",
- "type": "number"
- },
- "todaysChangePerc": {
- "description": "The percentage change since the previous day.",
- "format": "double",
- "type": "number"
- },
- "updated": {
- "description": "The last updated timestamp.",
- "type": "integer"
}
- },
- "type": "object"
- }
- },
- "type": "object"
+ },
+ "description": "Exponential Moving Average (EMA) data for each period."
}
- ]
- }
- },
- "text/csv": {
- "example": "day_c,day_h,day_l,day_o,day_v,lastQuote_a,lastQuote_b,lastQuote_i,lastQuote_t,lastQuote_x,lastTrade_c,lastTrade_i,lastTrade_p,lastTrade_s,lastTrade_t,lastTrade_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n120.4229,120.53,118.81,119.62,28727868,119.725,120.47,4,120.46,8,1605195918507251817,\"[14,41]\",4046,120.47,236,1605195918306274031,10,28724441,120.4201,120.468,120.37,120.435,270796,120.4129,119.49,119.63,116.44,117.19,110597265,118.4998\n",
- "schema": {
- "type": "string"
+ },
+ "summary": "Exponential Moving Average (EMA)",
+ "tags": [
+ "crpyto:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
}
- }
},
- "description": "Get current state for a ticker"
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Ticker",
- "tags": [
- "stocks:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
+ "x-polygon-ignore": true
},
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
- }
- }
- },
- "/v2/snapshot/locale/us/markets/stocks/{direction}": {
- "get": {
- "description": "Get the most up-to-date market data for the current top 20 gainers or losers of the day in the stocks/equities markets.\n\u003cbr /\u003e\n\u003cbr /\u003e\nTop gainers are those tickers whose price has increased by the highest percentage since the previous day's close.\nTop losers are those tickers whose price has decreased by the highest percentage since the previous day's close.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 3:30am EST and gets populated as data is received from the exchanges.\n",
- "parameters": [
- {
- "description": "The direction of the snapshot results to return.\n",
- "example": "gainers",
- "in": "path",
- "name": "direction",
- "required": true,
- "schema": {
- "enum": [
- "gainers",
- "losers"
- ],
- "type": "string"
- }
- },
- {
- "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n",
- "in": "query",
- "name": "include_otc",
- "schema": {
- "type": "boolean"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "status": "OK",
- "tickers": [
- {
- "day": {
- "c": 14.2284,
- "h": 15.09,
- "l": 14.2,
- "o": 14.33,
- "v": 133963,
- "vw": 14.5311
- },
- "lastQuote": {
- "P": 14.44,
- "S": 11,
- "p": 14.2,
- "s": 25,
- "t": 1605195929997325600
- },
- "lastTrade": {
- "c": [
- 63
- ],
- "i": "79372124707124",
- "p": 14.2284,
- "s": 536,
- "t": 1605195848258266000,
- "x": 4
- },
- "min": {
- "av": 133963,
- "c": 14.2284,
- "h": 14.325,
- "l": 14.2,
- "o": 14.28,
- "v": 6108,
- "vw": 14.2426
- },
- "prevDay": {
- "c": 0.73,
- "h": 0.799,
- "l": 0.73,
- "o": 0.75,
- "v": 1568097,
- "vw": 0.7721
- },
- "ticker": "PDS",
- "todaysChange": 13.498,
- "todaysChangePerc": 1849.096,
- "updated": 1605195848258266000
- }
- ]
- },
- "schema": {
- "allOf": [
+ "/v1/indicators/ema/{fxTicker}": {
+ "get": {
+ "description": "Get the exponential moving average (EMA) for a ticker symbol over a given time range.",
+ "operationId": "ForexEMA",
+ "parameters": [
{
- "properties": {
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status"
- ],
- "type": "object"
+ "description": "The ticker symbol for which to get exponential moving average (EMA) data.",
+ "example": "C:EURUSD",
+ "in": "path",
+ "name": "fxTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-go-id": "Ticker"
},
{
- "properties": {
- "tickers": {
- "items": {
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "lastQuote": {
- "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
- "properties": {
- "P": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "S": {
- "description": "The ask size in lots.",
- "type": "integer"
- },
- "p": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The bid size in lots.",
- "type": "integer"
- },
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- }
- },
- "required": [
- "p",
- "s",
- "P",
- "S",
- "t"
- ],
- "type": "object"
- },
- "lastTrade": {
- "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.",
- "properties": {
- "c": {
- "description": "The trade conditions.",
- "items": {
- "type": "integer"
- },
- "type": "array"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The size (volume) of the trade.",
- "type": "integer"
- },
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- }
- },
- "required": [
- "c",
- "i",
- "p",
- "s",
- "t",
- "x"
- ],
- "type": "object"
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "properties": {
- "av": {
- "description": "The accumulated volume.",
- "type": "integer"
- },
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "av",
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v",
- "vw"
- ],
- "type": "object"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "todaysChange": {
- "description": "The value of the change the from previous day.",
- "format": "double",
- "type": "number"
- },
- "todaysChangePerc": {
- "description": "The percentage change since the previous day.",
- "format": "double",
- "type": "number"
- },
- "updated": {
- "description": "The last updated timestamp.",
- "type": "integer"
- }
- },
- "type": "object"
- },
- "type": "array"
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true
}
- },
- "type": "object"
- }
- ]
- }
- },
- "text/csv": {
- "example": "day_c,day_h,day_l,day_o,day_v,day_vw,lastQuote_P,lastQuote_S,lastQuote_p,lastQuote_s,lastQuote_t,lastTrade_c,lastTrade_i,lastTrade_p,lastTrade_s,lastTrade_t,lastTrade_x,min_av,min_c,min_h,min_l,min_o,min_v,min_vw,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n14.2284,15.09,14.2,14.33,133963,14.5311,14.44,11,14.2,25,1605195929997325568,\"[63]\",79372124707124,14.2284,536,1605195848258266112,4,133963,14.2284,14.325,14.2,14.28,6108,14.2426,0.73,0.799,0.73,0.75,1568097,0.7721\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Get the current tickers of the day"
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Gainers/Losers",
- "tags": [
- "stocks:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
- }
- }
- },
- "/v2/ticks/stocks/nbbo/{ticker}/{date}": {
- "get": {
- "description": "Get NBBO quotes for a given ticker symbol on a specified date.\n",
- "parameters": [
- {
- "description": "The ticker symbol we want quotes for.",
- "example": "AAPL",
- "in": "path",
- "name": "ticker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The date/day of the quotes to retrieve in the format YYYY-MM-DD.",
- "example": "2020-10-14",
- "in": "path",
- "name": "date",
- "required": true,
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "The timestamp offset, used for pagination. This is the offset at which to start the results. Using the `timestamp` of the last result as the offset will give you the next page of results.\n",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "integer"
- }
- },
- {
- "description": "The maximum timestamp allowed in the results.\n",
- "in": "query",
- "name": "timestampLimit",
- "schema": {
- "type": "integer"
- }
- },
- {
- "description": "Reverse the order of the results.\n",
- "example": true,
- "in": "query",
- "name": "reverse",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "description": "Limit the size of the response, max 50000 and default 5000.",
- "example": 10,
- "in": "query",
- "name": "limit",
- "schema": {
- "type": "integer"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "db_latency": 43,
- "map": {
- "P": {
- "name": "ask_price",
- "type": "float64"
},
- "S": {
- "name": "ask_size",
- "type": "int"
- },
- "X": {
- "name": "ask_exchange",
- "type": "int"
+ {
+ "description": "The size of the aggregate time window.",
+ "example": "day",
+ "in": "query",
+ "name": "timespan",
+ "schema": {
+ "default": "day",
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
+ "type": "string"
+ }
},
- "c": {
- "name": "conditions",
- "type": "int"
+ {
+ "description": "Whether or not the aggregates used to calculate the exponential moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "default": true,
+ "type": "boolean"
+ }
},
- "f": {
- "name": "trf_timestamp",
- "type": "int64"
+ {
+ "description": "The window size used to calculate the exponential moving average (EMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
+ "example": 50,
+ "in": "query",
+ "name": "window",
+ "schema": {
+ "default": 50,
+ "type": "integer"
+ }
},
- "i": {
- "name": "indicators",
- "type": "int"
+ {
+ "description": "The price in the aggregate which will be used to calculate the exponential moving average. i.e. 'close' will result in using close prices to \ncalculate the exponential moving average (EMA).",
+ "example": "close",
+ "in": "query",
+ "name": "series_type",
+ "schema": {
+ "default": "close",
+ "enum": [
+ "open",
+ "high",
+ "low",
+ "close"
+ ],
+ "type": "string"
+ }
},
- "p": {
- "name": "bid_price",
- "type": "float64"
+ {
+ "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
+ "in": "query",
+ "name": "expand_underlying",
+ "schema": {
+ "default": false,
+ "type": "boolean"
+ }
},
- "q": {
- "name": "sequence_number",
- "type": "int"
+ {
+ "description": "The order in which to return the results, ordered by timestamp.",
+ "example": "desc",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
+ }
},
- "s": {
- "name": "bid_size",
- "type": "int"
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 5000",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "maximum": 5000,
+ "type": "integer"
+ }
},
- "t": {
- "name": "sip_timestamp",
- "type": "int64"
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
},
- "x": {
- "name": "bid_exchange",
- "type": "int"
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
},
- "y": {
- "name": "participant_timestamp",
- "type": "int64"
- },
- "z": {
- "name": "tape",
- "type": "int"
- }
- },
- "results": [
- {
- "P": 0,
- "S": 0,
- "X": 0,
- "c": [
- 1
- ],
- "p": 102.7,
- "q": 2060,
- "s": 60,
- "t": 1517562000065700400,
- "x": 11,
- "y": 1517562000065321200,
- "z": 3
- },
- {
- "P": 0,
- "S": 0,
- "X": 0,
- "c": [
- 1
- ],
- "p": 170,
- "q": 2061,
- "s": 2,
- "t": 1517562000065791500,
- "x": 11,
- "y": 1517562000065408300,
- "z": 3
- }
- ],
- "results_count": 2,
- "success": true,
- "ticker": "AAPL"
- },
- "schema": {
- "allOf": [
{
- "properties": {
- "db_latency": {
- "description": "Latency in milliseconds for the query results from the database.",
- "type": "integer"
- },
- "results_count": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "success": {
- "description": "Whether or not this query was executed successfully.",
- "type": "boolean"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
}
- },
- "type": "object"
},
{
- "properties": {
- "results": {
- "items": {
- "allOf": [
- {
- "properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "f": {
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
- "type": "integer"
- },
- "q": {
- "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",
- "format": "int64",
- "type": "integer"
- },
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- },
- "y": {
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
- "type": "integer"
- }
- },
- "required": [
- "T",
- "t",
- "y",
- "f",
- "q"
- ],
- "type": "object"
- },
- {
- "properties": {
- "P": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "S": {
- "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.",
- "type": "integer"
- },
- "X": {
- "allOf": [
- {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- {
- "description": "Ask Exchange Id"
- }
- ]
- },
- "c": {
- "description": "A list of condition codes.\n",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
- "type": "integer"
- },
- "type": "array"
- },
- "i": {
- "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n",
- "items": {
- "description": "The indicator code.\n",
- "type": "integer"
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v1/indicators/ema/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": {
+ "underlying": {
+ "url": "https://api.polygon.io/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25"
+ },
+ "values": [
+ {
+ "timestamp": 1517562000016,
+ "value": 140.139
+ }
+ ]
},
- "type": "array"
- },
- "p": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "s": {
- "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.",
- "type": "integer"
- },
- "x": {
- "allOf": [
- {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- {
- "description": "Bid Exchange Id"
- }
- ]
- },
- "z": {
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n",
- "type": "integer"
- }
+ "status": "OK"
},
- "required": [
- "c",
- "i",
- "p",
- "s",
- "x",
- "P",
- "S",
- "X",
- "z"
- ],
- "type": "object"
- }
- ]
- },
- "type": "array"
- }
- },
- "type": "object"
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "underlying": {
+ "properties": {
+ "aggregates": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "format": "float",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "float",
+ "type": "number"
+ }
+ },
+ "required": [
+ "v",
+ "vw",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t",
+ "n"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "Aggregate",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "url": {
+ "description": "The URL which can be used to request the underlying aggregates used in this request.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "values": {
+ "items": {
+ "properties": {
+ "timestamp": {
+ "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMicroseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "value": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "EMAResults"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664323200000,685,,0,,0,0,0,0,0,false,1664323200000,1.4915199239999994\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664164800000,550,,0,,0,0,0,0,0,false,1664164800000,1.4863299679999997\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664078400000,10,,0,,0,0,0,0,0,false,1664078400000,1.4826388699999997\nC:USDAUD,686,1.5442,0,1.53763,1.5404,1.5526022,1.537279,1664409600000,686,,0,,0,0,0,0,0,false,1664409600000,1.4942168479999998\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664251200000,536,,0,,0,0,0,0,0,false,1664251200000,1.4900704799999993\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664236800000,536,,0,,0,0,0,0,0,false,1664236800000,1.4882634499999994\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664150400000,550,,0,,0,0,0,0,0,false,1664150400000,1.4845906159999998\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664064000000,10,,0,,0,0,0,0,0,false,1664064000000,1.4809719239999999\nC:USDAUD,1,1.5314,0,1.5313936,1.5313936,1.5313936,1.5313936,1663977600000,1,,0,,0,0,0,0,0,false,1663977600000,1.4794745239999998\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664337600000,685,,0,,0,0,0,0,0,false,1664337600000,1.4928357579999996\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Exponential Moving Average (EMA) data for each period."
}
- ]
+ },
+ "summary": "Exponential Moving Average (EMA)",
+ "tags": [
+ "fx:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Forex data",
+ "name": "fx"
}
- }
},
- "description": "A list of quotes."
- },
- "default": {
- "description": "Unexpected error"
- }
+ "x-polygon-ignore": true
},
- "summary": "Quotes (NBBO)",
- "tags": [
- "stocks:quotes"
- ],
- "x-polygon-deprecation": {
- "date": 1654056060000,
- "replaces": {
- "name": "Quotes (NBBO) v3",
- "path": "get_v3_quotes__stockticker"
- }
- },
- "x-polygon-entitlement-data-type": {
- "description": "NBBO data",
- "name": "nbbo"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
- }
- }
- },
- "/v2/ticks/stocks/trades/{ticker}/{date}": {
- "get": {
- "description": "Get trades for a given ticker symbol on a specified date.\n",
- "parameters": [
- {
- "description": "The ticker symbol we want trades for.",
- "example": "AAPL",
- "in": "path",
- "name": "ticker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The date/day of the trades to retrieve in the format YYYY-MM-DD.",
- "example": "2020-10-14",
- "in": "path",
- "name": "date",
- "required": true,
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "The timestamp offset, used for pagination. This is the offset at which to start the results. Using the `timestamp` of the last result as the offset will give you the next page of results.\n",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "integer"
- }
- },
- {
- "description": "The maximum timestamp allowed in the results.\n",
- "in": "query",
- "name": "timestampLimit",
- "schema": {
- "type": "integer"
- }
- },
- {
- "description": "Reverse the order of the results.\n",
- "example": true,
- "in": "query",
- "name": "reverse",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "description": "Limit the size of the response, max 50000 and default 5000.",
- "example": 10,
- "in": "query",
- "name": "limit",
- "schema": {
- "type": "integer"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "db_latency": 11,
- "map": {
- "I": {
- "name": "orig_id",
- "type": "string"
+ "/v1/indicators/ema/{indicesTicker}": {
+ "get": {
+ "description": "Get the exponential moving average (EMA) for a ticker symbol over a given time range.",
+ "operationId": "IndicesEMA",
+ "parameters": [
+ {
+ "description": "The ticker symbol for which to get exponential moving average (EMA) data.",
+ "example": "I:DJI",
+ "in": "path",
+ "name": "indicesTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-go-id": "Ticker"
},
- "c": {
- "name": "conditions",
- "type": "int"
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
},
- "e": {
- "name": "correction",
- "type": "int"
+ {
+ "description": "The size of the aggregate time window.",
+ "example": "day",
+ "in": "query",
+ "name": "timespan",
+ "schema": {
+ "default": "day",
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
+ "type": "string"
+ }
},
- "f": {
- "name": "trf_timestamp",
- "type": "int64"
+ {
+ "description": "Whether or not the aggregates used to calculate the exponential moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "default": true,
+ "type": "boolean"
+ }
},
- "i": {
- "name": "id",
- "type": "string"
+ {
+ "description": "The window size used to calculate the exponential moving average (EMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
+ "example": 50,
+ "in": "query",
+ "name": "window",
+ "schema": {
+ "default": 50,
+ "type": "integer"
+ }
},
- "p": {
- "name": "price",
- "type": "float64"
+ {
+ "description": "The value in the aggregate which will be used to calculate the exponential moving average. i.e. 'close' will result in using close values to \ncalculate the exponential moving average (EMA).",
+ "example": "close",
+ "in": "query",
+ "name": "series_type",
+ "schema": {
+ "default": "close",
+ "enum": [
+ "open",
+ "high",
+ "low",
+ "close"
+ ],
+ "type": "string"
+ }
},
- "q": {
- "name": "sequence_number",
- "type": "int64"
+ {
+ "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
+ "in": "query",
+ "name": "expand_underlying",
+ "schema": {
+ "default": false,
+ "type": "boolean"
+ }
},
- "r": {
- "name": "trf_id",
- "type": "int"
+ {
+ "description": "The order in which to return the results, ordered by timestamp.",
+ "example": "desc",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
+ }
},
- "s": {
- "name": "size",
- "type": "int"
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 5000",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "maximum": 5000,
+ "type": "integer"
+ }
},
- "t": {
- "name": "sip_timestamp",
- "type": "int64"
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
},
- "x": {
- "name": "exchange",
- "type": "int"
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
},
- "y": {
- "name": "participant_timestamp",
- "type": "int64"
- },
- "z": {
- "name": "tape",
- "type": "int"
- }
- },
- "results": [
- {
- "c": [
- 12,
- 41
- ],
- "i": "1",
- "p": 171.55,
- "q": 1063,
- "s": 100,
- "t": 1517562000016036600,
- "x": 11,
- "y": 1517562000015577000,
- "z": 3
- },
- {
- "c": [
- 12,
- 41
- ],
- "i": "2",
- "p": 171.55,
- "q": 1064,
- "s": 100,
- "t": 1517562000016038100,
- "x": 11,
- "y": 1517562000015577600,
- "z": 3
- }
- ],
- "results_count": 2,
- "success": true,
- "ticker": "AAPL"
- },
- "schema": {
- "allOf": [
{
- "properties": {
- "db_latency": {
- "description": "Latency in milliseconds for the query results from the database.",
- "type": "integer"
- },
- "results_count": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "success": {
- "description": "Whether or not this query was executed successfully.",
- "type": "boolean"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
}
- },
- "type": "object"
},
{
- "properties": {
- "results": {
- "items": {
- "allOf": [
- {
- "properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "f": {
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
- "type": "integer"
- },
- "q": {
- "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",
- "format": "int64",
- "type": "integer"
- },
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- },
- "y": {
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
- "type": "integer"
- }
- },
- "required": [
- "T",
- "t",
- "y",
- "f",
- "q"
- ],
- "type": "object"
- },
- {
- "properties": {
- "c": {
- "description": "A list of condition codes.\n",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
- "type": "integer"
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v1/indicators/ema/I:DJI?cursor=YWRqdXN0ZWQ9dHJ1ZSZhcD0lN0IlMjJ2JTIyJTNBMCUyQyUyMm8lMjIlM0EwJTJDJTIyYyUyMiUzQTQwNDcuNDEwMDAwMDAwMDAwMyUyQyUyMmglMjIlM0EwJTJDJTIybCUyMiUzQTAlMkMlMjJ0JTIyJTNBMTY3ODA4MjQwMDAwMCU3RCZhcz0mZXhwYW5kX3VuZGVybHlpbmc9ZmFsc2UmbGltaXQ9MTAmb3JkZXI9ZGVzYyZzZXJpZXNfdHlwZT1jbG9zZSZ0aW1lc3Bhbj1kYXkmdGltZXN0YW1wLmx0PTE2NzgxNjUyMDAwMDAmd2luZG93PTU",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": {
+ "underlying": {
+ "url": "https://api.polygon.io/v2/aggs/ticker/I:DJI/range/1/day/1063281600000/1678726291180?limit=35&sort=desc"
+ },
+ "values": [
+ {
+ "timestamp": 1681966800000,
+ "value": 33355.64416487007
+ }
+ ]
},
- "type": "array"
- },
- "e": {
- "description": "The trade correction indicator.\n",
- "type": "integer"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "r": {
- "description": "The ID for the Trade Reporting Facility where the trade took place.\n",
- "type": "integer"
- },
- "s": {
- "description": "The size of a trade (also known as volume).\n",
- "format": "double",
- "type": "number"
- },
- "x": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- "z": {
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n",
- "type": "integer"
- }
+ "status": "OK"
},
- "required": [
- "c",
- "i",
- "p",
- "s",
- "e",
- "x",
- "r",
- "z"
- ],
- "type": "object"
- }
- ]
- },
- "type": "array"
- }
- },
- "type": "object"
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "underlying": {
+ "properties": {
+ "aggregates": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "format": "float",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "float",
+ "type": "number"
+ }
+ },
+ "required": [
+ "v",
+ "vw",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t",
+ "n"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "Aggregate",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "url": {
+ "description": "The URL which can be used to request the underlying aggregates used in this request.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "values": {
+ "items": {
+ "properties": {
+ "timestamp": {
+ "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMicroseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "value": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "EMAResults"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "Exponential Moving Average (EMA) data for each period."
}
- ]
+ },
+ "summary": "Exponential Moving Average (EMA)",
+ "tags": [
+ "indices:aggregates"
+ ],
+ "x-polygon-entitlement-allowed-limited-tickers": true,
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Indices data",
+ "name": "indices"
}
- }
},
- "description": "A list of trades."
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Trades",
- "tags": [
- "stocks:trades"
- ],
- "x-polygon-deprecation": {
- "date": 1654056060000,
- "replaces": {
- "name": "Trades v3",
- "path": "get_v3_trades__stockticker"
- }
+ "x-polygon-ignore": true
},
- "x-polygon-entitlement-data-type": {
- "description": "Trade data",
- "name": "trades"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
- }
- }
- },
- "/v3/quotes/{fxTicker}": {
- "get": {
- "description": "Get BBO quotes for a ticker symbol in a given time range.",
- "operationId": "QuotesFx",
- "parameters": [
- {
- "description": "The ticker symbol to get quotes for.",
- "example": "C:EUR-USD",
- "in": "path",
- "name": "fxTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Order results based on the `sort` field.",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 50000.",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "example": 10,
- "maximum": 50000,
- "minimum": 1,
- "type": "integer"
- }
- },
- {
- "description": "Sort field used for ordering.",
- "in": "query",
- "name": "sort",
- "schema": {
- "default": "timestamp",
- "enum": [
- "timestamp"
- ],
- "example": "timestamp",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v3/quotes/C:EUR-USD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": [
- {
- "ask_exchange": "48,",
- "ask_price": "1.18565,",
- "bid_exchange": "48,",
- "bid_price": "1.18558,",
- "participant_timestamp": 1625097600000000000
- },
- {
- "ask_exchange": "48,",
- "ask_price": "1.18565,",
- "bid_exchange": "48,",
- "bid_price": "1.18559,",
- "participant_timestamp": 1625097600000000000
- }
- ],
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ "/v1/indicators/ema/{optionsTicker}": {
+ "get": {
+ "description": "Get the exponential moving average (EMA) for a ticker symbol over a given time range.",
+ "operationId": "OptionsEMA",
+ "parameters": [
+ {
+ "description": "The ticker symbol for which to get exponential moving average (EMA) data.",
+ "example": "O:SPY241220P00720000",
+ "in": "path",
+ "name": "optionsTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-go-id": "Ticker"
},
- "results": {
- "items": {
- "properties": {
- "ask_exchange": {
- "description": "The ask exchange ID",
- "type": "integer"
- },
- "ask_price": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "bid_exchange": {
- "description": "The bid exchange ID",
- "type": "integer"
- },
- "bid_price": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "participant_timestamp": {
- "description": "The nanosecond Exchange Unix Timestamp. This is the timestamp of when the quote was generated at the exchange.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- }
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
},
- "type": "object"
- },
- "type": "array"
+ "x-polygon-filter-field": {
+ "range": true
+ }
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "ask_exchange,ask_price,bid_exchange,bid_price,participant_timestamp\n48,,1.18565,,48,,1.18558,,1625097600000000000\n48,,1.18565,,48,,1.18559,,1625097600000000000\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "A list of quotes."
- }
- },
- "summary": "Quotes (BBO)",
- "tags": [
- "fx:quotes"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "NBBO data",
- "name": "nbbo"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Forex data",
- "name": "fx"
- },
- "x-polygon-paginate": {
- "limit": {
- "max": 50000
- },
- "order": {
- "default": "desc"
- },
- "sort": {
- "default": "timestamp",
- "enum": [
- "timestamp"
- ]
- }
- },
- "x-polygon-replaces": {
- "date": 1654056060000,
- "replaces": {
- "name": "Historic Forex Ticks",
- "path": "get_v1_historic_forex__from___to___date"
- }
- }
- },
- "x-polygon-ignore": true
- },
- "/v3/quotes/{optionsTicker}": {
- "get": {
- "description": "Get quotes for an options ticker symbol in a given time range.",
- "operationId": "QuotesOptions",
- "parameters": [
- {
- "description": "The ticker symbol to get quotes for.",
- "example": "O:SPY241220P00720000",
- "in": "path",
- "name": "optionsTicker",
- "required": true,
- "schema": {
- "type": "string"
- },
- "x-polygon-go-id": "Ticker"
- },
- {
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Order results based on the `sort` field.",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 50000.",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "example": 10,
- "maximum": 50000,
- "minimum": 1,
- "type": "integer"
- }
- },
- {
- "description": "Sort field used for ordering.",
- "in": "query",
- "name": "sort",
- "schema": {
- "default": "timestamp",
- "enum": [
- "timestamp"
- ],
- "example": "timestamp",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v3/quotes/O:SPY241220P00720000?cursor=YXA9NzY5Nzg0NzAxJmFzPSZsaW1pdD0xMCZvcmRlcj1kZXNjJnNvcnQ9dGltZXN0YW1wJnRpbWVzdGFtcC5sdGU9MjAyMi0wMi0xN1QxNyUzQTI1JTNBMTMuMDA5MzU2MDMyWg",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": [
- {
- "ask_exchange": 323,
- "ask_price": 282,
- "ask_size": 10,
- "bid_exchange": 316,
- "bid_price": 277.5,
- "bid_size": 1,
- "sequence_number": 789539218,
- "sip_timestamp": 1645119125346243600
- },
- {
- "ask_exchange": 301,
- "ask_price": 282,
- "ask_size": 1,
- "bid_exchange": 323,
- "bid_price": 277.5,
- "bid_size": 10,
- "sequence_number": 788994206,
- "sip_timestamp": 1645119118474271000
- }
- ],
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ {
+ "description": "The size of the aggregate time window.",
+ "example": "day",
+ "in": "query",
+ "name": "timespan",
+ "schema": {
+ "default": "day",
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
+ "type": "string"
+ }
},
- "results": {
- "items": {
- "properties": {
- "ask_exchange": {
- "description": "The ask exchange ID",
- "type": "integer"
- },
- "ask_price": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "ask_size": {
- "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.",
- "format": "double",
- "type": "number"
- },
- "bid_exchange": {
- "description": "The bid exchange ID",
+ {
+ "description": "Whether or not the aggregates used to calculate the exponential moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "default": true,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The window size used to calculate the exponential moving average (EMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
+ "example": 50,
+ "in": "query",
+ "name": "window",
+ "schema": {
+ "default": 50,
"type": "integer"
- },
- "bid_price": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "bid_size": {
- "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.",
- "format": "double",
- "type": "number"
- },
- "sequence_number": {
- "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).",
- "format": "int64",
+ }
+ },
+ {
+ "description": "The price in the aggregate which will be used to calculate the exponential moving average. i.e. 'close' will result in using close prices to \ncalculate the exponential moving average (EMA).",
+ "example": "close",
+ "in": "query",
+ "name": "series_type",
+ "schema": {
+ "default": "close",
+ "enum": [
+ "open",
+ "high",
+ "low",
+ "close"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
+ "in": "query",
+ "name": "expand_underlying",
+ "schema": {
+ "default": false,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The order in which to return the results, ordered by timestamp.",
+ "example": "desc",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 5000",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "maximum": 5000,
"type": "integer"
- },
- "sip_timestamp": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this quote from the exchange which produced it.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v1/indicators/ema/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": {
+ "underlying": {
+ "url": "https://api.polygon.io/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25"
+ },
+ "values": [
+ {
+ "timestamp": 1517562000016,
+ "value": 140.139
+ }
+ ]
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "underlying": {
+ "properties": {
+ "aggregates": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "format": "float",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "float",
+ "type": "number"
+ }
+ },
+ "required": [
+ "v",
+ "vw",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t",
+ "n"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "Aggregate",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "url": {
+ "description": "The URL which can be used to request the underlying aggregates used in this request.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "values": {
+ "items": {
+ "properties": {
+ "timestamp": {
+ "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMicroseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "value": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "EMAResults"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649217600000,1,,0,,0,0,0,0,0,false,1649217600000,286.1730473491824 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649131200000,1,,0,,0,0,0,0,0,false,1649131200000,285.60990642465924 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649044800000,1,,0,,0,0,0,0,0,false,1649044800000,285.023780156278 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648785600000,1,,0,,0,0,0,0,0,false,1648785600000,284.4137303667383 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648526400000,1,,0,,0,0,0,0,0,false,1648526400000,282.43007426223943 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649304000000,1,,0,,0,0,0,0,0,false,1649304000000,286.7141043158811 O:SPY241220P00720000,2,270.49,0,270.49,270.49,270.49,270.49,1649390400000,1,,0,,0,0,0,0,0,false,1649390400000,286.0778649309446 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648699200000,1,,0,,0,0,0,0,0,false,1648699200000,283.77878058578887 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648612800000,1,,0,,0,0,0,0,0,false,1648612800000,283.11791448724966 O:SPY241220P00720000,3,277.8267,0,277.82,277.83,277.83,277.82,1649649600000,2,,0,,0,0,0,0,0,false,1649649600000,285.7544192473781",
+ "schema": {
+ "type": "string"
+ }
}
- }
},
- "type": "object"
- },
- "type": "array"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ "description": "Exponential Moving Average (EMA) data for each period."
}
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "ask_exchange,ask_price,ask_size,bid_exchange,bid_price,bid_size,sequence_number,sip_timestamp\n323,282,10,316,277.5,1,789539218,1645119125346243600\n301,282,1,323,277.5,10,788994206,1645119118474271000\n",
- "schema": {
- "type": "string"
+ },
+ "summary": "Exponential Moving Average (EMA)",
+ "tags": [
+ "options:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Options data",
+ "name": "options"
}
- }
},
- "description": "A list of quotes."
- }
+ "x-polygon-ignore": true
},
- "summary": "Quotes",
- "tags": [
- "options:quotes"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "NBBO data",
- "name": "nbbo"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Options data",
- "name": "options"
- },
- "x-polygon-paginate": {
- "limit": {
- "max": 50000
- },
- "order": {
- "default": "desc"
- },
- "sort": {
- "default": "timestamp",
- "enum": [
- "timestamp"
- ]
- }
- }
- },
- "x-polygon-ignore": true
- },
- "/v3/quotes/{stockTicker}": {
- "get": {
- "description": "Get NBBO quotes for a ticker symbol in a given time range.",
- "operationId": "Quotes",
- "parameters": [
- {
- "description": "The ticker symbol to get quotes for.",
- "example": "AAPL",
- "in": "path",
- "name": "stockTicker",
- "required": true,
- "schema": {
- "type": "string"
- },
- "x-polygon-go-id": "Ticker"
- },
- {
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Order results based on the `sort` field.",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 50000.",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "example": 10,
- "maximum": 50000,
- "minimum": 1,
- "type": "integer"
- }
- },
- {
- "description": "Sort field used for ordering.",
- "in": "query",
- "name": "sort",
- "schema": {
- "default": "timestamp",
- "enum": [
- "timestamp"
- ],
- "example": "timestamp",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v3/quotes/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": [
- {
- "ask_exchange": 0,
- "ask_price": 0,
- "ask_size": 0,
- "bid_exchange": 11,
- "bid_price": 102.7,
- "bid_size": 60,
- "conditions": [
- 1
- ],
- "participant_timestamp": 1517562000065321200,
- "sequence_number": 2060,
- "sip_timestamp": 1517562000065700400,
- "tape": 3
- },
- {
- "ask_exchange": 0,
- "ask_price": 0,
- "ask_size": 0,
- "bid_exchange": 11,
- "bid_price": 170,
- "bid_size": 2,
- "conditions": [
- 1
- ],
- "participant_timestamp": 1517562000065408300,
- "sequence_number": 2061,
- "sip_timestamp": 1517562000065791500,
- "tape": 3
- }
- ],
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
- },
- "results": {
- "items": {
- "properties": {
- "ask_exchange": {
- "description": "The ask exchange ID",
- "type": "integer"
- },
- "ask_price": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "ask_size": {
- "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.",
- "format": "double",
- "type": "number"
- },
- "bid_exchange": {
- "description": "The bid exchange ID",
- "type": "integer"
- },
- "bid_price": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "bid_size": {
- "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.",
- "format": "double",
- "type": "number"
- },
- "conditions": {
- "description": "A list of condition codes.",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
- "format": "int32",
- "type": "integer"
- },
- "type": "array",
- "x-polygon-go-type": {
- "name": "Int32Array"
- }
- },
- "indicators": {
- "description": "A list of indicator codes.",
- "items": {
- "description": "The indicator codes. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).",
- "format": "int32",
- "type": "integer"
- },
- "type": "array",
- "x-polygon-go-type": {
- "name": "Int32Array"
- }
- },
- "participant_timestamp": {
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "sequence_number": {
- "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.",
- "format": "int64",
- "type": "integer"
- },
- "sip_timestamp": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this quote from the exchange which produced it.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "tape": {
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ",
- "format": "int32",
- "type": "integer"
- },
- "trf_timestamp": {
- "description": "The nanosecond accuracy TRF (Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this quote.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- }
+ "/v1/indicators/ema/{stockTicker}": {
+ "get": {
+ "description": "Get the exponential moving average (EMA) for a ticker symbol over a given time range.",
+ "operationId": "EMA",
+ "parameters": [
+ {
+ "description": "The ticker symbol for which to get exponential moving average (EMA) data.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "stockTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
},
- "type": "object"
- },
- "type": "array"
+ "x-polygon-go-id": "Ticker"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "ask_exchange,ask_price,ask_size,bid_exchange,bid_price,bid_size,conditions,participant_timestamp,sequence_number,sip_timestamp,tape\n0,0,0,11,102.7,60,1,1517562000065321216,2060,1517562000065700260,3\n0,0,0,11,170,2,1,1517562000065408256,2061,1517562000065791515,3\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "A list of quotes."
- }
- },
- "summary": "Quotes (NBBO)",
- "tags": [
- "stocks:quotes"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "NBBO data",
- "name": "nbbo"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
- },
- "x-polygon-paginate": {
- "limit": {
- "max": 50000
- },
- "order": {
- "default": "desc"
- },
- "sort": {
- "default": "timestamp",
- "enum": [
- "timestamp"
- ]
- }
- },
- "x-polygon-replaces": {
- "date": 1654056060000,
- "replaces": {
- "name": "Quotes (NBBO)",
- "path": "get_v2_ticks_stocks_nbbo__ticker___date"
- }
- }
- }
- },
- "/v3/reference/conditions": {
- "get": {
- "description": "List all conditions that Polygon.io uses.",
- "operationId": "ListConditions",
- "parameters": [
- {
- "description": "Filter for conditions within a given asset class.",
- "in": "query",
- "name": "asset_class",
- "schema": {
- "description": "An identifier for a group of similar financial instruments.",
- "enum": [
- "stocks",
- "options",
- "crypto",
- "fx"
- ],
- "example": "stocks",
- "type": "string"
- }
- },
- {
- "description": "Filter by data type.",
- "in": "query",
- "name": "data_type",
- "schema": {
- "description": "The type of financial data represented by a data model.",
- "enum": [
- "trade",
- "bbo",
- "nbbo"
- ],
- "example": "trade",
- "type": "string"
- }
- },
- {
- "description": "Filter for conditions with a given ID.",
- "in": "query",
- "name": "id",
- "schema": {
- "description": "An identifier used by Polygon.io for this condition. Unique per data type.",
- "example": 1,
- "type": "integer"
- }
- },
- {
- "description": "Filter by SIP. If the condition contains a mapping for that SIP, the condition will be returned.",
- "in": "query",
- "name": "sip",
- "schema": {
- "description": "One of the SIPs.",
- "enum": [
- "CTA",
- "UTP",
- "OPRA"
- ],
- "example": "CTA",
- "type": "string"
- }
- },
- {
- "description": "Order results based on the `sort` field.",
- "in": "query",
- "name": "order",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 1000.",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "example": 10,
- "maximum": 1000,
- "minimum": 1,
- "type": "integer"
- }
- },
- {
- "description": "Sort field used for ordering.",
- "in": "query",
- "name": "sort",
- "schema": {
- "default": "asset_class",
- "enum": [
- "asset_class",
- "id",
- "type",
- "name",
- "data_types",
- "legacy"
- ],
- "example": "asset_class",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "schema": {
- "example": {
- "count": 1,
- "request_id": "31d59dda-80e5-4721-8496-d0d32a654afe",
- "results": [
- {
- "asset_class": "stocks",
- "data_types": [
- "trade"
- ],
- "id": 2,
- "name": "Average Price Trade",
- "sip_mapping": {
- "CTA": "B",
- "UTP": "W"
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
},
- "type": "condition",
- "update_rules": {
- "consolidated": {
- "updates_high_low": false,
- "updates_open_close": false,
- "updates_volume": true
- },
- "market_center": {
- "updates_high_low": false,
- "updates_open_close": false,
- "updates_volume": true
- }
- }
- }
- ],
- "status": "OK"
- },
- "properties": {
- "count": {
- "description": "The total number of results for this request.",
- "example": 1,
- "type": "integer"
+ "x-polygon-filter-field": {
+ "range": true
+ }
},
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ {
+ "description": "The size of the aggregate time window.",
+ "example": "day",
+ "in": "query",
+ "name": "timespan",
+ "schema": {
+ "default": "day",
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
+ "type": "string"
+ }
},
- "request_id": {
- "description": "A request ID assigned by the server.",
- "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
- "type": "string"
+ {
+ "description": "Whether or not the aggregates used to calculate the exponential moving average are adjusted for splits. By default, aggregates are adjusted. Set this to false to get results that are NOT adjusted for splits.",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "default": true,
+ "type": "boolean"
+ }
},
- "results": {
- "description": "An array of conditions that match your query.",
- "items": {
- "description": "A condition generally refers to any extra information passed in a trade or a quote. These conditions\nmay or may not affect the behavior of aggregates.",
- "properties": {
- "abbreviation": {
- "description": "A commonly-used abbreviation for this condition.",
- "type": "string"
- },
- "asset_class": {
- "description": "An identifier for a group of similar financial instruments.",
+ {
+ "description": "The window size used to calculate the exponential moving average (EMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
+ "example": 50,
+ "in": "query",
+ "name": "window",
+ "schema": {
+ "default": 50,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The price in the aggregate which will be used to calculate the exponential moving average. i.e. 'close' will result in using close prices to \ncalculate the exponential moving average (EMA).",
+ "example": "close",
+ "in": "query",
+ "name": "series_type",
+ "schema": {
+ "default": "close",
"enum": [
- "stocks",
- "options",
- "crypto",
- "fx"
+ "open",
+ "high",
+ "low",
+ "close"
],
- "example": "stocks",
- "type": "string"
- },
- "data_types": {
- "description": "Data types that this condition applies to.",
- "items": {
- "description": "The type of financial data represented by a data model.",
- "enum": [
- "trade",
- "bbo",
- "nbbo"
- ],
- "example": "trade",
- "type": "string"
- },
- "type": "array"
- },
- "description": {
- "description": "A short description of the semantics of this condition.",
"type": "string"
- },
- "exchange": {
- "description": "If present, mapping this condition from a Polygon.io code to a SIP symbol depends on this attribute.\nIn other words, data with this condition attached comes exclusively from the given exchange.",
- "type": "integer"
- },
- "id": {
- "description": "An identifier used by Polygon.io for this condition. Unique per data type.",
- "example": 1,
- "type": "integer"
- },
- "legacy": {
- "description": "If true, this condition is from an old version of the SIPs' specs and no longer is used.\nOther conditions may or may not reuse the same symbol as this one.",
+ }
+ },
+ {
+ "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
+ "in": "query",
+ "name": "expand_underlying",
+ "schema": {
+ "default": false,
"type": "boolean"
- },
- "name": {
- "description": "The name of this condition.",
- "example": "Acquisition",
- "type": "string"
- },
- "sip_mapping": {
- "description": "A mapping to a symbol for each SIP that has this condition.",
- "properties": {
- "CTA": {
- "type": "string"
- },
- "OPRA": {
- "type": "string"
- },
- "UTP": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "type": {
- "description": "An identifier for a collection of related conditions.",
+ }
+ },
+ {
+ "description": "The order in which to return the results, ordered by timestamp.",
+ "example": "desc",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
"enum": [
- "sale_condition",
- "quote_condition",
- "sip_generated_flag",
- "financial_status_indicator",
- "short_sale_restriction_indicator",
- "settlement_condition",
- "market_condition",
- "trade_thru_exempt"
+ "asc",
+ "desc"
],
"type": "string"
- },
- "update_rules": {
- "description": "A list of aggregation rules.",
- "properties": {
- "consolidated": {
- "description": "Describes aggregation rules on a consolidated (all exchanges) basis.",
- "properties": {
- "updates_high_low": {
- "description": "Whether or not trades with this condition update the high/low.",
- "type": "boolean"
- },
- "updates_open_close": {
- "description": "Whether or not trades with this condition update the open/close.",
- "type": "boolean"
- },
- "updates_volume": {
- "description": "Whether or not trades with this condition update the volume.",
- "type": "boolean"
- }
- },
- "required": [
- "updates_high_low",
- "updates_open_close",
- "updates_volume"
- ],
- "type": "object"
- },
- "market_center": {
- "description": "Describes aggregation rules on a per-market-center basis.",
- "properties": {
- "updates_high_low": {
- "description": "Whether or not trades with this condition update the high/low.",
- "type": "boolean"
- },
- "updates_open_close": {
- "description": "Whether or not trades with this condition update the open/close.",
- "type": "boolean"
- },
- "updates_volume": {
- "description": "Whether or not trades with this condition update the volume.",
- "type": "boolean"
- }
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 5000",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "maximum": 5000,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v1/indicators/ema/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": {
+ "underlying": {
+ "url": "https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25"
+ },
+ "values": [
+ {
+ "timestamp": 1517562000016,
+ "value": 140.139
+ }
+ ]
+ },
+ "status": "OK"
},
- "required": [
- "updates_high_low",
- "updates_open_close",
- "updates_volume"
- ],
- "type": "object"
- }
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "underlying": {
+ "properties": {
+ "aggregates": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "format": "float",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "float",
+ "type": "number"
+ }
+ },
+ "required": [
+ "v",
+ "vw",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t",
+ "n"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "Aggregate",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "url": {
+ "description": "The URL which can be used to request the underlying aggregates used in this request.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "values": {
+ "items": {
+ "properties": {
+ "timestamp": {
+ "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMicroseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "value": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "EMAResults"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
},
- "required": [
- "consolidated",
- "market_center"
- ],
- "type": "object"
- }
+ "text/csv": {
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nAAPL,8.1599225E+07,152.5505,0,149.31,154.48,154.56,149.1,1663560000000,671961,,0,,0,0,0,0,0,false,1663560000000,163.17972071441582\nAAPL,8.4461761E+07,152.1354,0,152.74,151.76,154.72,149.945,1664251200000,683781,,0,,0,0,0,0,0,false,1664251200000,160.92194334973746\nAAPL,9.3308449E+07,156.1877,0,157.34,153.72,158.61,153.6,1663732800000,712645,,0,,0,0,0,0,0,false,1663732800000,162.5721451116157\nAAPL,1.07691097E+08,156.1317,0,153.4,156.9,158.08,153.08,1663646400000,792177,,0,,0,0,0,0,0,false,1663646400000,162.93345715698777\nAAPL,9.6031641E+07,150.0222,0,151.19,150.43,151.47,148.56,1663905600000,766888,,0,,0,0,0,0,0,false,1663905600000,161.72552880161066\nAAPL,8.6651514E+07,152.5709,0,152.38,152.74,154.47,150.91,1663819200000,686866,,0,,0,0,0,0,0,false,1663819200000,162.18657079351314\nAAPL,1.64879031E+08,150.2387,0,151.21,150.7,151.35,148.37,1663300800000,850358,,0,,0,0,0,0,0,false,1663300800000,163.53481135582055\nAAPL,1.27842348E+08,142.9013,0,146.1,142.48,146.72,140.68,1664424000000,1061605,,0,,0,0,0,0,0,false,1664424000000,159.78118646009983\nAAPL,1.46755122E+08,147.599,0,147.64,149.84,150.6414,144.84,1664337600000,1140818,,0,,0,0,0,0,0,false,1664337600000,160.48735733602226\nAAPL,9.3339409E+07,151.5222,0,149.66,150.77,153.7701,149.64,1664164800000,747666,,0,,0,0,0,0,0,false,1664164800000,161.29590022115534\n",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "required": [
- "id",
- "type",
- "name",
- "asset_class",
- "sip_mapping",
- "data_types"
- ],
- "type": "object"
- },
- "type": "array"
- },
- "status": {
- "description": "The status of this request's response.",
- "example": "OK",
- "type": "string"
+ "description": "Exponential Moving Average (EMA) data for each period."
}
- },
- "required": [
- "status",
- "request_id",
- "count",
- "results"
- ],
- "type": "object"
- }
- },
- "text/csv": {
- "example": "id,type,abbreviation,name,description,asset_class,sip_mapping,exchange,consolidated_updates_high_low,consolidated_updates_open_close,consolidated_updates_volume,market_center_updates_high_low,market_center_updates_open_close,market_center_updates_volume,data_types,legacy\n0,regular,,Regular Trade,,crypto,null,0,,,,,,,trade,false\n1,buy_or_sell_side,,Sell Side,The asset was sold at the prevailing best bid price on an exchange.,crypto,null,0,,,,,,,trade,false\n2,buy_or_sell_side,,Buy Side,The asset was bought at the prevailing best ask price on an exchange.,crypto,null,0,,,,,,,trade,false\n",
- "schema": {
- "type": "string"
+ },
+ "summary": "Exponential Moving Average (EMA)",
+ "tags": [
+ "stocks:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
}
- }
- },
- "description": "OK"
- },
- "400": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "count": {
- "description": "The total number of results for this request.",
- "example": 1,
- "type": "integer"
- },
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
- },
- "request_id": {
- "description": "A request ID assigned by the server.",
- "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
- "type": "string"
+ }
+ },
+ "/v1/indicators/macd/{cryptoTicker}": {
+ "get": {
+ "description": "Get moving average convergence/divergence (MACD) data for a ticker symbol over a given time range.",
+ "operationId": "CryptoMACD",
+ "parameters": [
+ {
+ "description": "The ticker symbol for which to get MACD data.",
+ "example": "X:BTCUSD",
+ "in": "path",
+ "name": "cryptoTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-go-id": "Ticker"
},
- "results": {
- "description": "An array of conditions that match your query.",
- "items": {
- "description": "A condition generally refers to any extra information passed in a trade or a quote. These conditions\nmay or may not affect the behavior of aggregates.",
- "properties": {
- "abbreviation": {
- "description": "A commonly-used abbreviation for this condition.",
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
"type": "string"
- },
- "asset_class": {
- "description": "An identifier for a group of similar financial instruments.",
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "The size of the aggregate time window.",
+ "example": "day",
+ "in": "query",
+ "name": "timespan",
+ "schema": {
+ "default": "day",
"enum": [
- "stocks",
- "options",
- "crypto",
- "fx"
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
],
- "example": "stocks",
- "type": "string"
- },
- "data_types": {
- "description": "Data types that this condition applies to.",
- "items": {
- "description": "The type of financial data represented by a data model.",
- "enum": [
- "trade",
- "bbo",
- "nbbo"
- ],
- "example": "trade",
- "type": "string"
- },
- "type": "array"
- },
- "description": {
- "description": "A short description of the semantics of this condition.",
"type": "string"
- },
- "exchange": {
- "description": "If present, mapping this condition from a Polygon.io code to a SIP symbol depends on this attribute.\nIn other words, data with this condition attached comes exclusively from the given exchange.",
+ }
+ },
+ {
+ "description": "The short window size used to calculate MACD data.",
+ "example": 12,
+ "in": "query",
+ "name": "short_window",
+ "schema": {
+ "default": 12,
"type": "integer"
- },
- "id": {
- "description": "An identifier used by Polygon.io for this condition. Unique per data type.",
- "example": 1,
+ }
+ },
+ {
+ "description": "The long window size used to calculate MACD data.",
+ "example": 26,
+ "in": "query",
+ "name": "long_window",
+ "schema": {
+ "default": 26,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The window size used to calculate the MACD signal line.",
+ "example": 9,
+ "in": "query",
+ "name": "signal_window",
+ "schema": {
+ "default": 9,
"type": "integer"
- },
- "legacy": {
- "description": "If true, this condition is from an old version of the SIPs' specs and no longer is used.\nOther conditions may or may not reuse the same symbol as this one.",
+ }
+ },
+ {
+ "description": "The price in the aggregate which will be used to calculate MACD data. i.e. 'close' will result in using close prices to \ncalculate the MACD.",
+ "example": "close",
+ "in": "query",
+ "name": "series_type",
+ "schema": {
+ "default": "close",
+ "enum": [
+ "open",
+ "high",
+ "low",
+ "close"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
+ "in": "query",
+ "name": "expand_underlying",
+ "schema": {
+ "default": false,
"type": "boolean"
- },
- "name": {
- "description": "The name of this condition.",
- "example": "Acquisition",
- "type": "string"
- },
- "sip_mapping": {
- "description": "A mapping to a symbol for each SIP that has this condition.",
- "properties": {
- "CTA": {
- "type": "string"
- },
- "OPRA": {
- "type": "string"
- },
- "UTP": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "type": {
- "description": "An identifier for a collection of related conditions.",
+ }
+ },
+ {
+ "description": "The order in which to return the results, ordered by timestamp.",
+ "example": "desc",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
"enum": [
- "sale_condition",
- "quote_condition",
- "sip_generated_flag",
- "financial_status_indicator",
- "short_sale_restriction_indicator",
- "settlement_condition",
- "market_condition",
- "trade_thru_exempt"
+ "asc",
+ "desc"
],
"type": "string"
- },
- "update_rules": {
- "description": "A list of aggregation rules.",
- "properties": {
- "consolidated": {
- "description": "Describes aggregation rules on a consolidated (all exchanges) basis.",
- "properties": {
- "updates_high_low": {
- "description": "Whether or not trades with this condition update the high/low.",
- "type": "boolean"
- },
- "updates_open_close": {
- "description": "Whether or not trades with this condition update the open/close.",
- "type": "boolean"
- },
- "updates_volume": {
- "description": "Whether or not trades with this condition update the volume.",
- "type": "boolean"
- }
- },
- "required": [
- "updates_high_low",
- "updates_open_close",
- "updates_volume"
- ],
- "type": "object"
- },
- "market_center": {
- "description": "Describes aggregation rules on a per-market-center basis.",
- "properties": {
- "updates_high_low": {
- "description": "Whether or not trades with this condition update the high/low.",
- "type": "boolean"
- },
- "updates_open_close": {
- "description": "Whether or not trades with this condition update the open/close.",
- "type": "boolean"
- },
- "updates_volume": {
- "description": "Whether or not trades with this condition update the volume.",
- "type": "boolean"
- }
- },
- "required": [
- "updates_high_low",
- "updates_open_close",
- "updates_volume"
- ],
- "type": "object"
- }
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 5000",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "maximum": 5000,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v1/indicators/macd/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": {
+ "underlying": {
+ "url": "https://api.polygon.io/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25"
+ },
+ "values": [
+ {
+ "histogram": 38.3801666667,
+ "signal": 106.9811666667,
+ "timestamp": 1517562000016,
+ "value": 145.3613333333
+ },
+ {
+ "histogram": 41.098859136,
+ "signal": 102.7386283473,
+ "timestamp": 1517562001016,
+ "value": 143.8374874833
+ }
+ ]
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "underlying": {
+ "properties": {
+ "aggregates": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "format": "float",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "float",
+ "type": "number"
+ }
+ },
+ "required": [
+ "v",
+ "vw",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t",
+ "n"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "Aggregate",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "url": {
+ "description": "The URL which can be used to request the underlying aggregates used in this request.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "values": {
+ "items": {
+ "properties": {
+ "histogram": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ },
+ "signal": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ },
+ "timestamp": {
+ "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMicroseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "value": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "MACDResults"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
},
- "required": [
- "consolidated",
- "market_center"
- ],
- "type": "object"
- }
+ "text/csv": {
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value,signal,histogram\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664323200000,225076,,0,,0,0,0,0,0,false,1664323200000,-200.79662915774315,-281.5009533935604,80.70432423581724\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664236800000,183075,,0,,0,0,0,0,0,false,1664236800000,-264.55324270273195,-316.4388906203941,51.88564791766214\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664150400000,297389,,0,,0,0,0,0,0,false,1664150400000,-317.75700272815084,-339.5909474061525,21.83394467800167\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664078400000,78936,,0,,0,0,0,0,0,false,1664078400000,-350.23805379084297,-345.0494335756529,-5.188620215190042\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664064000000,78936,,0,,0,0,0,0,0,false,1664064000000,-347.75055091027025,-343.7522785218554,-3.9982723884148754\nX:BTCUSD,2868.09828007,19069.8521,0,19210.31,18925.87,19400,18805.1,1663992000000,58721,,0,,0,0,0,0,0,false,1663992000000,-339.51740285673077,-342.7527104247516,3.2353075680208576\nX:BTCUSD,11337.77105153,19346.509,0,19527.23,19487.24,19640,18846.95,1664409600000,142239,,0,,0,0,0,0,0,false,1664409600000,-130.70646519456568,-232.81921860513586,102.11275341057018\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664337600000,225076,,0,,0,0,0,0,0,false,1664337600000,-165.73322121465026,-258.3474069577784,92.61418574312813\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664251200000,183075,,0,,0,0,0,0,0,false,1664251200000,-242.62960978099727,-301.6770344525147,59.04742467151743\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664164800000,297389,,0,,0,0,0,0,0,false,1664164800000,-288.68772337443806,-329.4103025998096,40.72257922537153\n",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "required": [
- "id",
- "type",
- "name",
- "asset_class",
- "sip_mapping",
- "data_types"
- ],
- "type": "object"
- },
- "type": "array"
- },
- "status": {
- "description": "The status of this request's response.",
- "example": "OK",
- "type": "string"
+ "description": "Moving Average Convergence/Divergence (MACD) data for each period."
}
- },
- "required": [
- "status",
- "request_id",
- "count",
- "results"
- ],
- "type": "object"
+ },
+ "summary": "Moving Average Convergence/Divergence (MACD)",
+ "tags": [
+ "crypto:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
}
- }
},
- "description": "a query parameter was malformed"
- },
- "default": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "count": {
- "description": "The total number of results for this request.",
- "example": 1,
- "type": "integer"
- },
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
- },
- "request_id": {
- "description": "A request ID assigned by the server.",
- "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
- "type": "string"
+ "x-polygon-ignore": true
+ },
+ "/v1/indicators/macd/{fxTicker}": {
+ "get": {
+ "description": "Get moving average convergence/divergence (MACD) data for a ticker symbol over a given time range.",
+ "operationId": "ForexMACD",
+ "parameters": [
+ {
+ "description": "The ticker symbol for which to get MACD data.",
+ "example": "C:EURUSD",
+ "in": "path",
+ "name": "fxTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-go-id": "Ticker"
},
- "results": {
- "description": "An array of conditions that match your query.",
- "items": {
- "description": "A condition generally refers to any extra information passed in a trade or a quote. These conditions\nmay or may not affect the behavior of aggregates.",
- "properties": {
- "abbreviation": {
- "description": "A commonly-used abbreviation for this condition.",
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
"type": "string"
- },
- "asset_class": {
- "description": "An identifier for a group of similar financial instruments.",
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "The size of the aggregate time window.",
+ "example": "day",
+ "in": "query",
+ "name": "timespan",
+ "schema": {
+ "default": "day",
"enum": [
- "stocks",
- "options",
- "crypto",
- "fx"
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
],
- "example": "stocks",
- "type": "string"
- },
- "data_types": {
- "description": "Data types that this condition applies to.",
- "items": {
- "description": "The type of financial data represented by a data model.",
- "enum": [
- "trade",
- "bbo",
- "nbbo"
- ],
- "example": "trade",
- "type": "string"
- },
- "type": "array"
- },
- "description": {
- "description": "A short description of the semantics of this condition.",
"type": "string"
- },
- "exchange": {
- "description": "If present, mapping this condition from a Polygon.io code to a SIP symbol depends on this attribute.\nIn other words, data with this condition attached comes exclusively from the given exchange.",
+ }
+ },
+ {
+ "description": "Whether or not the aggregates used to calculate the MACD are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "default": true,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The short window size used to calculate MACD data.",
+ "example": 12,
+ "in": "query",
+ "name": "short_window",
+ "schema": {
+ "default": 12,
"type": "integer"
- },
- "id": {
- "description": "An identifier used by Polygon.io for this condition. Unique per data type.",
- "example": 1,
+ }
+ },
+ {
+ "description": "The long window size used to calculate MACD data.",
+ "example": 26,
+ "in": "query",
+ "name": "long_window",
+ "schema": {
+ "default": 26,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The window size used to calculate the MACD signal line.",
+ "example": 9,
+ "in": "query",
+ "name": "signal_window",
+ "schema": {
+ "default": 9,
"type": "integer"
- },
- "legacy": {
- "description": "If true, this condition is from an old version of the SIPs' specs and no longer is used.\nOther conditions may or may not reuse the same symbol as this one.",
+ }
+ },
+ {
+ "description": "The price in the aggregate which will be used to calculate the MACD. i.e. 'close' will result in using close prices to \ncalculate the MACD.",
+ "example": "close",
+ "in": "query",
+ "name": "series_type",
+ "schema": {
+ "default": "close",
+ "enum": [
+ "open",
+ "high",
+ "low",
+ "close"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
+ "in": "query",
+ "name": "expand_underlying",
+ "schema": {
+ "default": false,
"type": "boolean"
- },
- "name": {
- "description": "The name of this condition.",
- "example": "Acquisition",
- "type": "string"
- },
- "sip_mapping": {
- "description": "A mapping to a symbol for each SIP that has this condition.",
- "properties": {
- "CTA": {
- "type": "string"
- },
- "OPRA": {
- "type": "string"
- },
- "UTP": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "type": {
- "description": "An identifier for a collection of related conditions.",
+ }
+ },
+ {
+ "description": "The order in which to return the results, ordered by timestamp.",
+ "example": "desc",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
"enum": [
- "sale_condition",
- "quote_condition",
- "sip_generated_flag",
- "financial_status_indicator",
- "short_sale_restriction_indicator",
- "settlement_condition",
- "market_condition",
- "trade_thru_exempt"
+ "asc",
+ "desc"
],
"type": "string"
- },
- "update_rules": {
- "description": "A list of aggregation rules.",
- "properties": {
- "consolidated": {
- "description": "Describes aggregation rules on a consolidated (all exchanges) basis.",
- "properties": {
- "updates_high_low": {
- "description": "Whether or not trades with this condition update the high/low.",
- "type": "boolean"
- },
- "updates_open_close": {
- "description": "Whether or not trades with this condition update the open/close.",
- "type": "boolean"
- },
- "updates_volume": {
- "description": "Whether or not trades with this condition update the volume.",
- "type": "boolean"
- }
- },
- "required": [
- "updates_high_low",
- "updates_open_close",
- "updates_volume"
- ],
- "type": "object"
- },
- "market_center": {
- "description": "Describes aggregation rules on a per-market-center basis.",
- "properties": {
- "updates_high_low": {
- "description": "Whether or not trades with this condition update the high/low.",
- "type": "boolean"
- },
- "updates_open_close": {
- "description": "Whether or not trades with this condition update the open/close.",
- "type": "boolean"
- },
- "updates_volume": {
- "description": "Whether or not trades with this condition update the volume.",
- "type": "boolean"
- }
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 5000",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "maximum": 5000,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v1/indicators/macd/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": {
+ "underlying": {
+ "url": "https://api.polygon.io/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25"
+ },
+ "values": [
+ {
+ "histogram": 38.3801666667,
+ "signal": 106.9811666667,
+ "timestamp": 1517562000016,
+ "value": 145.3613333333
+ },
+ {
+ "histogram": 41.098859136,
+ "signal": 102.7386283473,
+ "timestamp": 1517562001016,
+ "value": 143.8374874833
+ }
+ ]
+ },
+ "status": "OK"
},
- "required": [
- "updates_high_low",
- "updates_open_close",
- "updates_volume"
- ],
- "type": "object"
- }
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "underlying": {
+ "properties": {
+ "aggregates": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "format": "float",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "float",
+ "type": "number"
+ }
+ },
+ "required": [
+ "v",
+ "vw",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t",
+ "n"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "Aggregate",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "url": {
+ "description": "The URL which can be used to request the underlying aggregates used in this request.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "values": {
+ "items": {
+ "properties": {
+ "histogram": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ },
+ "signal": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ },
+ "timestamp": {
+ "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMicroseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "value": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "MACDResults"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
},
- "required": [
- "consolidated",
- "market_center"
- ],
- "type": "object"
- }
+ "text/csv": {
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value,signal,histogram\nC:USDAUD,687,1.5442,0,1.53763,1.5386983,1.5526022,1.537279,1664409600000,687,,0,,0,0,0,0,0,false,1664409600000,0.0160095063995076,0.016240853664654657,-0.0002313472651470569\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664251200000,536,,0,,0,0,0,0,0,false,1664251200000,0.019060448457087098,0.015690709670065223,0.0033697387870218753\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664164800000,550,,0,,0,0,0,0,0,false,1664164800000,0.017190795754692623,0.013971241529748895,0.003219554224943728\nC:USDAUD,1,1.5314,0,1.5313936,1.5313936,1.5313936,1.5313936,1663977600000,1,,0,,0,0,0,0,0,false,1663977600000,0.014349509127189686,0.010792069356789809,0.0035574397703998766\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664337600000,685,,0,,0,0,0,0,0,false,1664337600000,0.0169083298713677,0.016298690480941423,0.0006096393904262767\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664323200000,685,,0,,0,0,0,0,0,false,1664323200000,0.017968564486413374,0.016146280633334852,0.001822283853078522\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664236800000,536,,0,,0,0,0,0,0,false,1664236800000,0.018356408747553177,0.014848274973309752,0.0035081337742434247\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664150400000,550,,0,,0,0,0,0,0,false,1664150400000,0.016441299960100686,0.01316635297351296,0.0032749469865877255\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664078400000,10,,0,,0,0,0,0,0,false,1664078400000,0.015245524601038118,0.012347616226866026,0.002897908374172092\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664064000000,10,,0,,0,0,0,0,0,false,1664064000000,0.014947418239455779,0.011623139133323003,0.0033242791061327756\n",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "required": [
- "id",
- "type",
- "name",
- "asset_class",
- "sip_mapping",
- "data_types"
- ],
- "type": "object"
- },
- "type": "array"
- },
- "status": {
- "description": "The status of this request's response.",
- "example": "OK",
- "type": "string"
+ "description": "Moving Average Convergence/Divergence (MACD) data for each period."
}
- },
- "required": [
- "status",
- "request_id",
- "count",
- "results"
- ],
- "type": "object"
+ },
+ "summary": "Moving Average Convergence/Divergence (MACD)",
+ "tags": [
+ "fx:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Forex data",
+ "name": "fx"
}
- }
},
- "description": "an unknown error occurred"
- }
- },
- "summary": "Conditions",
- "tags": [
- "reference:conditions"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
+ "x-polygon-ignore": true
},
- "x-polygon-paginate": {
- "limit": {
- "default": 10,
- "max": 1000
- },
- "sort": {
- "default": "asset_class",
- "enum": [
- "asset_class",
- "id",
- "type",
- "name",
- "data_types",
- "legacy"
- ]
- }
- }
- }
- },
- "/v3/reference/dividends": {
- "get": {
- "description": "Get a list of historical cash dividends, including the ticker symbol,\ndeclaration date, ex-dividend date, record date, pay date, frequency,\nand amount.",
- "operationId": "ListDividends",
- "parameters": [
- {
- "description": "Return the dividends that contain this ticker.",
- "in": "query",
- "name": "ticker",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true,
- "type": "string"
- }
- },
- {
- "description": "Query by ex-dividend date with the format YYYY-MM-DD.",
- "in": "query",
- "name": "ex_dividend_date",
- "schema": {
- "format": "date",
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true,
- "type": "string"
- }
- },
- {
- "description": "Query by record date with the format YYYY-MM-DD.",
- "in": "query",
- "name": "record_date",
- "schema": {
- "format": "date",
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true,
- "type": "string"
- }
- },
- {
- "description": "Query by declaration date with the format YYYY-MM-DD.",
- "in": "query",
- "name": "declaration_date",
- "schema": {
- "format": "date",
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true,
- "type": "string"
- }
- },
- {
- "description": "Query by pay date with the format YYYY-MM-DD.",
- "in": "query",
- "name": "pay_date",
- "schema": {
- "format": "date",
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true,
- "type": "string"
- }
- },
- {
- "description": "Query by the number of times per year the dividend is paid out. Possible values are 0 (one-time), 1 (annually), 2 (bi-annually), 4 (quarterly), and 12 (monthly).",
- "in": "query",
- "name": "frequency",
- "schema": {
- "enum": [
- 0,
- 1,
- 2,
- 4,
- 12
- ],
- "type": "integer"
- }
- },
- {
- "description": "Query by the cash amount of the dividend.",
- "in": "query",
- "name": "cash_amount",
- "schema": {
- "type": "number"
- },
- "x-polygon-filter-field": {
- "range": true,
- "type": "number"
- }
- },
- {
- "description": "Query by the type of dividend. Dividends that have been paid and/or are expected to be paid on consistent schedules are denoted as CD.\nSpecial Cash dividends that have been paid that are infrequent or unusual, and/or can not be expected to occur in the future are denoted as SC.",
- "in": "query",
- "name": "dividend_type",
- "schema": {
- "description": "The type of dividend. Dividends that have been paid and/or are expected to be paid on consistent schedules are denoted as CD.\nSpecial Cash dividends that have been paid that are infrequent or unusual, and/or can not be expected to occur in the future are denoted as SC.\nLong-Term and Short-Term capital gain distributions are denoted as LT and ST, respectively.",
- "enum": [
- "CD",
- "SC",
- "LT",
- "ST"
- ],
- "type": "string",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- }
- },
- {
- "description": "Search by ticker.",
- "in": "query",
- "name": "ticker.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by ticker.",
- "in": "query",
- "name": "ticker.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by ticker.",
- "in": "query",
- "name": "ticker.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by ticker.",
- "in": "query",
- "name": "ticker.lt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by ex_dividend_date.",
- "in": "query",
- "name": "ex_dividend_date.gte",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by ex_dividend_date.",
- "in": "query",
- "name": "ex_dividend_date.gt",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by ex_dividend_date.",
- "in": "query",
- "name": "ex_dividend_date.lte",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by ex_dividend_date.",
- "in": "query",
- "name": "ex_dividend_date.lt",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by record_date.",
- "in": "query",
- "name": "record_date.gte",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by record_date.",
- "in": "query",
- "name": "record_date.gt",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by record_date.",
- "in": "query",
- "name": "record_date.lte",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by record_date.",
- "in": "query",
- "name": "record_date.lt",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by declaration_date.",
- "in": "query",
- "name": "declaration_date.gte",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by declaration_date.",
- "in": "query",
- "name": "declaration_date.gt",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by declaration_date.",
- "in": "query",
- "name": "declaration_date.lte",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by declaration_date.",
- "in": "query",
- "name": "declaration_date.lt",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by pay_date.",
- "in": "query",
- "name": "pay_date.gte",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by pay_date.",
- "in": "query",
- "name": "pay_date.gt",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by pay_date.",
- "in": "query",
- "name": "pay_date.lte",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by pay_date.",
- "in": "query",
- "name": "pay_date.lt",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by cash_amount.",
- "in": "query",
- "name": "cash_amount.gte",
- "schema": {
- "type": "number"
- }
- },
- {
- "description": "Search by cash_amount.",
- "in": "query",
- "name": "cash_amount.gt",
- "schema": {
- "type": "number"
- }
- },
- {
- "description": "Search by cash_amount.",
- "in": "query",
- "name": "cash_amount.lte",
- "schema": {
- "type": "number"
- }
- },
- {
- "description": "Search by cash_amount.",
- "in": "query",
- "name": "cash_amount.lt",
- "schema": {
- "type": "number"
- }
- },
- {
- "description": "Order results based on the `sort` field.",
- "in": "query",
- "name": "order",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 1000.",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "example": 10,
- "maximum": 1000,
- "minimum": 1,
- "type": "integer"
- }
- },
- {
- "description": "Sort field used for ordering.",
- "in": "query",
- "name": "sort",
- "schema": {
- "default": "ex_dividend_date",
- "enum": [
- "ex_dividend_date",
- "pay_date",
- "declaration_date",
- "record_date",
- "cash_amount",
- "ticker"
- ],
- "example": "ex_dividend_date",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "schema": {
- "description": "A list of dividends.",
- "example": {
- "next_url": "https://api.polygon.io/v3/reference/dividends/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "results": [
- {
- "cash_amount": 0.22,
- "declaration_date": "2021-10-28",
- "dividend_type": "CD",
- "ex_dividend_date": "2021-11-05",
- "frequency": 4,
- "pay_date": "2021-11-11",
- "record_date": "2021-11-08",
- "ticker": "AAPL"
- },
- {
- "cash_amount": 0.22,
- "declaration_date": "2021-07-27",
- "dividend_type": "CD",
- "ex_dividend_date": "2021-08-06",
- "frequency": 4,
- "pay_date": "2021-08-12",
- "record_date": "2021-08-09",
- "ticker": "AAPL"
- }
- ],
- "status": "OK"
- },
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
- },
- "request_id": {
- "type": "string"
+ "/v1/indicators/macd/{indicesTicker}": {
+ "get": {
+ "description": "Get moving average convergence/divergence (MACD) for a ticker symbol over a given time range.",
+ "operationId": "IndicesMACD",
+ "parameters": [
+ {
+ "description": "The ticker symbol for which to get MACD data.",
+ "example": "I:DJI",
+ "in": "path",
+ "name": "indicesTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-go-id": "Ticker"
},
- "results": {
- "items": {
- "properties": {
- "cash_amount": {
- "description": "The cash amount of the dividend per share owned.",
- "type": "number",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "currency": {
- "description": "The currency in which the dividend is paid.",
- "type": "string",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "declaration_date": {
- "description": "The date that the dividend was announced.",
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
"type": "string"
- },
- "dividend_type": {
- "description": "The type of dividend. Dividends that have been paid and/or are expected to be paid on consistent schedules are denoted as CD.\nSpecial Cash dividends that have been paid that are infrequent or unusual, and/or can not be expected to occur in the future are denoted as SC.\nLong-Term and Short-Term capital gain distributions are denoted as LT and ST, respectively.",
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "The size of the aggregate time window.",
+ "example": "day",
+ "in": "query",
+ "name": "timespan",
+ "schema": {
+ "default": "day",
"enum": [
- "CD",
- "SC",
- "LT",
- "ST"
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
],
- "type": "string",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "ex_dividend_date": {
- "description": "The date that the stock first trades without the dividend, determined by the exchange.",
- "type": "string",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "frequency": {
- "description": "The number of times per year the dividend is paid out. Possible values are 0 (one-time), 1 (annually), 2 (bi-annually), 4 (quarterly), and 12 (monthly).",
- "type": "integer",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "pay_date": {
- "description": "The date that the dividend is paid out.",
"type": "string"
- },
- "record_date": {
- "description": "The date that the stock must be held to receive the dividend, set by the company.",
- "type": "string"
- },
- "ticker": {
- "description": "The ticker symbol of the dividend.",
- "type": "string",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- }
- },
- "required": [
- "ticker",
- "ex_dividend_date",
- "frequency",
- "cash_amount",
- "dividend_type"
- ],
- "type": "object",
- "x-polygon-go-struct-tags": {
- "tags": [
- "db"
- ]
}
- },
- "type": "array"
},
- "status": {
- "type": "string"
- }
- },
- "required": [
- "request_id"
- ],
- "type": "object"
- }
- },
- "text/csv": {
- "schema": {
- "example": "ticker,declaration_date,ex_dividend_date,record_date,pay_date,frequency,cash_amount,dividend_type\nAAPL,2021-10-28,2021-11-05,2021-11-08,2021-11-11,4,0.22,CD\nAAPL,2021-07-27,2021-08-06,2021-08-09,2021-08-12,4,0.22,CD\n",
- "type": "string"
- }
- }
- },
- "description": "OK"
- }
- },
- "summary": "Dividends v3",
- "tags": [
- "reference:dividends"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
- },
- "x-polygon-paginate": {
- "limit": {
- "default": 10,
- "max": 1000
- },
- "sort": {
- "default": "ex_dividend_date",
- "enum": [
- "ex_dividend_date",
- "pay_date",
- "declaration_date",
- "record_date",
- "cash_amount",
- "ticker"
- ]
- }
- }
- },
- "post": {
- "description": "Manually add Polygon a dividend.",
- "operationId": "CreateDividend",
- "parameters": [
- {
- "description": "If true don't trigger overlay",
- "in": "query",
- "name": "skip_overlay_trigger",
- "schema": {
- "default": false,
- "type": "boolean"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "cash_amount": {
- "description": "The cash amount of the dividend per share owned.",
- "type": "number",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "currency": {
- "description": "The currency in which the dividend is paid.",
- "type": "string",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "declaration_date": {
- "description": "The date that the dividend was announced.",
- "type": "string"
- },
- "dividend_type": {
- "description": "The type of dividend. Dividends that have been paid and/or are expected to be paid on consistent schedules are denoted as CD.\nSpecial Cash dividends that have been paid that are infrequent or unusual, and/or can not be expected to occur in the future are denoted as SC.\nLong-Term and Short-Term capital gain distributions are denoted as LT and ST, respectively.",
- "enum": [
- "CD",
- "SC",
- "LT",
- "ST"
- ],
- "type": "string",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "ex_dividend_date": {
- "description": "The date that the stock first trades without the dividend, determined by the exchange.",
- "type": "string",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "frequency": {
- "description": "The number of times per year the dividend is paid out. Possible values are 0 (one-time), 1 (annually), 2 (bi-annually), 4 (quarterly), and 12 (monthly).",
- "type": "integer",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "pay_date": {
- "description": "The date that the dividend is paid out.",
- "type": "string"
- },
- "record_date": {
- "description": "The date that the stock must be held to receive the dividend, set by the company.",
- "type": "string"
- },
- "ticker": {
- "description": "The ticker symbol of the dividend.",
- "type": "string",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
+ {
+ "description": "Whether or not the aggregates used to calculate the MACD are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "default": true,
+ "type": "boolean"
}
- ]
- }
- }
- },
- "required": [
- "ticker",
- "ex_dividend_date",
- "frequency",
- "cash_amount",
- "dividend_type"
- ],
- "type": "object",
- "x-polygon-go-struct-tags": {
- "tags": [
- "db"
- ]
- }
- }
- }
- },
- "description": "Pass the desired dividend in the request body.",
- "required": true
- },
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "request_id": {
- "type": "string"
},
- "results": {
- "properties": {
- "cash_amount": {
- "description": "The cash amount of the dividend per share owned.",
- "type": "number",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "currency": {
- "description": "The currency in which the dividend is paid.",
- "type": "string",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "declaration_date": {
- "description": "The date that the dividend was announced.",
- "type": "string"
- },
- "dividend_type": {
- "description": "The type of dividend. Dividends that have been paid and/or are expected to be paid on consistent schedules are denoted as CD.\nSpecial Cash dividends that have been paid that are infrequent or unusual, and/or can not be expected to occur in the future are denoted as SC.\nLong-Term and Short-Term capital gain distributions are denoted as LT and ST, respectively.",
- "enum": [
- "CD",
- "SC",
- "LT",
- "ST"
- ],
- "type": "string",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "ex_dividend_date": {
- "description": "The date that the stock first trades without the dividend, determined by the exchange.",
- "type": "string",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "frequency": {
- "description": "The number of times per year the dividend is paid out. Possible values are 0 (one-time), 1 (annually), 2 (bi-annually), 4 (quarterly), and 12 (monthly).",
- "type": "integer",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "pay_date": {
- "description": "The date that the dividend is paid out.",
- "type": "string"
- },
- "record_date": {
- "description": "The date that the stock must be held to receive the dividend, set by the company.",
- "type": "string"
- },
- "ticker": {
- "description": "The ticker symbol of the dividend.",
- "type": "string",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- }
- },
- "required": [
- "ticker",
- "ex_dividend_date",
- "frequency",
- "cash_amount",
- "dividend_type"
- ],
- "type": "object",
- "x-polygon-go-struct-tags": {
- "tags": [
- "db"
- ]
- }
+ {
+ "description": "The short window size used to calculate MACD data.",
+ "example": 12,
+ "in": "query",
+ "name": "short_window",
+ "schema": {
+ "default": 12,
+ "type": "integer"
+ }
},
- "status": {
- "type": "string"
- }
- },
- "required": [
- "request_id"
- ],
- "type": "object"
- }
- }
- },
- "description": "OK"
- },
- "400": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "error": {
- "type": "string"
+ {
+ "description": "The long window size used to calculate MACD data.",
+ "example": 26,
+ "in": "query",
+ "name": "long_window",
+ "schema": {
+ "default": 26,
+ "type": "integer"
+ }
},
- "request_id": {
- "type": "string"
+ {
+ "description": "The window size used to calculate the MACD signal line.",
+ "example": 9,
+ "in": "query",
+ "name": "signal_window",
+ "schema": {
+ "default": 9,
+ "type": "integer"
+ }
},
- "status": {
- "type": "string"
- }
- },
- "required": [
- "request_id",
- "error"
- ],
- "type": "object"
- }
- }
- },
- "description": "the requested update was unable to be performed due to an invalid request body"
- },
- "409": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "error": {
- "type": "string"
+ {
+ "description": "The value in the aggregate which will be used to calculate the MACD. i.e. 'close' will result in using close values to \ncalculate the MACD.",
+ "example": "close",
+ "in": "query",
+ "name": "series_type",
+ "schema": {
+ "default": "close",
+ "enum": [
+ "open",
+ "high",
+ "low",
+ "close"
+ ],
+ "type": "string"
+ }
},
- "request_id": {
- "type": "string"
+ {
+ "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
+ "in": "query",
+ "name": "expand_underlying",
+ "schema": {
+ "default": false,
+ "type": "boolean"
+ }
},
- "status": {
- "type": "string"
- }
- },
- "required": [
- "request_id",
- "error"
- ],
- "type": "object"
- }
- }
- },
- "description": "a dividend already exists for this date and ticker"
- },
- "default": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "error": {
- "type": "string"
+ {
+ "description": "The order in which to return the results, ordered by timestamp.",
+ "example": "desc",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
+ }
},
- "request_id": {
- "type": "string"
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 5000",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "maximum": 5000,
+ "type": "integer"
+ }
},
- "status": {
- "type": "string"
- }
- },
- "required": [
- "request_id",
- "error"
- ],
- "type": "object"
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v1/indicators/macd/I:DJI?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": {
+ "underlying": {
+ "url": "https://api.polygon.io/v2/aggs/ticker/I:DJI/range/1/day/1063281600000/1678726155743?limit=129&sort=desc"
+ },
+ "values": [
+ {
+ "histogram": -48.29157370302107,
+ "signal": 225.60959338746886,
+ "timestamp": 1681966800000,
+ "value": 177.3180196844478
+ },
+ {
+ "histogram": -37.55634001543484,
+ "signal": 237.6824868132241,
+ "timestamp": 1681963200000,
+ "value": 200.12614679778926
+ }
+ ]
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "underlying": {
+ "properties": {
+ "aggregates": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "format": "float",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "float",
+ "type": "number"
+ }
+ },
+ "required": [
+ "v",
+ "vw",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t",
+ "n"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "Aggregate",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "url": {
+ "description": "The URL which can be used to request the underlying aggregates used in this request.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "values": {
+ "items": {
+ "properties": {
+ "histogram": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ },
+ "signal": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ },
+ "timestamp": {
+ "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMicroseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "value": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "MACDResults"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "Moving Average Convergence/Divergence (MACD) data for each period."
+ }
+ },
+ "summary": "Moving Average Convergence/Divergence (MACD)",
+ "tags": [
+ "indices:aggregates"
+ ],
+ "x-polygon-entitlement-allowed-limited-tickers": true,
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Indices data",
+ "name": "indices"
}
- }
},
- "description": "unknown error"
- }
+ "x-polygon-ignore": true
},
- "summary": "Dividends v3",
- "tags": [
- "reference:stocks"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
- }
- }
- },
- "/v3/reference/exchanges": {
- "get": {
- "description": "List all exchanges that Polygon.io knows about.",
- "operationId": "ListExchanges",
- "parameters": [
- {
- "description": "Filter by asset class.",
- "in": "query",
- "name": "asset_class",
- "schema": {
- "description": "An identifier for a group of similar financial instruments.",
- "enum": [
- "stocks",
- "options",
- "crypto",
- "fx"
- ],
- "example": "stocks",
- "type": "string"
- }
- },
- {
- "description": "Filter by locale.",
- "in": "query",
- "name": "locale",
- "schema": {
- "description": "An identifier for a geographical location.",
- "enum": [
- "us",
- "global"
- ],
- "example": "us",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "count": {
- "description": "The total number of results for this request.",
- "example": 1,
- "type": "integer"
- },
- "request_id": {
- "description": "A request ID assigned by the server.",
- "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
- "type": "string"
+ "/v1/indicators/macd/{optionsTicker}": {
+ "get": {
+ "description": "Get moving average convergence/divergence (MACD) for a ticker symbol over a given time range.",
+ "operationId": "OptionsMACD",
+ "parameters": [
+ {
+ "description": "The ticker symbol for which to get MACD data.",
+ "example": "O:SPY241220P00720000",
+ "in": "path",
+ "name": "optionsTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-go-id": "Ticker"
},
- "results": {
- "items": {
- "description": "An entity that reports trades.",
- "properties": {
- "acronym": {
- "description": "A commonly used abbreviation for this exchange.",
- "example": "AMEX",
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
"type": "string"
- },
- "asset_class": {
- "description": "An identifier for a group of similar financial instruments.",
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "The size of the aggregate time window.",
+ "example": "day",
+ "in": "query",
+ "name": "timespan",
+ "schema": {
+ "default": "day",
"enum": [
- "stocks",
- "options",
- "crypto",
- "fx"
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
],
- "example": "stocks",
"type": "string"
- },
- "id": {
- "description": "A unique identifier used by Polygon.io for this exchange.",
- "example": 1,
+ }
+ },
+ {
+ "description": "Whether or not the aggregates used to calculate the MACD are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "default": true,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The short window size used to calculate MACD data.",
+ "example": 12,
+ "in": "query",
+ "name": "short_window",
+ "schema": {
+ "default": 12,
"type": "integer"
- },
- "locale": {
- "description": "An identifier for a geographical location.",
+ }
+ },
+ {
+ "description": "The long window size used to calculate MACD data.",
+ "example": 26,
+ "in": "query",
+ "name": "long_window",
+ "schema": {
+ "default": 26,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The window size used to calculate the MACD signal line.",
+ "example": 9,
+ "in": "query",
+ "name": "signal_window",
+ "schema": {
+ "default": 9,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The price in the aggregate which will be used to calculate the MACD. i.e. 'close' will result in using close prices to \ncalculate the MACD.",
+ "example": "close",
+ "in": "query",
+ "name": "series_type",
+ "schema": {
+ "default": "close",
"enum": [
- "us",
- "global"
+ "open",
+ "high",
+ "low",
+ "close"
],
- "example": "us",
"type": "string"
- },
- "mic": {
- "description": "The Market Identifer Code of this exchange (see ISO 10383).",
- "example": "XASE",
- "type": "string"
- },
- "name": {
- "description": "Name of this exchange.",
- "example": "NYSE American, LLC",
- "type": "string"
- },
- "operating_mic": {
- "description": "The MIC of the entity that operates this exchange.",
- "example": "XNYS",
- "type": "string"
- },
- "participant_id": {
- "description": "The ID used by SIP's to represent this exchange.",
- "example": "A",
- "type": "string"
- },
- "type": {
- "description": "Represents the type of exchange.",
+ }
+ },
+ {
+ "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
+ "in": "query",
+ "name": "expand_underlying",
+ "schema": {
+ "default": false,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The order in which to return the results, ordered by timestamp.",
+ "example": "desc",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
"enum": [
- "exchange",
- "TRF",
- "SIP"
+ "asc",
+ "desc"
],
- "example": "exchange",
- "type": "string"
- },
- "url": {
- "description": "A link to this exchange's website, if one exists.",
- "example": "https://www.nyse.com/markets/nyse-american",
"type": "string"
- }
- },
- "required": [
- "id",
- "type",
- "asset_class",
- "locale",
- "name"
- ],
- "type": "object"
- },
- "type": "array"
+ }
},
- "status": {
- "description": "The status of this request's response.",
- "example": "OK",
- "type": "string"
- }
- },
- "required": [
- "status",
- "request_id"
- ],
- "type": "object"
- }
- },
- "text/csv": {
- "example": "id,type,asset_class,locale,name,acronym,mic,operating_mic,participant_id,url\n1,exchange,stocks,us,\"NYSE American, LLC\",AMEX,XASE,XNYS,65,https://www.nyse.com/markets/nyse-american\n2,exchange,stocks,us,\"Nasdaq OMX BX, Inc.\",,XBOS,XNAS,66,https://www.nasdaq.com/solutions/nasdaq-bx-stock-market\n3,exchange,stocks,us,\"NYSE National, Inc.\",NSX,XCIS,XNYS,67,https://www.nyse.com/markets/nyse-national\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "OK"
- },
- "400": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "count": {
- "description": "The total number of results for this request.",
- "example": 1,
- "type": "integer"
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 5000",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "maximum": 5000,
+ "type": "integer"
+ }
},
- "request_id": {
- "description": "A request ID assigned by the server.",
- "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
- "type": "string"
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
},
- "status": {
- "description": "The status of this request's response.",
- "example": "OK",
- "type": "string"
- }
- },
- "required": [
- "status",
- "request_id"
- ],
- "type": "object"
- }
- }
- },
- "description": "a query parameter was malformed"
- },
- "default": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "count": {
- "description": "The total number of results for this request.",
- "example": 1,
- "type": "integer"
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
},
- "request_id": {
- "description": "A request ID assigned by the server.",
- "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
- "type": "string"
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
},
- "status": {
- "description": "The status of this request's response.",
- "example": "OK",
- "type": "string"
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
}
- },
- "required": [
- "status",
- "request_id"
- ],
- "type": "object"
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v1/indicators/macd/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": {
+ "underlying": {
+ "url": "https://api.polygon.io/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25"
+ },
+ "values": [
+ {
+ "histogram": 38.3801666667,
+ "signal": 106.9811666667,
+ "timestamp": 1517562000016,
+ "value": 145.3613333333
+ },
+ {
+ "histogram": 41.098859136,
+ "signal": 102.7386283473,
+ "timestamp": 1517562001016,
+ "value": 143.8374874833
+ }
+ ]
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "underlying": {
+ "properties": {
+ "aggregates": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "format": "float",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "float",
+ "type": "number"
+ }
+ },
+ "required": [
+ "v",
+ "vw",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t",
+ "n"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "Aggregate",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "url": {
+ "description": "The URL which can be used to request the underlying aggregates used in this request.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "values": {
+ "items": {
+ "properties": {
+ "histogram": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ },
+ "signal": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ },
+ "timestamp": {
+ "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMicroseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "value": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "MACDResults"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value,signal,histogram\nO:SPY241220P00720000,3,277.8267,0,277.82,277.83,277.83,277.82,1649649600000,2,,0,,0,0,0,0,0,false,1649649600000,-0.05105556065990413,3.5771695836806834,-3.6282251443405875\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649304000000,1,,0,,0,0,0,0,0,false,1649304000000,4.047960862047148,5.247666286053219,-1.199705424006071\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648785600000,1,,0,,0,0,0,0,0,false,1648785600000,5.255380647906861,6.466477305754766,-1.2110966578479045\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648699200000,1,,0,,0,0,0,0,0,false,1648699200000,5.591072756938104,6.769251470216741,-1.178178713278637\nO:SPY241220P00720000,2,270.49,0,270.49,270.49,270.49,270.49,1649390400000,1,,0,,0,0,0,0,0,false,1649390400000,1.4304642046162712,4.48422586976583,-3.053761665149559\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649217600000,1,,0,,0,0,0,0,0,false,1649217600000,4.32835898317461,5.547592642054737,-1.2192336588801274\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649131200000,1,,0,,0,0,0,0,0,false,1649131200000,4.623290999840208,5.852401056774768,-1.2291100569345605\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649044800000,1,,0,,0,0,0,0,0,false,1649044800000,4.932483632022979,6.159678571008409,-1.2271949389854298\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648612800000,1,,0,,0,0,0,0,0,false,1648612800000,5.93821326327344,7.063796148536399,-1.1255828852629595\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648526400000,1,,0,,0,0,0,0,0,false,1648526400000,6.294916771166584,7.345191869852139,-1.050275098685555\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Moving Average Convergence/Divergence (MACD) data for each period."
+ }
+ },
+ "summary": "Moving Average Convergence/Divergence (MACD)",
+ "tags": [
+ "options:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Options data",
+ "name": "options"
}
- }
},
- "description": "an unknown error occurred"
- }
+ "x-polygon-ignore": true
},
- "summary": "Exchanges",
- "tags": [
- "reference:exchanges"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
- }
- }
- },
- "/v3/reference/options/contracts": {
- "get": {
- "description": "Query for historical options contracts. This provides both active and expired options contracts.",
- "operationId": "ListOptionsContracts",
- "parameters": [
- {
- "description": "This parameter has been deprecated. To search by specific options ticker, use the Options Contract endpoint [here](https://polygon.io/docs/options/get_v3_reference_options_contracts__options_ticker).",
- "in": "query",
- "name": "ticker",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Query for contracts relating to an underlying stock ticker.",
- "in": "query",
- "name": "underlying_ticker",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true,
- "type": "string"
- }
- },
- {
- "description": "Query by the type of contract.",
- "in": "query",
- "name": "contract_type",
- "schema": {
- "enum": [
- "call",
- "put"
- ],
- "type": "string"
- }
- },
- {
- "description": "Query by contract expiration with date format YYYY-MM-DD.",
- "in": "query",
- "name": "expiration_date",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "Specify a point in time for contracts as of this date with format YYYY-MM-DD. Defaults to today's date.",
- "in": "query",
- "name": "as_of",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Query by strike price of a contract.",
- "in": "query",
- "name": "strike_price",
- "schema": {
- "type": "number"
- },
- "x-polygon-filter-field": {
- "range": true,
- "type": "number"
- }
- },
- {
- "description": "Query for expired contracts. Default is false.",
- "in": "query",
- "name": "expired",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "description": "Search by underlying_ticker.",
- "in": "query",
- "name": "underlying_ticker.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by underlying_ticker.",
- "in": "query",
- "name": "underlying_ticker.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by underlying_ticker.",
- "in": "query",
- "name": "underlying_ticker.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by underlying_ticker.",
- "in": "query",
- "name": "underlying_ticker.lt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by expiration_date.",
- "in": "query",
- "name": "expiration_date.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by expiration_date.",
- "in": "query",
- "name": "expiration_date.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by expiration_date.",
- "in": "query",
- "name": "expiration_date.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by expiration_date.",
- "in": "query",
- "name": "expiration_date.lt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by strike_price.",
- "in": "query",
- "name": "strike_price.gte",
- "schema": {
- "type": "number"
- }
- },
- {
- "description": "Search by strike_price.",
- "in": "query",
- "name": "strike_price.gt",
- "schema": {
- "type": "number"
- }
- },
- {
- "description": "Search by strike_price.",
- "in": "query",
- "name": "strike_price.lte",
- "schema": {
- "type": "number"
- }
- },
- {
- "description": "Search by strike_price.",
- "in": "query",
- "name": "strike_price.lt",
- "schema": {
- "type": "number"
- }
- },
- {
- "description": "Order results based on the `sort` field.",
- "in": "query",
- "name": "order",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 1000.",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "example": 10,
- "maximum": 1000,
- "minimum": 1,
- "type": "integer"
- }
- },
- {
- "description": "Sort field used for ordering.",
- "in": "query",
- "name": "sort",
- "schema": {
- "default": "ticker",
- "enum": [
- "ticker",
- "underlying_ticker",
- "expiration_date",
- "strike_price"
- ],
- "example": "ticker",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "request_id": "603902c0-a5a5-406f-bd08-f030f92418fa",
- "results": [
- {
- "cfi": "OCASPS",
- "contract_type": "call",
- "exercise_style": "american",
- "expiration_date": "2021-11-19",
- "primary_exchange": "BATO",
- "shares_per_contract": 100,
- "strike_price": 85,
- "ticker": "O:AAPL211119C00085000",
- "underlying_ticker": "AAPL"
- },
- {
- "additional_underlyings": [
- {
- "amount": 44,
- "type": "equity",
- "underlying": "VMW"
+ "/v1/indicators/macd/{stockTicker}": {
+ "get": {
+ "description": "Get moving average convergence/divergence (MACD) data for a ticker symbol over a given time range.",
+ "operationId": "MACD",
+ "parameters": [
+ {
+ "description": "The ticker symbol for which to get MACD data.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "stockTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
},
- {
- "amount": 6.53,
- "type": "currency",
- "underlying": "USD"
- }
- ],
- "cfi": "OCASPS",
- "contract_type": "call",
- "exercise_style": "american",
- "expiration_date": "2021-11-19",
- "primary_exchange": "BATO",
- "shares_per_contract": 100,
- "strike_price": 90,
- "ticker": "O:AAPL211119C00090000",
- "underlying_ticker": "AAPL"
- }
- ],
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
- },
- "request_id": {
- "type": "string"
+ "x-polygon-go-id": "Ticker"
},
- "results": {
- "items": {
- "properties": {
- "additional_underlyings": {
- "description": "If an option contract has additional underlyings or deliverables associated with it, they will appear here.\nSee \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"https://www.optionseducation.org/referencelibrary/faq/splits-mergers-spinoffs-bankruptcies\"\u003ehere\u003c/a\u003e for some examples of what might cause a contract to have additional underlyings.",
- "items": {
- "properties": {
- "amount": {
- "description": "The number of shares per contract of the additional underlying, or the cash-in-lieu amount of the currency.",
- "type": "number"
- },
- "type": {
- "description": "The type of the additional underlying asset, either equity or currency.",
- "type": "string"
- },
- "underlying": {
- "description": "The name of the additional underlying asset.",
- "type": "string"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "AdditionalUnderlying"
- }
- },
- "type": "array",
- "x-polygon-go-type": {
- "name": "AdditionalUnderlyings"
- }
- },
- "cfi": {
- "description": "The 6 letter CFI code of the contract (defined in \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/ISO_10962\"\u003eISO 10962\u003c/a\u003e)",
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
"type": "string"
- },
- "contract_type": {
- "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".",
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "The size of the aggregate time window.",
+ "example": "day",
+ "in": "query",
+ "name": "timespan",
+ "schema": {
+ "default": "day",
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
"type": "string"
- },
- "correction": {
- "description": "The correction number for this option contract.",
+ }
+ },
+ {
+ "description": "Whether or not the aggregates used to calculate the MACD are adjusted for splits. By default, aggregates are adjusted. Set this to false to get results that are NOT adjusted for splits.",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "default": true,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The short window size used to calculate MACD data.",
+ "example": 12,
+ "in": "query",
+ "name": "short_window",
+ "schema": {
+ "default": 12,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The long window size used to calculate MACD data.",
+ "example": 26,
+ "in": "query",
+ "name": "long_window",
+ "schema": {
+ "default": 26,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The window size used to calculate the MACD signal line.",
+ "example": 9,
+ "in": "query",
+ "name": "signal_window",
+ "schema": {
+ "default": 9,
"type": "integer"
- },
- "exercise_style": {
- "description": "The exercise style of this contract. See \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Option_style\"\u003ethis link\u003c/a\u003e for more details on exercise styles.",
+ }
+ },
+ {
+ "description": "The price in the aggregate which will be used to calculate the MACD. i.e. 'close' will result in using close prices to \ncalculate the MACD.",
+ "example": "close",
+ "in": "query",
+ "name": "series_type",
+ "schema": {
+ "default": "close",
"enum": [
- "american",
- "european",
- "bermudan"
+ "open",
+ "high",
+ "low",
+ "close"
],
"type": "string"
- },
- "expiration_date": {
- "description": "The contract's expiration date in YYYY-MM-DD format.",
- "type": "string",
- "x-polygon-go-type": {
- "name": "IDaysPolygonDateString",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "primary_exchange": {
- "description": "The MIC code of the primary exchange that this contract is listed on.",
- "type": "string"
- },
- "shares_per_contract": {
- "description": "The number of shares per contract for this contract.",
- "type": "number"
- },
- "strike_price": {
- "description": "The strike price of the option contract.",
- "type": "number"
- },
- "ticker": {
- "description": "The ticker for the option contract.",
- "type": "string"
- },
- "underlying_ticker": {
- "description": "The underlying ticker that the option contract relates to.",
- "type": "string"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "OptionsContract"
}
- },
- "type": "array"
},
- "status": {
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "schema": {
- "example": "cfi,contract_type,exercise_style,expiration_date,primary_exchange,shares_per_contract,strike_price,ticker,underlying_ticker,additional_underlyings_json\nOCASPS,call,american,2021-11-19,BATO,100,85,O:AAPL211119C00085000,AAPL,\nOCASPS,call,american,2021-11-19,BATO,100,90,O:AAPL211119C00090000,AAPL,\"[{'type': 'equity', 'underlying': 'VMW', 'amount': 44}, {'type': 'currency', 'underlying': 'USD', 'amount': 6.53}]\"\n",
- "type": "string"
- }
- }
- },
- "description": "A list of options contracts"
- }
- },
- "summary": "Options Contracts",
- "tags": [
- "reference:options:contracts:list"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
- },
- "x-polygon-paginate": {
- "limit": {
- "default": 10,
- "max": 1000
- },
- "sort": {
- "default": "ticker",
- "enum": [
- "ticker",
- "underlying_ticker",
- "expiration_date",
- "strike_price"
- ]
- }
- }
- }
- },
- "/v3/reference/options/contracts/{options_ticker}": {
- "get": {
- "description": "Get an options contract",
- "operationId": "GetOptionsContract",
- "parameters": [
- {
- "description": "Query for a contract by options ticker. You can learn more about the structure of options tickers [here](https://polygon.io/blog/how-to-read-a-stock-options-ticker/).",
- "example": "O:EVRI240119C00002500",
- "in": "path",
- "name": "options_ticker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Specify a point in time for the contract as of this date with format YYYY-MM-DD. Defaults to today's date.",
- "in": "query",
- "name": "as_of",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "request_id": "603902c0-a5a5-406f-bd08-f030f92418fa",
- "results": {
- "additional_underlyings": [
- {
- "amount": 44,
- "type": "equity",
- "underlying": "VMW"
- },
- {
- "amount": 6.53,
- "type": "currency",
- "underlying": "USD"
- }
- ],
- "cfi": "OCASPS",
- "contract_type": "call",
- "exercise_style": "american",
- "expiration_date": "2021-11-19",
- "primary_exchange": "BATO",
- "shares_per_contract": 100,
- "strike_price": 85,
- "ticker": "O:AAPL211119C00085000",
- "underlying_ticker": "AAPL"
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "request_id": {
- "type": "string"
+ {
+ "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
+ "in": "query",
+ "name": "expand_underlying",
+ "schema": {
+ "default": false,
+ "type": "boolean"
+ }
},
- "results": {
- "properties": {
- "additional_underlyings": {
- "description": "If an option contract has additional underlyings or deliverables associated with it, they will appear here.\nSee \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"https://www.optionseducation.org/referencelibrary/faq/splits-mergers-spinoffs-bankruptcies\"\u003ehere\u003c/a\u003e for some examples of what might cause a contract to have additional underlyings.",
- "items": {
- "properties": {
- "amount": {
- "description": "The number of shares per contract of the additional underlying, or the cash-in-lieu amount of the currency.",
- "type": "number"
- },
- "type": {
- "description": "The type of the additional underlying asset, either equity or currency.",
- "type": "string"
- },
- "underlying": {
- "description": "The name of the additional underlying asset.",
- "type": "string"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "AdditionalUnderlying"
- }
- },
- "type": "array",
- "x-polygon-go-type": {
- "name": "AdditionalUnderlyings"
- }
- },
- "cfi": {
- "description": "The 6 letter CFI code of the contract (defined in \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/ISO_10962\"\u003eISO 10962\u003c/a\u003e)",
- "type": "string"
- },
- "contract_type": {
- "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".",
- "type": "string"
- },
- "correction": {
- "description": "The correction number for this option contract.",
- "type": "integer"
- },
- "exercise_style": {
- "description": "The exercise style of this contract. See \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Option_style\"\u003ethis link\u003c/a\u003e for more details on exercise styles.",
- "enum": [
- "american",
- "european",
- "bermudan"
- ],
- "type": "string"
- },
- "expiration_date": {
- "description": "The contract's expiration date in YYYY-MM-DD format.",
- "type": "string",
- "x-polygon-go-type": {
- "name": "IDaysPolygonDateString",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "primary_exchange": {
- "description": "The MIC code of the primary exchange that this contract is listed on.",
- "type": "string"
- },
- "shares_per_contract": {
- "description": "The number of shares per contract for this contract.",
- "type": "number"
- },
- "strike_price": {
- "description": "The strike price of the option contract.",
- "type": "number"
- },
- "ticker": {
- "description": "The ticker for the option contract.",
- "type": "string"
- },
- "underlying_ticker": {
- "description": "The underlying ticker that the option contract relates to.",
- "type": "string"
+ {
+ "description": "The order in which to return the results, ordered by timestamp.",
+ "example": "desc",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
}
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "OptionsContract"
- }
},
- "status": {
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "schema": {
- "example": "cfi,contract_type,exercise_style,expiration_date,primary_exchange,shares_per_contract,strike_price,ticker,underlying_ticker,additional_underlyings_json\nOCASPS,call,american,2021-11-19,BATO,100,90,O:AAPL211119C00090000,AAPL,\"[{'type': 'equity', 'underlying': 'VMW', 'amount': 44}, {'type': 'currency', 'underlying': 'USD', 'amount': 6.53}]\"\n",
- "type": "string"
- }
- }
- },
- "description": "A specific options contract"
- }
- },
- "summary": "Options Contract",
- "tags": [
- "reference:options:contract"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
- }
- }
- },
- "/v3/reference/splits": {
- "get": {
- "description": "Get a list of historical stock splits, including the ticker symbol, the execution date, and the factors of the split ratio.",
- "operationId": "ListStockSplits",
- "parameters": [
- {
- "description": "Return the stock splits that contain this ticker.",
- "in": "query",
- "name": "ticker",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true,
- "type": "string"
- }
- },
- {
- "description": "Query by execution date with the format YYYY-MM-DD.",
- "in": "query",
- "name": "execution_date",
- "schema": {
- "format": "date",
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true,
- "type": "string"
- }
- },
- {
- "description": "Query for reverse stock splits. A split ratio where split_from is greater than split_to represents a reverse split. By default this filter is not used.",
- "in": "query",
- "name": "reverse_split",
- "schema": {
- "nullable": true,
- "type": "boolean"
- }
- },
- {
- "description": "Search by ticker.",
- "in": "query",
- "name": "ticker.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by ticker.",
- "in": "query",
- "name": "ticker.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by ticker.",
- "in": "query",
- "name": "ticker.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by ticker.",
- "in": "query",
- "name": "ticker.lt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by execution_date.",
- "in": "query",
- "name": "execution_date.gte",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by execution_date.",
- "in": "query",
- "name": "execution_date.gt",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by execution_date.",
- "in": "query",
- "name": "execution_date.lte",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by execution_date.",
- "in": "query",
- "name": "execution_date.lt",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Order results based on the `sort` field.",
- "in": "query",
- "name": "order",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 1000.",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "example": 10,
- "maximum": 1000,
- "minimum": 1,
- "type": "integer"
- }
- },
- {
- "description": "Sort field used for ordering.",
- "in": "query",
- "name": "sort",
- "schema": {
- "default": "execution_date",
- "enum": [
- "execution_date",
- "ticker"
- ],
- "example": "execution_date",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v3/splits/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "results": [
{
- "execution_date": "2020-08-31",
- "split_from": 1,
- "split_to": 4,
- "ticker": "AAPL"
+ "description": "Limit the number of results returned, default is 10 and max is 5000",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "maximum": 5000,
+ "type": "integer"
+ }
},
{
- "execution_date": "2005-02-28",
- "split_from": 1,
- "split_to": 2,
- "ticker": "AAPL"
- }
- ],
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
},
- "request_id": {
- "type": "string"
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
},
- "results": {
- "items": {
- "properties": {
- "execution_date": {
- "description": "The execution date of the stock split. On this date the stock split was applied.",
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
"type": "string"
- },
- "split_from": {
- "description": "The second number in the split ratio.\n\nFor example: In a 2-for-1 split, split_from would be 1.",
- "format": "float",
- "type": "number"
- },
- "split_to": {
- "description": "The first number in the split ratio.\n\nFor example: In a 2-for-1 split, split_to would be 2.",
- "format": "float",
- "type": "number"
- },
- "ticker": {
- "description": "The ticker symbol of the stock split.",
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
"type": "string"
- }
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v1/indicators/macd/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": {
+ "underlying": {
+ "url": "https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25"
+ },
+ "values": [
+ {
+ "histogram": 38.3801666667,
+ "signal": 106.9811666667,
+ "timestamp": 1517562000016,
+ "value": 145.3613333333
+ },
+ {
+ "histogram": 41.098859136,
+ "signal": 102.7386283473,
+ "timestamp": 1517562001016,
+ "value": 143.8374874833
+ }
+ ]
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "underlying": {
+ "properties": {
+ "aggregates": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "format": "float",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "float",
+ "type": "number"
+ }
+ },
+ "required": [
+ "v",
+ "vw",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t",
+ "n"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "Aggregate",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "url": {
+ "description": "The URL which can be used to request the underlying aggregates used in this request.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "values": {
+ "items": {
+ "properties": {
+ "histogram": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ },
+ "signal": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ },
+ "timestamp": {
+ "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMicroseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "value": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "MACDResults"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value,signal,histogram\nAAPL,1.27842348E+08,142.9013,0,146.1,142.48,146.72,140.68,1664424000000,1061605,,0,,0,0,0,0,0,false,1664424000000,-5.413804946923619,-3.8291158739479005,-1.5846890729757188\nAAPL,8.4461761E+07,152.1354,0,152.74,151.76,154.72,149.945,1664251200000,683781,,0,,0,0,0,0,0,false,1664251200000,-4.63165683097526,-3.098305244715017,-1.5333515862602427\nAAPL,9.3339409E+07,151.5222,0,149.66,150.77,153.7701,149.64,1664164800000,747666,,0,,0,0,0,0,0,false,1664164800000,-4.581291216131007,-2.7149673481499565,-1.86632386798105\nAAPL,9.3308449E+07,156.1877,0,157.34,153.72,158.61,153.6,1663732800000,712645,,0,,0,0,0,0,0,false,1663732800000,-3.6311474313744156,-1.1648824074663984,-2.4662650239080173\nAAPL,1.64879031E+08,150.2387,0,151.21,150.7,151.35,148.37,1663300800000,850358,,0,,0,0,0,0,0,false,1663300800000,-2.533545758578896,0.9308104167079131,-3.464356175286809\nAAPL,1.46755122E+08,147.599,0,147.64,149.84,150.6414,144.84,1664337600000,1140818,,0,,0,0,0,0,0,false,1664337600000,-4.771497049659786,-3.432943605703971,-1.3385534439558149\nAAPL,9.6031641E+07,150.0222,0,151.19,150.43,151.47,148.56,1663905600000,766888,,0,,0,0,0,0,0,false,1663905600000,-4.349569413677017,-2.2483863811546936,-2.1011830325223233\nAAPL,8.6651514E+07,152.5709,0,152.38,152.74,154.47,150.91,1663819200000,686866,,0,,0,0,0,0,0,false,1663819200000,-3.9559234852549707,-1.7230906230241128,-2.232832862230858\nAAPL,1.07691097E+08,156.1317,0,153.4,156.9,158.08,153.08,1663646400000,792177,,0,,0,0,0,0,0,false,1663646400000,-3.2635802145105117,-0.548316151489394,-2.7152640630211176\nAAPL,8.1599225E+07,152.5505,0,149.31,154.48,154.56,149.1,1663560000000,671961,,0,,0,0,0,0,0,false,1663560000000,-3.070742345502225,0.13049986426588545,-3.2012422097681106\n",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "required": [
- "split_from",
- "split_to"
- ],
- "type": "object"
- },
- "type": "array"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ "description": "Moving Average Convergence/Divergence (MACD) data for each period."
}
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "ticker,execution_date,split_from,split_to\nAAPL,2020-08-31,1.0,4.0\nAAPL,2005-02-28,1.0,2.0\n",
- "schema": {
- "type": "string"
+ },
+ "summary": "Moving Average Convergence/Divergence (MACD)",
+ "tags": [
+ "stocks:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
}
- }
- },
- "description": "A list of stock splits."
- }
- },
- "summary": "Stock Splits v3",
- "tags": [
- "reference:stocks"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
- },
- "x-polygon-paginate": {
- "limit": {
- "default": 10,
- "max": 1000
- },
- "sort": {
- "default": "execution_date",
- "enum": [
- "execution_date",
- "ticker"
- ]
- }
- }
- }
- },
- "/v3/reference/tickers": {
- "get": {
- "description": "Query all ticker symbols which are supported by Polygon.io. This API currently includes Stocks/Equities, Crypto, and Forex.",
- "operationId": "ListTickers",
- "parameters": [
- {
- "description": "Specify a ticker symbol.\nDefaults to empty string which queries all tickers.",
- "in": "query",
- "name": "ticker",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "Specify the type of the tickers. Find the types that we support via our [Ticker Types API](https://polygon.io/docs/stocks/get_v3_reference_tickers_types).\nDefaults to empty string which queries all types.",
- "in": "query",
- "name": "type",
- "schema": {
- "enum": [
- "CS",
- "ADRC",
- "ADRP",
- "ADRR",
- "UNIT",
- "RIGHT",
- "PFD",
- "FUND",
- "SP",
- "WARRANT",
- "INDEX",
- "ETF",
- "ETN",
- "OS",
- "GDR",
- "OTHER",
- "NYRS",
- "AGEN",
- "EQLK",
- "BOND",
- "ADRW",
- "BASKET",
- "LT"
- ],
- "type": "string"
- }
- },
- {
- "description": "Filter by market type. By default all markets are included.",
- "in": "query",
- "name": "market",
- "schema": {
- "enum": [
- "stocks",
- "crypto",
- "fx",
- "otc",
- "indices"
- ],
- "type": "string"
- }
- },
- {
- "description": "Specify the primary exchange of the asset in the ISO code format. Find more information about the ISO codes [at the ISO org website](https://www.iso20022.org/market-identifier-codes).\nDefaults to empty string which queries all exchanges.",
- "in": "query",
- "name": "exchange",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Specify the CUSIP code of the asset you want to search for. Find more information about CUSIP codes [at their website](https://www.cusip.com/identifiers.html#/CUSIP).\nDefaults to empty string which queries all CUSIPs.\n\nNote: Although you can query by CUSIP, due to legal reasons we do not return the CUSIP in the response.",
- "in": "query",
- "name": "cusip",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Specify the CIK of the asset you want to search for. Find more information about CIK codes [at their website](https://www.sec.gov/edgar/searchedgar/cik.htm).\nDefaults to empty string which queries all CIKs.",
- "in": "query",
- "name": "cik",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Specify a point in time to retrieve tickers available on that date.\nDefaults to the most recent available date.",
- "in": "query",
- "name": "date",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search for terms within the ticker and/or company name.",
- "in": "query",
- "name": "search",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Specify if the tickers returned should be actively traded on the queried date. Default is true.",
- "example": true,
- "in": "query",
- "name": "active",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "description": "Search by ticker.",
- "in": "query",
- "name": "ticker.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by ticker.",
- "in": "query",
- "name": "ticker.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by ticker.",
- "in": "query",
- "name": "ticker.lte",
- "schema": {
- "type": "string"
}
- },
- {
- "description": "Search by ticker.",
- "in": "query",
- "name": "ticker.lt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Order results based on the `sort` field.",
- "in": "query",
- "name": "order",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 100 and max is 1000.",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 100,
- "example": 100,
- "maximum": 1000,
- "minimum": 1,
- "type": "integer"
- }
- },
- {
- "description": "Sort field used for ordering.",
- "in": "query",
- "name": "sort",
- "schema": {
- "default": "ticker",
- "enum": [
- "ticker",
- "name",
- "market",
- "locale",
- "primary_exchange",
- "type",
- "currency_symbol",
- "currency_name",
- "base_currency_symbol",
- "base_currency_name",
- "cik",
- "composite_figi",
- "share_class_figi",
- "last_updated_utc",
- "delisted_utc"
- ],
- "example": "ticker",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "count": 1,
- "next_url": "https://api.polygon.io/v3/reference/tickers?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "e70013d92930de90e089dc8fa098888e",
- "results": [
- {
- "active": true,
- "cik": "0001090872",
- "composite_figi": "BBG000BWQYZ5",
- "currency_name": "usd",
- "last_updated_utc": "2021-04-25T00:00:00Z",
- "locale": "us",
- "market": "stocks",
- "name": "Agilent Technologies Inc.",
- "primary_exchange": "XNYS",
- "share_class_figi": "BBG001SCTQY4",
- "ticker": "A",
- "type": "CS"
- }
- ],
- "status": "OK"
- },
- "schema": {
- "properties": {
- "count": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "results": {
- "description": "An array of tickers that match your query.\n\nNote: Although you can query by CUSIP, due to legal reasons we do not return the CUSIP in the response.",
- "items": {
- "properties": {
- "active": {
- "description": "Whether or not the asset is actively traded. False means the asset has been delisted.",
- "type": "boolean"
- },
- "cik": {
- "description": "The CIK number for this ticker. Find more information [here](https://en.wikipedia.org/wiki/Central_Index_Key).",
- "type": "string"
- },
- "composite_figi": {
- "description": "The composite OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)",
- "type": "string"
- },
- "currency_name": {
- "description": "The name of the currency that this asset is traded with.",
- "type": "string"
- },
- "delisted_utc": {
- "description": "The last date that the asset was traded.",
- "format": "date-time",
+ },
+ "/v1/indicators/rsi/{cryptoTicker}": {
+ "get": {
+ "description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.",
+ "operationId": "CryptoRSI",
+ "parameters": [
+ {
+ "description": "The ticker symbol for which to get relative strength index (RSI) data.",
+ "example": "X:BTCUSD",
+ "in": "path",
+ "name": "cryptoTicker",
+ "required": true,
+ "schema": {
"type": "string"
- },
- "last_updated_utc": {
- "description": "The information is accurate up to this time.",
- "format": "date-time",
+ },
+ "x-polygon-go-id": "Ticker"
+ },
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
"type": "string"
- },
- "locale": {
- "description": "The locale of the asset.",
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "The size of the aggregate time window.",
+ "example": "day",
+ "in": "query",
+ "name": "timespan",
+ "schema": {
+ "default": "day",
"enum": [
- "us",
- "global"
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
],
"type": "string"
- },
- "market": {
- "description": "The market type of the asset.",
+ }
+ },
+ {
+ "description": "The window size used to calculate the relative strength index (RSI). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
+ "example": 14,
+ "in": "query",
+ "name": "window",
+ "schema": {
+ "default": 14,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The price in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close prices to \ncalculate the relative strength index (RSI).",
+ "example": "close",
+ "in": "query",
+ "name": "series_type",
+ "schema": {
+ "default": "close",
"enum": [
- "stocks",
- "crypto",
- "fx",
- "otc",
- "indices"
+ "open",
+ "high",
+ "low",
+ "close"
],
"type": "string"
- },
- "name": {
- "description": "The name of the asset. For stocks/equities this will be the companies registered name. For crypto/fx this will be the name of the currency or coin pair.",
- "type": "string"
- },
- "primary_exchange": {
- "description": "The ISO code of the primary listing exchange for this asset.",
- "type": "string"
- },
- "share_class_figi": {
- "description": "The share Class OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)",
- "type": "string"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "type": {
- "description": "The type of the asset. Find the types that we support via our [Ticker Types API](https://polygon.io/docs/stocks/get_v3_reference_tickers_types).",
- "type": "string"
- }
- },
- "required": [
- "ticker",
- "name",
- "market",
- "locale"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "ReferenceTicker",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
}
- },
- "type": "array"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "ticker,name,market,locale,primary_exchange,type,active,currency_name,cik,composite_figi,share_class_figi,last_updated_utc\nA,Agilent Technologies Inc.,stocks,us,XNYS,CS,true,usd,0001090872,BBG000BWQYZ5,BBG001SCTQY4,2021-04-25T00:00:00Z\n",
- "schema": {
- "type": "string"
+ {
+ "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
+ "in": "query",
+ "name": "expand_underlying",
+ "schema": {
+ "default": false,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The order in which to return the results, ordered by timestamp.",
+ "example": "desc",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 5000",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "maximum": 5000,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v1/indicators/rsi/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": {
+ "underlying": {
+ "url": "https://api.polygon.io/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25"
+ },
+ "values": [
+ {
+ "timestamp": 1517562000016,
+ "value": 82.19
+ }
+ ]
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "underlying": {
+ "properties": {
+ "aggregates": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "format": "float",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "float",
+ "type": "number"
+ }
+ },
+ "required": [
+ "v",
+ "vw",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t",
+ "n"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "Aggregate",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "url": {
+ "description": "The URL which can be used to request the underlying aggregates used in this request.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "values": {
+ "items": {
+ "properties": {
+ "timestamp": {
+ "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMicroseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "value": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "RSIResults"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nX:BTCUSD,15457.24362826,19317.486,0,19529.04,19475.84,19651.2772302,18846.67,1664409600000,191936,,0,,0,0,0,0,0,false,1664409600000,52.040915721136884\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664251200000,183075,,0,,0,0,0,0,0,false,1664251200000,44.813590401722564\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664236800000,183075,,0,,0,0,0,0,0,false,1664236800000,44.813590401722564\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664164800000,297389,,0,,0,0,0,0,0,false,1664164800000,45.22751170711286\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664150400000,297389,,0,,0,0,0,0,0,false,1664150400000,45.22751170711286\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664078400000,78936,,0,,0,0,0,0,0,false,1664078400000,37.361825384231004\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664064000000,78936,,0,,0,0,0,0,0,false,1664064000000,37.361825384231004\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664337600000,225076,,0,,0,0,0,0,0,false,1664337600000,50.74235333598462\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664323200000,225076,,0,,0,0,0,0,0,false,1664323200000,50.74235333598462\nX:BTCUSD,2868.09828007,19069.8521,0,19210.31,18925.87,19400,18805.1,1663992000000,58721,,0,,0,0,0,0,0,false,1663992000000,39.159457782344376\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Relative strength index data for each period."
+ }
+ },
+ "summary": "Relative Strength Index (RSI)",
+ "tags": [
+ "crpyto:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
}
- }
},
- "description": "Reference Tickers."
- },
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
- }
- },
- "summary": "Tickers",
- "tags": [
- "reference:tickers:list"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
+ "x-polygon-ignore": true
},
- "x-polygon-paginate": {
- "limit": {
- "default": 100,
- "max": 1000
- },
- "sort": {
- "default": "ticker",
- "enum": [
- "ticker",
- "name",
- "market",
- "locale",
- "primary_exchange",
- "type",
- "currency_symbol",
- "currency_name",
- "base_currency_symbol",
- "base_currency_name",
- "cik",
- "composite_figi",
- "share_class_figi",
- "last_updated_utc",
- "delisted_utc"
- ]
- }
- }
- }
- },
- "/v3/reference/tickers/types": {
- "get": {
- "description": "List all ticker types that Polygon.io has.",
- "operationId": "ListTickerTypes",
- "parameters": [
- {
- "description": "Filter by asset class.",
- "in": "query",
- "name": "asset_class",
- "schema": {
- "description": "An identifier for a group of similar financial instruments.",
- "enum": [
- "stocks",
- "options",
- "crypto",
- "fx",
- "indices"
- ],
- "example": "stocks",
- "type": "string"
- }
- },
- {
- "description": "Filter by locale.",
- "in": "query",
- "name": "locale",
- "schema": {
- "description": "An identifier for a geographical location.",
- "enum": [
- "us",
- "global"
- ],
- "example": "us",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "count": {
- "description": "The total number of results for this request.",
- "example": 1,
- "type": "integer"
+ "/v1/indicators/rsi/{fxTicker}": {
+ "get": {
+ "description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.",
+ "operationId": "ForexRSI",
+ "parameters": [
+ {
+ "description": "The ticker symbol for which to get relative strength index (RSI) data.",
+ "example": "C:EURUSD",
+ "in": "path",
+ "name": "fxTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-go-id": "Ticker"
},
- "request_id": {
- "description": "A request ID assigned by the server.",
- "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
- "type": "string"
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
},
- "results": {
- "items": {
- "description": "Describes the type of financial instrument represented by a ticker.",
- "properties": {
- "asset_class": {
- "description": "An identifier for a group of similar financial instruments.",
+ {
+ "description": "The size of the aggregate time window.",
+ "example": "day",
+ "in": "query",
+ "name": "timespan",
+ "schema": {
+ "default": "day",
"enum": [
- "stocks",
- "options",
- "crypto",
- "fx",
- "indices"
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
],
- "example": "stocks",
- "type": "string"
- },
- "code": {
- "description": "A code used by Polygon.io to refer to this ticker type.",
- "example": "CS",
"type": "string"
- },
- "description": {
- "description": "A short description of this ticker type.",
- "example": "Common Stock",
- "type": "string"
- },
- "locale": {
- "description": "An identifier for a geographical location.",
+ }
+ },
+ {
+ "description": "Whether or not the aggregates used to calculate the relative strength index are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "default": true,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The window size used to calculate the relative strength index (RSI).",
+ "example": 14,
+ "in": "query",
+ "name": "window",
+ "schema": {
+ "default": 14,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The price in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close prices to \ncalculate the relative strength index (RSI).",
+ "example": "close",
+ "in": "query",
+ "name": "series_type",
+ "schema": {
+ "default": "close",
"enum": [
- "us",
- "global"
+ "open",
+ "high",
+ "low",
+ "close"
],
- "example": "us",
"type": "string"
- }
- },
- "required": [
- "code",
- "description",
- "asset_class",
- "locale"
- ],
- "type": "object"
- },
- "type": "array"
+ }
},
- "status": {
- "description": "The status of this request's response.",
- "example": "OK",
- "type": "string"
- }
- },
- "required": [
- "status",
- "request_id"
- ],
- "type": "object"
- }
- },
- "text/csv": {
- "example": "code,description,asset_class,locale\nCS,Common Stock,stocks,us\nPFD,Preferred Stock,stocks,us\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "OK"
- },
- "400": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "count": {
- "description": "The total number of results for this request.",
- "example": 1,
- "type": "integer"
+ {
+ "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
+ "in": "query",
+ "name": "expand_underlying",
+ "schema": {
+ "default": false,
+ "type": "boolean"
+ }
},
- "request_id": {
- "description": "A request ID assigned by the server.",
- "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
- "type": "string"
+ {
+ "description": "The order in which to return the results, ordered by timestamp.",
+ "example": "desc",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
+ }
},
- "status": {
- "description": "The status of this request's response.",
- "example": "OK",
- "type": "string"
- }
- },
- "required": [
- "status",
- "request_id"
- ],
- "type": "object"
- }
- }
- },
- "description": "a query parameter was malformed"
- },
- "default": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "count": {
- "description": "The total number of results for this request.",
- "example": 1,
- "type": "integer"
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 5000",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "maximum": 5000,
+ "type": "integer"
+ }
},
- "request_id": {
- "description": "A request ID assigned by the server.",
- "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
- "type": "string"
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
},
- "status": {
- "description": "The status of this request's response.",
- "example": "OK",
- "type": "string"
- }
- },
- "required": [
- "status",
- "request_id"
- ],
- "type": "object"
- }
- }
- },
- "description": "an unknown error occurred"
- }
- },
- "summary": "Ticker Types",
- "tags": [
- "reference:tickers:types"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
- }
- }
- },
- "/v3/reference/tickers/{ticker}": {
- "get": {
- "description": "Get a single ticker supported by Polygon.io. This response will have detailed information about the ticker and the company behind it.",
- "operationId": "GetTicker",
- "parameters": [
- {
- "description": "The ticker symbol of the asset.",
- "example": "AAPL",
- "in": "path",
- "name": "ticker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Specify a point in time to get information about the ticker available on that date.\nWhen retrieving information from SEC filings, we compare this date with the period of report date on the SEC filing.\n\nFor example, consider an SEC filing submitted by AAPL on 2019-07-31, with a period of report date ending on 2019-06-29.\nThat means that the filing was submitted on 2019-07-31, but the filing was created based on information from 2019-06-29.\nIf you were to query for AAPL details on 2019-06-29, the ticker details would include information from the SEC filing.\n\nDefaults to the most recent available date.",
- "in": "query",
- "name": "date",
- "schema": {
- "format": "date",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "request_id": "31d59dda-80e5-4721-8496-d0d32a654afe",
- "results": {
- "active": true,
- "address": {
- "address1": "One Apple Park Way",
- "city": "Cupertino",
- "postal_code": "95014",
- "state": "CA"
- },
- "branding": {
- "icon_url": "https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_icon.png",
- "logo_url": "https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_logo.svg"
- },
- "cik": "0000320193",
- "composite_figi": "BBG000B9XRY4",
- "currency_name": "usd",
- "description": "Apple designs a wide variety of consumer electronic devices, including smartphones (iPhone), tablets (iPad), PCs (Mac), smartwatches (Apple Watch), AirPods, and TV boxes (Apple TV), among others. The iPhone makes up the majority of Apple's total revenue. In addition, Apple offers its customers a variety of services such as Apple Music, iCloud, Apple Care, Apple TV+, Apple Arcade, Apple Card, and Apple Pay, among others. Apple's products run internally developed software and semiconductors, and the firm is well known for its integration of hardware, software and services. Apple's products are distributed online as well as through company-owned stores and third-party retailers. The company generates roughly 40% of its revenue from the Americas, with the remainder earned internationally.",
- "homepage_url": "https://www.apple.com",
- "list_date": "1980-12-12",
- "locale": "us",
- "market": "stocks",
- "market_cap": 2771126040150,
- "name": "Apple Inc.",
- "phone_number": "(408) 996-1010",
- "primary_exchange": "XNAS",
- "round_lot": 100,
- "share_class_figi": "BBG001S5N8V8",
- "share_class_shares_outstanding": 16406400000,
- "sic_code": "3571",
- "sic_description": "ELECTRONIC COMPUTERS",
- "ticker": "AAPL",
- "ticker_root": "AAPL",
- "total_employees": 154000,
- "type": "CS",
- "weighted_shares_outstanding": 16334371000
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "count": {
- "description": "The total number of results for this request.",
- "type": "integer"
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
},
- "results": {
- "description": "Ticker with details.",
- "properties": {
- "active": {
- "description": "Whether or not the asset is actively traded. False means the asset has been delisted.",
- "type": "boolean"
- },
- "address": {
- "properties": {
- "address1": {
- "description": "The first line of the company's headquarters address.",
- "type": "string"
- },
- "city": {
- "description": "The city of the company's headquarters address.",
- "type": "string"
- },
- "postal_code": {
- "description": "The postal code of the company's headquarters address.",
- "type": "string"
- },
- "state": {
- "description": "The state of the company's headquarters address.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "branding": {
- "properties": {
- "icon_url": {
- "description": "A link to this ticker's company's icon. Icon's are generally smaller, square images that represent the company at a glance.\nNote that you must provide an API key when accessing this URL. See the \"Authentication\" section at the top of this page for more details.",
- "type": "string"
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v1/indicators/rsi/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": {
+ "underlying": {
+ "url": "https://api.polygon.io/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25"
+ },
+ "values": [
+ {
+ "timestamp": 1517562000016,
+ "value": 82.19
+ }
+ ]
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "underlying": {
+ "properties": {
+ "aggregates": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "format": "float",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "float",
+ "type": "number"
+ }
+ },
+ "required": [
+ "v",
+ "vw",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t",
+ "n"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "Aggregate",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "url": {
+ "description": "The URL which can be used to request the underlying aggregates used in this request.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "values": {
+ "items": {
+ "properties": {
+ "timestamp": {
+ "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMicroseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "value": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "RSIResults"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
},
- "logo_url": {
- "description": "A link to this ticker's company's logo.\nNote that you must provide an API key when accessing this URL. See the \"Authentication\" section at the top of this page for more details.",
- "type": "string"
+ "text/csv": {
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nC:USDAUD,686,1.5442,0,1.53763,1.5404,1.5526022,1.537279,1664409600000,686,,0,,0,0,0,0,0,false,1664409600000,65.97230488287764\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664164800000,550,,0,,0,0,0,0,0,false,1664164800000,79.3273623194404\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664150400000,550,,0,,0,0,0,0,0,false,1664150400000,79.32736231944038\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664064000000,10,,0,,0,0,0,0,0,false,1664064000000,74.64770184023104\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664337600000,685,,0,,0,0,0,0,0,false,1664337600000,64.43214811875563\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664323200000,685,,0,,0,0,0,0,0,false,1664323200000,64.43214811875563\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664251200000,536,,0,,0,0,0,0,0,false,1664251200000,81.95981214984681\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664236800000,536,,0,,0,0,0,0,0,false,1664236800000,81.95981214984683\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664078400000,10,,0,,0,0,0,0,0,false,1664078400000,74.64770184023104\nC:USDAUD,1,1.5314,0,1.5313936,1.5313936,1.5313936,1.5313936,1663977600000,1,,0,,0,0,0,0,0,false,1663977600000,74.98028072374902\n",
+ "schema": {
+ "type": "string"
+ }
}
- },
- "type": "object"
- },
- "cik": {
- "description": "The CIK number for this ticker. Find more information [here](https://en.wikipedia.org/wiki/Central_Index_Key).",
- "type": "string"
- },
- "composite_figi": {
- "description": "The composite OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)",
- "type": "string"
- },
- "currency_name": {
- "description": "The name of the currency that this asset is traded with.",
- "type": "string"
- },
- "delisted_utc": {
- "description": "The last date that the asset was traded.",
- "format": "date-time",
- "type": "string"
- },
- "description": {
- "description": "A description of the company and what they do/offer.",
- "type": "string"
- },
- "homepage_url": {
- "description": "The URL of the company's website homepage.",
- "type": "string"
- },
- "list_date": {
- "description": "The date that the symbol was first publicly listed in the format YYYY-MM-DD.",
- "type": "string"
- },
- "locale": {
- "description": "The locale of the asset.",
- "enum": [
- "us",
- "global"
- ],
- "type": "string"
- },
- "market": {
- "description": "The market type of the asset.",
- "enum": [
- "stocks",
- "crypto",
- "fx",
- "otc",
- "indices"
- ],
- "type": "string"
- },
- "market_cap": {
- "description": "The most recent close price of the ticker multiplied by weighted outstanding shares.",
- "format": "double",
- "type": "number"
- },
- "name": {
- "description": "The name of the asset. For stocks/equities this will be the companies registered name. For crypto/fx this will be the name of the currency or coin pair.",
- "type": "string"
- },
- "phone_number": {
- "description": "The phone number for the company behind this ticker.",
- "type": "string"
- },
- "primary_exchange": {
- "description": "The ISO code of the primary listing exchange for this asset.",
- "type": "string"
},
- "round_lot": {
- "description": "Round lot size of this security.",
- "format": "double",
- "type": "number"
- },
- "share_class_figi": {
- "description": "The share Class OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)",
- "type": "string"
- },
- "share_class_shares_outstanding": {
- "description": "The recorded number of outstanding shares for this particular share class.",
- "format": "double",
- "type": "number"
- },
- "sic_code": {
- "description": "The standard industrial classification code for this ticker. For a list of SIC Codes, see the SEC's \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://www.sec.gov/info/edgar/siccodes.htm\"\u003eSIC Code List\u003c/a\u003e.",
- "type": "string"
- },
- "sic_description": {
- "description": "A description of this ticker's SIC code.",
- "type": "string"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "ticker_root": {
- "description": "The root of a specified ticker. For example, the root of BRK.A is BRK.",
- "type": "string"
- },
- "ticker_suffix": {
- "description": "The suffix of a specified ticker. For example, the suffix of BRK.A is A.",
- "type": "string"
- },
- "total_employees": {
- "description": "The approximate number of employees for the company.",
- "type": "number"
- },
- "type": {
- "description": "The type of the asset. Find the types that we support via our [Ticker Types API](https://polygon.io/docs/stocks/get_v3_reference_tickers_types).",
- "type": "string"
- },
- "weighted_shares_outstanding": {
- "description": "The shares outstanding calculated assuming all shares of other share classes are converted to this share class.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "ticker",
- "name",
- "market",
- "locale",
- "active",
- "currency_name"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "ReferenceTicker",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ "description": "Relative strength index data for each period."
}
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "ticker,name,market,locale,primary_exchange,type,active,currency_name,cik,composite_figi,share_class_figi,share_class_shares_outstanding,weighted_shares_outstanding,round_lot,market_cap,phone_number,address1,city,state,postal_code,sic_code,sic_description,ticker_root,total_employees,list_date,homepage_url,description,branding/logo_url,branding/icon_url\nAAPL,Apple Inc.,stocks,us,XNAS,CS,true,usd,0000320193,BBG000B9XRY4,BBG001S5N8V8,16406400000,16334371000,100,2771126040150,(408) 996-1010,One Apple Park Way,Cupertino,CA,95014,3571,ELECTRONIC COMPUTERS,AAPL,154000,1980-12-12,https://www.apple.com,\"Apple designs a wide variety of consumer electronic devices, including smartphones (iPhone), tablets (iPad), PCs (Mac), smartwatches (Apple Watch), AirPods, and TV boxes (Apple TV), among others. The iPhone makes up the majority of Apple's total revenue. In addition, Apple offers its customers a variety of services such as Apple Music, iCloud, Apple Care, Apple TV+, Apple Arcade, Apple Card, and Apple Pay, among others. Apple's products run internally developed software and semiconductors, and the firm is well known for its integration of hardware, software and services. Apple's products are distributed online as well as through company-owned stores and third-party retailers. The company generates roughly 40% of its revenue from the Americas, with the remainder earned internationally.\",https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_logo.svg,https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_icon.png\n",
- "schema": {
- "type": "string"
+ },
+ "summary": "Relative Strength Index (RSI)",
+ "tags": [
+ "fx:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Forex data",
+ "name": "fx"
}
- }
},
- "description": "Reference Tickers."
- },
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
- }
+ "x-polygon-ignore": true
},
- "summary": "Ticker Details v3",
- "tags": [
- "reference:tickers:get"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
- }
- }
- },
- "/v3/snapshot/indices": {
- "get": {
- "description": "Get a Snapshot of indices data for said tickers",
- "operationId": "IndicesSnapshot",
- "parameters": [
- {
- "description": "Comma separated list of tickers",
- "example": "I:SPX",
- "in": "query",
- "name": "ticker.any_of",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "request_id": "6a7e466379af0a71039d60cc78e72282",
- "results": [
- {
- "market_status": "closed",
- "name": "S\u0026P 500",
- "session": {
- "change": -50.01,
- "change_percent": -1.45,
- "close": 3822.39,
- "high": 3834.41,
- "low": 38217.11,
- "open": 3827.38,
- "previous_close": 3812.19
- },
- "ticker": "I:SPX",
- "type": "indices",
- "value": 3822.39
- },
- {
- "error": "NOT_FOUND",
- "message": "Ticker not found.",
- "ticker": "APx"
- },
- {
- "error": "NOT_ENTITLED",
- "message": "Not entitled to this ticker.",
- "ticker": "APy"
- }
- ],
- "status": "OK"
- },
- "schema": {
- "properties": {
- "request_id": {
- "type": "string"
- },
- "results": {
- "items": {
- "properties": {
- "error": {
- "description": "The error while looking for this ticker.",
- "type": "string"
- },
- "market_status": {
- "description": "The market status for the market that trades this ticker.",
- "type": "string"
- },
- "message": {
- "description": "The error message while looking for this ticker.",
- "type": "string"
- },
- "name": {
- "description": "Name of Index.",
+ "/v1/indicators/rsi/{indicesTicker}": {
+ "get": {
+ "description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.",
+ "operationId": "IndicesRSI",
+ "parameters": [
+ {
+ "description": "The ticker symbol for which to get relative strength index (RSI) data.",
+ "example": "I:DJI",
+ "in": "path",
+ "name": "indicesTicker",
+ "required": true,
+ "schema": {
"type": "string"
- },
- "session": {
- "properties": {
- "change": {
- "description": "The value of the change for the index from the previous trading day.",
- "format": "double",
- "type": "number"
- },
- "change_percent": {
- "description": "The percent of the change for the index from the previous trading day.",
- "format": "double",
- "type": "number"
- },
- "close": {
- "description": "The closing value for the index of the day.",
- "format": "double",
- "type": "number"
- },
- "high": {
- "description": "The highest value for the index of the day.",
- "format": "double",
- "type": "number"
- },
- "low": {
- "description": "The lowest value for the index of the day.",
- "format": "double",
- "type": "number"
- },
- "open": {
- "description": "The open value for the index of the day.",
- "format": "double",
- "type": "number"
- },
- "previous_close": {
- "description": "The closing value for the index of previous trading day.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "IndicesSession"
- }
- },
- "ticker": {
- "description": "Ticker of asset queried.",
+ },
+ "x-polygon-go-id": "Ticker"
+ },
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
"type": "string"
- },
- "type": {
- "description": "The indices market.",
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "The size of the aggregate time window.",
+ "example": "day",
+ "in": "query",
+ "name": "timespan",
+ "schema": {
+ "default": "day",
"enum": [
- "indices"
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
],
"type": "string"
- },
- "value": {
- "description": "Value of Index.",
- "type": "number"
- }
- },
- "required": [
- "ticker"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "IndicesResult"
}
- },
- "type": "array"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status",
- "request_id"
- ],
- "type": "object"
- }
- }
- },
- "description": "Snapshots for indices data of the underlying ticker"
- }
- },
- "summary": "Indices Snapshot",
- "tags": [
- "indices:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Indices data",
- "name": "indices"
- }
- }
- },
- "/v3/snapshot/options/{underlyingAsset}": {
- "get": {
- "description": "Get the snapshot of all options contracts for an underlying ticker.",
- "operationId": "OptionsChain",
- "parameters": [
- {
- "description": "The underlying ticker symbol of the option contract.",
- "example": "AAPL",
- "in": "path",
- "name": "underlyingAsset",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Query by strike price of a contract.",
- "in": "query",
- "name": "strike_price",
- "schema": {
- "type": "number"
- },
- "x-polygon-filter-field": {
- "range": true,
- "type": "number"
- }
- },
- {
- "description": "Query by contract expiration with date format YYYY-MM-DD.",
- "in": "query",
- "name": "expiration_date",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "Query by the type of contract.",
- "in": "query",
- "name": "contract_type",
- "schema": {
- "enum": [
- "call",
- "put"
- ],
- "type": "string"
- }
- },
- {
- "description": "Search by strike_price.",
- "in": "query",
- "name": "strike_price.gte",
- "schema": {
- "type": "number"
- }
- },
- {
- "description": "Search by strike_price.",
- "in": "query",
- "name": "strike_price.gt",
- "schema": {
- "type": "number"
- }
- },
- {
- "description": "Search by strike_price.",
- "in": "query",
- "name": "strike_price.lte",
- "schema": {
- "type": "number"
- }
- },
- {
- "description": "Search by strike_price.",
- "in": "query",
- "name": "strike_price.lt",
- "schema": {
- "type": "number"
- }
- },
- {
- "description": "Search by expiration_date.",
- "in": "query",
- "name": "expiration_date.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by expiration_date.",
- "in": "query",
- "name": "expiration_date.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by expiration_date.",
- "in": "query",
- "name": "expiration_date.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by expiration_date.",
- "in": "query",
- "name": "expiration_date.lt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Order results based on the `sort` field.",
- "in": "query",
- "name": "order",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 250.",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "example": 10,
- "maximum": 250,
- "minimum": 1,
- "type": "integer"
- }
- },
- {
- "description": "Sort field used for ordering.",
- "in": "query",
- "name": "sort",
- "schema": {
- "default": "ticker",
- "enum": [
- "ticker",
- "expiration_date",
- "strike_price"
- ],
- "example": "ticker",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "request_id": "6a7e466379af0a71039d60cc78e72282",
- "results": [
- {
- "break_even_price": 151.2,
- "day": {
- "change": 4.5,
- "change_percent": 6.76,
- "close": 120.73,
- "high": 120.81,
- "last_updated": 1605195918507251700,
- "low": 118.9,
- "open": 119.32,
- "previous_close": 119.12,
- "volume": 868,
- "vwap": 119.31
- },
- "details": {
- "contract_type": "call",
- "exercise_style": "american",
- "expiration_date": "2022-01-21",
- "shares_per_contract": 100,
- "strike_price": 150,
- "ticker": "AAPL211022C000150000"
- },
- "greeks": {
- "delta": 1,
- "gamma": 0,
- "theta": 0.00229,
- "vega": 0
- },
- "implied_volatility": 5,
- "last_quote": {
- "ask": 120.3,
- "ask_size": 4,
- "bid": 120.28,
- "bid_size": 8,
- "last_updated": 1605195918507251700,
- "midpoint": 120.29
- },
- "last_trade": {
- "conditions": [
- 209
- ],
- "exchange": 316,
- "price": 0.05,
- "sip_timestamp": 1675280958783136800,
- "size": 2,
- "timeframe": "REAL-TIME"
- },
- "open_interest": 1543,
- "underlying_asset": {
- "change_to_break_even": 4.2,
- "last_updated": 1605195918507251700,
- "price": 147,
- "ticker": "AAPL",
- "timeframe": "DELAYED"
- }
- }
- ],
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ {
+ "description": "Whether or not the aggregates used to calculate the relative strength index are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "default": true,
+ "type": "boolean"
+ }
},
- "request_id": {
- "type": "string"
+ {
+ "description": "The window size used to calculate the relative strength index (RSI).",
+ "example": 14,
+ "in": "query",
+ "name": "window",
+ "schema": {
+ "default": 14,
+ "type": "integer"
+ }
},
- "results": {
- "items": {
- "properties": {
- "break_even_price": {
- "description": "The price the underlying asset for the contract to break even. For a call this value is (strike price + premium paid), where a put this value is (strike price - premium paid)",
- "format": "double",
- "type": "number"
- },
- "day": {
- "description": "The most recent daily bar for this contract.",
- "properties": {
- "change": {
- "description": "The value of the price change for the contract from the previous trading day.",
- "format": "double",
- "type": "number"
- },
- "change_percent": {
- "description": "The percent of the price change for the contract from the previous trading day.",
- "format": "double",
- "type": "number"
- },
- "close": {
- "description": "The closing price for the contract of the day.",
- "format": "double",
- "type": "number"
- },
- "high": {
- "description": "The highest price for the contract of the day.",
- "format": "double",
- "type": "number"
- },
- "last_updated": {
- "description": "The nanosecond timestamp of when this information was updated.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "low": {
- "description": "The lowest price for the contract of the day.",
- "format": "double",
- "type": "number"
- },
- "open": {
- "description": "The open price for the contract of the day.",
- "format": "double",
- "type": "number"
- },
- "previous_close": {
- "description": "The closing price for the contract of previous trading day.",
- "format": "double",
- "type": "number"
- },
- "volume": {
- "description": "The trading volume for the contract of the day.",
- "format": "double",
- "type": "number"
- },
- "vwap": {
- "description": "The trading volume weighted average price for the contract of the day.",
- "format": "double",
- "type": "number",
- "x-polygon-go-id": "VWAP"
- }
- },
- "required": [
- "last_updated",
- "open",
- "high",
- "low",
- "close",
- "previous_close",
- "volume",
- "vwap",
- "change_percent",
- "change"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Day"
- }
- },
- "details": {
- "properties": {
- "contract_type": {
- "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".",
- "enum": [
- "put",
- "call",
- "other"
- ],
- "type": "string"
- },
- "exercise_style": {
- "description": "The exercise style of this contract. See \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Option_style\"\u003ethis link\u003c/a\u003e for more details on exercise styles.",
- "enum": [
- "american",
- "european",
- "bermudan"
- ],
- "type": "string"
- },
- "expiration_date": {
- "description": "The contract's expiration date in YYYY-MM-DD format.",
- "format": "date",
- "type": "string",
- "x-polygon-go-type": {
- "name": "IDaysPolygonDateString",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "shares_per_contract": {
- "description": "The number of shares per contract for this contract.",
- "type": "number"
- },
- "strike_price": {
- "description": "The strike price of the option contract.",
- "format": "double",
- "type": "number"
- },
- "ticker": {
- "description": "The ticker for the option contract.",
- "type": "string"
- }
- },
- "required": [
- "ticker",
- "contract_type",
- "exercise_style",
- "expiration_date",
- "shares_per_contract",
- "strike_price"
+ {
+ "description": "The value in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close values to \ncalculate the relative strength index (RSI).",
+ "example": "close",
+ "in": "query",
+ "name": "series_type",
+ "schema": {
+ "default": "close",
+ "enum": [
+ "open",
+ "high",
+ "low",
+ "close"
],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Details"
- }
- },
- "greeks": {
- "description": "The greeks for this contract. This is only returned if your current plan includes greeks.",
- "properties": {
- "delta": {
- "description": "The change in the option's price per $0.01 increment in the price of the underlying asset.",
- "format": "double",
- "type": "number"
- },
- "gamma": {
- "description": "The change in delta per $0.01 change in the price of the underlying asset.",
- "format": "double",
- "type": "number"
- },
- "theta": {
- "description": "The change in the option's price per day.",
- "format": "double",
- "type": "number"
- },
- "vega": {
- "description": "The change in the option's price per 1% increment in volatility.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "Greeks"
- }
- },
- "implied_volatility": {
- "description": "The market's forecast for the volatility of the underlying asset, based on this option's current price.",
- "format": "double",
- "type": "number"
- },
- "last_quote": {
- "description": "The most recent quote for this contract. This is only returned if your current plan includes quotes.",
- "properties": {
- "ask": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "ask_size": {
- "description": "The ask size.",
- "format": "double",
- "type": "number"
- },
- "bid": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "bid_size": {
- "description": "The bid size.",
- "format": "double",
- "type": "number"
- },
- "last_updated": {
- "description": "The nanosecond timestamp of when this information was updated.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "midpoint": {
- "description": "The average of the bid and ask price.",
- "format": "double",
- "type": "number"
- },
- "timeframe": {
- "description": "The time relevance of the data.",
- "enum": [
- "DELAYED",
- "REAL-TIME"
- ],
- "type": "string"
- }
- },
- "required": [
- "last_updated",
- "timeframe",
- "ask",
- "ask_size",
- "bid_size",
- "bid",
- "midpoint"
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
+ "in": "query",
+ "name": "expand_underlying",
+ "schema": {
+ "default": false,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The order in which to return the results, ordered by timestamp.",
+ "example": "desc",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
],
- "type": "object",
- "x-polygon-go-type": {
- "name": "LastQuote"
- }
- },
- "last_trade": {
- "description": "The most recent trade for this contract. This is only returned if your current plan includes trades.",
- "properties": {
- "conditions": {
- "description": "A list of condition codes.",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/options/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
- "format": "int32",
- "type": "integer"
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 5000",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "maximum": 5000,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v1/indicators/rsi/I:DJI?cursor=YWRqdXN0ZWQ9dHJ1ZSZhcD0lN0IlMjJ2JTIyJTNBMCUyQyUyMm8lMjIlM0EwJTJDJTIyYyUyMiUzQTQwNDcuNDEwMDAwMDAwMDAwMyUyQyUyMmglMjIlM0EwJTJDJTIybCUyMiUzQTAlMkMlMjJ0JTIyJTNBMTY3ODA4MjQwMDAwMCU3RCZhcz0mZXhwYW5kX3VuZGVybHlpbmc9ZmFsc2UmbGltaXQ9MTAmb3JkZXI9ZGVzYyZzZXJpZXNfdHlwZT1jbG9zZSZ0aW1lc3Bhbj1kYXkmdGltZXN0YW1wLmx0PTE2NzgxNjUyMDAwMDAmd2luZG93PTU",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": {
+ "underlying": {
+ "url": "https://api.polygon.io/v2/aggs/ticker/I:DJI/range/1/day/1063281600000/1678725829099?limit=35&sort=desc"
+ },
+ "values": [
+ {
+ "timestamp": 1681966800000,
+ "value": 55.89394103205648
+ }
+ ]
+ },
+ "status": "OK"
},
- "type": "array"
- },
- "exchange": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/options/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- "price": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
- "format": "double",
- "type": "number"
- },
- "sip_timestamp": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this trade from the exchange which produced it.",
- "format": "int64",
- "type": "integer"
- },
- "size": {
- "description": "The size of a trade (also known as volume).",
- "format": "int32",
- "type": "integer"
- },
- "timeframe": {
- "description": "The time relevance of the data.",
- "enum": [
- "DELAYED",
- "REAL-TIME"
- ],
- "type": "string"
- }
- },
- "required": [
- "timeframe",
- "exchange",
- "price",
- "sip_timestamp",
- "size"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "OptionsLastTrade"
- }
- },
- "open_interest": {
- "description": "The quantity of this contract held at the end of the last trading day.",
- "format": "double",
- "type": "number"
- },
- "underlying_asset": {
- "description": "Information on the underlying stock for this options contract. The market data returned depends on your current stocks plan.",
- "properties": {
- "change_to_break_even": {
- "description": "The change in price for the contract to break even.",
- "format": "double",
- "type": "number"
- },
- "last_updated": {
- "description": "The nanosecond timestamp of when this information was updated.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "underlying": {
+ "properties": {
+ "aggregates": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "format": "float",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "float",
+ "type": "number"
+ }
+ },
+ "required": [
+ "v",
+ "vw",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t",
+ "n"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "Aggregate",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "url": {
+ "description": "The URL which can be used to request the underlying aggregates used in this request.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "values": {
+ "items": {
+ "properties": {
+ "timestamp": {
+ "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMicroseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "value": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "RSIResults"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
}
- },
- "price": {
- "description": "The price of the trade. This is the actual dollar value per whole share of this trade. A trade of 100 shares with a price of $2.00 would be worth a total dollar value of $200.00.",
- "format": "double",
- "type": "number"
- },
- "ticker": {
- "description": "The ticker symbol for the contract's underlying asset.",
- "type": "string"
- },
- "timeframe": {
- "description": "The time relevance of the data.",
- "enum": [
- "DELAYED",
- "REAL-TIME"
- ],
- "type": "string"
- },
- "value": {
- "description": "The value of the underlying index.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "last_updated",
- "timeframe",
- "ticker",
- "change_to_break_even"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "UnderlyingAsset"
}
- }
},
- "required": [
- "day",
- "last_quote",
- "underlying_asset",
- "details",
- "break_even_price",
- "implied_volatility",
- "open_interest"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "OptionSnapshotResult"
- }
- },
- "type": "array"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ "description": "Relative Strength Index (RSI) data for each period."
}
- },
- "required": [
- "status",
- "request_id"
- ],
- "type": "object"
+ },
+ "summary": "Relative Strength Index (RSI)",
+ "tags": [
+ "indices:aggregates"
+ ],
+ "x-polygon-entitlement-allowed-limited-tickers": true,
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Indices data",
+ "name": "indices"
}
- }
},
- "description": "Snapshots for options contracts of the underlying ticker"
- }
- },
- "summary": "Options Chain",
- "tags": [
- "options:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
+ "x-polygon-ignore": true
},
- "x-polygon-entitlement-market-type": {
- "description": "Options data",
- "name": "options"
- },
- "x-polygon-paginate": {
- "limit": {
- "default": 10,
- "max": 250
- },
- "sort": {
- "default": "ticker",
- "enum": [
- "ticker",
- "expiration_date",
- "strike_price"
- ]
- }
- }
- }
- },
- "/v3/snapshot/options/{underlyingAsset}/{optionContract}": {
- "get": {
- "description": "Get the snapshot of an option contract for a stock equity.",
- "operationId": "OptionContract",
- "parameters": [
- {
- "description": "The underlying ticker symbol of the option contract.",
- "example": "AAPL",
- "in": "path",
- "name": "underlyingAsset",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The option contract identifier.",
- "example": "O:AAPL230616C00150000",
- "in": "path",
- "name": "optionContract",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "request_id": "d9ff18dac69f55c218f69e4753706acd",
- "results": {
- "break_even_price": 171.075,
- "day": {
- "change": -1.05,
- "change_percent": -4.67,
- "close": 21.4,
- "high": 22.49,
- "last_updated": 1636520400000000000,
- "low": 21.35,
- "open": 22.49,
- "previous_close": 22.45,
- "volume": 37,
- "vwap": 21.6741
- },
- "details": {
- "contract_type": "call",
- "exercise_style": "american",
- "expiration_date": "2023-06-16",
- "shares_per_contract": 100,
- "strike_price": 150,
- "ticker": "O:AAPL230616C00150000"
- },
- "greeks": {
- "delta": 0.5520187372272933,
- "gamma": 0.00706756515659829,
- "theta": -0.018532772783847958,
- "vega": 0.7274811132998142
- },
- "implied_volatility": 0.3048997097864957,
- "last_quote": {
- "ask": 21.25,
- "ask_size": 110,
- "bid": 20.9,
- "bid_size": 172,
- "last_updated": 1636573458756383500,
- "midpoint": 21.075,
- "timeframe": "REAL-TIME"
- },
- "last_trade": {
- "conditions": [
- 209
- ],
- "exchange": 316,
- "price": 0.05,
- "sip_timestamp": 1675280958783136800,
- "size": 2,
- "timeframe": "REAL-TIME"
- },
- "open_interest": 8921,
- "underlying_asset": {
- "change_to_break_even": 23.123999999999995,
- "last_updated": 1636573459862384600,
- "price": 147.951,
- "ticker": "AAPL",
- "timeframe": "REAL-TIME"
- }
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
- },
- "request_id": {
- "type": "string"
- },
- "results": {
- "properties": {
- "break_even_price": {
- "description": "The price the underlying asset for the contract to break even. For a call this value is (strike price + premium paid), where a put this value is (strike price - premium paid)",
- "format": "double",
- "type": "number"
- },
- "day": {
- "description": "The most recent daily bar for this contract.",
- "properties": {
- "change": {
- "description": "The value of the price change for the contract from the previous trading day.",
- "format": "double",
- "type": "number"
- },
- "change_percent": {
- "description": "The percent of the price change for the contract from the previous trading day.",
- "format": "double",
- "type": "number"
- },
- "close": {
- "description": "The closing price for the contract of the day.",
- "format": "double",
- "type": "number"
- },
- "high": {
- "description": "The highest price for the contract of the day.",
- "format": "double",
- "type": "number"
- },
- "last_updated": {
- "description": "The nanosecond timestamp of when this information was updated.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "low": {
- "description": "The lowest price for the contract of the day.",
- "format": "double",
- "type": "number"
- },
- "open": {
- "description": "The open price for the contract of the day.",
- "format": "double",
- "type": "number"
- },
- "previous_close": {
- "description": "The closing price for the contract of previous trading day.",
- "format": "double",
- "type": "number"
- },
- "volume": {
- "description": "The trading volume for the contract of the day.",
- "format": "double",
- "type": "number"
- },
- "vwap": {
- "description": "The trading volume weighted average price for the contract of the day.",
- "format": "double",
- "type": "number",
- "x-polygon-go-id": "VWAP"
- }
- },
- "required": [
- "last_updated",
- "open",
- "high",
- "low",
- "close",
- "previous_close",
- "volume",
- "vwap",
- "change_percent",
- "change"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Day"
- }
- },
- "details": {
- "properties": {
- "contract_type": {
- "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".",
- "enum": [
- "put",
- "call",
- "other"
- ],
- "type": "string"
- },
- "exercise_style": {
- "description": "The exercise style of this contract. See \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Option_style\"\u003ethis link\u003c/a\u003e for more details on exercise styles.",
- "enum": [
- "american",
- "european",
- "bermudan"
- ],
- "type": "string"
- },
- "expiration_date": {
- "description": "The contract's expiration date in YYYY-MM-DD format.",
- "format": "date",
- "type": "string",
- "x-polygon-go-type": {
- "name": "IDaysPolygonDateString",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "shares_per_contract": {
- "description": "The number of shares per contract for this contract.",
- "type": "number"
- },
- "strike_price": {
- "description": "The strike price of the option contract.",
- "format": "double",
- "type": "number"
- },
- "ticker": {
- "description": "The ticker for the option contract.",
- "type": "string"
- }
- },
- "required": [
- "ticker",
- "contract_type",
- "exercise_style",
- "expiration_date",
- "shares_per_contract",
- "strike_price"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Details"
- }
- },
- "greeks": {
- "description": "The greeks for this contract. This is only returned if your current plan includes greeks.",
- "properties": {
- "delta": {
- "description": "The change in the option's price per $0.01 increment in the price of the underlying asset.",
- "format": "double",
- "type": "number"
- },
- "gamma": {
- "description": "The change in delta per $0.01 change in the price of the underlying asset.",
- "format": "double",
- "type": "number"
- },
- "theta": {
- "description": "The change in the option's price per day.",
- "format": "double",
- "type": "number"
- },
- "vega": {
- "description": "The change in the option's price per 1% increment in volatility.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "Greeks"
- }
+ "/v1/indicators/rsi/{optionsTicker}": {
+ "get": {
+ "description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.",
+ "operationId": "OptionsRSI",
+ "parameters": [
+ {
+ "description": "The ticker symbol for which to get relative strength index (RSI) data.",
+ "example": "O:SPY241220P00720000",
+ "in": "path",
+ "name": "optionsTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
},
- "implied_volatility": {
- "description": "The market's forecast for the volatility of the underlying asset, based on this option's current price.",
- "format": "double",
- "type": "number"
+ "x-polygon-go-id": "Ticker"
+ },
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
},
- "last_quote": {
- "description": "The most recent quote for this contract. This is only returned if your current plan includes quotes.",
- "properties": {
- "ask": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "ask_size": {
- "description": "The ask size.",
- "format": "double",
- "type": "number"
- },
- "bid": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "bid_size": {
- "description": "The bid size.",
- "format": "double",
- "type": "number"
- },
- "last_updated": {
- "description": "The nanosecond timestamp of when this information was updated.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "midpoint": {
- "description": "The average of the bid and ask price.",
- "format": "double",
- "type": "number"
- },
- "timeframe": {
- "description": "The time relevance of the data.",
- "enum": [
- "DELAYED",
- "REAL-TIME"
- ],
- "type": "string"
- }
- },
- "required": [
- "last_updated",
- "timeframe",
- "ask",
- "ask_size",
- "bid_size",
- "bid",
- "midpoint"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "LastQuote"
- }
- },
- "last_trade": {
- "description": "The most recent trade for this contract. This is only returned if your current plan includes trades.",
- "properties": {
- "conditions": {
- "description": "A list of condition codes.",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/options/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
- "format": "int32",
- "type": "integer"
- },
- "type": "array"
- },
- "exchange": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/options/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- "price": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
- "format": "double",
- "type": "number"
- },
- "sip_timestamp": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this trade from the exchange which produced it.",
- "format": "int64",
- "type": "integer"
- },
- "size": {
- "description": "The size of a trade (also known as volume).",
- "format": "int32",
- "type": "integer"
- },
- "timeframe": {
- "description": "The time relevance of the data.",
- "enum": [
- "DELAYED",
- "REAL-TIME"
- ],
- "type": "string"
- }
- },
- "required": [
- "timeframe",
- "exchange",
- "price",
- "sip_timestamp",
- "size"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "OptionsLastTrade"
- }
- },
- "open_interest": {
- "description": "The quantity of this contract held at the end of the last trading day.",
- "format": "double",
- "type": "number"
- },
- "underlying_asset": {
- "description": "Information on the underlying stock for this options contract. The market data returned depends on your current stocks plan.",
- "properties": {
- "change_to_break_even": {
- "description": "The change in price for the contract to break even.",
- "format": "double",
- "type": "number"
- },
- "last_updated": {
- "description": "The nanosecond timestamp of when this information was updated.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "price": {
- "description": "The price of the trade. This is the actual dollar value per whole share of this trade. A trade of 100 shares with a price of $2.00 would be worth a total dollar value of $200.00.",
- "format": "double",
- "type": "number"
- },
- "ticker": {
- "description": "The ticker symbol for the contract's underlying asset.",
- "type": "string"
- },
- "timeframe": {
- "description": "The time relevance of the data.",
- "enum": [
- "DELAYED",
- "REAL-TIME"
- ],
- "type": "string"
- },
- "value": {
- "description": "The value of the underlying index.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "last_updated",
- "timeframe",
- "ticker",
- "change_to_break_even"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "UnderlyingAsset"
- }
- }
- },
- "required": [
- "day",
- "last_quote",
- "underlying_asset",
- "details",
- "break_even_price",
- "implied_volatility",
- "open_interest"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "OptionSnapshotResult"
- }
+ "x-polygon-filter-field": {
+ "range": true
+ }
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status",
- "request_id"
- ],
- "type": "object"
- }
- },
- "text/csv": {
- "schema": {
- "example": "break_even_price,day_close,day_high,day_last_updated,day_low,day_open,day_previous_close,day_volume,day_vwap,day_change,day_change_percent,details_contract_type,details_exercise_style,details_expiration_date,details_shares_per_contract,details_strike_price,details_ticker,greeks_delta,greeks_gamma,greeks_theta,greeks_vega,implied_volatility,last_quote_ask,last_quote_ask_size,last_quote_bid,last_quote_bid_size,last_quote_last_updated,last_quote_midpoint,last_quote_timeframe,open_interest,underlying_asset_change_to_break_even,underlying_asset_last_updated,underlying_asset_price,underlying_asset_ticker,underlying_asset_timeframe\n0,171.075,21.4,22.49,1636520400000000000,21.35,22.49,22.45,37,21.6741,-1.05,-4.67,call,american,2023-06-16,100,150,O:AAPL230616C00150000,0.5520187372272933,0.00706756515659829,-0.018532772783847958,0.7274811132998142,0.3048997097864957,21.25,110,20.9,172,1636573458756383500,21.075,REAL-TIME,8921,23.123999999999995,1636573459862384600,147.951,AAPL,REAL-TIME\n",
- "type": "string"
- }
- }
- },
- "description": "Snapshot of the option contract."
- }
- },
- "summary": "Option Contract",
- "tags": [
- "options:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Options data",
- "name": "options"
- }
- }
- },
- "/v3/trades/{cryptoTicker}": {
- "get": {
- "description": "Get trades for a crypto ticker symbol in a given time range.",
- "operationId": "TradesCrypto",
- "parameters": [
- {
- "description": "The ticker symbol to get trades for.",
- "example": "X:BTC-USD",
- "in": "path",
- "name": "cryptoTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Query by trade timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Order results based on the `sort` field.",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 50000.",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "example": 10,
- "maximum": 50000,
- "minimum": 1,
- "type": "integer"
- }
- },
- {
- "description": "Sort field used for ordering.",
- "in": "query",
- "name": "sort",
- "schema": {
- "default": "timestamp",
- "enum": [
- "timestamp"
- ],
- "example": "timestamp",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v3/trades/X:BTC-USD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": [
- {
- "conditions": [
- 1
- ],
- "exchange": 1,
- "id": "191450340",
- "participant_timestamp": 1625097600103000000,
- "price": 35060,
- "size": 1.0434526
- },
- {
- "conditions": [
- 2
- ],
- "exchange": 1,
- "id": "191450341",
- "participant_timestamp": 1625097600368000000,
- "price": 35059.99,
- "size": 0.0058883
- }
- ],
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ {
+ "description": "The size of the aggregate time window.",
+ "example": "day",
+ "in": "query",
+ "name": "timespan",
+ "schema": {
+ "default": "day",
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
+ "type": "string"
+ }
},
- "results": {
- "items": {
- "properties": {
- "conditions": {
- "description": "A list of condition codes.",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
- "format": "int32",
- "type": "integer"
- },
- "type": "array",
- "x-polygon-go-type": {
- "name": "Int32Array"
- }
- },
- "exchange": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ {
+ "description": "Whether or not the aggregates used to calculate the relative strength index are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "default": true,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The window size used to calculate the relative strength index (RSI).",
+ "example": 14,
+ "in": "query",
+ "name": "window",
+ "schema": {
+ "default": 14,
"type": "integer"
- },
- "id": {
- "description": "The Trade ID which uniquely identifies a trade on the exchange that the trade happened on.",
+ }
+ },
+ {
+ "description": "The price in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close prices to \ncalculate the relative strength index (RSI).",
+ "example": "close",
+ "in": "query",
+ "name": "series_type",
+ "schema": {
+ "default": "close",
+ "enum": [
+ "open",
+ "high",
+ "low",
+ "close"
+ ],
"type": "string"
- },
- "participant_timestamp": {
- "description": "The nanosecond Exchange Unix Timestamp. This is the timestamp of when the trade was generated at the exchange.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "price": {
- "description": "The price of the trade in the base currency of the crypto pair.",
- "format": "double",
- "type": "number"
- },
- "size": {
- "description": "The size of a trade (also known as volume).",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
- },
- "type": "array"
+ }
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "conditions,exchange,id,participant_timestamp,price,size\n1,1,191450340,1625097600103000000,35060,1.0434526\n2,1,191450341,1625097600368000000,35059.99,0.0058883\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "A list of trades."
- }
- },
- "summary": "Trades",
- "tags": [
- "crypto:trades"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Trade data",
- "name": "trades"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Crypto data",
- "name": "crypto"
- },
- "x-polygon-paginate": {
- "limit": {
- "max": 50000
- },
- "order": {
- "default": "desc"
- },
- "sort": {
- "default": "timestamp",
- "enum": [
- "timestamp"
- ]
- }
- },
- "x-polygon-replaces": {
- "date": 1654056060000,
- "replaces": {
- "name": "Historic Crypto Trades",
- "path": "get_v1_historic_crypto__from___to___date"
- }
- }
- },
- "x-polygon-ignore": true
- },
- "/v3/trades/{optionsTicker}": {
- "get": {
- "description": "Get trades for an options ticker symbol in a given time range.",
- "operationId": "TradesOptions",
- "parameters": [
- {
- "description": "The options ticker symbol to get trades for.",
- "example": "O:TSLA210903C00700000",
- "in": "path",
- "name": "optionsTicker",
- "required": true,
- "schema": {
- "type": "string"
- },
- "x-polygon-go-id": "Ticker"
- },
- {
- "description": "Query by trade timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Order results based on the `sort` field.",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 50000.",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "example": 10,
- "maximum": 50000,
- "minimum": 1,
- "type": "integer"
- }
- },
- {
- "description": "Sort field used for ordering.",
- "in": "query",
- "name": "sort",
- "schema": {
- "default": "timestamp",
- "enum": [
- "timestamp"
- ],
- "example": "timestamp",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v3/trades/O:AZO140621P00530000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": [
- {
- "exchange": 46,
- "participant_timestamp": 1401715883806000000,
- "price": 6.91,
- "sip_timestamp": 1401715883806000000,
- "size": 1
- },
- {
- "conditions": [
- 209
- ],
- "exchange": 67,
- "participant_timestamp": 1401716547786000000,
- "price": 7.2,
- "sip_timestamp": 1401716547786000000,
- "size": 1
- }
- ],
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ {
+ "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
+ "in": "query",
+ "name": "expand_underlying",
+ "schema": {
+ "default": false,
+ "type": "boolean"
+ }
},
- "results": {
- "items": {
- "properties": {
- "conditions": {
- "description": "A list of condition codes.",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
- "format": "int32",
- "type": "integer"
- },
- "type": "array",
- "x-polygon-go-type": {
- "name": "Int32Array"
- }
- },
- "correction": {
- "description": "The trade correction indicator.",
- "type": "integer"
- },
- "exchange": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/options/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ {
+ "description": "The order in which to return the results, ordered by timestamp.",
+ "example": "desc",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 5000",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "maximum": 5000,
"type": "integer"
- },
- "participant_timestamp": {
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the trade was actually generated at the exchange.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "price": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
- "format": "double",
- "type": "number"
- },
- "sip_timestamp": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this trade from the exchange which produced it.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "size": {
- "description": "The size of a trade (also known as volume).",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
- },
- "type": "array"
+ }
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "conditions,exchange,participant_timestamp,price,sip_timestamp,size\n,46,1401715883806000000,6.91,1401715883806000000,1\n209,67,1401716547786000000,7.2,1401716547786000000,1\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "A list of trades."
- }
- },
- "summary": "Trades",
- "tags": [
- "options:trades"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Trade data",
- "name": "trades"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Options data",
- "name": "options"
- },
- "x-polygon-paginate": {
- "limit": {
- "max": 50000
- },
- "order": {
- "default": "desc"
- },
- "sort": {
- "default": "timestamp",
- "enum": [
- "timestamp"
- ]
- }
- }
- },
- "x-polygon-ignore": true
- },
- "/v3/trades/{stockTicker}": {
- "get": {
- "description": "Get trades for a ticker symbol in a given time range.",
- "operationId": "Trades",
- "parameters": [
- {
- "description": "The ticker symbol to get trades for.",
- "example": "AAPL",
- "in": "path",
- "name": "stockTicker",
- "required": true,
- "schema": {
- "type": "string"
- },
- "x-polygon-go-id": "Ticker"
- },
- {
- "description": "Query by trade timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Order results based on the `sort` field.",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 50000.",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "example": 10,
- "maximum": 50000,
- "minimum": 1,
- "type": "integer"
- }
- },
- {
- "description": "Sort field used for ordering.",
- "in": "query",
- "name": "sort",
- "schema": {
- "default": "timestamp",
- "enum": [
- "timestamp"
- ],
- "example": "timestamp",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v3/trades/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": [
- {
- "conditions": [
- 12,
- 41
- ],
- "exchange": 11,
- "id": "1",
- "participant_timestamp": 1517562000015577000,
- "price": 171.55,
- "sequence_number": 1063,
- "sip_timestamp": 1517562000016036600,
- "size": 100,
- "tape": 3
- },
- {
- "conditions": [
- 12,
- 41
- ],
- "exchange": 11,
- "id": "2",
- "participant_timestamp": 1517562000015577600,
- "price": 171.55,
- "sequence_number": 1064,
- "sip_timestamp": 1517562000016038100,
- "size": 100,
- "tape": 3
- }
- ],
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
},
- "results": {
- "items": {
- "properties": {
- "conditions": {
- "description": "A list of condition codes.",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
- "format": "int32",
- "type": "integer"
- },
- "type": "array",
- "x-polygon-go-type": {
- "name": "Int32Array"
- }
- },
- "correction": {
- "description": "The trade correction indicator.",
- "type": "integer"
- },
- "exchange": {
- "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- "id": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.",
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
"type": "string"
- },
- "participant_timestamp": {
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the trade was actually generated at the exchange.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "price": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
- "format": "double",
- "type": "number"
- },
- "sequence_number": {
- "description": "The sequence number represents the sequence in which trade 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.",
- "format": "int64",
- "type": "integer"
- },
- "sip_timestamp": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this trade from the exchange which produced it.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "size": {
- "description": "The size of a trade (also known as volume).",
- "format": "double",
- "type": "number"
- },
- "tape": {
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ",
- "format": "int32",
- "type": "integer"
- },
- "trf_id": {
- "description": "The ID for the Trade Reporting Facility where the trade took place.",
- "type": "integer"
- },
- "trf_timestamp": {
- "description": "The nanosecond accuracy TRF (Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this trade.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v1/indicators/rsi/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": {
+ "underlying": {
+ "url": "https://api.polygon.io/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25"
+ },
+ "values": [
+ {
+ "timestamp": 1517562000016,
+ "value": 82.19
+ }
+ ]
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "underlying": {
+ "properties": {
+ "aggregates": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "format": "float",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "float",
+ "type": "number"
+ }
+ },
+ "required": [
+ "v",
+ "vw",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t",
+ "n"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "Aggregate",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "url": {
+ "description": "The URL which can be used to request the underlying aggregates used in this request.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "values": {
+ "items": {
+ "properties": {
+ "timestamp": {
+ "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMicroseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "value": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "RSIResults"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nO:SPY241220P00720000,3,277.8267,0,277.82,277.83,277.83,277.82,1649649600000,2,,0,,0,0,0,0,0,false,1649649600000,30.837887188419387\nO:SPY241220P00720000,2,270.49,0,270.49,270.49,270.49,270.49,1649390400000,1,,0,,0,0,0,0,0,false,1649390400000,15.546598157051605\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648785600000,1,,0,,0,0,0,0,0,false,1648785600000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648699200000,1,,0,,0,0,0,0,0,false,1648699200000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648612800000,1,,0,,0,0,0,0,0,false,1648612800000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648526400000,1,,0,,0,0,0,0,0,false,1648526400000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649304000000,1,,0,,0,0,0,0,0,false,1649304000000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649217600000,1,,0,,0,0,0,0,0,false,1649217600000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649131200000,1,,0,,0,0,0,0,0,false,1649131200000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649044800000,1,,0,,0,0,0,0,0,false,1649044800000,88.61520575036505\n",
+ "schema": {
+ "type": "string"
+ }
}
- }
},
- "type": "object"
- },
- "type": "array"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ "description": "Relative Strength Index (RSI) data for each period."
}
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "conditions,exchange,id,participant_timestamp,price,sequence_number,sip_timestamp,size,tape\n\"12,41\",11,1,1517562000015577088,171.55,1063,1517562000016036581,100,3\n\"12,41\",11,2,1517562000015577600,171.55,1064,1517562000016038175,100,3\n",
- "schema": {
- "type": "string"
+ },
+ "summary": "Relative Strength Index (RSI)",
+ "tags": [
+ "options:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Options data",
+ "name": "options"
}
- }
},
- "description": "A list of trades."
- }
+ "x-polygon-ignore": true
},
- "summary": "Trades",
- "tags": [
- "stocks:trades"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Trade data",
- "name": "trades"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
- },
- "x-polygon-paginate": {
- "limit": {
- "max": 50000
- },
- "order": {
- "default": "desc"
- },
- "sort": {
- "default": "timestamp",
- "enum": [
- "timestamp"
- ]
- }
- },
- "x-polygon-replaces": {
- "date": 1654056060000,
- "replaces": {
- "name": "Trades",
- "path": "get_v2_ticks_stocks_trades__ticker___date"
- }
- }
- }
- },
- "/vX/reference/financials": {
- "get": {
- "description": "Get historical financial data for a stock ticker.\nThe financials data is extracted from XBRL from company SEC filings using the methodology outlined \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"http://xbrl.squarespace.com/understanding-sec-xbrl-financi/\"\u003ehere\u003c/a\u003e.",
- "operationId": "ListFinancials",
- "parameters": [
- {
- "description": "Query by company ticker.",
- "in": "query",
- "name": "ticker",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Query by central index key (\u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"https://www.sec.gov/edgar/searchedgar/cik.htm\"\u003eCIK\u003c/a\u003e) Number",
- "in": "query",
- "name": "cik",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Query by company name.",
- "in": "query",
- "name": "company_name",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "search": true
- }
- },
- {
- "description": "Query by standard industrial classification (\u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"https://www.sec.gov/corpfin/division-of-corporation-finance-standard-industrial-classification-sic-code-list\"\u003eSIC\u003c/a\u003e)",
- "in": "query",
- "name": "sic",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Query by the date when the filing with financials data was filed in YYYY-MM-DD format.\n\nBest used when querying over date ranges to find financials based on filings that happen in a time period.\n\nExamples:\n\nTo get financials based on filings that have happened after January 1, 2009 use the query param filing_date.gte=2009-01-01\n\nTo get financials based on filings that happened in the year 2009 use the query params filing_date.gte=2009-01-01\u0026filing_date.lt=2010-01-01",
- "in": "query",
- "name": "filing_date",
- "schema": {
- "format": "date",
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "The period of report for the filing with financials data in YYYY-MM-DD format.",
- "in": "query",
- "name": "period_of_report_date",
- "schema": {
- "format": "date",
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "Query by timeframe. Annual financials originate from 10-K filings, and quarterly financials originate from 10-Q filings. Note: Most companies do not file quarterly reports for Q4 and instead include those financials in their annual report, so some companies my not return quarterly financials for Q4",
- "in": "query",
- "name": "timeframe",
- "schema": {
- "enum": [
- "annual",
- "quarterly",
- "ttm"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not to include the `xpath` and `formula` attributes for each financial data point.\nSee the `xpath` and `formula` response attributes for more info. False by default.",
- "in": "query",
- "name": "include_sources",
- "schema": {
- "default": false,
- "type": "boolean"
- }
- },
- {
- "description": "Search by company_name.",
- "in": "query",
- "name": "company_name.search",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by filing_date.",
- "in": "query",
- "name": "filing_date.gte",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by filing_date.",
- "in": "query",
- "name": "filing_date.gt",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by filing_date.",
- "in": "query",
- "name": "filing_date.lte",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by filing_date.",
- "in": "query",
- "name": "filing_date.lt",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by period_of_report_date.",
- "in": "query",
- "name": "period_of_report_date.gte",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by period_of_report_date.",
- "in": "query",
- "name": "period_of_report_date.gt",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by period_of_report_date.",
- "in": "query",
- "name": "period_of_report_date.lte",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by period_of_report_date.",
- "in": "query",
- "name": "period_of_report_date.lt",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Order results based on the `sort` field.",
- "in": "query",
- "name": "order",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 100.",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "example": 10,
- "maximum": 100,
- "minimum": 1,
- "type": "integer"
- }
- },
- {
- "description": "Sort field used for ordering.",
- "in": "query",
- "name": "sort",
- "schema": {
- "default": "period_of_report_date",
- "enum": [
- "filing_date",
- "period_of_report_date"
- ],
- "example": "filing_date",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "count": 1,
- "next_url": "https://api.polygon.io/vX/reference/financials?",
- "request_id": "55eb92ed43b25568ab0cce159830ea34",
- "results": [
- {
- "cik": "0001650729",
- "company_name": "SiteOne Landscape Supply, Inc.",
- "end_date": "2022-04-03",
- "filing_date": "2022-05-04",
- "financials": {
- "balance_sheet": {
- "assets": {
- "label": "Assets",
- "order": 100,
- "unit": "USD",
- "value": 2407400000
- },
- "current_assets": {
- "label": "Current Assets",
- "order": 200,
- "unit": "USD",
- "value": 1385900000
- },
- "current_liabilities": {
- "label": "Current Liabilities",
- "order": 700,
- "unit": "USD",
- "value": 597500000
- },
- "equity": {
- "label": "Equity",
- "order": 1400,
- "unit": "USD",
- "value": 1099200000
- },
- "equity_attributable_to_noncontrolling_interest": {
- "label": "Equity Attributable To Noncontrolling Interest",
- "order": 1500,
- "unit": "USD",
- "value": 0
- },
- "equity_attributable_to_parent": {
- "label": "Equity Attributable To Parent",
- "order": 1600,
- "unit": "USD",
- "value": 1099200000
- },
- "liabilities": {
- "label": "Liabilities",
- "order": 600,
- "unit": "USD",
- "value": 1308200000
- },
- "liabilities_and_equity": {
- "label": "Liabilities And Equity",
- "order": 1900,
- "unit": "USD",
- "value": 2407400000
- },
- "noncurrent_assets": {
- "label": "Noncurrent Assets",
- "order": 300,
- "unit": "USD",
- "value": 1021500000
- },
- "noncurrent_liabilities": {
- "label": "Noncurrent Liabilities",
- "order": 800,
- "unit": "USD",
- "value": 710700000
- }
- },
- "cash_flow_statement": {
- "exchange_gains_losses": {
- "label": "Exchange Gains/Losses",
- "order": 1000,
- "unit": "USD",
- "value": 100000
- },
- "net_cash_flow": {
- "label": "Net Cash Flow",
- "order": 1100,
- "unit": "USD",
- "value": -8600000
- },
- "net_cash_flow_continuing": {
- "label": "Net Cash Flow, Continuing",
- "order": 1200,
- "unit": "USD",
- "value": -8700000
- },
- "net_cash_flow_from_financing_activities": {
- "label": "Net Cash Flow From Financing Activities",
- "order": 700,
- "unit": "USD",
- "value": 150600000
- },
- "net_cash_flow_from_financing_activities_continuing": {
- "label": "Net Cash Flow From Financing Activities, Continuing",
- "order": 800,
- "unit": "USD",
- "value": 150600000
- },
- "net_cash_flow_from_investing_activities": {
- "label": "Net Cash Flow From Investing Activities",
- "order": 400,
- "unit": "USD",
- "value": -41000000
- },
- "net_cash_flow_from_investing_activities_continuing": {
- "label": "Net Cash Flow From Investing Activities, Continuing",
- "order": 500,
- "unit": "USD",
- "value": -41000000
- },
- "net_cash_flow_from_operating_activities": {
- "label": "Net Cash Flow From Operating Activities",
- "order": 100,
- "unit": "USD",
- "value": -118300000
- },
- "net_cash_flow_from_operating_activities_continuing": {
- "label": "Net Cash Flow From Operating Activities, Continuing",
- "order": 200,
- "unit": "USD",
- "value": -118300000
- }
+ "/v1/indicators/rsi/{stockTicker}": {
+ "get": {
+ "description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.",
+ "operationId": "RSI",
+ "parameters": [
+ {
+ "description": "The ticker symbol for which to get relative strength index (RSI) data.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "stockTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
},
- "comprehensive_income": {
- "comprehensive_income_loss": {
- "label": "Comprehensive Income/Loss",
- "order": 100,
- "unit": "USD",
- "value": 40500000
- },
- "comprehensive_income_loss_attributable_to_noncontrolling_interest": {
- "label": "Comprehensive Income/Loss Attributable To Noncontrolling Interest",
- "order": 200,
- "unit": "USD",
- "value": 0
- },
- "comprehensive_income_loss_attributable_to_parent": {
- "label": "Comprehensive Income/Loss Attributable To Parent",
- "order": 300,
- "unit": "USD",
- "value": 40500000
- },
- "other_comprehensive_income_loss": {
- "label": "Other Comprehensive Income/Loss",
- "order": 400,
- "unit": "USD",
- "value": 40500000
- },
- "other_comprehensive_income_loss_attributable_to_parent": {
- "label": "Other Comprehensive Income/Loss Attributable To Parent",
- "order": 600,
- "unit": "USD",
- "value": 8200000
- }
+ "x-polygon-go-id": "Ticker"
+ },
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
},
- "income_statement": {
- "basic_earnings_per_share": {
- "label": "Basic Earnings Per Share",
- "order": 4200,
- "unit": "USD / shares",
- "value": 0.72
- },
- "benefits_costs_expenses": {
- "label": "Benefits Costs and Expenses",
- "order": 200,
- "unit": "USD",
- "value": 768400000
- },
- "cost_of_revenue": {
- "label": "Cost Of Revenue",
- "order": 300,
- "unit": "USD",
- "value": 536100000
- },
- "costs_and_expenses": {
- "label": "Costs And Expenses",
- "order": 600,
- "unit": "USD",
- "value": 768400000
- },
- "diluted_earnings_per_share": {
- "label": "Diluted Earnings Per Share",
- "order": 4300,
- "unit": "USD / shares",
- "value": 0.7
- },
- "gross_profit": {
- "label": "Gross Profit",
- "order": 800,
- "unit": "USD",
- "value": 269200000
- },
- "income_loss_from_continuing_operations_after_tax": {
- "label": "Income/Loss From Continuing Operations After Tax",
- "order": 1400,
- "unit": "USD",
- "value": 32300000
- },
- "income_loss_from_continuing_operations_before_tax": {
- "label": "Income/Loss From Continuing Operations Before Tax",
- "order": 1500,
- "unit": "USD",
- "value": 36900000
- },
- "income_tax_expense_benefit": {
- "label": "Income Tax Expense/Benefit",
- "order": 2200,
- "unit": "USD",
- "value": 4600000
- },
- "interest_expense_operating": {
- "label": "Interest Expense, Operating",
- "order": 2700,
- "unit": "USD",
- "value": 4300000
- },
- "net_income_loss": {
- "label": "Net Income/Loss",
- "order": 3200,
- "unit": "USD",
- "value": 32300000
- },
- "net_income_loss_attributable_to_noncontrolling_interest": {
- "label": "Net Income/Loss Attributable To Noncontrolling Interest",
- "order": 3300,
- "unit": "USD",
- "value": 0
- },
- "net_income_loss_attributable_to_parent": {
- "label": "Net Income/Loss Attributable To Parent",
- "order": 3500,
- "unit": "USD",
- "value": 32300000
- },
- "net_income_loss_available_to_common_stockholders_basic": {
- "label": "Net Income/Loss Available To Common Stockholders, Basic",
- "order": 3700,
- "unit": "USD",
- "value": 32300000
- },
- "operating_expenses": {
- "label": "Operating Expenses",
- "order": 1000,
- "unit": "USD",
- "value": 228000000
- },
- "operating_income_loss": {
- "label": "Operating Income/Loss",
- "order": 1100,
- "unit": "USD",
- "value": 41200000
- },
- "participating_securities_distributed_and_undistributed_earnings_loss_basic": {
- "label": "Participating Securities, Distributed And Undistributed Earnings/Loss, Basic",
- "order": 3800,
- "unit": "USD",
- "value": 0
- },
- "preferred_stock_dividends_and_other_adjustments": {
- "label": "Preferred Stock Dividends And Other Adjustments",
- "order": 3900,
- "unit": "USD",
- "value": 0
- },
- "revenues": {
- "label": "Revenues",
- "order": 100,
- "unit": "USD",
- "value": 805300000
- }
- }
- },
- "fiscal_period": "Q1",
- "fiscal_year": "2022",
- "source_filing_file_url": "https://api.polygon.io/v1/reference/sec/filings/0001650729-22-000010/files/site-20220403_htm.xml",
- "source_filing_url": "https://api.polygon.io/v1/reference/sec/filings/0001650729-22-000010",
- "start_date": "2022-01-03"
- }
- ],
- "status": "OK"
- },
- "schema": {
- "properties": {
- "count": {
- "description": "The total number of results for this request.",
- "type": "integer"
+ "x-polygon-filter-field": {
+ "range": true
+ }
},
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
+ {
+ "description": "The size of the aggregate time window.",
+ "example": "day",
+ "in": "query",
+ "name": "timespan",
+ "schema": {
+ "default": "day",
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
+ "type": "string"
+ }
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ {
+ "description": "Whether or not the aggregates used to calculate the relative strength index are adjusted for splits. By default, aggregates are adjusted. Set this to false to get results that are NOT adjusted for splits.",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "default": true,
+ "type": "boolean"
+ }
},
- "results": {
- "items": {
- "properties": {
- "acceptance_datetime": {
- "description": "The datetime (EST timezone) the filing was accepted by EDGAR in YYYYMMDDHHMMSS format."
- },
- "cik": {
- "description": "The CIK number for the company.",
- "type": "string"
- },
- "company_name": {
- "description": "The company name.",
- "type": "string"
- },
- "end_date": {
- "description": "The end date of the period that these financials cover in YYYYMMDD format.",
- "type": "string"
- },
- "filing_date": {
- "description": "The date that the SEC filing which these financials were derived from was made available. Note that this is not necessarily the date when this information became public, as some companies may publish a press release before filing with the SEC."
- },
- "financials": {
- "properties": {
- "balance_sheet": {
- "description": "Balance sheet.\nNote that the keys in this object can be any of the balance sheet concepts defined in \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"http://www.xbrlsite.com/2016/fac/v3/Documentation/FundamentalAccountingConceptsList.html\"\u003ethis table of fundamental accounting concepts\u003c/a\u003e but converted to `snake_case`.",
- "properties": {
- "*": {
- "description": "An individual financial data point.",
+ {
+ "description": "The window size used to calculate the relative strength index (RSI).",
+ "example": 14,
+ "in": "query",
+ "name": "window",
+ "schema": {
+ "default": 14,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The price in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close prices to \ncalculate the relative strength index (RSI).",
+ "example": "close",
+ "in": "query",
+ "name": "series_type",
+ "schema": {
+ "default": "close",
+ "enum": [
+ "open",
+ "high",
+ "low",
+ "close"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
+ "in": "query",
+ "name": "expand_underlying",
+ "schema": {
+ "default": false,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The order in which to return the results, ordered by timestamp.",
+ "example": "desc",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 5000",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "maximum": 5000,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v1/indicators/rsi/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": {
+ "underlying": {
+ "url": "https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25"
+ },
+ "values": [
+ {
+ "timestamp": 1517562000016,
+ "value": 82.19
+ }
+ ]
+ },
+ "status": "OK"
+ },
+ "schema": {
"properties": {
- "derived_from": {
- "description": "The list of report IDs (or errata) which were used to derive this data point.\nThis value is only returned for data points taken directly from XBRL when the `include_sources` query parameter is `true` and if source is SourceInterReportDerived.",
- "items": {
- "type": "string"
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
},
- "type": "array"
- },
- "formula": {
- "description": "The name of the formula used to derive this data point from other financial data points.\nInformation about the formulas can be found \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"http://xbrlsite.azurewebsites.net/2020/reporting-scheme/us-gaap/fac/documentation/ImputeRulesList.html\"\u003ehere\u003c/a\u003e.\nThis value is only returned for data points that are not explicitly expressed within the XBRL source file when the `include_sources` query parameter is `true` and if source is SourceIntraReportImpute.",
- "type": "string"
- },
- "label": {
- "description": "A human readable label for the financial data point.",
- "type": "string"
- },
- "order": {
- "description": "An indicator of what order within the statement that you would find this data point.",
- "type": "integer"
- },
- "source": {
- "description": "The source where this data point came from. This will be one of: SourceDirectReport, SourceIntraReportImpute or SourceInterReportDerived."
- },
- "unit": {
- "description": "The unit of the financial data point.",
- "type": "string"
- },
- "value": {
- "description": "The value of the financial data point.",
- "type": "number"
- },
- "xpath": {
- "description": "The \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/XPath\"\u003eXPath 1.0\u003c/a\u003e query that identifies the fact from within the XBRL source file.\nThis value is only returned for data points taken directly from XBRL when the `include_sources` query parameter is `true` and if source is SourceDirectReport.",
- "type": "string"
- }
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "underlying": {
+ "properties": {
+ "aggregates": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "format": "float",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "float",
+ "type": "number"
+ }
+ },
+ "required": [
+ "v",
+ "vw",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t",
+ "n"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "Aggregate",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "url": {
+ "description": "The URL which can be used to request the underlying aggregates used in this request.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "values": {
+ "items": {
+ "properties": {
+ "timestamp": {
+ "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMicroseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "value": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "RSIResults"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
},
- "required": [
- "label",
- "order",
- "value",
- "unit"
- ],
"type": "object"
- }
- },
- "type": "object"
- },
- "cash_flow_statement": {
- "description": "Cash flow statement.\nNote that the keys in this object can be any of the cash flow statement concepts defined in \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"http://www.xbrlsite.com/2016/fac/v3/Documentation/FundamentalAccountingConceptsList.html\"\u003ethis table of fundamental accounting concepts\u003c/a\u003e but converted to `snake_case`.\nSee the attributes of the objects within `balance_sheet` for more details.",
- "type": "object"
- },
- "comprehensive_income": {
- "description": "Comprehensive income.\nNote that the keys in this object can be any of the comprehensive income statement concepts defined in \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"http://www.xbrlsite.com/2016/fac/v3/Documentation/FundamentalAccountingConceptsList.html\"\u003ethis table of fundamental accounting concepts\u003c/a\u003e but converted to `snake_case`.\nSee the attributes of the objects within `balance_sheet` for more details.",
- "type": "object"
- },
- "income_statement": {
- "description": "Income statement.\nNote that the keys in this object can be any of the income statement concepts defined in \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"http://www.xbrlsite.com/2016/fac/v3/Documentation/FundamentalAccountingConceptsList.html\"\u003ethis table of fundamental accounting concepts\u003c/a\u003e but converted to `snake_case`.\nSee the attributes of the objects within `balance_sheet` for more details.",
- "type": "object"
- }
- },
- "type": "object"
- },
- "fiscal_period": {
- "description": "Fiscal period of the report according to the company (Q1, Q2, Q3, Q4, or FY).",
- "type": "string"
- },
- "fiscal_year": {
- "description": "Fiscal year of the report according to the company.",
- "type": "string"
- },
- "source_filing_file_url": {
- "description": "The URL of the specific XBRL instance document within the SEC filing that these financials were derived from."
- },
- "source_filing_url": {
- "description": "The URL of the SEC filing that these financials were derived from.",
- "type": "string"
- },
- "start_date": {
- "description": "The start date of the period that these financials cover in YYYYMMDD format.",
- "type": "string"
- },
- "tickers": {
- "description": "The list of ticker symbols for the company.",
- "items": {
- "type": "string"
+ }
},
- "type": "array"
- },
- "timeframe": {
- "description": "The timeframe of the report (quarterly, annual or ttm).",
- "type": "string"
- }
+ "text/csv": {
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nAAPL,1.27849501E+08,142.9012,0,146.1,142.48,146.72,140.68,1664424000000,1061692,,0,,0,0,0,0,0,false,1664424000000,23.065352237561996\nAAPL,1.46755122E+08,147.599,0,147.64,149.84,150.6414,144.84,1664337600000,1140818,,0,,0,0,0,0,0,false,1664337600000,29.877761913419718\nAAPL,9.3339409E+07,151.5222,0,149.66,150.77,153.7701,149.64,1664164800000,747666,,0,,0,0,0,0,0,false,1664164800000,29.58201330468151\nAAPL,8.1599225E+07,152.5505,0,149.31,154.48,154.56,149.1,1663560000000,671961,,0,,0,0,0,0,0,false,1663560000000,30.233508748331047\nAAPL,1.64879031E+08,150.2387,0,151.21,150.7,151.35,148.37,1663300800000,850358,,0,,0,0,0,0,0,false,1663300800000,19.857312489527956\nAAPL,8.4461761E+07,152.1354,0,152.74,151.76,154.72,149.945,1664251200000,683781,,0,,0,0,0,0,0,false,1664251200000,32.18008680069761\nAAPL,9.6031641E+07,150.0222,0,151.19,150.43,151.47,148.56,1663905600000,766888,,0,,0,0,0,0,0,false,1663905600000,28.71109953239781\nAAPL,8.6651514E+07,152.5709,0,152.38,152.74,154.47,150.91,1663819200000,686866,,0,,0,0,0,0,0,false,1663819200000,31.140902927103383\nAAPL,9.3308449E+07,156.1877,0,157.34,153.72,158.61,153.6,1663732800000,712645,,0,,0,0,0,0,0,false,1663732800000,32.21491128713248\nAAPL,1.07691097E+08,156.1317,0,153.4,156.9,158.08,153.08,1663646400000,792177,,0,,0,0,0,0,0,false,1663646400000,35.950871523070575\n",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "required": [
- "cik",
- "company_name",
- "financials",
- "timeframe",
- "fiscal_period"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "FinancialReport"
- }
- },
- "type": "array"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ "description": "Relative strength Index data for each period."
}
- },
- "required": [
- "status",
- "request_id",
- "count",
- "results"
- ],
- "type": "object"
+ },
+ "summary": "Relative Strength Index (RSI)",
+ "tags": [
+ "stocks:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
}
- }
- },
- "description": "FIXME"
- }
- },
- "summary": "Stock Financials vX",
- "tags": [
- "reference:stocks"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
- },
- "x-polygon-experimental": {},
- "x-polygon-paginate": {
- "limit": {
- "default": 10,
- "max": 100
- },
- "sort": {
- "default": "period_of_report_date",
- "enum": [
- "filing_date",
- "period_of_report_date"
- ]
- }
- }
- }
- },
- "/vX/reference/tickers/{id}/events": {
- "get": {
- "description": "Get a timeline of events for the entity associated with the given ticker, CUSIP, or Composite FIGI.",
- "operationId": "GetEvents",
- "parameters": [
- {
- "description": "Identifier of an asset. This can currently be a Ticker, CUSIP, or Composite FIGI.\nWhen given a ticker, we return events for the entity currently represented by that ticker.\nTo find events for entities previously associated with a ticker, find the relevant identifier using the \n[Ticker Details Endpoint](https://polygon.io/docs/stocks/get_v3_reference_tickers__ticker)",
- "example": "META",
- "in": "path",
- "name": "id",
- "required": true,
- "schema": {
- "type": "string"
}
- },
- {
- "description": "A comma-separated list of the types of event to include. Currently ticker_change is the only supported event_type.\nLeave blank to return all supported event_types.",
- "in": "query",
- "name": "types",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "request_id": "31d59dda-80e5-4721-8496-d0d32a654afe",
- "results": {
- "events": [
- {
- "date": "2022-06-09",
- "ticker_change": {
- "ticker": "META"
+ },
+ "/v1/indicators/sma/{cryptoTicker}": {
+ "get": {
+ "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.",
+ "operationId": "CryptoSMA",
+ "parameters": [
+ {
+ "description": "The ticker symbol for which to get simple moving average (SMA) data.",
+ "example": "X:BTCUSD",
+ "in": "path",
+ "name": "cryptoTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
},
- "type": "ticker_change"
- },
- {
- "date": "2012-05-18",
- "ticker_change": {
- "ticker": "FB"
+ "x-polygon-go-id": "Ticker"
+ },
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
},
- "type": "ticker_change"
- }
- ],
- "name": "Meta Platforms, Inc. Class A Common Stock"
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "x-polygon-filter-field": {
+ "range": true
+ }
},
- "results": {
- "properties": {
- "events": {
- "items": {
- "oneOf": [
- {
- "properties": {
- "date": {
- "description": "The date the event took place",
- "format": "date",
- "type": "string"
- },
- "event_type": {
- "description": "The type of historical event for the asset",
- "type": "string"
- },
- "ticker_change": {
+ {
+ "description": "The size of the aggregate time window.",
+ "example": "day",
+ "in": "query",
+ "name": "timespan",
+ "schema": {
+ "default": "day",
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
+ "example": 50,
+ "in": "query",
+ "name": "window",
+ "schema": {
+ "default": 50,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The price in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close prices to \ncalculate the simple moving average (SMA).",
+ "example": "close",
+ "in": "query",
+ "name": "series_type",
+ "schema": {
+ "default": "close",
+ "enum": [
+ "open",
+ "high",
+ "low",
+ "close"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
+ "in": "query",
+ "name": "expand_underlying",
+ "schema": {
+ "default": false,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The order in which to return the results, ordered by timestamp.",
+ "example": "desc",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 5000",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "maximum": 5000,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v1/indicators/sma/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": {
+ "underlying": {
+ "aggregates": [
+ {
+ "c": 75.0875,
+ "h": 75.15,
+ "l": 73.7975,
+ "n": 1,
+ "o": 74.06,
+ "t": 1577941200000,
+ "v": 135647456,
+ "vw": 74.6099
+ },
+ {
+ "c": 74.3575,
+ "h": 75.145,
+ "l": 74.125,
+ "n": 1,
+ "o": 74.2875,
+ "t": 1578027600000,
+ "v": 146535512,
+ "vw": 74.7026
+ }
+ ],
+ "url": "https://api.polygon.io/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25"
+ },
+ "values": [
+ {
+ "timestamp": 1517562000016,
+ "value": 140.139
+ }
+ ]
+ },
+ "status": "OK"
+ },
+ "schema": {
"properties": {
- "ticker": {
- "type": "string"
- }
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "underlying": {
+ "properties": {
+ "aggregates": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "format": "float",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "float",
+ "type": "number"
+ }
+ },
+ "required": [
+ "v",
+ "vw",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t",
+ "n"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "Aggregate",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "url": {
+ "description": "The URL which can be used to request the underlying aggregates used in this request.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "values": {
+ "items": {
+ "properties": {
+ "timestamp": {
+ "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMicroseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "value": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "SMAResults"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
},
"type": "object"
- }
- },
- "required": [
- "event_type",
- "date"
- ],
- "type": "object"
- }
- ]
- },
- "type": "array"
+ }
+ },
+ "text/csv": {
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664164800000,297389,,0,,0,0,0,0,0,false,1664164800000,19846.01135387188\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664078400000,78936,,0,,0,0,0,0,0,false,1664078400000,19902.65703099573\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664064000000,78936,,0,,0,0,0,0,0,false,1664064000000,19948.29976695474\nX:BTCUSD,15457.24362826,19317.486,0,19529.04,19475.84,19651.2772302,18846.67,1664409600000,191936,,0,,0,0,0,0,0,false,1664409600000,19751.714760699124\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664337600000,225076,,0,,0,0,0,0,0,false,1664337600000,19762.974955013375\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664251200000,183075,,0,,0,0,0,0,0,false,1664251200000,19791.86053850303\nX:BTCUSD,2868.09828007,19069.8521,0,19210.31,18925.87,19400,18805.1,1663992000000,58721,,0,,0,0,0,0,0,false,1663992000000,19995.805471728403\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664323200000,225076,,0,,0,0,0,0,0,false,1664323200000,19777.128890923308\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664236800000,183075,,0,,0,0,0,0,0,false,1664236800000,19818.394438033767\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664150400000,297389,,0,,0,0,0,0,0,false,1664150400000,19873.767735662568\n",
+ "schema": {
+ "type": "string"
+ }
+ }
},
- "name": {
- "type": "string"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "EventsResults"
- }
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ "description": "Simple Moving Average (SMA) data for each period."
}
- },
- "type": "object"
+ },
+ "summary": "Simple Moving Average (SMA)",
+ "tags": [
+ "crpyto:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
}
- }
},
- "description": "Ticker Events."
- },
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
- }
- },
- "summary": "Ticker Events",
- "tags": [
- "reference:tickers:get"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
+ "x-polygon-ignore": true
},
- "x-polygon-experimental": {}
- }
- }
- },
- "security": [
- {
- "apiKey": []
- }
- ],
- "servers": [
- {
- "description": "Polygon Platform API",
- "url": "https://api.polygon.io"
- },
- {
- "description": "Polygon Platform API (Staging)",
- "url": "https://api.staging.polygon.io"
- }
- ],
- "tags": [
- {
- "description": "Reference API",
- "name": "reference",
- "x-polygon-sub-tags": [
- "tickers:list",
- "tickers:types",
- "tickers:get",
- "options:contracts:list",
- "news",
- "tickers",
- "stocks",
- "sec:filings",
- "sec:filing",
- "sec:filing:files",
- "sec:filing:file",
- "stocks:market",
- "conditions",
- "stocks:meta:exchanges",
- "crypto",
- "exchanges"
- ]
- },
- {
- "description": "Stocks API",
- "name": "stocks",
- "x-polygon-sub-tags": [
- "trades",
- "quotes",
- "last:trade",
- "last:quote",
- "open-close",
- "aggregates",
- "snapshot"
- ]
- },
- {
- "description": "Options API",
- "name": "options",
- "x-polygon-sub-tags": [
- "trades",
- "quotes",
- "last:trade",
- "last:quote",
- "open-close",
- "aggregates",
- "snapshot"
- ]
- },
- {
- "description": "Forex API",
- "name": "fx",
- "x-polygon-sub-tags": [
- "trades",
- "quotes",
- "conversion",
- "last:trade",
- "last:quote",
- "aggregates",
- "snapshot"
- ]
- },
- {
- "description": "Crypto API",
- "name": "crypto",
- "x-polygon-sub-tags": [
- "trades",
- "last:trade",
- "open-close",
- "aggregates",
- "snapshot"
- ]
- },
- {
- "description": "Indices API",
- "name": "indices",
- "x-polygon-sub-tags": [
- "trades",
- "last:trade",
- "open-close",
- "aggregates",
- "snapshot"
- ]
- }
- ],
- "x-polygon-order": {
- "crypto": {
- "market": [
- {
- "launchpad": "shared",
- "paths": [
- "/v2/aggs/ticker/{cryptoTicker}/range/{multiplier}/{timespan}/{from}/{to}"
- ]
- },
- {
- "launchpad": "exclusive",
- "paths": [
- "/v1/summaries"
- ]
- },
- {
- "paths": [
- "/v2/aggs/grouped/locale/global/market/crypto/{date}"
- ]
- },
- {
- "paths": [
- "/v1/open-close/crypto/{from}/{to}/{date}"
- ]
- },
- {
- "paths": [
- "/v2/aggs/ticker/{cryptoTicker}/prev"
- ]
- },
- {
- "paths": [
- "/v3/trades/{cryptoTicker}"
- ]
- },
- {
- "paths": [
- "/v1/historic/crypto/{from}/{to}/{date}"
- ]
- },
- {
- "paths": [
- "/v1/last/crypto/{from}/{to}"
- ]
- },
- {
- "group": "Snapshots",
- "paths": [
- "/v2/snapshot/locale/global/markets/crypto/tickers",
- "/v2/snapshot/locale/global/markets/crypto/{direction}",
- "/v2/snapshot/locale/global/markets/crypto/tickers/{ticker}",
- "/v2/snapshot/locale/global/markets/crypto/tickers/{ticker}/book"
- ]
- },
- {
- "group": "Technical Indicators",
- "paths": [
- "/v1/indicators/sma/{cryptoTicker}",
- "/v1/indicators/ema/{cryptoTicker}",
- "/v1/indicators/macd/{cryptoTicker}",
- "/v1/indicators/rsi/{cryptoTicker}"
- ]
- }
- ],
- "reference": [
- {
- "paths": [
- "/v3/reference/tickers"
- ]
- },
- {
- "paths": [
- "/v1/marketstatus/upcoming"
- ]
- },
- {
- "paths": [
- "/v1/marketstatus/now"
- ]
- },
- {
- "paths": [
- "/v3/reference/conditions"
- ]
- },
- {
- "paths": [
- "/v3/reference/exchanges"
- ]
- }
- ]
- },
- "fx": {
- "market": [
- {
- "launchpad": "shared",
- "paths": [
- "/v2/aggs/ticker/{forexTicker}/range/{multiplier}/{timespan}/{from}/{to}"
- ]
- },
- {
- "launchpad": "exclusive",
- "paths": [
- "/v1/summaries"
- ]
- },
- {
- "paths": [
- "/v2/aggs/grouped/locale/global/market/fx/{date}"
- ]
- },
- {
- "paths": [
- "/v2/aggs/ticker/{forexTicker}/prev"
- ]
- },
- {
- "paths": [
- "/v3/quotes/{fxTicker}"
- ]
- },
- {
- "paths": [
- "/v1/historic/forex/{from}/{to}/{date}"
- ]
- },
- {
- "paths": [
- "/v1/last_quote/currencies/{from}/{to}"
- ]
- },
- {
- "paths": [
- "/v1/conversion/{from}/{to}"
- ]
- },
- {
- "group": "Snapshots",
- "paths": [
- "/v2/snapshot/locale/global/markets/forex/tickers",
- "/v2/snapshot/locale/global/markets/forex/{direction}",
- "/v2/snapshot/locale/global/markets/forex/tickers/{ticker}"
- ]
- },
- {
- "group": "Technical Indicators",
- "paths": [
- "/v1/indicators/sma/{fxTicker}",
- "/v1/indicators/ema/{fxTicker}",
- "/v1/indicators/macd/{fxTicker}",
- "/v1/indicators/rsi/{fxTicker}"
- ]
- }
- ],
- "reference": [
- {
- "paths": [
- "/v3/reference/tickers"
- ]
- },
- {
- "paths": [
- "/v1/marketstatus/upcoming"
- ]
+ "/v1/indicators/sma/{fxTicker}": {
+ "get": {
+ "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.",
+ "operationId": "ForexSMA",
+ "parameters": [
+ {
+ "description": "The ticker symbol for which to get simple moving average (SMA) data.",
+ "example": "C:EURUSD",
+ "in": "path",
+ "name": "fxTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-go-id": "Ticker"
+ },
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "The size of the aggregate time window.",
+ "example": "day",
+ "in": "query",
+ "name": "timespan",
+ "schema": {
+ "default": "day",
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the aggregates used to calculate the simple moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "default": true,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
+ "example": 50,
+ "in": "query",
+ "name": "window",
+ "schema": {
+ "default": 50,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The price in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close prices to \ncalculate the simple moving average (SMA).",
+ "example": "close",
+ "in": "query",
+ "name": "series_type",
+ "schema": {
+ "default": "close",
+ "enum": [
+ "open",
+ "high",
+ "low",
+ "close"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
+ "in": "query",
+ "name": "expand_underlying",
+ "schema": {
+ "default": false,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The order in which to return the results, ordered by timestamp.",
+ "example": "desc",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 5000",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "maximum": 5000,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v1/indicators/sma/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": {
+ "underlying": {
+ "aggregates": [
+ {
+ "c": 75.0875,
+ "h": 75.15,
+ "l": 73.7975,
+ "n": 1,
+ "o": 74.06,
+ "t": 1577941200000,
+ "v": 135647456,
+ "vw": 74.6099
+ },
+ {
+ "c": 74.3575,
+ "h": 75.145,
+ "l": 74.125,
+ "n": 1,
+ "o": 74.2875,
+ "t": 1578027600000,
+ "v": 146535512,
+ "vw": 74.7026
+ }
+ ],
+ "url": "https://api.polygon.io/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25"
+ },
+ "values": [
+ {
+ "timestamp": 1517562000016,
+ "value": 140.139
+ }
+ ]
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "underlying": {
+ "properties": {
+ "aggregates": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "format": "float",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "float",
+ "type": "number"
+ }
+ },
+ "required": [
+ "v",
+ "vw",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t",
+ "n"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "Aggregate",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "url": {
+ "description": "The URL which can be used to request the underlying aggregates used in this request.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "values": {
+ "items": {
+ "properties": {
+ "timestamp": {
+ "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMicroseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "value": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "SMAResults"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664323200000,685,,0,,0,0,0,0,0,false,1664323200000,1.4915199239999994\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664164800000,550,,0,,0,0,0,0,0,false,1664164800000,1.4863299679999997\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664078400000,10,,0,,0,0,0,0,0,false,1664078400000,1.4826388699999997\nC:USDAUD,686,1.5442,0,1.53763,1.5404,1.5526022,1.537279,1664409600000,686,,0,,0,0,0,0,0,false,1664409600000,1.4942168479999998\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664251200000,536,,0,,0,0,0,0,0,false,1664251200000,1.4900704799999993\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664236800000,536,,0,,0,0,0,0,0,false,1664236800000,1.4882634499999994\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664150400000,550,,0,,0,0,0,0,0,false,1664150400000,1.4845906159999998\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664064000000,10,,0,,0,0,0,0,0,false,1664064000000,1.4809719239999999\nC:USDAUD,1,1.5314,0,1.5313936,1.5313936,1.5313936,1.5313936,1663977600000,1,,0,,0,0,0,0,0,false,1663977600000,1.4794745239999998\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664337600000,685,,0,,0,0,0,0,0,false,1664337600000,1.4928357579999996\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Simple Moving Average (SMA) data for each period."
+ }
+ },
+ "summary": "Simple Moving Average (SMA)",
+ "tags": [
+ "fx:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Forex data",
+ "name": "fx"
+ }
+ },
+ "x-polygon-ignore": true
+ },
+ "/v1/indicators/sma/{indicesTicker}": {
+ "get": {
+ "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.",
+ "operationId": "IndicesSMA",
+ "parameters": [
+ {
+ "description": "The ticker symbol for which to get simple moving average (SMA) data.",
+ "example": "I:DJI",
+ "in": "path",
+ "name": "indicesTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-go-id": "Ticker"
+ },
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "The size of the aggregate time window.",
+ "example": "day",
+ "in": "query",
+ "name": "timespan",
+ "schema": {
+ "default": "day",
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the aggregates used to calculate the simple moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "default": true,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
+ "example": 50,
+ "in": "query",
+ "name": "window",
+ "schema": {
+ "default": 50,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The value in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close values to \ncalculate the simple moving average (SMA).",
+ "example": "close",
+ "in": "query",
+ "name": "series_type",
+ "schema": {
+ "default": "close",
+ "enum": [
+ "open",
+ "high",
+ "low",
+ "close"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
+ "in": "query",
+ "name": "expand_underlying",
+ "schema": {
+ "default": false,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The order in which to return the results, ordered by timestamp.",
+ "example": "desc",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 5000",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "maximum": 5000,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v1/indicators/sma/I:DJI?cursor=YWRqdXN0ZWQ9dHJ1ZSZhcD0lN0IlMjJ2JTIyJTNBMCUyQyUyMm8lMjIlM0EwJTJDJTIyYyUyMiUzQTQwNDcuNDEwMDAwMDAwMDAwMyUyQyUyMmglMjIlM0EwJTJDJTIybCUyMiUzQTAlMkMlMjJ0JTIyJTNBMTY3ODA4MjQwMDAwMCU3RCZhcz0mZXhwYW5kX3VuZGVybHlpbmc9ZmFsc2UmbGltaXQ9MTAmb3JkZXI9ZGVzYyZzZXJpZXNfdHlwZT1jbG9zZSZ0aW1lc3Bhbj1kYXkmdGltZXN0YW1wLmx0PTE2NzgxNjUyMDAwMDAmd2luZG93PTU",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": {
+ "underlying": {
+ "url": "https://api.polygon.io/v2/aggs/ticker/I:DJI/range/1/day/1063281600000/1678725829099?limit=35&sort=desc"
+ },
+ "values": [
+ {
+ "timestamp": 1681966800000,
+ "value": 33236.3424
+ }
+ ]
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "underlying": {
+ "properties": {
+ "aggregates": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "format": "float",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "float",
+ "type": "number"
+ }
+ },
+ "required": [
+ "v",
+ "vw",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t",
+ "n"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "Aggregate",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "url": {
+ "description": "The URL which can be used to request the underlying aggregates used in this request.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "values": {
+ "items": {
+ "properties": {
+ "timestamp": {
+ "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMicroseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "value": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "SMAResults"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "Simple Moving Average (SMA) data for each period."
+ }
+ },
+ "summary": "Simple Moving Average (SMA)",
+ "tags": [
+ "indices:aggregates"
+ ],
+ "x-polygon-entitlement-allowed-limited-tickers": true,
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Indices data",
+ "name": "indices"
+ }
+ },
+ "x-polygon-ignore": true
+ },
+ "/v1/indicators/sma/{optionsTicker}": {
+ "get": {
+ "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.",
+ "operationId": "OptionsSMA",
+ "parameters": [
+ {
+ "description": "The ticker symbol for which to get simple moving average (SMA) data.",
+ "example": "O:SPY241220P00720000",
+ "in": "path",
+ "name": "optionsTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-go-id": "Ticker"
+ },
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "The size of the aggregate time window.",
+ "example": "day",
+ "in": "query",
+ "name": "timespan",
+ "schema": {
+ "default": "day",
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the aggregates used to calculate the simple moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "default": true,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
+ "example": 50,
+ "in": "query",
+ "name": "window",
+ "schema": {
+ "default": 50,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The price in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close prices to \ncalculate the simple moving average (SMA).",
+ "example": "close",
+ "in": "query",
+ "name": "series_type",
+ "schema": {
+ "default": "close",
+ "enum": [
+ "open",
+ "high",
+ "low",
+ "close"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
+ "in": "query",
+ "name": "expand_underlying",
+ "schema": {
+ "default": false,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The order in which to return the results, ordered by timestamp.",
+ "example": "desc",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 5000",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "maximum": 5000,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v1/indicators/sma/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": {
+ "underlying": {
+ "aggregates": [
+ {
+ "c": 75.0875,
+ "h": 75.15,
+ "l": 73.7975,
+ "n": 1,
+ "o": 74.06,
+ "t": 1577941200000,
+ "v": 135647456,
+ "vw": 74.6099
+ },
+ {
+ "c": 74.3575,
+ "h": 75.145,
+ "l": 74.125,
+ "n": 1,
+ "o": 74.2875,
+ "t": 1578027600000,
+ "v": 146535512,
+ "vw": 74.7026
+ }
+ ],
+ "url": "https://api.polygon.io/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25"
+ },
+ "values": [
+ {
+ "timestamp": 1517562000016,
+ "value": 140.139
+ }
+ ]
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "underlying": {
+ "properties": {
+ "aggregates": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "format": "float",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "float",
+ "type": "number"
+ }
+ },
+ "required": [
+ "v",
+ "vw",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t",
+ "n"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "Aggregate",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "url": {
+ "description": "The URL which can be used to request the underlying aggregates used in this request.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "values": {
+ "items": {
+ "properties": {
+ "timestamp": {
+ "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMicroseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "value": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "SMAResults"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649304000000,1,,0,,0,0,0,0,0,false,1649304000000,286.0121999999996\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649131200000,1,,0,,0,0,0,0,0,false,1649131200000,284.61099999999965\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648699200000,1,,0,,0,0,0,0,0,false,1648699200000,282.50919999999974\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648612800000,1,,0,,0,0,0,0,0,false,1648612800000,281.80859999999973\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648526400000,1,,0,,0,0,0,0,0,false,1648526400000,281.1079999999998\nO:SPY241220P00720000,3,277.8267,0,277.82,277.83,277.83,277.82,1649649600000,2,,0,,0,0,0,0,0,false,1649649600000,285.4949999999996\nO:SPY241220P00720000,2,270.49,0,270.49,270.49,270.49,270.49,1649390400000,1,,0,,0,0,0,0,0,false,1649390400000,285.6801999999996\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649217600000,1,,0,,0,0,0,0,0,false,1649217600000,285.31159999999966\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649044800000,1,,0,,0,0,0,0,0,false,1649044800000,283.9103999999997\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648785600000,1,,0,,0,0,0,0,0,false,1648785600000,283.2097999999997\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Simple Moving Average (SMA) data for each period."
+ }
+ },
+ "summary": "Simple Moving Average (SMA)",
+ "tags": [
+ "options:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Options data",
+ "name": "options"
+ }
+ },
+ "x-polygon-ignore": true
+ },
+ "/v1/indicators/sma/{stockTicker}": {
+ "get": {
+ "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.",
+ "operationId": "SMA",
+ "parameters": [
+ {
+ "description": "The ticker symbol for which to get simple moving average (SMA) data.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "stockTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-go-id": "Ticker"
+ },
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "The size of the aggregate time window.",
+ "example": "day",
+ "in": "query",
+ "name": "timespan",
+ "schema": {
+ "default": "day",
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the aggregates used to calculate the simple moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "default": true,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
+ "example": 50,
+ "in": "query",
+ "name": "window",
+ "schema": {
+ "default": 50,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The price in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close prices to \ncalculate the simple moving average (SMA).",
+ "example": "close",
+ "in": "query",
+ "name": "series_type",
+ "schema": {
+ "default": "close",
+ "enum": [
+ "open",
+ "high",
+ "low",
+ "close"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
+ "in": "query",
+ "name": "expand_underlying",
+ "schema": {
+ "default": false,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The order in which to return the results, ordered by timestamp.",
+ "example": "desc",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 5000",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "maximum": 5000,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v1/indicators/sma/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": {
+ "underlying": {
+ "aggregates": [
+ {
+ "c": 75.0875,
+ "h": 75.15,
+ "l": 73.7975,
+ "n": 1,
+ "o": 74.06,
+ "t": 1577941200000,
+ "v": 135647456,
+ "vw": 74.6099
+ },
+ {
+ "c": 74.3575,
+ "h": 75.145,
+ "l": 74.125,
+ "n": 1,
+ "o": 74.2875,
+ "t": 1578027600000,
+ "v": 146535512,
+ "vw": 74.7026
+ }
+ ],
+ "url": "https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25"
+ },
+ "values": [
+ {
+ "timestamp": 1517562000016,
+ "value": 140.139
+ }
+ ]
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "underlying": {
+ "properties": {
+ "aggregates": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "format": "float",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "float",
+ "type": "number"
+ }
+ },
+ "required": [
+ "v",
+ "vw",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t",
+ "n"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "Aggregate",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "url": {
+ "description": "The URL which can be used to request the underlying aggregates used in this request.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "values": {
+ "items": {
+ "properties": {
+ "timestamp": {
+ "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMicroseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "value": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-polygon-go-type": {
+ "name": "*float64"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "SMAResults"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nAAPL,1.27849501E+08,142.9012,0,146.1,142.48,146.72,140.68,1664424000000,1061692,,0,,0,0,0,0,0,false,1664424000000,164.19240000000005\nAAPL,1.46755122E+08,147.599,0,147.64,149.84,150.6414,144.84,1664337600000,1140818,,0,,0,0,0,0,0,false,1664337600000,164.40360000000007\nAAPL,8.4461761E+07,152.1354,0,152.74,151.76,154.72,149.945,1664251200000,683781,,0,,0,0,0,0,0,false,1664251200000,164.42680000000007\nAAPL,9.3339409E+07,151.5222,0,149.66,150.77,153.7701,149.64,1664164800000,747666,,0,,0,0,0,0,0,false,1664164800000,164.33300000000006\nAAPL,9.3308449E+07,156.1877,0,157.34,153.72,158.61,153.6,1663732800000,712645,,0,,0,0,0,0,0,false,1663732800000,164.13680000000005\nAAPL,9.6031641E+07,150.0222,0,151.19,150.43,151.47,148.56,1663905600000,766888,,0,,0,0,0,0,0,false,1663905600000,164.32100000000005\nAAPL,8.6651514E+07,152.5709,0,152.38,152.74,154.47,150.91,1663819200000,686866,,0,,0,0,0,0,0,false,1663819200000,164.28180000000003\nAAPL,1.07691097E+08,156.1317,0,153.4,156.9,158.08,153.08,1663646400000,792177,,0,,0,0,0,0,0,false,1663646400000,163.97960000000006\nAAPL,8.1599225E+07,152.5505,0,149.31,154.48,154.56,149.1,1663560000000,671961,,0,,0,0,0,0,0,false,1663560000000,163.73900000000006\nAAPL,1.64879031E+08,150.2387,0,151.21,150.7,151.35,148.37,1663300800000,850358,,0,,0,0,0,0,0,false,1663300800000,163.59020000000007\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Simple Moving Average (SMA) data for each period."
+ }
+ },
+ "summary": "Simple Moving Average (SMA)",
+ "tags": [
+ "stocks:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
+ }
+ }
+ },
+ "/v1/last/crypto/{from}/{to}": {
+ "get": {
+ "description": "Get the last trade tick for a cryptocurrency pair.",
+ "operationId": "LastTradeCrypto",
+ "parameters": [
+ {
+ "description": "The \"from\" symbol of the pair.",
+ "example": "BTC",
+ "in": "path",
+ "name": "from",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The \"to\" symbol of the pair.",
+ "example": "USD",
+ "in": "path",
+ "name": "to",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "last": {
+ "conditions": [
+ 1
+ ],
+ "exchange": 4,
+ "price": 16835.42,
+ "size": 0.006909,
+ "timestamp": 1605560885027
+ },
+ "request_id": "d2d779df015fe2b7fbb8e58366610ef7",
+ "status": "success",
+ "symbol": "BTC-USD"
+ },
+ "schema": {
+ "properties": {
+ "last": {
+ "properties": {
+ "conditions": {
+ "description": "A list of condition codes.",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": "array",
+ "x-polygon-go-type": {
+ "name": "Int32Array"
+ }
+ },
+ "exchange": {
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.",
+ "type": "integer"
+ },
+ "price": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
+ "format": "double",
+ "type": "number"
+ },
+ "size": {
+ "description": "The size of a trade (also known as volume).",
+ "format": "double",
+ "type": "number"
+ },
+ "timestamp": {
+ "description": "The Unix millisecond timestamp.",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMilliseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ }
+ },
+ "required": [
+ "exchange",
+ "price",
+ "size",
+ "timestamp"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "LastTradeCrypto"
+ }
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ "symbol": {
+ "description": "The symbol pair that was evaluated from the request.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id",
+ "symbol"
+ ],
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "conditions,exchange,price,size,timestamp\n1,4,16835.42,0.006909,1605560885027\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "The last tick for this currency pair."
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Last Trade for a Crypto Pair",
+ "tags": [
+ "crypto:last:trade"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Trade data",
+ "name": "trades"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
+ }
+ }
+ },
+ "/v1/last_quote/currencies/{from}/{to}": {
+ "get": {
+ "description": "Get the last quote tick for a forex currency pair.",
+ "operationId": "LastQuoteCurrencies",
+ "parameters": [
+ {
+ "description": "The \"from\" symbol of the pair.",
+ "example": "AUD",
+ "in": "path",
+ "name": "from",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The \"to\" symbol of the pair.",
+ "example": "USD",
+ "in": "path",
+ "name": "to",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "last": {
+ "ask": 0.73124,
+ "bid": 0.73122,
+ "exchange": 48,
+ "timestamp": 1605557756000
+ },
+ "request_id": "a73a29dbcab4613eeaf48583d3baacf0",
+ "status": "success",
+ "symbol": "AUD/USD"
+ },
+ "schema": {
+ "properties": {
+ "last": {
+ "properties": {
+ "ask": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "bid": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "exchange": {
+ "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "timestamp": {
+ "description": "The Unix millisecond timestamp.",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMilliseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ }
+ },
+ "required": [
+ "ask",
+ "bid",
+ "exchange",
+ "timestamp"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "LastQuoteCurrencies"
+ }
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ "symbol": {
+ "description": "The symbol pair that was evaluated from the request.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id",
+ "symbol"
+ ],
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "ask,bid,exchange,timestamp\n0.73124,0.73122,48,1605557756000\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "The last quote tick for this currency pair."
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Last Quote for a Currency Pair",
+ "tags": [
+ "fx:last:quote"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "NBBO data",
+ "name": "nbbo"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Forex data",
+ "name": "fx"
+ }
+ }
+ },
+ "/v1/marketstatus/now": {
+ "get": {
+ "description": "Get the current trading status of the exchanges and overall financial markets.\n",
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "afterHours": true,
+ "currencies": {
+ "crypto": "open",
+ "fx": "open"
+ },
+ "earlyHours": false,
+ "exchanges": {
+ "nasdaq": "extended-hours",
+ "nyse": "extended-hours",
+ "otc": "closed"
+ },
+ "market": "extended-hours",
+ "serverTime": "2020-11-10T22:37:37.000Z"
+ },
+ "schema": {
+ "properties": {
+ "afterHours": {
+ "description": "Whether or not the market is in post-market hours.",
+ "type": "boolean"
+ },
+ "currencies": {
+ "properties": {
+ "crypto": {
+ "description": "The status of the crypto market.",
+ "type": "string"
+ },
+ "fx": {
+ "description": "The status of the forex market.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "earlyHours": {
+ "description": "Whether or not the market is in pre-market hours.",
+ "type": "boolean"
+ },
+ "exchanges": {
+ "properties": {
+ "nasdaq": {
+ "description": "The status of the Nasdaq market.",
+ "type": "string"
+ },
+ "nyse": {
+ "description": "The status of the NYSE market.",
+ "type": "string"
+ },
+ "otc": {
+ "description": "The status of the OTC market.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "market": {
+ "description": "The status of the market as a whole.",
+ "type": "string"
+ },
+ "serverTime": {
+ "description": "The current time of the server.",
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "Status of the market and each exchange"
+ },
+ "401": {
+ "description": "Unauthorized - Check our API Key and account status"
+ },
+ "404": {
+ "description": "The specified resource was not found"
+ },
+ "409": {
+ "description": "Parameter is invalid or incorrect."
+ }
+ },
+ "summary": "Market Status",
+ "tags": [
+ "reference:stocks:market"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ }
+ }
+ },
+ "/v1/marketstatus/upcoming": {
+ "get": {
+ "description": "Get upcoming market holidays and their open/close times.\n",
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": [
+ {
+ "date": "2020-11-26T00:00:00.000Z",
+ "exchange": "NYSE",
+ "name": "Thanksgiving",
+ "status": "closed"
+ },
+ {
+ "date": "2020-11-26T00:00:00.000Z",
+ "exchange": "NASDAQ",
+ "name": "Thanksgiving",
+ "status": "closed"
+ },
+ {
+ "date": "2020-11-26T00:00:00.000Z",
+ "exchange": "OTC",
+ "name": "Thanksgiving",
+ "status": "closed"
+ },
+ {
+ "close": "2020-11-27T18:00:00.000Z",
+ "date": "2020-11-27T00:00:00.000Z",
+ "exchange": "NASDAQ",
+ "name": "Thanksgiving",
+ "open": "2020-11-27T14:30:00.000Z",
+ "status": "early-close"
+ },
+ {
+ "close": "2020-11-27T18:00:00.000Z",
+ "date": "2020-11-27T00:00:00.000Z",
+ "exchange": "NYSE",
+ "name": "Thanksgiving",
+ "open": "2020-11-27T14:30:00.000Z",
+ "status": "early-close"
+ }
+ ],
+ "schema": {
+ "items": {
+ "properties": {
+ "close": {
+ "description": "The market close time on the holiday (if it's not closed).",
+ "format": "date-time",
+ "type": "string"
+ },
+ "date": {
+ "description": "The date of the holiday.",
+ "format": "date",
+ "type": "string"
+ },
+ "exchange": {
+ "description": "Which market the record is for.",
+ "type": "string"
+ },
+ "name": {
+ "description": "The name of the holiday.",
+ "type": "string"
+ },
+ "open": {
+ "description": "The market open time on the holiday (if it's not closed).",
+ "format": "date-time",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of the market on the holiday.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ }
+ },
+ "description": "Holidays for each market in the near future."
+ },
+ "401": {
+ "description": "Unauthorized - Check our API Key and account status"
+ },
+ "404": {
+ "description": "The specified resource was not found"
+ },
+ "409": {
+ "description": "Parameter is invalid or incorrect."
+ }
+ },
+ "summary": "Market Holidays",
+ "tags": [
+ "reference:stocks:market"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ }
+ }
+ },
+ "/v1/open-close/crypto/{from}/{to}/{date}": {
+ "get": {
+ "description": "Get the open, close prices of a cryptocurrency symbol on a certain day.\n",
+ "parameters": [
+ {
+ "description": "The \"from\" symbol of the pair.",
+ "example": "BTC",
+ "in": "path",
+ "name": "from",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The \"to\" symbol of the pair.",
+ "example": "USD",
+ "in": "path",
+ "name": "to",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The date of the requested open/close in the format YYYY-MM-DD.",
+ "example": "2023-01-09",
+ "in": "path",
+ "name": "date",
+ "required": true,
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "close": 11050.64,
+ "closingTrades": [
+ {
+ "c": [
+ 2
+ ],
+ "i": "973323250",
+ "p": 11050.64,
+ "s": 0.006128,
+ "t": 1602287999795,
+ "x": 4
+ },
+ {
+ "c": [
+ 1
+ ],
+ "i": "105717893",
+ "p": 11049.4,
+ "s": 0.014,
+ "t": 1602287999659,
+ "x": 17
+ }
+ ],
+ "day": "2020-10-09T00:00:00.000Z",
+ "isUTC": true,
+ "open": 10932.44,
+ "openTrades": [
+ {
+ "c": [
+ 2
+ ],
+ "i": "511235746",
+ "p": 10932.44,
+ "s": 0.002,
+ "t": 1602201600056,
+ "x": 1
+ },
+ {
+ "c": [
+ 2
+ ],
+ "i": "511235751",
+ "p": 10923.76,
+ "s": 0.02,
+ "t": 1602201600141,
+ "x": 4
+ }
+ ],
+ "symbol": "BTC-USD"
+ },
+ "schema": {
+ "properties": {
+ "close": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "closingTrades": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size of a trade (also known as volume).\n",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "p",
+ "s",
+ "x",
+ "c",
+ "t",
+ "i"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "day": {
+ "description": "The date requested.",
+ "format": "date",
+ "type": "string"
+ },
+ "isUTC": {
+ "description": "Whether or not the timestamps are in UTC timezone.",
+ "type": "boolean"
+ },
+ "open": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "openTrades": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size of a trade (also known as volume).\n",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "p",
+ "s",
+ "x",
+ "c",
+ "t",
+ "i"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "symbol": {
+ "description": "The symbol pair that was evaluated from the request.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "symbol",
+ "isUTC",
+ "day",
+ "open",
+ "close",
+ "openTrades",
+ "closingTrades"
+ ],
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "isUTC,day,open,close,openTrades,closingTrades\ntrue,2020-10-09,10932.44,11050.64,\"[{\\\"s\\\":0.002,\\\"p\\\":10932.44,\\\"x\\\":1,\\\"t\\\":1602201600056,\\\"c\\\":[2],\\\"i\\\":\\\"511235746\\\"},{\\\"s\\\":0.02,\\\"p\\\":10923.76,\\\"x\\\":4,\\\"t\\\":1602201600141,\\\"c\\\":[2],\\\"i\\\":\\\"511235751\\\"}]\",\"[{\\\"s\\\":0.006128,\\\"p\\\":11050.64,\\\"x\\\":4,\\\"t\\\":1602287999795,\\\"c\\\":[2],\\\"i\\\":\\\"973323250\\\"},{\\\"s\\\":0.014,\\\"p\\\":11049.4,\\\"x\\\":17,\\\"t\\\":1602287999659,\\\"c\\\":[1],\\\"i\\\":\\\"105717893\\\"}]\"\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "The open/close of this symbol."
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Daily Open/Close",
+ "tags": [
+ "crypto:open-close"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
+ }
+ }
+ },
+ "/v1/open-close/{indicesTicker}/{date}": {
+ "get": {
+ "description": "Get the open, close and afterhours values of a index symbol on a certain date.\n",
+ "parameters": [
+ {
+ "description": "The ticker symbol of Index.",
+ "example": "I:DJI",
+ "in": "path",
+ "name": "indicesTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The date of the requested open/close in the format YYYY-MM-DD.",
+ "example": "2023-03-10",
+ "in": "path",
+ "name": "date",
+ "required": true,
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "afterHours": 31909.64,
+ "close": 32245.14,
+ "from": "2023-03-10",
+ "high": 32988.26,
+ "low": 32200.66,
+ "open": 32922.75,
+ "preMarket": 32338.23,
+ "status": "OK",
+ "symbol": "I:DJI"
+ },
+ "schema": {
+ "properties": {
+ "afterHours": {
+ "description": "The close value of the ticker symbol in after hours trading.",
+ "format": "double",
+ "type": "number"
+ },
+ "close": {
+ "description": "The close value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "from": {
+ "description": "The requested date.",
+ "format": "date",
+ "type": "string"
+ },
+ "high": {
+ "description": "The highest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "low": {
+ "description": "The lowest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "open": {
+ "description": "The open value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "preMarket": {
+ "description": "The open value of the ticker symbol in pre-market trading.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ "symbol": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "from",
+ "symbol",
+ "open",
+ "high",
+ "low",
+ "close"
+ ],
+ "type": "object"
+ }
+ }
+ },
+ "description": "The open/close of this stock symbol."
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Daily Open/Close",
+ "tags": [
+ "stocks:open-close"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Indices data",
+ "name": "indices"
+ }
+ }
+ },
+ "/v1/open-close/{optionsTicker}/{date}": {
+ "get": {
+ "description": "Get the open, close and afterhours prices of an options contract on a certain date.\n",
+ "parameters": [
+ {
+ "description": "The ticker symbol of the options contract.",
+ "example": "O:SPY251219C00650000",
+ "in": "path",
+ "name": "optionsTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The date of the requested open/close in the format YYYY-MM-DD.",
+ "example": "2023-01-09",
+ "in": "path",
+ "name": "date",
+ "required": true,
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "afterHours": 26.35,
+ "close": 26.35,
+ "from": "2023-01-09",
+ "high": 26.35,
+ "low": 25,
+ "open": 25,
+ "preMarket": 25,
+ "status": "OK",
+ "symbol": "O:TSLA210903C00700000",
+ "volume": 2
+ },
+ "schema": {
+ "properties": {
+ "afterHours": {
+ "description": "The close price of the ticker symbol in after hours trading.",
+ "format": "double",
+ "type": "number"
+ },
+ "close": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "from": {
+ "description": "The requested date.",
+ "format": "date",
+ "type": "string"
+ },
+ "high": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "low": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "open": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "preMarket": {
+ "description": "The open price of the ticker symbol in pre-market trading.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ "symbol": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "volume": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "status",
+ "from",
+ "symbol",
+ "open",
+ "high",
+ "low",
+ "close",
+ "volume"
+ ],
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "from,open,high,low,close,volume,afterHours,preMarket\n2023-01-09,25,26.35,25,26.35,2,26.35,25\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "The open/close of this stock symbol."
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Daily Open/Close",
+ "tags": [
+ "options:open-close"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Options data",
+ "name": "options"
+ }
+ }
+ },
+ "/v1/open-close/{stocksTicker}/{date}": {
+ "get": {
+ "description": "Get the open, close and afterhours prices of a stock symbol on a certain date.\n",
+ "parameters": [
+ {
+ "description": "The ticker symbol of the stock/equity.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "stocksTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The date of the requested open/close in the format YYYY-MM-DD.",
+ "example": "2023-01-09",
+ "in": "path",
+ "name": "date",
+ "required": true,
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "afterHours": 322.1,
+ "close": 325.12,
+ "from": "2023-01-09",
+ "high": 326.2,
+ "low": 322.3,
+ "open": 324.66,
+ "preMarket": 324.5,
+ "status": "OK",
+ "symbol": "AAPL",
+ "volume": 26122646
+ },
+ "schema": {
+ "properties": {
+ "afterHours": {
+ "description": "The close price of the ticker symbol in after hours trading.",
+ "format": "double",
+ "type": "number"
+ },
+ "close": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "from": {
+ "description": "The requested date.",
+ "format": "date",
+ "type": "string"
+ },
+ "high": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "low": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "open": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "preMarket": {
+ "description": "The open price of the ticker symbol in pre-market trading.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ "symbol": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "volume": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "status",
+ "from",
+ "symbol",
+ "open",
+ "high",
+ "low",
+ "close",
+ "volume"
+ ],
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "from,open,high,low,close,volume,afterHours,preMarket\n2023-01-09,324.66,326.2,322.3,325.12,26122646,322.1,324.5\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "The open/close of this stock symbol."
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Daily Open/Close",
+ "tags": [
+ "stocks:open-close"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
+ }
+ }
+ },
+ "/v1/reference/sec/filings": {
+ "get": {
+ "description": "List filings",
+ "operationId": "ListFilings",
+ "parameters": [
+ {
+ "description": "Query by filing type.",
+ "in": "query",
+ "name": "type",
+ "schema": {
+ "description": "Filing Type",
+ "enum": [
+ "10-K",
+ "10-Q"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Query by filing date.",
+ "in": "query",
+ "name": "filing_date",
+ "schema": {
+ "description": "The date when the filing was filed in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "Query by period of report.",
+ "in": "query",
+ "name": "period_of_report_date",
+ "schema": {
+ "description": "The period of report for the filing in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "If true, query only for filings with an XBRL instance file.\nIf false, query for filings without an XBRL instance file.\nIf this parameter is not provided, query for filings with or without XBRL instance files.",
+ "in": "query",
+ "name": "has_xbrl",
+ "schema": {
+ "nullable": true,
+ "type": "boolean"
+ },
+ "x-polygon-go-id": "HasXBRL"
+ },
+ {
+ "description": "Query by entity company name.",
+ "in": "query",
+ "name": "entities.company_data.name",
+ "schema": {
+ "example": "Facebook Inc",
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "search": true
+ }
+ },
+ {
+ "description": "Query by entity company CIK.",
+ "in": "query",
+ "name": "entities.company_data.cik",
+ "schema": {
+ "description": "Central Index Key (CIK) Number",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Query by entity company ticker.",
+ "in": "query",
+ "name": "entities.company_data.ticker",
+ "schema": {
+ "description": "Ticker",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Query by entity company SIC.",
+ "in": "query",
+ "name": "entities.company_data.sic",
+ "schema": {
+ "description": "Standard Industrial Classification (SIC)",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by filing_date.",
+ "in": "query",
+ "name": "filing_date.gte",
+ "schema": {
+ "description": "The date when the filing was filed in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by filing_date.",
+ "in": "query",
+ "name": "filing_date.gt",
+ "schema": {
+ "description": "The date when the filing was filed in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by filing_date.",
+ "in": "query",
+ "name": "filing_date.lte",
+ "schema": {
+ "description": "The date when the filing was filed in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by filing_date.",
+ "in": "query",
+ "name": "filing_date.lt",
+ "schema": {
+ "description": "The date when the filing was filed in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by period_of_report_date.",
+ "in": "query",
+ "name": "period_of_report_date.gte",
+ "schema": {
+ "description": "The period of report for the filing in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by period_of_report_date.",
+ "in": "query",
+ "name": "period_of_report_date.gt",
+ "schema": {
+ "description": "The period of report for the filing in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by period_of_report_date.",
+ "in": "query",
+ "name": "period_of_report_date.lte",
+ "schema": {
+ "description": "The period of report for the filing in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by period_of_report_date.",
+ "in": "query",
+ "name": "period_of_report_date.lt",
+ "schema": {
+ "description": "The period of report for the filing in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by entities.company_data.name.",
+ "in": "query",
+ "name": "entities.company_data.name.search",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 1000.",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "example": 10,
+ "maximum": 1000,
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "filing_date",
+ "enum": [
+ "filing_date",
+ "period_of_report_date"
+ ],
+ "example": "filing_date",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "description": "FIXME",
+ "example": {
+
+ },
+ "schema": {
+ "properties": {
+ "count": {
+ "type": "integer"
+ },
+ "next_url": {
+ "type": "string"
+ },
+ "request_id": {
+ "type": "string"
+ },
+ "results": {
+ "items": {
+ "properties": {
+ "acceptance_datetime": {
+ "description": "The datetime when the filing was accepted by EDGAR in EST (format: YYYYMMDDHHMMSS)",
+ "type": "string"
+ },
+ "accession_number": {
+ "description": "Filing Accession Number",
+ "type": "string"
+ },
+ "entities": {
+ "description": "Entities related to the filing (e.g. the document filers).",
+ "items": {
+ "description": "A filing entity (e.g. the document filer).",
+ "properties": {
+ "company_data": {
+ "properties": {
+ "cik": {
+ "description": "Central Index Key (CIK) Number",
+ "type": "string"
+ },
+ "name": {
+ "example": "Facebook Inc",
+ "type": "string"
+ },
+ "sic": {
+ "description": "Standard Industrial Classification (SIC)",
+ "type": "string"
+ },
+ "ticker": {
+ "description": "Ticker",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "cik",
+ "sic"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "SECCompanyData",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "relation": {
+ "description": "Relationship of this entity to the filing.",
+ "enum": [
+ "filer"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "relation"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "SECFilingEntity",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "files_count": {
+ "description": "The number of files associated with the filing.",
+ "format": "int64",
+ "type": "integer"
+ },
+ "filing_date": {
+ "description": "The date when the filing was filed in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ },
+ "id": {
+ "description": "Unique identifier for the filing.",
+ "type": "string"
+ },
+ "period_of_report_date": {
+ "description": "The period of report for the filing in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ },
+ "source_url": {
+ "description": "The source URL is a link back to the upstream source for this filing\ndocument.",
+ "example": "https://www.sec.gov/Archives/edgar/data/0001326801/000132680119000037/0001326801-19-000037-index.html",
+ "format": "uri",
+ "type": "string"
+ },
+ "type": {
+ "description": "Filing Type",
+ "enum": [
+ "10-K",
+ "10-Q"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "accession_number",
+ "type",
+ "filing_date",
+ "period_of_report_date",
+ "files_count",
+ "source_url",
+ "download_url",
+ "entities",
+ "acceptance_datetime"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "SECFiling",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "status": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id",
+ "count",
+ "results"
+ ],
+ "type": "object"
+ }
+ }
+ },
+ "description": "FIXME"
+ }
+ },
+ "summary": "SEC Filings",
+ "tags": [
+ "reference:sec:filings"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ },
+ "x-polygon-paginate": {
+ "sort": {
+ "default": "filing_date",
+ "enum": [
+ "filing_date",
+ "period_of_report_date"
+ ]
+ }
+ }
+ },
+ "x-polygon-draft": true
+ },
+ "/v1/reference/sec/filings/{filing_id}": {
+ "get": {
+ "description": "Get filing",
+ "operationId": "GetFiling",
+ "parameters": [
+ {
+ "description": "Select by filing id.",
+ "in": "path",
+ "name": "filing_id",
+ "schema": {
+ "description": "Unique identifier for the filing.",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "description": "FIXME",
+ "example": {
+
+ },
+ "schema": {
+ "properties": {
+ "acceptance_datetime": {
+ "description": "The datetime when the filing was accepted by EDGAR in EST (format: YYYYMMDDHHMMSS)",
+ "type": "string"
+ },
+ "accession_number": {
+ "description": "Filing Accession Number",
+ "type": "string"
+ },
+ "entities": {
+ "description": "Entities related to the filing (e.g. the document filers).",
+ "items": {
+ "description": "A filing entity (e.g. the document filer).",
+ "properties": {
+ "company_data": {
+ "properties": {
+ "cik": {
+ "description": "Central Index Key (CIK) Number",
+ "type": "string"
+ },
+ "name": {
+ "example": "Facebook Inc",
+ "type": "string"
+ },
+ "sic": {
+ "description": "Standard Industrial Classification (SIC)",
+ "type": "string"
+ },
+ "ticker": {
+ "description": "Ticker",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "cik",
+ "sic"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "SECCompanyData",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "relation": {
+ "description": "Relationship of this entity to the filing.",
+ "enum": [
+ "filer"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "relation"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "SECFilingEntity",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "files_count": {
+ "description": "The number of files associated with the filing.",
+ "format": "int64",
+ "type": "integer"
+ },
+ "filing_date": {
+ "description": "The date when the filing was filed in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ },
+ "id": {
+ "description": "Unique identifier for the filing.",
+ "type": "string"
+ },
+ "period_of_report_date": {
+ "description": "The period of report for the filing in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ },
+ "source_url": {
+ "description": "The source URL is a link back to the upstream source for this filing\ndocument.",
+ "example": "https://www.sec.gov/Archives/edgar/data/0001326801/000132680119000037/0001326801-19-000037-index.html",
+ "format": "uri",
+ "type": "string"
+ },
+ "type": {
+ "description": "Filing Type",
+ "enum": [
+ "10-K",
+ "10-Q"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "accession_number",
+ "type",
+ "filing_date",
+ "period_of_report_date",
+ "files_count",
+ "source_url",
+ "download_url",
+ "entities",
+ "acceptance_datetime"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "SECFiling",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ }
+ }
+ },
+ "description": "FIXME"
+ }
+ },
+ "summary": "SEC Filing",
+ "tags": [
+ "reference:sec:filing"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ }
+ },
+ "x-polygon-draft": true
+ },
+ "/v1/reference/sec/filings/{filing_id}/files": {
+ "get": {
+ "description": "List filing files",
+ "operationId": "ListFilingFiles",
+ "parameters": [
+ {
+ "description": "Select by filing id.",
+ "in": "path",
+ "name": "filing_id",
+ "schema": {
+ "description": "Unique identifier for the filing.",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Query by file sequence number.",
+ "in": "query",
+ "name": "sequence",
+ "schema": {
+ "description": "File Sequence Number",
+ "format": "int64",
+ "max": 999,
+ "min": 1,
+ "type": "integer"
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "Query by file name.",
+ "in": "query",
+ "name": "filename",
+ "schema": {
+ "description": "The name for the file.",
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "Search by sequence.",
+ "in": "query",
+ "name": "sequence.gte",
+ "schema": {
+ "description": "File Sequence Number",
+ "format": "int64",
+ "max": 999,
+ "min": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Search by sequence.",
+ "in": "query",
+ "name": "sequence.gt",
+ "schema": {
+ "description": "File Sequence Number",
+ "format": "int64",
+ "max": 999,
+ "min": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Search by sequence.",
+ "in": "query",
+ "name": "sequence.lte",
+ "schema": {
+ "description": "File Sequence Number",
+ "format": "int64",
+ "max": 999,
+ "min": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Search by sequence.",
+ "in": "query",
+ "name": "sequence.lt",
+ "schema": {
+ "description": "File Sequence Number",
+ "format": "int64",
+ "max": 999,
+ "min": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Search by filename.",
+ "in": "query",
+ "name": "filename.gte",
+ "schema": {
+ "description": "The name for the file.",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by filename.",
+ "in": "query",
+ "name": "filename.gt",
+ "schema": {
+ "description": "The name for the file.",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by filename.",
+ "in": "query",
+ "name": "filename.lte",
+ "schema": {
+ "description": "The name for the file.",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by filename.",
+ "in": "query",
+ "name": "filename.lt",
+ "schema": {
+ "description": "The name for the file.",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 1000.",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "example": 10,
+ "maximum": 1000,
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "sequence",
+ "enum": [
+ "sequence",
+ "filename"
+ ],
+ "example": "sequence",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "description": "FIXME",
+ "example": {
+
+ },
+ "schema": {
+ "properties": {
+ "count": {
+ "type": "integer"
+ },
+ "next_url": {
+ "type": "string"
+ },
+ "request_id": {
+ "type": "string"
+ },
+ "results": {
+ "items": {
+ "description": "File associated with the filing.\n\nThis provides information to uniquly identify the additional data and a URL\nwhere the file may be downloaded.",
+ "properties": {
+ "description": {
+ "description": "A description for the contents of the file.",
+ "type": "string"
+ },
+ "filename": {
+ "description": "The name for the file.",
+ "type": "string"
+ },
+ "id": {
+ "description": "An identifier unique to the filing for this data entry.",
+ "example": "1",
+ "type": "string"
+ },
+ "sequence": {
+ "description": "File Sequence Number",
+ "format": "int64",
+ "max": 999,
+ "min": 1,
+ "type": "integer"
+ },
+ "size_bytes": {
+ "description": "The size of the file in bytes.",
+ "format": "int64",
+ "type": "integer"
+ },
+ "source_url": {
+ "description": "The source URL is a link back to the upstream source for this file.",
+ "format": "uri",
+ "type": "string"
+ },
+ "type": {
+ "description": "The type of document contained in the file.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "file",
+ "description",
+ "type",
+ "size_bytes",
+ "sequence",
+ "source_url"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "SECFilingFile",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "status": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id",
+ "count",
+ "results"
+ ],
+ "type": "object"
+ }
+ }
+ },
+ "description": "FIXME"
+ }
+ },
+ "summary": "SEC Filing Files",
+ "tags": [
+ "reference:sec:filing:files"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ },
+ "x-polygon-paginate": {
+ "sort": {
+ "default": "sequence",
+ "enum": [
+ "sequence",
+ "filename"
+ ]
+ }
+ }
+ },
+ "x-polygon-draft": true
+ },
+ "/v1/reference/sec/filings/{filing_id}/files/{file_id}": {
+ "get": {
+ "description": "Get filing file",
+ "operationId": "GetFilingFile",
+ "parameters": [
+ {
+ "description": "Select by filing id.",
+ "in": "path",
+ "name": "filing_id",
+ "schema": {
+ "description": "Unique identifier for the filing.",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Select by file id.",
+ "in": "path",
+ "name": "file_id",
+ "schema": {
+ "description": "An identifier unique to the filing for this data entry.",
+ "example": "1",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "description": "File associated with the filing.\n\nThis provides information to uniquly identify the additional data and a URL\nwhere the file may be downloaded.",
+ "properties": {
+ "description": {
+ "description": "A description for the contents of the file.",
+ "type": "string"
+ },
+ "filename": {
+ "description": "The name for the file.",
+ "type": "string"
+ },
+ "id": {
+ "description": "An identifier unique to the filing for this data entry.",
+ "example": "1",
+ "type": "string"
+ },
+ "sequence": {
+ "description": "File Sequence Number",
+ "format": "int64",
+ "max": 999,
+ "min": 1,
+ "type": "integer"
+ },
+ "size_bytes": {
+ "description": "The size of the file in bytes.",
+ "format": "int64",
+ "type": "integer"
+ },
+ "source_url": {
+ "description": "The source URL is a link back to the upstream source for this file.",
+ "format": "uri",
+ "type": "string"
+ },
+ "type": {
+ "description": "The type of document contained in the file.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "file",
+ "description",
+ "type",
+ "size_bytes",
+ "sequence",
+ "source_url"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "SECFilingFile",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ }
+ }
+ },
+ "description": "The file data."
+ }
+ },
+ "summary": "SEC Filing File",
+ "tags": [
+ "reference:sec:filing:file"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ }
+ },
+ "x-polygon-draft": true
+ },
+ "/v1/summaries": {
+ "get": {
+ "description": "Get everything needed to visualize the tick-by-tick movement of a list of tickers.",
+ "operationId": "SnapshotSummary",
+ "parameters": [
+ {
+ "description": "Comma separated list of tickers. This API currently supports Stocks/Equities, Crypto, Options, and Forex. See the tickers endpoint for more details on supported tickers. If no tickers are passed then no results will be returned.\n\nWarning: The maximum number of characters allowed in a URL are subject to your technology stack.",
+ "example": "NCLH,O:SPY250321C00380000,C:EURUSD,X:BTCUSD",
+ "in": "query",
+ "name": "ticker.any_of",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "request_id": "abc123",
+ "results": [
+ {
+ "branding": {
+ "icon_url": "https://api.polygon.io/icon.png",
+ "logo_url": "https://api.polygon.io/logo.svg"
+ },
+ "last_updated": 1679597116344223500,
+ "market_status": "closed",
+ "name": "Norwegian Cruise Lines",
+ "price": 22.3,
+ "session": {
+ "change": -1.05,
+ "change_percent": -4.67,
+ "close": 21.4,
+ "early_trading_change": -0.39,
+ "early_trading_change_percent": -0.07,
+ "high": 22.49,
+ "late_trading_change": 1.2,
+ "late_trading_change_percent": 3.92,
+ "low": 21.35,
+ "open": 22.49,
+ "previous_close": 22.45,
+ "volume": 37
+ },
+ "ticker": "NCLH",
+ "type": "stock"
+ },
+ {
+ "last_updated": 1679597116344223500,
+ "market_status": "closed",
+ "name": "NCLH $5 Call",
+ "options": {
+ "contract_type": "call",
+ "exercise_style": "american",
+ "expiration_date": "2022-10-14",
+ "shares_per_contract": 100,
+ "strike_price": 5,
+ "underlying_ticker": "NCLH"
+ },
+ "price": 6.6,
+ "session": {
+ "change": -0.05,
+ "change_percent": -1.07,
+ "close": 6.65,
+ "early_trading_change": -0.01,
+ "early_trading_change_percent": -0.03,
+ "high": 7.01,
+ "late_trading_change": -0.4,
+ "late_trading_change_percent": -0.02,
+ "low": 5.42,
+ "open": 6.7,
+ "previous_close": 6.71,
+ "volume": 67
+ },
+ "ticker": "O:NCLH221014C00005000",
+ "type": "options"
+ },
+ {
+ "last_updated": 1679597116344223500,
+ "market_status": "open",
+ "name": "Euro - United States Dollar",
+ "price": 0.97989,
+ "session": {
+ "change": -0.0001,
+ "change_percent": -0.67,
+ "close": 0.97989,
+ "high": 0.98999,
+ "low": 0.96689,
+ "open": 0.97889,
+ "previous_close": 0.98001
+ },
+ "ticker": "C:EURUSD",
+ "type": "fx"
+ },
+ {
+ "branding": {
+ "icon_url": "https://api.polygon.io/icon.png",
+ "logo_url": "https://api.polygon.io/logo.svg"
+ },
+ "last_updated": 1679597116344223500,
+ "market_status": "open",
+ "name": "Bitcoin - United States Dollar",
+ "price": 32154.68,
+ "session": {
+ "change": -201.23,
+ "change_percent": -0.77,
+ "close": 32154.68,
+ "high": 33124.28,
+ "low": 28182.88,
+ "open": 31129.32,
+ "previous_close": 33362.18
+ },
+ "ticker": "X:BTCUSD",
+ "type": "crypto"
+ },
+ {
+ "error": "NOT_FOUND",
+ "message": "Ticker not found.",
+ "ticker": "APx"
+ }
+ ],
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "request_id": {
+ "type": "string"
+ },
+ "results": {
+ "items": {
+ "properties": {
+ "branding": {
+ "properties": {
+ "icon_url": {
+ "description": "A link to this ticker's company's icon. Icon's are generally smaller, square images that represent the company at a glance.\nNote that you must provide an API key when accessing this URL. See the \"Authentication\" section at the top of this page for more details.",
+ "type": "string"
+ },
+ "logo_url": {
+ "description": "A link to this ticker's company's logo.\nNote that you must provide an API key when accessing this URL. See the \"Authentication\" section at the top of this page for more details.",
+ "type": "string"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "Branding"
+ }
+ },
+ "error": {
+ "description": "The error while looking for this ticker.",
+ "type": "string"
+ },
+ "last_updated": {
+ "description": "The nanosecond timestamp of when this information was updated.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "market_status": {
+ "description": "The market status for the market that trades this ticker.",
+ "type": "string"
+ },
+ "message": {
+ "description": "The error message while looking for this ticker.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of ticker, forex, or crypto asset.",
+ "type": "string"
+ },
+ "options": {
+ "properties": {
+ "contract_type": {
+ "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".",
+ "enum": [
+ "put",
+ "call",
+ "other"
+ ],
+ "type": "string"
+ },
+ "exercise_style": {
+ "description": "The exercise style of this contract. See this link for more details on exercise styles.",
+ "enum": [
+ "american",
+ "european",
+ "bermudan"
+ ],
+ "type": "string"
+ },
+ "expiration_date": {
+ "description": "The contract's expiration date in YYYY-MM-DD format.",
+ "format": "date",
+ "type": "string",
+ "x-polygon-go-type": {
+ "name": "IDaysPolygonDateString",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "shares_per_contract": {
+ "description": "The number of shares per contract for this contract.",
+ "format": "double",
+ "type": "number"
+ },
+ "strike_price": {
+ "description": "The strike price of the option contract.",
+ "format": "double",
+ "type": "number"
+ },
+ "underlying_ticker": {
+ "description": "The ticker for the option contract.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "contract_type",
+ "expiration_date",
+ "exercise_style",
+ "shares_per_contract",
+ "strike_price",
+ "underlying_ticker"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "Options"
+ }
+ },
+ "price": {
+ "description": "The most up to date ticker price.",
+ "format": "double",
+ "type": "number"
+ },
+ "session": {
+ "properties": {
+ "change": {
+ "description": "The value of the price change for the asset from the previous trading day.",
+ "format": "double",
+ "type": "number"
+ },
+ "change_percent": {
+ "description": "The percent of the price change for the asset from the previous trading day.",
+ "format": "double",
+ "type": "number"
+ },
+ "close": {
+ "description": "The closing price of the asset for the day.",
+ "format": "double",
+ "type": "number"
+ },
+ "early_trading_change": {
+ "description": "Today's early trading change amount, difference between price and previous close if in early trading hours, otherwise difference between last price during early trading and previous close.",
+ "format": "double",
+ "type": "number"
+ },
+ "early_trading_change_percent": {
+ "description": "Today's early trading change as a percentage.",
+ "format": "double",
+ "type": "number"
+ },
+ "high": {
+ "description": "The highest price of the asset for the day.",
+ "format": "double",
+ "type": "number"
+ },
+ "late_trading_change": {
+ "description": "Today's late trading change amount, difference between price and today's close if in late trading hours, otherwise difference between last price during late trading and today's close.",
+ "format": "double",
+ "type": "number"
+ },
+ "late_trading_change_percent": {
+ "description": "Today's late trading change as a percentage.",
+ "format": "double",
+ "type": "number"
+ },
+ "low": {
+ "description": "The lowest price of the asset for the day.",
+ "format": "double",
+ "type": "number"
+ },
+ "open": {
+ "description": "The open price of the asset for the day.",
+ "format": "double",
+ "type": "number"
+ },
+ "previous_close": {
+ "description": "The closing price of the asset for the previous trading day.",
+ "format": "double",
+ "type": "number"
+ },
+ "volume": {
+ "description": "The trading volume for the asset for the day.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "change",
+ "change_percent",
+ "close",
+ "high",
+ "low",
+ "open",
+ "previous_close"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "Session"
+ }
+ },
+ "ticker": {
+ "description": "Ticker of asset queried.",
+ "type": "string"
+ },
+ "type": {
+ "description": "The market for this ticker of stock, crypto, fx, option.",
+ "enum": [
+ "stocks",
+ "crypto",
+ "options",
+ "fx"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker",
+ "name",
+ "price",
+ "branding",
+ "market_status",
+ "type",
+ "session",
+ "options",
+ "last_updated"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "SummaryResult"
+ }
+ },
+ "type": "array"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ }
+ },
+ "description": "Snapshot Summary for ticker list"
+ }
+ },
+ "summary": "Summaries",
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
+ }
+ }
+ },
+ "/v2/aggs/grouped/locale/global/market/crypto/{date}": {
+ "get": {
+ "description": "Get the daily open, high, low, and close (OHLC) for the entire cryptocurrency markets.\n",
+ "parameters": [
+ {
+ "description": "The beginning date for the aggregate window.",
+ "example": "2023-01-09",
+ "in": "path",
+ "name": "date",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "adjusted": true,
+ "queryCount": 3,
+ "results": [
+ {
+ "T": "X:ARDRUSD",
+ "c": 0.0550762,
+ "h": 0.0550762,
+ "l": 0.0550762,
+ "n": 18388,
+ "o": 0.0550762,
+ "t": 1580676480000,
+ "v": 2,
+ "vw": 0.0551
+ },
+ {
+ "T": "X:NGCUSD",
+ "c": 0.0272983,
+ "h": 0.0273733,
+ "l": 0.0272983,
+ "n": 18,
+ "o": 0.0273733,
+ "t": 1580674080000,
+ "v": 4734,
+ "vw": 0.0273
+ },
+ {
+ "T": "X:ZSCUSD",
+ "c": 0.00028531,
+ "h": 0.00028531,
+ "l": 0.00028531,
+ "n": 151,
+ "o": 0.00028531,
+ "t": 1580671080000,
+ "v": 390,
+ "vw": 0.0003
+ }
+ ],
+ "resultsCount": 3,
+ "status": "OK"
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "adjusted",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t",
+ "T"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ },
+ "text/csv": {
+ "example": "T,c,h,l,n,o,t,v,vw\nX:ARDRUSD,0.0550762,0.0550762,0.0550762,18388,0.0550762,1580676480000,2,0.0551\nX:NGCUSD,0.0272983,0.0273733,0.0272983,18,0.0273733,1580674080000,4734,0.0273\nX:ZSCUSD,0.00028531,0.00028531,0.00028531,151,0.00028531,1580671080000,390,0.0003\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "The previous day OHLC for the ticker."
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Grouped Daily (Bars)",
+ "tags": [
+ "crypto:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
+ }
+ }
+ },
+ "/v2/aggs/grouped/locale/global/market/fx/{date}": {
+ "get": {
+ "description": "Get the daily open, high, low, and close (OHLC) for the entire forex markets.\n",
+ "parameters": [
+ {
+ "description": "The beginning date for the aggregate window.",
+ "example": "2023-01-09",
+ "in": "path",
+ "name": "date",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "adjusted": true,
+ "queryCount": 3,
+ "results": [
+ {
+ "T": "C:ILSCHF",
+ "c": 0.2704,
+ "h": 0.2706,
+ "l": 0.2693,
+ "n": 689,
+ "o": 0.2698,
+ "t": 1602719999999,
+ "v": 689,
+ "vw": 0.2702
+ },
+ {
+ "T": "C:GBPCAD",
+ "c": 1.71103,
+ "h": 1.71642,
+ "l": 1.69064,
+ "n": 407324,
+ "o": 1.69955,
+ "t": 1602719999999,
+ "v": 407324,
+ "vw": 1.7062
+ },
+ {
+ "T": "C:DKKAUD",
+ "c": 0.2214,
+ "h": 0.2214,
+ "l": 0.2195,
+ "n": 10639,
+ "o": 0.22,
+ "t": 1602719999999,
+ "v": 10639,
+ "vw": 0.2202
+ }
+ ],
+ "resultsCount": 3,
+ "status": "OK"
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "adjusted",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t",
+ "T"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ },
+ "text/csv": {
+ "example": "T,c,h,l,n,o,t,v,vw\nC:ILSCHF,0.2704,0.2706,0.2693,689,0.2698,1602719999999,689,0.2702\nC:GBPCAD,1.71103,1.71642,1.69064,407324,1.69955,1602719999999,407324,1.7062\nC:DKKAUD,0.2214,0.2214,0.2195,10639,0.22,1602719999999,10639,0.2202\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Previous day OHLC for ticker"
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Grouped Daily (Bars)",
+ "tags": [
+ "fx:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Forex data",
+ "name": "fx"
+ }
+ }
+ },
+ "/v2/aggs/grouped/locale/us/market/stocks/{date}": {
+ "get": {
+ "description": "Get the daily open, high, low, and close (OHLC) for the entire stocks/equities markets.\n",
+ "parameters": [
+ {
+ "description": "The beginning date for the aggregate window.",
+ "example": "2023-01-09",
+ "in": "path",
+ "name": "date",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n",
+ "in": "query",
+ "name": "include_otc",
+ "schema": {
+ "type": "boolean"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "adjusted": true,
+ "queryCount": 3,
+ "results": [
+ {
+ "T": "KIMpL",
+ "c": 25.9102,
+ "h": 26.25,
+ "l": 25.91,
+ "n": 74,
+ "o": 26.07,
+ "t": 1602705600000,
+ "v": 4369,
+ "vw": 26.0407
+ },
+ {
+ "T": "TANH",
+ "c": 23.4,
+ "h": 24.763,
+ "l": 22.65,
+ "n": 1096,
+ "o": 24.5,
+ "t": 1602705600000,
+ "v": 25933.6,
+ "vw": 23.493
+ },
+ {
+ "T": "VSAT",
+ "c": 34.24,
+ "h": 35.47,
+ "l": 34.21,
+ "n": 4966,
+ "o": 34.9,
+ "t": 1602705600000,
+ "v": 312583,
+ "vw": 34.4736
+ }
+ ],
+ "resultsCount": 3,
+ "status": "OK"
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "adjusted",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "t",
+ "v",
+ "T"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ },
+ "text/csv": {
+ "example": "T,c,h,l,n,o,t,v,vw\nKIMpL,25.9102,26.25,25.91,74,26.07,1602705600000,4369,26.0407\nTANH,23.4,24.763,22.65,1096,24.5,1602705600000,25933.6,23.493\nVSAT,34.24,35.47,34.21,4966,34.9,1602705600000,312583,34.4736\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Previous day OHLC for ticker"
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Grouped Daily (Bars)",
+ "tags": [
+ "stocks:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
+ }
+ }
+ },
+ "/v2/aggs/ticker/{cryptoTicker}/prev": {
+ "get": {
+ "description": "Get the previous day's open, high, low, and close (OHLC) for the specified cryptocurrency pair.\n",
+ "parameters": [
+ {
+ "description": "The ticker symbol of the currency pair.",
+ "example": "X:BTCUSD",
+ "in": "path",
+ "name": "cryptoTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "adjusted": true,
+ "queryCount": 1,
+ "request_id": "b2170df985474b6d21a6eeccfb6bee67",
+ "results": [
+ {
+ "T": "X:BTCUSD",
+ "c": 16035.9,
+ "h": 16180,
+ "l": 15639.2,
+ "o": 15937.1,
+ "t": 1605416400000,
+ "v": 95045.16897951,
+ "vw": 15954.2111
+ }
+ ],
+ "resultsCount": 1,
+ "status": "OK",
+ "ticker": "X:BTCUSD"
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "adjusted",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t",
+ "T"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ },
+ "text/csv": {
+ "example": "T,c,h,l,o,t,v,vw\nX:BTCUSD,16035.9,16180,15639.2,15937.1,1605416400000,95045.16897951,15954.2111\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "The previous day OHLC for a ticker."
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Previous Close",
+ "tags": [
+ "crypto:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
+ }
+ }
+ },
+ "/v2/aggs/ticker/{cryptoTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
+ "get": {
+ "description": "Get aggregate bars for a cryptocurrency pair over a given date range in custom time window sizes.\n
\n
\nFor example, if timespan = \u2018minute\u2019 and multiplier = \u20185\u2019 then 5-minute bars will be returned.\n",
+ "parameters": [
+ {
+ "description": "The ticker symbol of the currency pair.",
+ "example": "X:BTCUSD",
+ "in": "path",
+ "name": "cryptoTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The size of the timespan multiplier.",
+ "example": 1,
+ "in": "path",
+ "name": "multiplier",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The size of the time window.",
+ "example": "day",
+ "in": "path",
+ "name": "timespan",
+ "required": true,
+ "schema": {
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-01-09",
+ "in": "path",
+ "name": "from",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-01-09",
+ "in": "path",
+ "name": "to",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
+ "example": "asc",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ]
+ }
+ },
+ {
+ "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on\nAggregate Data API Improvements.\n",
+ "example": 120,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "adjusted": true,
+ "queryCount": 2,
+ "request_id": "0cf72b6da685bcd386548ffe2895904a",
+ "results": [
+ {
+ "c": 10094.75,
+ "h": 10429.26,
+ "l": 9490,
+ "n": 1,
+ "o": 9557.9,
+ "t": 1590984000000,
+ "v": 303067.6562332156,
+ "vw": 9874.5529
+ },
+ {
+ "c": 9492.62,
+ "h": 10222.72,
+ "l": 9135.68,
+ "n": 1,
+ "o": 10096.87,
+ "t": 1591070400000,
+ "v": 323339.6922892879,
+ "vw": 9729.5701
+ }
+ ],
+ "resultsCount": 2,
+ "status": "OK",
+ "ticker": "X:BTCUSD"
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "adjusted",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ },
+ "text/csv": {
+ "example": "c,h,l,n,o,t,v,vw\n10094.75,10429.26,9490,1,9557.9,1590984000000,303067.6562332156,9874.5529\n9492.62,10222.72,9135.68,1,10096.87,1591070400000,323339.6922892879,9729.5701\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Cryptocurrency Aggregates."
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Aggregates (Bars)",
+ "tags": [
+ "crypto:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
+ }
+ }
+ },
+ "/v2/aggs/ticker/{forexTicker}/prev": {
+ "get": {
+ "description": "Get the previous day's open, high, low, and close (OHLC) for the specified forex pair.\n",
+ "parameters": [
+ {
+ "description": "The ticker symbol of the currency pair.",
+ "example": "C:EURUSD",
+ "in": "path",
+ "name": "forexTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "adjusted": true,
+ "queryCount": 1,
+ "request_id": "08ec061fb85115678d68452c0a609cb7",
+ "results": [
+ {
+ "T": "C:EURUSD",
+ "c": 1.06206,
+ "h": 1.0631,
+ "l": 1.0505,
+ "n": 180300,
+ "o": 1.05252,
+ "t": 1651708799999,
+ "v": 180300,
+ "vw": 1.055
+ }
+ ],
+ "resultsCount": 1,
+ "status": "OK",
+ "ticker": "C:EURUSD"
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "adjusted",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "T",
+ "v",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ },
+ "text/csv": {
+ "example": "T,c,h,l,n,o,t,v,vw\nC:EURUSD,1.06206,1.0631,1.0505,180300,1.05252,1651708799999,180300,1.055\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "The previous day OHLC for the ticker."
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Previous Close",
+ "tags": [
+ "fx:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Forex data",
+ "name": "fx"
+ }
+ }
+ },
+ "/v2/aggs/ticker/{forexTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
+ "get": {
+ "description": "Get aggregate bars for a forex pair over a given date range in custom time window sizes.\n
\n
\nFor example, if timespan = \u2018minute\u2019 and multiplier = \u20185\u2019 then 5-minute bars will be returned.\n",
+ "parameters": [
+ {
+ "description": "The ticker symbol of the currency pair.",
+ "example": "C:EURUSD",
+ "in": "path",
+ "name": "forexTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The size of the timespan multiplier.",
+ "example": 1,
+ "in": "path",
+ "name": "multiplier",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The size of the time window.",
+ "example": "day",
+ "in": "path",
+ "name": "timespan",
+ "required": true,
+ "schema": {
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-01-09",
+ "in": "path",
+ "name": "from",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-01-09",
+ "in": "path",
+ "name": "to",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
+ "example": "asc",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ]
+ }
+ },
+ {
+ "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on\nAggregate Data API Improvements.\n",
+ "example": 120,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "adjusted": true,
+ "queryCount": 1,
+ "request_id": "79c061995d8b627b736170bc9653f15d",
+ "results": [
+ {
+ "c": 1.17721,
+ "h": 1.18305,
+ "l": 1.1756,
+ "n": 125329,
+ "o": 1.17921,
+ "t": 1626912000000,
+ "v": 125329,
+ "vw": 1.1789
+ }
+ ],
+ "resultsCount": 1,
+ "status": "OK",
+ "ticker": "C:EURUSD"
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "adjusted",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ },
+ "text/csv": {
+ "example": "c,h,l,n,o,t,v,vw\n1.17721,1.18305,1.1756,125329,1.17921,1626912000000,125329,1.1789\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Forex Aggregates."
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Aggregates (Bars)",
+ "tags": [
+ "fx:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Forex data",
+ "name": "fx"
+ }
+ }
+ },
+ "/v2/aggs/ticker/{indicesTicker}/prev": {
+ "get": {
+ "description": "Get the previous day's open, high, low, and close (OHLC) for the specified index.\n",
+ "parameters": [
+ {
+ "description": "The ticker symbol of Index.",
+ "example": "I:DJI",
+ "in": "path",
+ "name": "indicesTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "queryCount": 1,
+ "request_id": "b2170df985474b6d21a6eeccfb6bee67",
+ "results": [
+ {
+ "T": "I:DJI",
+ "c": 33786.62,
+ "h": 33786.62,
+ "l": 33677.74,
+ "o": 33677.74,
+ "t": 1682020800000
+ }
+ ],
+ "resultsCount": 1,
+ "status": "OK",
+ "ticker": "I:DJI"
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "t"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ }
+ },
+ "description": "The previous day OHLC for a index."
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Previous Close",
+ "tags": [
+ "indices:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Indices data",
+ "name": "indices"
+ }
+ }
+ },
+ "/v2/aggs/ticker/{indicesTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
+ "get": {
+ "description": "Get aggregate bars for an index over a given date range in custom time window sizes.\n
\n
\nFor example, if timespan = \u2018minute\u2019 and multiplier = \u20185\u2019 then 5-minute bars will be returned.\n",
+ "parameters": [
+ {
+ "description": "The ticker symbol of Index.",
+ "example": "I:DJI",
+ "in": "path",
+ "name": "indicesTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The size of the timespan multiplier.",
+ "example": 1,
+ "in": "path",
+ "name": "multiplier",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The size of the time window.",
+ "example": "day",
+ "in": "path",
+ "name": "timespan",
+ "required": true,
+ "schema": {
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-03-10",
+ "in": "path",
+ "name": "from",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-03-10",
+ "in": "path",
+ "name": "to",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
+ "example": "asc",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ]
+ }
+ },
+ {
+ "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on\nAggregate Data API Improvements.\n",
+ "example": 120,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "count": 2,
+ "queryCount": 2,
+ "request_id": "0cf72b6da685bcd386548ffe2895904a",
+ "results": [
+ {
+ "c": 32245.14,
+ "h": 32988.26,
+ "l": 32200.66,
+ "o": 32922.75,
+ "t": 1678341600000
+ },
+ {
+ "c": 31787.7,
+ "h": 32422.100000000002,
+ "l": 31786.06,
+ "o": 32198.9,
+ "t": 1678428000000
+ }
+ ],
+ "status": "OK",
+ "ticker": "I:DJI"
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "t"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ }
+ },
+ "description": "Index Aggregates."
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Aggregates (Bars)",
+ "tags": [
+ "indices:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Indices data",
+ "name": "indices"
+ }
+ }
+ },
+ "/v2/aggs/ticker/{optionsTicker}/prev": {
+ "get": {
+ "description": "Get the previous day's open, high, low, and close (OHLC) for the specified option contract.\n",
+ "parameters": [
+ {
+ "description": "The ticker symbol of the options contract.",
+ "example": "O:SPY251219C00650000",
+ "in": "path",
+ "name": "optionsTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "adjusted": true,
+ "queryCount": 1,
+ "request_id": "6a7e466379af0a71039d60cc78e72282",
+ "results": [
+ {
+ "T": "O:TSLA210903C00700000",
+ "c": 115.97,
+ "h": 117.59,
+ "l": 114.13,
+ "n": 2,
+ "o": 115.55,
+ "t": 1605042000000,
+ "v": 131704427,
+ "vw": 116.3058
+ }
+ ],
+ "resultsCount": 1,
+ "status": "OK",
+ "ticker": "O:TSLA210903C00700000"
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "adjusted",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ },
+ "text/csv": {
+ "example": "T,c,h,l,n,o,t,v,vw\nO:TSLA210903C00700000,115.97,117.59,114.13,2,115.55,1605042000000,131704427.0,116.3058\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "The previous day OHLC for the options contract."
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Previous Close",
+ "tags": [
+ "options:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Options data",
+ "name": "options"
+ }
+ }
+ },
+ "/v2/aggs/ticker/{optionsTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
+ "get": {
+ "description": "Get aggregate bars for an option contract over a given date range in custom time window sizes.\n
\n
\nFor example, if timespan = \u2018minute\u2019 and multiplier = \u20185\u2019 then 5-minute bars will be returned.\n",
+ "parameters": [
+ {
+ "description": "The ticker symbol of the options contract.",
+ "example": "O:SPY251219C00650000",
+ "in": "path",
+ "name": "optionsTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The size of the timespan multiplier.",
+ "example": 1,
+ "in": "path",
+ "name": "multiplier",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The size of the time window.",
+ "example": "day",
+ "in": "path",
+ "name": "timespan",
+ "required": true,
+ "schema": {
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-01-09",
+ "in": "path",
+ "name": "from",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-01-09",
+ "in": "path",
+ "name": "to",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
+ "example": "asc",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ]
+ }
+ },
+ {
+ "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on\nAggregate Data API Improvements.\n",
+ "example": 120,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "adjusted": true,
+ "count": 2,
+ "queryCount": 2,
+ "request_id": "5585acde-5085-42d6-95b2-2e388a28370a",
+ "results": [
+ {
+ "c": 26.2,
+ "h": 26.2,
+ "l": 26.2,
+ "n": 1,
+ "o": 26.2,
+ "t": 1632369600000,
+ "v": 2,
+ "vw": 26.2
+ },
+ {
+ "c": 28.3,
+ "h": 28.3,
+ "l": 28.3,
+ "n": 1,
+ "o": 28.3,
+ "t": 1632456000000,
+ "v": 2,
+ "vw": 28.3
+ }
+ ],
+ "resultsCount": 2,
+ "status": "OK",
+ "ticker": "O:RDFN211119C00025000"
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "adjusted",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ },
+ "text/csv": {
+ "example": "c,h,l,n,o,t,v,vw\n26.2,26.2,26.2,1,26.2,1632369600000,2,26.2\n28.3,28.3,28.3,1,28.3,1632456000000,2,28.3\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Options Aggregates."
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Aggregates (Bars)",
+ "tags": [
+ "options:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Options data",
+ "name": "options"
+ }
+ }
+ },
+ "/v2/aggs/ticker/{stocksTicker}/prev": {
+ "get": {
+ "description": "Get the previous day's open, high, low, and close (OHLC) for the specified stock ticker.\n",
+ "parameters": [
+ {
+ "description": "The ticker symbol of the stock/equity.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "stocksTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "adjusted": true,
+ "queryCount": 1,
+ "request_id": "6a7e466379af0a71039d60cc78e72282",
+ "results": [
+ {
+ "T": "AAPL",
+ "c": 115.97,
+ "h": 117.59,
+ "l": 114.13,
+ "o": 115.55,
+ "t": 1605042000000,
+ "v": 131704427,
+ "vw": 116.3058
+ }
+ ],
+ "resultsCount": 1,
+ "status": "OK",
+ "ticker": "AAPL"
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "adjusted",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ },
+ "text/csv": {
+ "example": "T,c,h,l,o,t,v,vw\nAAPL,115.97,117.59,114.13,115.55,1605042000000,131704427.0,116.3058\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "The previous day OHLC for the ticker."
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Previous Close",
+ "tags": [
+ "stocks:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
+ }
+ }
+ },
+ "/v2/aggs/ticker/{stocksTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
+ "get": {
+ "description": "Get aggregate bars for a stock over a given date range in custom time window sizes.\n
\n
\nFor example, if timespan = \u2018minute\u2019 and multiplier = \u20185\u2019 then 5-minute bars will be returned.\n",
+ "parameters": [
+ {
+ "description": "The ticker symbol of the stock/equity.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "stocksTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The size of the timespan multiplier.",
+ "example": 1,
+ "in": "path",
+ "name": "multiplier",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The size of the time window.",
+ "example": "day",
+ "in": "path",
+ "name": "timespan",
+ "required": true,
+ "schema": {
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-01-09",
+ "in": "path",
+ "name": "from",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-01-09",
+ "in": "path",
+ "name": "to",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
+ "example": "asc",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ]
+ }
+ },
+ {
+ "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on\nAggregate Data API Improvements.\n",
+ "example": 120,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "adjusted": true,
+ "next_url": "https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/1578114000000/2020-01-10?cursor=bGltaXQ9MiZzb3J0PWFzYw",
+ "queryCount": 2,
+ "request_id": "6a7e466379af0a71039d60cc78e72282",
+ "results": [
+ {
+ "c": 75.0875,
+ "h": 75.15,
+ "l": 73.7975,
+ "n": 1,
+ "o": 74.06,
+ "t": 1577941200000,
+ "v": 135647456,
+ "vw": 74.6099
+ },
+ {
+ "c": 74.3575,
+ "h": 75.145,
+ "l": 74.125,
+ "n": 1,
+ "o": 74.2875,
+ "t": 1578027600000,
+ "v": 146535512,
+ "vw": 74.7026
+ }
+ ],
+ "resultsCount": 2,
+ "status": "OK",
+ "ticker": "AAPL"
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "adjusted",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ },
+ "text/csv": {
+ "example": "c,h,l,n,o,t,v,vw\n75.0875,75.15,73.7975,1,74.06,1577941200000,135647456.0,74.6099\n74.3575,75.145,74.125,1,74.2875,1578027600000,146535512.0,74.7026\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Stock Aggregates."
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Aggregates (Bars)",
+ "tags": [
+ "stocks:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
+ }
+ }
+ },
+ "/v2/last/nbbo/{stocksTicker}": {
+ "get": {
+ "description": "Get the most recent NBBO (Quote) tick for a given stock.",
+ "operationId": "LastQuote",
+ "parameters": [
+ {
+ "description": "The ticker symbol of the stock/equity.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "stocksTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-go-id": "Ticker"
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "request_id": "b84e24636301f19f88e0dfbf9a45ed5c",
+ "results": {
+ "P": 127.98,
+ "S": 7,
+ "T": "AAPL",
+ "X": 19,
+ "p": 127.96,
+ "q": 83480742,
+ "s": 1,
+ "t": 1617827221349730300,
+ "x": 11,
+ "y": 1617827221349366000,
+ "z": 3
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "P": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "S": {
+ "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.",
+ "type": "integer"
+ },
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "X": {
+ "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "c": {
+ "description": "A list of condition codes.",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": "array",
+ "x-polygon-go-type": {
+ "name": "Int32Array"
+ }
+ },
+ "f": {
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
+ },
+ "i": {
+ "description": "A list of indicator codes.",
+ "items": {
+ "description": "The indicator codes. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).",
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": "array",
+ "x-polygon-go-type": {
+ "name": "Int32Array"
+ }
+ },
+ "p": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "q": {
+ "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).",
+ "format": "int64",
+ "type": "integer"
+ },
+ "s": {
+ "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.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "y": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
+ },
+ "z": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "T",
+ "t",
+ "y",
+ "q"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "LastQuoteResult"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "P,S,T,X,p,q,s,t,x,y,z\n127.98,7,AAPL,19,127.96,83480742,1,1617827221349730300,11,1617827221349366000,3\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "The last NBBO tick for this stock."
+ },
+ "401": {
+ "description": "Unauthorized - Check our API Key and account status"
+ },
+ "404": {
+ "description": "The specified resource was not found"
+ }
+ },
+ "summary": "Last Quote",
+ "tags": [
+ "stocks:last:quote"
+ ],
+ "x-polygon-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
+ },
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
+ }
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "NBBO data",
+ "name": "nbbo"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
+ }
+ }
+ },
+ "/v2/last/trade/{optionsTicker}": {
+ "get": {
+ "description": "Get the most recent trade for a given options contract.",
+ "operationId": "LastTradeOptions",
+ "parameters": [
+ {
+ "description": "The ticker symbol of the options contract.",
+ "example": "O:TSLA210903C00700000",
+ "in": "path",
+ "name": "optionsTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "request_id": "f05562305bd26ced64b98ed68b3c5d96",
+ "results": {
+ "T": "O:TSLA210903C00700000",
+ "c": [
+ 227
+ ],
+ "f": 1617901342969796400,
+ "i": "",
+ "p": 115.55,
+ "q": 1325541950,
+ "r": 202,
+ "s": 25,
+ "t": 1617901342969834000,
+ "x": 312
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "c": {
+ "description": "A list of condition codes.",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": "array",
+ "x-polygon-go-type": {
+ "name": "Int32Array"
+ }
+ },
+ "e": {
+ "description": "The trade correction indicator.",
+ "type": "integer"
+ },
+ "f": {
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
+ "format": "double",
+ "type": "number"
+ },
+ "q": {
+ "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).",
+ "format": "int64",
+ "type": "integer"
+ },
+ "r": {
+ "description": "The ID for the Trade Reporting Facility where the trade took place.",
+ "type": "integer"
+ },
+ "s": {
+ "description": "The size of a trade (also known as volume).",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "y": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
+ },
+ "z": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "T",
+ "t",
+ "y",
+ "q",
+ "i",
+ "p",
+ "x"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "LastTradeResult"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "T,c,f,i,p,q,r,s,t,x\nO:TSLA210903C00700000,227,1617901342969796400,,115.55,1325541950,202,25,1617901342969834000,312\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "The last trade for this options contract."
+ },
+ "401": {
+ "description": "Unauthorized - Check our API Key and account status"
+ },
+ "404": {
+ "description": "The specified resource was not found"
+ }
+ },
+ "summary": "Last Trade",
+ "tags": [
+ "options:last:trade"
+ ],
+ "x-polygon-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
+ },
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
+ }
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Trade data",
+ "name": "trades"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Options data",
+ "name": "options"
+ }
+ },
+ "x-polygon-ignore": true
+ },
+ "/v2/last/trade/{stocksTicker}": {
+ "get": {
+ "description": "Get the most recent trade for a given stock.",
+ "operationId": "LastTrade",
+ "parameters": [
+ {
+ "description": "The ticker symbol of the stock/equity.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "stocksTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-go-id": "Ticker"
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "request_id": "f05562305bd26ced64b98ed68b3c5d96",
+ "results": {
+ "T": "AAPL",
+ "c": [
+ 37
+ ],
+ "f": 1617901342969796400,
+ "i": "118749",
+ "p": 129.8473,
+ "q": 3135876,
+ "r": 202,
+ "s": 25,
+ "t": 1617901342969834000,
+ "x": 4,
+ "y": 1617901342968000000,
+ "z": 3
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "c": {
+ "description": "A list of condition codes.",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": "array",
+ "x-polygon-go-type": {
+ "name": "Int32Array"
+ }
+ },
+ "e": {
+ "description": "The trade correction indicator.",
+ "type": "integer"
+ },
+ "f": {
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
+ "format": "double",
+ "type": "number"
+ },
+ "q": {
+ "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).",
+ "format": "int64",
+ "type": "integer"
+ },
+ "r": {
+ "description": "The ID for the Trade Reporting Facility where the trade took place.",
+ "type": "integer"
+ },
+ "s": {
+ "description": "The size of a trade (also known as volume).",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "y": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
+ },
+ "z": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "T",
+ "t",
+ "y",
+ "q",
+ "i",
+ "p",
+ "x"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "LastTradeResult"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "T,c,f,i,p,q,r,s,t,x,y,z\nAAPL,37,1617901342969796400,118749,129.8473,3135876,202,25,1617901342969834000,4,1617901342968000000,3\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "The last trade for this stock."
+ },
+ "401": {
+ "description": "Unauthorized - Check our API Key and account status"
+ },
+ "404": {
+ "description": "The specified resource was not found"
+ }
+ },
+ "summary": "Last Trade",
+ "tags": [
+ "stocks:last:trade"
+ ],
+ "x-polygon-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
+ },
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
+ }
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Trade data",
+ "name": "trades"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
+ }
+ }
+ },
+ "/v2/reference/news": {
+ "get": {
+ "description": "Get the most recent news articles relating to a stock ticker symbol, including a summary of the article and a link to the original source.",
+ "operationId": "ListNews",
+ "parameters": [
+ {
+ "description": "Return results that contain this ticker.",
+ "in": "query",
+ "name": "ticker",
+ "schema": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "Return results published on, before, or after this date.",
+ "in": "query",
+ "name": "published_utc",
+ "schema": {
+ "oneOf": [
+ {
+ "format": "date-time",
+ "type": "string"
+ },
+ {
+ "format": "date",
+ "type": "string"
+ }
+ ]
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "Search by ticker.",
+ "in": "query",
+ "name": "ticker.gte",
+ "schema": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by ticker.",
+ "in": "query",
+ "name": "ticker.gt",
+ "schema": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by ticker.",
+ "in": "query",
+ "name": "ticker.lte",
+ "schema": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by ticker.",
+ "in": "query",
+ "name": "ticker.lt",
+ "schema": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by published_utc.",
+ "in": "query",
+ "name": "published_utc.gte",
+ "schema": {
+ "oneOf": [
+ {
+ "format": "date-time",
+ "type": "string"
+ },
+ {
+ "format": "date",
+ "type": "string"
+ }
+ ]
+ }
+ },
+ {
+ "description": "Search by published_utc.",
+ "in": "query",
+ "name": "published_utc.gt",
+ "schema": {
+ "oneOf": [
+ {
+ "format": "date-time",
+ "type": "string"
+ },
+ {
+ "format": "date",
+ "type": "string"
+ }
+ ]
+ }
+ },
+ {
+ "description": "Search by published_utc.",
+ "in": "query",
+ "name": "published_utc.lte",
+ "schema": {
+ "oneOf": [
+ {
+ "format": "date-time",
+ "type": "string"
+ },
+ {
+ "format": "date",
+ "type": "string"
+ }
+ ]
+ }
+ },
+ {
+ "description": "Search by published_utc.",
+ "in": "query",
+ "name": "published_utc.lt",
+ "schema": {
+ "oneOf": [
+ {
+ "format": "date-time",
+ "type": "string"
+ },
+ {
+ "format": "date",
+ "type": "string"
+ }
+ ]
+ }
+ },
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 1000.",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "example": 10,
+ "maximum": 1000,
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "published_utc",
+ "enum": [
+ "published_utc"
+ ],
+ "example": "published_utc",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "count": 1,
+ "next_url": "https://api.polygon.io:443/v2/reference/news?cursor=eyJsaW1pdCI6MSwic29ydCI6InB1Ymxpc2hlZF91dGMiLCJvcmRlciI6ImFzY2VuZGluZyIsInRpY2tlciI6e30sInB1Ymxpc2hlZF91dGMiOnsiZ3RlIjoiMjAyMS0wNC0yNiJ9LCJzZWFyY2hfYWZ0ZXIiOlsxNjE5NDA0Mzk3MDAwLG51bGxdfQ",
+ "request_id": "831afdb0b8078549fed053476984947a",
+ "results": [
+ {
+ "amp_url": "https://amp.benzinga.com/amp/content/20784086",
+ "article_url": "https://www.benzinga.com/markets/cryptocurrency/21/04/20784086/cathie-wood-adds-more-coinbase-skillz-trims-square",
+ "author": "Rachit Vats",
+ "description": "
Cathie Wood-led Ark Investment Management on Friday snapped up another 221,167 shares of the cryptocurrency exchange Coinbase Global Inc (NASDAQ COIN) worth about $64.49 million on the stock’s Friday’s dip and also its fourth-straight loss.
\nThe investment firm’s Ark Innovation ETF (NYSE ARKK) bought the shares of the company that closed 0.63% lower at $291.60 on Friday, giving the cryptocurrency exchange a market cap of $58.09 billion. Coinbase’s market cap has dropped from $85.8 billion on its blockbuster listing earlier this month.
\nThe New York-based company also added another 3,873 shares of the mobile gaming company Skillz Inc (NYSE SKLZ), just a day after snapping 1.2 million shares of the stock.
\nARKK bought the shares of the company which closed ...
Full story available on Benzinga.com
", + "id": "nJsSJJdwViHZcw5367rZi7_qkXLfMzacXBfpv-vD9UA", + "image_url": "https://cdn2.benzinga.com/files/imagecache/og_image_social_share_1200x630/images/story/2012/andre-francois-mckenzie-auhr4gcqcce-unsplash.jpg?width=720", + "keywords": [ + "Sector ETFs", + "Penny Stocks", + "Cryptocurrency", + "Small Cap", + "Markets", + "Trading Ideas", + "ETFs" + ], + "published_utc": "2021-04-26T02:33:17Z", + "publisher": { + "favicon_url": "https://s3.polygon.io/public/public/assets/news/favicons/benzinga.ico", + "homepage_url": "https://www.benzinga.com/", + "logo_url": "https://s3.polygon.io/public/public/assets/news/logos/benzinga.svg", + "name": "Benzinga" + }, + "tickers": [ + "DOCU", + "DDD", + "NIU", + "ARKF", + "NVDA", + "SKLZ", + "PCAR", + "MASS", + "PSTI", + "SPFR", + "TREE", + "PHR", + "IRDM", + "BEAM", + "ARKW", + "ARKK", + "ARKG", + "PSTG", + "SQ", + "IONS", + "SYRS" + ], + "title": "Cathie Wood Adds More Coinbase, Skillz, Trims Square" + } + ], + "status": "OK" + }, + "schema": { + "properties": { + "count": { + "description": "The total number of results for this request.", + "type": "integer" + }, + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" + }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "results": { + "items": { + "properties": { + "amp_url": { + "description": "The mobile friendly Accelerated Mobile Page (AMP) URL.", + "type": "string" + }, + "article_url": { + "description": "A link to the news article.", + "type": "string" + }, + "author": { + "description": "The article's author.", + "type": "string" + }, + "description": { + "description": "A description of the article.", + "type": "string" + }, + "id": { + "description": "Unique identifier for the article.", + "type": "string" + }, + "image_url": { + "description": "The article's image URL.", + "type": "string" + }, + "keywords": { + "description": "The keywords associated with the article (which will vary depending on\nthe publishing source).", + "items": { + "type": "string" + }, + "type": "array" + }, + "published_utc": { + "description": "The date the article was published on.", + "format": "date-time", + "type": "string" + }, + "publisher": { + "properties": { + "favicon_url": { + "description": "The publisher's homepage favicon URL.", + "type": "string" + }, + "homepage_url": { + "description": "The publisher's homepage URL.", + "type": "string" + }, + "logo_url": { + "description": "The publisher's logo URL.", + "type": "string" + }, + "name": { + "description": "The publisher's name.", + "type": "string" + } + }, + "required": [ + "name", + "logo_url", + "homepage_url" + ], + "type": "object" + }, + "tickers": { + "description": "The ticker symbols associated with the article.", + "items": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "type": "array" + }, + "title": { + "description": "The title of the news article.", + "type": "string" + } + }, + "required": [ + "id", + "publisher", + "title", + "author", + "published_utc", + "article_url", + "tickers" + ], + "type": "object", + "x-polygon-go-type": { + "name": "NewsArticleMetadata", + "path": "github.com/polygon-io/go-lib-models/v2/globals" + } + }, + "type": "array", + "x-polygon-go-type": { + "name": "ListNewsArticlesResults" + } + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "type": "object" + } + }, + "text/csv": { + "example": "id,publisher_name,publisher_homepage_url,publisher_logo_url,publisher_favicon_url,title,author,published_utc,article_url,tickers,amp_url,image_url,description,keywords\nnJsSJJdwViHZcw5367rZi7_qkXLfMzacXBfpv-vD9UA,Benzinga,https://www.benzinga.com/,https://s3.polygon.io/public/public/assets/news/logos/benzinga.svg,https://s3.polygon.io/public/public/assets/news/favicons/benzinga.ico,\"Cathie Wood Adds More Coinbase, Skillz, Trims Square\",Rachit Vats,2021-04-26T02:33:17Z,https://www.benzinga.com/markets/cryptocurrency/21/04/20784086/cathie-wood-adds-more-coinbase-skillz-trims-square,\"DOCU,DDD,NIU,ARKF,NVDA,SKLZ,PCAR,MASS,PSTI,SPFR,TREE,PHR,IRDM,BEAM,ARKW,ARKK,ARKG,PSTG,SQ,IONS,SYRS\",https://amp.benzinga.com/amp/content/20784086,https://cdn2.benzinga.com/files/imagecache/og_image_social_share_1200x630/images/story/2012/andre-francois-mckenzie-auhr4gcqcce-unsplash.jpg?width=720,\"Cathie Wood-led Ark Investment Management on Friday snapped up another 221,167 shares of the cryptocurrency exchange Coinbase Global Inc (NASDAQ COIN) worth about $64.49 million on the stock’s Friday’s dip and also its fourth-straight loss.
The investment firm’s Ark Innovation ETF (NYSE ARKK) bought the shares of the company that closed 0.63% lower at $291.60 on Friday, giving the cryptocurrency exchange a market cap of $58.09 billion. Coinbase’s market cap has dropped from $85.8 billion on its blockbuster listing earlier this month.
The New York-based company also added another 3,873 shares of the mobile gaming company Skillz Inc (NYSE SKLZ), just a day after snapping 1.2 million shares of the stock.
ARKK bought the shares of the company which closed ...
Full story available on Benzinga.com
\",\"Sector ETFs,Penny Stocks,Cryptocurrency,Small Cap,Markets,Trading Ideas,ETFs\"\n", + "schema": { + "type": "string" + } + } + }, + "description": "An array of news articles." + }, + "401": { + "description": "Unauthorized - Check our API Key and account status" + }, + "404": { + "description": "The specified resource was not found" + } + }, + "summary": "Ticker News", + "tags": [ + "reference:news" + ], + "x-polygon-entitlement-data-type": { + "description": "Reference data", + "name": "reference" + }, + "x-polygon-paginate": { + "sort": { + "default": "published_utc", + "enum": [ + "published_utc" + ], + "limit": { + "default": 10, + "maximum": 1000, + "minimum": 1 + } + } + } + } + }, + "/v2/snapshot/locale/global/markets/crypto/tickers": { + "get": { + "description": "Get the current minute, day, and previous day\u2019s aggregate, as well as the last trade and quote for all traded cryptocurrency symbols.\n