diff --git a/.polygon/rest.json b/.polygon/rest.json index 92a41f15..1ea641d1 100644 --- a/.polygon/rest.json +++ b/.polygon/rest.json @@ -445,6 +445,13 @@ "type": "string" } }, + "required": [ + "id", + "type", + "market", + "name", + "url" + ], "type": "object" }, "type": "array" @@ -497,6 +504,15 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t", + "T" + ], "type": "object" }, "type": "array" @@ -557,11 +573,26 @@ "type": "integer" } }, + "required": [ + "p", + "s", + "x", + "c", + "t", + "i" + ], "type": "object" }, "type": "array" } }, + "required": [ + "day", + "map", + "msLatency", + "symbol", + "ticks" + ], "type": "object" }, "CryptoLastTrade": { @@ -595,6 +626,13 @@ "type": "integer" } }, + "required": [ + "conditions", + "exchange", + "price", + "size", + "timestamp" + ], "type": "object" }, "symbol": { @@ -602,6 +640,9 @@ "type": "string" } }, + "required": [ + "symbol" + ], "type": "object" }, "CryptoOpenClose": { @@ -645,6 +686,14 @@ "type": "integer" } }, + "required": [ + "p", + "s", + "x", + "c", + "t", + "i" + ], "type": "object" }, "type": "array" @@ -697,6 +746,14 @@ "type": "integer" } }, + "required": [ + "p", + "s", + "x", + "c", + "t", + "i" + ], "type": "object" }, "type": "array" @@ -706,6 +763,15 @@ "type": "string" } }, + "required": [ + "symbol", + "isUTC", + "day", + "open", + "close", + "openTrades", + "closingTrades" + ], "type": "object" }, "CryptoSnapshotMinute": { @@ -741,6 +807,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "CryptoSnapshotTicker": { @@ -781,6 +855,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "lastTrade": { @@ -819,6 +901,14 @@ "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "t", + "x" + ], "type": "object" }, { @@ -865,6 +955,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "prevDay": { @@ -901,6 +999,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "ticker": { @@ -922,6 +1028,16 @@ "type": "integer" } }, + "required": [ + "day", + "lastTrade", + "min", + "prevDay", + "ticker", + "todaysChange", + "todaysChangePerc", + "updated" + ], "type": "object" } }, @@ -949,6 +1065,10 @@ "type": "object" } }, + "required": [ + "p", + "x" + ], "type": "object" }, "type": "array" @@ -971,6 +1091,10 @@ "type": "object" } }, + "required": [ + "p", + "x" + ], "type": "object" }, "type": "array" @@ -989,6 +1113,15 @@ "type": "integer" } }, + "required": [ + "ticker", + "bids", + "asks", + "bidCount", + "askCount", + "spread", + "updated" + ], "type": "object" } }, @@ -1033,6 +1166,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "lastTrade": { @@ -1071,6 +1212,14 @@ "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "t", + "x" + ], "type": "object" }, { @@ -1117,6 +1266,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "prevDay": { @@ -1153,6 +1310,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "ticker": { @@ -1174,6 +1339,16 @@ "type": "integer" } }, + "required": [ + "day", + "lastTrade", + "min", + "prevDay", + "ticker", + "todaysChange", + "todaysChangePerc", + "updated" + ], "type": "object" }, "type": "array" @@ -1214,6 +1389,14 @@ "type": "integer" } }, + "required": [ + "p", + "s", + "x", + "c", + "t", + "i" + ], "type": "object" }, "CryptoTradeExchange": { @@ -1791,6 +1974,12 @@ "type": "integer" } }, + "required": [ + "ask", + "bid", + "exchange", + "timestamp" + ], "type": "object" }, "to": { @@ -1798,6 +1987,12 @@ "type": "string" } }, + "required": [ + "from", + "to", + "initialAmount", + "converted" + ], "type": "object" }, "ForexExchangeId": { @@ -1852,6 +2047,15 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t", + "T" + ], "type": "object" }, "type": "array" @@ -1900,11 +2104,24 @@ "type": "integer" } }, + "required": [ + "a", + "b", + "x", + "t" + ], "type": "object" }, "type": "array" } }, + "required": [ + "day", + "map", + "msLatency", + "pair", + "ticks" + ], "type": "object" }, "ForexPairLastQuote": { @@ -1930,6 +2147,12 @@ "type": "integer" } }, + "required": [ + "ask", + "bid", + "exchange", + "timestamp" + ], "type": "object" }, "symbol": { @@ -1937,6 +2160,9 @@ "type": "string" } }, + "required": [ + "symbol" + ], "type": "object" }, "ForexPreviousClose": { @@ -1987,6 +2213,15 @@ "type": "number" } }, + "required": [ + "T", + "v", + "o", + "c", + "h", + "l", + "t" + ], "type": "object" }, "type": "array" @@ -2015,6 +2250,12 @@ "type": "integer" } }, + "required": [ + "a", + "b", + "t", + "x" + ], "type": "object" }, "ForexSnapshotPrevDay": { @@ -2050,6 +2291,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "ForexSnapshotTicker": { @@ -2085,6 +2334,13 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v" + ], "type": "object" }, "lastQuote": { @@ -2109,6 +2365,12 @@ "type": "integer" } }, + "required": [ + "a", + "b", + "t", + "x" + ], "type": "object" }, "min": { @@ -2140,6 +2402,13 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v" + ], "type": "object" }, "prevDay": { @@ -2176,6 +2445,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "ticker": { @@ -2197,6 +2474,16 @@ "type": "integer" } }, + "required": [ + "day", + "lastQuote", + "min", + "prevDay", + "ticker", + "todaysChange", + "todaysChangePerc", + "updated" + ], "type": "object" } }, @@ -2236,6 +2523,13 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v" + ], "type": "object" }, "lastQuote": { @@ -2260,6 +2554,12 @@ "type": "integer" } }, + "required": [ + "a", + "b", + "t", + "x" + ], "type": "object" }, "min": { @@ -2291,6 +2591,13 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v" + ], "type": "object" }, "prevDay": { @@ -2327,6 +2634,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "ticker": { @@ -2348,6 +2663,16 @@ "type": "integer" } }, + "required": [ + "day", + "lastQuote", + "min", + "prevDay", + "ticker", + "todaysChange", + "todaysChangePerc", + "updated" + ], "type": "object" }, "type": "array" @@ -2399,6 +2724,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t" + ], "type": "object" }, "type": "array" @@ -2716,6 +3049,9 @@ "type": "string" } }, + "required": [ + "request_id" + ], "type": "object" }, "SequenceNumber": { @@ -2759,6 +3095,14 @@ "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "t", + "x" + ], "type": "object" }, "SnapshotOHLCV": { @@ -2789,6 +3133,13 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v" + ], "type": "object" }, "SnapshotOHLCVVW": { @@ -2824,6 +3175,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "SnapshotOHLCVVWOtc": { @@ -2863,6 +3222,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "StandardBase": { @@ -2874,6 +3241,9 @@ "type": "string" } }, + "required": [ + "request_id" + ], "type": "object" }, { @@ -2887,6 +3257,9 @@ "type": "string" } }, + "required": [ + "status" + ], "type": "object" } ] @@ -2902,6 +3275,9 @@ "type": "string" } }, + "required": [ + "status" + ], "type": "object" }, "StatusCountBase": { @@ -2915,6 +3291,9 @@ "type": "string" } }, + "required": [ + "status" + ], "type": "object" }, "StockSymbol": { @@ -2973,6 +3352,15 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "t", + "v", + "T" + ], "type": "object" }, "type": "array" @@ -3034,6 +3422,16 @@ "type": "number" } }, + "required": [ + "status", + "from", + "symbol", + "open", + "high", + "low", + "close", + "volume" + ], "type": "object" }, "StocksSnapshotLastQuote": { @@ -3061,6 +3459,13 @@ "type": "integer" } }, + "required": [ + "p", + "s", + "P", + "S", + "t" + ], "type": "object" }, "StocksSnapshotMinute": { @@ -3100,6 +3505,15 @@ "type": "number" } }, + "required": [ + "av", + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "StocksSnapshotMinuteOTC": { @@ -3143,6 +3557,15 @@ "type": "number" } }, + "required": [ + "av", + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "StocksSnapshotTicker": { @@ -3187,6 +3610,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "lastQuote": { @@ -3215,6 +3646,13 @@ "type": "integer" } }, + "required": [ + "p", + "s", + "P", + "S", + "t" + ], "type": "object" }, "lastTrade": { @@ -3249,6 +3687,14 @@ "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "t", + "x" + ], "type": "object" }, "min": { @@ -3293,6 +3739,15 @@ "type": "number" } }, + "required": [ + "av", + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "prevDay": { @@ -3333,6 +3788,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "ticker": { @@ -3402,6 +3865,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "lastQuote": { @@ -3430,6 +3901,13 @@ "type": "integer" } }, + "required": [ + "p", + "s", + "P", + "S", + "t" + ], "type": "object" }, "lastTrade": { @@ -3464,6 +3942,14 @@ "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "t", + "x" + ], "type": "object" }, "min": { @@ -3508,6 +3994,15 @@ "type": "number" } }, + "required": [ + "av", + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "prevDay": { @@ -3548,6 +4043,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "ticker": { @@ -3624,6 +4127,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t" + ], "type": "object" }, "type": "array" @@ -3655,6 +4166,13 @@ "type": "integer" } }, + "required": [ + "T", + "t", + "y", + "f", + "q" + ], "type": "object" }, "StocksV2NBBO": { @@ -3683,6 +4201,13 @@ "type": "integer" } }, + "required": [ + "T", + "t", + "y", + "f", + "q" + ], "type": "object" }, { @@ -3748,6 +4273,17 @@ "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "x", + "P", + "S", + "X", + "z" + ], "type": "object" } ] @@ -3781,6 +4317,13 @@ "type": "integer" } }, + "required": [ + "T", + "t", + "y", + "f", + "q" + ], "type": "object" }, { @@ -3846,6 +4389,17 @@ "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "x", + "P", + "S", + "X", + "z" + ], "type": "object" } ] @@ -3881,6 +4435,13 @@ "type": "integer" } }, + "required": [ + "T", + "t", + "y", + "f", + "q" + ], "type": "object" }, { @@ -3924,6 +4485,16 @@ "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "e", + "x", + "r", + "z" + ], "type": "object" } ] @@ -3957,6 +4528,13 @@ "type": "integer" } }, + "required": [ + "T", + "t", + "y", + "f", + "q" + ], "type": "object" }, { @@ -4000,6 +4578,16 @@ "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "e", + "x", + "r", + "z" + ], "type": "object" } ] @@ -4024,6 +4612,9 @@ "type": "string" } }, + "required": [ + "ticker" + ], "type": "object" }, "TickerResults": { @@ -4070,6 +4661,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t" + ], "type": "object" }, "type": "array" @@ -4147,6 +4746,11 @@ "type": "string" } }, + "required": [ + "symbol", + "status", + "request_id" + ], "type": "object" }, "V2AggsBase": { @@ -4172,6 +4776,13 @@ "type": "string" } }, + "required": [ + "status", + "adjusted", + "queryCount", + "resultsCount", + "request_id" + ], "type": "object" }, "V2LastBase": { @@ -4185,6 +4796,10 @@ "type": "string" } }, + "required": [ + "status", + "request_id" + ], "type": "object" }, "V2TicksBase": { @@ -4234,224 +4849,159 @@ }, "openapi": "3.0.3", "paths": { - "/v1/conversion/{from}/{to}": { + "/delete-me/{underlyingAsset}": { "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", + "description": "Get the snapshot of all options contracts for an underlying ticker.", + "operationId": "OptionsChain", "parameters": [ { - "description": "The \"from\" symbol of the pair.", - "example": "AUD", + "description": "The underlying ticker symbol of the option contract.", + "example": "AAPL", "in": "path", - "name": "from", + "name": "underlyingAsset", "required": true, "schema": { "type": "string" } }, { - "description": "The \"to\" symbol of the pair.", - "example": "USD", - "in": "path", - "name": "to", - "required": true, + "description": "Query by strike price of a contract.", + "in": "query", + "name": "strike_price", "schema": { - "type": "string" + "type": "number" + }, + "x-polygon-filter-field": { + "range": true, + "type": "number" } }, { - "description": "The amount to convert, with a decimal.", - "example": 100, + "description": "Query by contract expiration with date format YYYY-MM-DD.", "in": "query", - "name": "amount", - "required": true, + "name": "expiration_date", "schema": { - "default": 100, - "type": "number" + "type": "string" + }, + "x-polygon-filter-field": { + "range": true } }, { - "description": "The decimal precision of the conversion. Defaults to 2 which is 2 decimal places accuracy.", - "example": 2, + "description": "Query by the type of contract.", "in": "query", - "name": "precision", + "name": "contract_type", "schema": { - "default": 2, "enum": [ - 0, - 1, - 2, - 3, - 4 + "call", + "put" ], - "type": "integer" + "type": "string" } - } - ], - "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 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" - } - } - }, - "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" - } - } - }, - "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, + "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": "The \"to\" symbol of the crypto pair.", - "example": "USD", - "in": "path", - "name": "to", - "required": true, + "description": "Search by expiration_date.", + "in": "query", + "name": "expiration_date.gt", "schema": { "type": "string" } }, { - "description": "The date/day of the historic ticks to retrieve.", - "example": "2020-10-14", - "in": "path", - "name": "date", - "required": true, + "description": "Search by expiration_date.", + "in": "query", + "name": "expiration_date.lte", "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", + "description": "Search by expiration_date.", "in": "query", - "name": "offset", + "name": "expiration_date.lt", "schema": { - "type": "integer" + "type": "string" } }, { - "description": "Limit the size of the response, max 10000.", - "example": 100, + "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", + "expiration_date", + "strike_price" + ], + "example": "ticker", + "type": "string" + } } ], "responses": { @@ -4459,450 +5009,592 @@ "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 - }, + "request_id": "6a7e466379af0a71039d60cc78e72282", + "results": [ { - "c": [ - 2 - ], - "p": 15482.11, - "s": 0.00161739, - "t": 1604880000167, - "x": 1 + "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, + "implied_volatility": 5, + "theta": 0.00229, + "vega": 0 + }, + "last_quote": { + "ask": 120.3, + "ask_size": 4, + "bid": 120.28, + "bid_size": 8, + "last_updated": 1605195918507251700, + "midpoint": 120.29 + }, + "open_interest": 1543, + "underlying_asset": { + "change_to_break_even": 4.2, + "last_updated": 1605195918507251700, + "price": 147, + "ticker": "AAPL", + "timeframe": "DELAYED" + } } ], - "type": "crypto" + "status": "OK" }, "schema": { - "allOf": [ - { - "description": "The status of this request's response.", + "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", "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": { + "request_id": { + "type": "string" + }, + "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": { - "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" + "change": { + "description": "The value of the price change for the contract from the previous trading day.", + "format": "double", + "type": "number" }, - "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" + "change_percent": { + "description": "The percent of the price change for the contract from the previous trading day.", + "format": "double", + "type": "number" }, - "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", + "close": { + "description": "The closing price for the contract of the day.", "format": "double", "type": "number" }, - "s": { - "description": "The size of a trade (also known as volume).\n", + "high": { + "description": "The highest price for the contract of the day.", "format": "double", "type": "number" }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" + "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" + } }, - "x": { - "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n", - "type": "integer" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "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" - } - }, - "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.", + "low": { + "description": "The lowest price for the contract of the day.", "format": "double", "type": "number" }, - "b": { - "description": "The bid price.", + "open": { + "description": "The open price for the contract of the day.", "format": "double", "type": "number" }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" + "previous_close": { + "description": "The closing price for the contract of previous trading day.", + "format": "double", + "type": "number" }, - "x": { - "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.", - "type": "integer" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" + "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" + } + }, + "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 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.", + "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" + } + }, + "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" + } + }, + "type": "object", + "x-polygon-go-type": { + "name": "LastQuote" + } + }, + "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" + } + }, + "type": "object", + "x-polygon-go-type": { + "name": "UnderlyingAsset" + } + } + }, + "type": "object", + "x-polygon-go-type": { + "name": "OptionSnapshotResult" + } + }, + "type": "array" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" } - ] + }, + "type": "object" } } }, - "description": "An array of forex ticks" - }, - "default": { - "description": "Unexpected error" + "description": "Snapshots for options contracts of the underlying ticker" } }, - "summary": "Historic Forex Ticks", + "summary": "Options Chain", "tags": [ - "fx:trades" + "options:snapshot" ], - "x-polygon-deprecation": { - "date": 1654056060000, - "replaces": { - "name": "Quotes (BBO) v3", - "path": "get_v3_quotes__fxticker" + "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" + "description": "Aggregate data", + "name": "aggregates" }, "x-polygon-entitlement-market-type": { - "description": "Forex data", - "name": "fx" + "description": "Options data", + "name": "options" + }, + "x-polygon-paginate": { + "limit": { + "default": 10, + "max": 1000 + }, + "sort": { + "default": "ticker", + "enum": [ + "ticker", + "expiration_date", + "strike_price" + ] + } } - } + }, + "x-polygon-draft": true }, - "/v1/indicators/ema/{cryptoTicker}": { + "/v1/conversion/{from}/{to}": { "get": { - "description": "Get the exponential moving average (EMA) for a ticker symbol over a given time range.", - "operationId": "CryptoEMA", + "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 ticker symbol for which to get exponential moving average (EMA) data.", - "example": "X:BTC-USD", + "description": "The \"from\" symbol of the pair.", + "example": "AUD", "in": "path", - "name": "cryptoTicker", + "name": "from", "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", + "description": "The \"to\" symbol of the pair.", + "example": "USD", + "in": "path", + "name": "to", + "required": true, "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, + "description": "The amount to convert, with a decimal.", + "example": 100, "in": "query", - "name": "window", + "name": "amount", + "required": true, "schema": { - "default": 50, - "type": "integer" + "default": 100, + "type": "number" } }, { - "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", + "description": "The decimal precision of the conversion. Defaults to 2 which is 2 decimal places accuracy.", + "example": 2, "in": "query", - "name": "series_type", + "name": "precision", "schema": { - "default": "close", + "default": 2, "enum": [ - "open", - "high", - "low", - "close" + 0, + 1, + 2, + 3, + 4 ], - "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" + "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 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" + } + } + }, + "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" + } + } + }, + "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 order in which to return the results, ordered by timestamp.", - "example": "desc", - "in": "query", - "name": "order", + "description": "The \"from\" symbol of the crypto pair.", + "example": "BTC", + "in": "path", + "name": "from", + "required": true, "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", + "description": "The \"to\" symbol of the crypto pair.", + "example": "USD", + "in": "path", + "name": "to", + "required": true, "schema": { "type": "string" } }, { - "description": "Search by timestamp.", - "in": "query", - "name": "timestamp.gt", + "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": "Search by timestamp.", + "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.lte", + "name": "offset", "schema": { - "type": "string" + "type": "integer" } }, { - "description": "Search by timestamp.", + "description": "Limit the size of the response, max 10000.", + "example": 100, "in": "query", - "name": "timestamp.lt", + "name": "limit", "schema": { - "type": "string" + "type": "integer" } } ], @@ -4911,191 +5603,366 @@ "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 - } - ] + "day": "2020-10-14T00:00:00.000Z", + "map": { + "c": "conditions", + "p": "price", + "s": "size", + "t": "timestamp", + "x": "exchange" }, - "status": "OK" + "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": { - "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.", + "allOf": [ + { + "description": "The status of this request's response.", "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" - } - }, + "day": { + "description": "The date that was evaluated from the request.", + "format": "date", + "type": "string" + }, + "map": { + "description": "A map for shortened result keys.", "type": "object" }, - "values": { + "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": { - "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" - } + "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" }, - "value": { - "description": "The indicator value for this period.", - "format": "float", - "type": "number", - "x-polygon-go-type": { - "name": "*float64" - } + "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" } }, - "type": "object", - "x-polygon-go-type": { - "name": "EMAResults" - } - }, - "status": { - "description": "The status of this request's response.", - "type": "string" + "required": [ + "day", + "map", + "msLatency", + "symbol", + "ticks" + ], + "type": "object" } - }, - "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." + "description": "An array of crypto trade ticks." + }, + "default": { + "description": "Unexpected error" } }, - "summary": "Exponential Moving Average (EMA)", + "summary": "Historic Crypto Trades", "tags": [ - "crpyto:aggregates" + "crypto:trades" ], + "x-polygon-deprecation": { + "date": 1654056060000, + "replaces": { + "name": "Trades v3", + "path": "get_v3_trades__cryptoticker" + } + }, "x-polygon-entitlement-data-type": { - "description": "Aggregate data", - "name": "aggregates" + "description": "Trade data", + "name": "trades" }, "x-polygon-entitlement-market-type": { "description": "Crypto data", "name": "crypto" } - }, - "x-polygon-ignore": true + } }, - "/v1/indicators/ema/{fxTicker}": { + "/v1/historic/forex/{from}/{to}/{date}": { "get": { - "description": "Get the exponential moving average (EMA) for a ticker symbol over a given time range.", - "operationId": "ForexEMA", + "description": "Get historic ticks for a forex currency pair.\n", "parameters": [ { - "description": "The ticker symbol for which to get exponential moving average (EMA) data.", - "example": "C:EUR-USD", + "description": "The \"from\" symbol of the currency pair.\n\nExample: For **USD/JPY** the `from` would be **USD**.\n", + "example": "AUD", "in": "path", - "name": "fxTicker", + "name": "from", "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", + "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" + }, + "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" + } + }, + "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" }, @@ -5122,16 +5989,6 @@ "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, @@ -5229,11 +6086,11 @@ "content": { "application/json": { "example": { - "next_url": "https://api.polygon.io/v1/indicators/ema/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "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/C:USDAUD/range/1/day/2003-01-01/2022-07-25" + "url": "https://api.polygon.io/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25" }, "values": [ { @@ -5370,7 +6227,7 @@ } }, "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", + "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" } @@ -5381,29 +6238,29 @@ }, "summary": "Exponential Moving Average (EMA)", "tags": [ - "fx:aggregates" + "crpyto:aggregates" ], "x-polygon-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, "x-polygon-entitlement-market-type": { - "description": "Forex data", - "name": "fx" + "description": "Crypto data", + "name": "crypto" } }, "x-polygon-ignore": true }, - "/v1/indicators/ema/{optionsTicker}": { + "/v1/indicators/ema/{fxTicker}": { "get": { "description": "Get the exponential moving average (EMA) for a ticker symbol over a given time range.", - "operationId": "OptionsEMA", + "operationId": "ForexEMA", "parameters": [ { "description": "The ticker symbol for which to get exponential moving average (EMA) data.", - "example": "O:SPY241220P00720000", + "example": "C:EUR-USD", "in": "path", - "name": "optionsTicker", + "name": "fxTicker", "required": true, "schema": { "type": "string" @@ -5547,11 +6404,11 @@ "content": { "application/json": { "example": { - "next_url": "https://api.polygon.io/v1/indicators/ema/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "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/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25" + "url": "https://api.polygon.io/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25" }, "values": [ { @@ -5688,7 +6545,7 @@ } }, "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", + "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" } @@ -5699,29 +6556,29 @@ }, "summary": "Exponential Moving Average (EMA)", "tags": [ - "options:aggregates" + "fx:aggregates" ], "x-polygon-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, "x-polygon-entitlement-market-type": { - "description": "Options data", - "name": "options" + "description": "Forex data", + "name": "fx" } }, "x-polygon-ignore": true }, - "/v1/indicators/ema/{stockTicker}": { + "/v1/indicators/ema/{optionsTicker}": { "get": { "description": "Get the exponential moving average (EMA) for a ticker symbol over a given time range.", - "operationId": "EMA", + "operationId": "OptionsEMA", "parameters": [ { "description": "The ticker symbol for which to get exponential moving average (EMA) data.", - "example": "AAPL", + "example": "O:SPY241220P00720000", "in": "path", - "name": "stockTicker", + "name": "optionsTicker", "required": true, "schema": { "type": "string" @@ -5759,7 +6616,7 @@ } }, { - "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.", + "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", @@ -5865,11 +6722,11 @@ "content": { "application/json": { "example": { - "next_url": "https://api.polygon.io/v1/indicators/ema/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "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/AAPL/range/1/day/2003-01-01/2022-07-25" + "url": "https://api.polygon.io/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25" }, "values": [ { @@ -6006,7 +6863,7 @@ } }, "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", + "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" } @@ -6017,28 +6874,29 @@ }, "summary": "Exponential Moving Average (EMA)", "tags": [ - "stocks:aggregates" + "options:aggregates" ], "x-polygon-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, "x-polygon-entitlement-market-type": { - "description": "Stocks data", - "name": "stocks" + "description": "Options data", + "name": "options" } - } + }, + "x-polygon-ignore": true }, - "/v1/indicators/macd/{cryptoTicker}": { + "/v1/indicators/ema/{stockTicker}": { "get": { - "description": "Get moving average convergence/divergence (MACD) data for a ticker symbol over a given time range.", - "operationId": "CryptoMACD", + "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 MACD data.", - "example": "X:BTC-USD", + "description": "The ticker symbol for which to get exponential moving average (EMA) data.", + "example": "AAPL", "in": "path", - "name": "cryptoTicker", + "name": "stockTicker", "required": true, "schema": { "type": "string" @@ -6076,37 +6934,27 @@ } }, { - "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, + "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": "long_window", + "name": "adjusted", "schema": { - "default": 26, - "type": "integer" + "default": true, + "type": "boolean" } }, { - "description": "The window size used to calculate the MACD signal line.", - "example": 9, + "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": "signal_window", + "name": "window", "schema": { - "default": 9, + "default": 50, "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.", + "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", @@ -6192,24 +7040,16 @@ "content": { "application/json": { "example": { - "next_url": "https://api.polygon.io/v1/indicators/macd/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "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/X:BTCUSD/range/1/day/2003-01-01/2022-07-25" + "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 + "value": 140.139 } ] }, @@ -6304,22 +7144,6 @@ "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", @@ -6345,7 +7169,7 @@ }, "type": "object", "x-polygon-go-type": { - "name": "MACDResults" + "name": "EMAResults" } }, "status": { @@ -6357,40 +7181,39 @@ } }, "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", + "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": "Moving Average Convergence/Divergence (MACD) data for each period." + "description": "Exponential Moving Average (EMA) data for each period." } }, - "summary": "Moving Average Convergence/Divergence (MACD)", + "summary": "Exponential Moving Average (EMA)", "tags": [ - "crypto:aggregates" + "stocks:aggregates" ], "x-polygon-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, "x-polygon-entitlement-market-type": { - "description": "Crypto data", - "name": "crypto" + "description": "Stocks data", + "name": "stocks" } - }, - "x-polygon-ignore": true + } }, - "/v1/indicators/macd/{fxTicker}": { + "/v1/indicators/macd/{cryptoTicker}": { "get": { "description": "Get moving average convergence/divergence (MACD) data for a ticker symbol over a given time range.", - "operationId": "ForexMACD", + "operationId": "CryptoMACD", "parameters": [ { "description": "The ticker symbol for which to get MACD data.", - "example": "C:EUR-USD", + "example": "X:BTC-USD", "in": "path", - "name": "fxTicker", + "name": "cryptoTicker", "required": true, "schema": { "type": "string" @@ -6427,16 +7250,6 @@ "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, @@ -6468,7 +7281,7 @@ } }, { - "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.", + "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", @@ -6554,11 +7367,11 @@ "content": { "application/json": { "example": { - "next_url": "https://api.polygon.io/v1/indicators/macd/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "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/C:USDAUD/range/1/day/2003-01-01/2022-07-25" + "url": "https://api.polygon.io/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25" }, "values": [ { @@ -6719,7 +7532,7 @@ } }, "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", + "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" } @@ -6730,29 +7543,29 @@ }, "summary": "Moving Average Convergence/Divergence (MACD)", "tags": [ - "fx:aggregates" + "crypto:aggregates" ], "x-polygon-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, "x-polygon-entitlement-market-type": { - "description": "Forex data", - "name": "fx" + "description": "Crypto data", + "name": "crypto" } }, "x-polygon-ignore": true }, - "/v1/indicators/macd/{optionsTicker}": { + "/v1/indicators/macd/{fxTicker}": { "get": { - "description": "Get moving average convergence/divergence (MACD) for a ticker symbol over a given time range.", - "operationId": "OptionsMACD", + "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": "O:SPY241220P00720000", + "example": "C:EUR-USD", "in": "path", - "name": "optionsTicker", + "name": "fxTicker", "required": true, "schema": { "type": "string" @@ -6916,11 +7729,11 @@ "content": { "application/json": { "example": { - "next_url": "https://api.polygon.io/v1/indicators/macd/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "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/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25" + "url": "https://api.polygon.io/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25" }, "values": [ { @@ -7081,7 +7894,7 @@ } }, "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", + "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" } @@ -7092,29 +7905,29 @@ }, "summary": "Moving Average Convergence/Divergence (MACD)", "tags": [ - "options:aggregates" + "fx:aggregates" ], "x-polygon-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, "x-polygon-entitlement-market-type": { - "description": "Options data", - "name": "options" + "description": "Forex data", + "name": "fx" } }, "x-polygon-ignore": true }, - "/v1/indicators/macd/{stockTicker}": { + "/v1/indicators/macd/{optionsTicker}": { "get": { - "description": "Get moving average convergence/divergence (MACD) data for a ticker symbol over a given time range.", - "operationId": "MACD", + "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": "AAPL", + "example": "O:SPY241220P00720000", "in": "path", - "name": "stockTicker", + "name": "optionsTicker", "required": true, "schema": { "type": "string" @@ -7152,7 +7965,7 @@ } }, { - "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.", + "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", @@ -7278,11 +8091,11 @@ "content": { "application/json": { "example": { - "next_url": "https://api.polygon.io/v1/indicators/macd/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "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/AAPL/range/1/day/2003-01-01/2022-07-25" + "url": "https://api.polygon.io/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25" }, "values": [ { @@ -7443,7 +8256,7 @@ } }, "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", + "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" } @@ -7454,28 +8267,29 @@ }, "summary": "Moving Average Convergence/Divergence (MACD)", "tags": [ - "stocks:aggregates" + "options:aggregates" ], "x-polygon-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, "x-polygon-entitlement-market-type": { - "description": "Stocks data", - "name": "stocks" + "description": "Options data", + "name": "options" } - } + }, + "x-polygon-ignore": true }, - "/v1/indicators/rsi/{cryptoTicker}": { + "/v1/indicators/macd/{stockTicker}": { "get": { - "description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.", - "operationId": "CryptoRSI", + "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 relative strength index (RSI) data.", - "example": "X:BTC-USD", + "description": "The ticker symbol for which to get MACD data.", + "example": "AAPL", "in": "path", - "name": "cryptoTicker", + "name": "stockTicker", "required": true, "schema": { "type": "string" @@ -7513,17 +8327,47 @@ } }, { - "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, + "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": "window", + "name": "adjusted", "schema": { - "default": 14, + "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 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).", + "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", @@ -7609,16 +8453,24 @@ "content": { "application/json": { "example": { - "next_url": "https://api.polygon.io/v1/indicators/rsi/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "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/X:BTCUSD/range/1/day/2003-01-01/2022-07-25" + "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": 140.139 + "value": 145.3613333333 + }, + { + "histogram": 41.098859136, + "signal": 102.7386283473, + "timestamp": 1517562001016, + "value": 143.8374874833 } ] }, @@ -7713,6 +8565,22 @@ "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", @@ -7738,7 +8606,7 @@ }, "type": "object", "x-polygon-go-type": { - "name": "RSIResults" + "name": "MACDResults" } }, "status": { @@ -7750,40 +8618,39 @@ } }, "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", + "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": "Relative strength index data for each period." + "description": "Moving Average Convergence/Divergence (MACD) data for each period." } }, - "summary": "Relative Strength Index (RSI)", + "summary": "Moving Average Convergence/Divergence (MACD)", "tags": [ - "crpyto:aggregates" + "stocks:aggregates" ], "x-polygon-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, "x-polygon-entitlement-market-type": { - "description": "Crypto data", - "name": "crypto" + "description": "Stocks data", + "name": "stocks" } - }, - "x-polygon-ignore": true + } }, - "/v1/indicators/rsi/{fxTicker}": { + "/v1/indicators/rsi/{cryptoTicker}": { "get": { "description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.", - "operationId": "ForexRSI", + "operationId": "CryptoRSI", "parameters": [ { "description": "The ticker symbol for which to get relative strength index (RSI) data.", - "example": "C:EUR-USD", + "example": "X:BTC-USD", "in": "path", - "name": "fxTicker", + "name": "cryptoTicker", "required": true, "schema": { "type": "string" @@ -7821,17 +8688,7 @@ } }, { - "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).", + "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", @@ -7927,11 +8784,11 @@ "content": { "application/json": { "example": { - "next_url": "https://api.polygon.io/v1/indicators/rsi/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "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/C:USDAUD/range/1/day/2003-01-01/2022-07-25" + "url": "https://api.polygon.io/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25" }, "values": [ { @@ -8068,7 +8925,7 @@ } }, "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", + "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" } @@ -8079,29 +8936,29 @@ }, "summary": "Relative Strength Index (RSI)", "tags": [ - "fx:aggregates" + "crpyto:aggregates" ], "x-polygon-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, "x-polygon-entitlement-market-type": { - "description": "Forex data", - "name": "fx" + "description": "Crypto data", + "name": "crypto" } }, "x-polygon-ignore": true }, - "/v1/indicators/rsi/{optionsTicker}": { + "/v1/indicators/rsi/{fxTicker}": { "get": { "description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.", - "operationId": "OptionsRSI", + "operationId": "ForexRSI", "parameters": [ { "description": "The ticker symbol for which to get relative strength index (RSI) data.", - "example": "O:SPY241220P00720000", + "example": "C:EUR-USD", "in": "path", - "name": "optionsTicker", + "name": "fxTicker", "required": true, "schema": { "type": "string" @@ -8245,11 +9102,11 @@ "content": { "application/json": { "example": { - "next_url": "https://api.polygon.io/v1/indicators/rsi/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "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/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25" + "url": "https://api.polygon.io/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25" }, "values": [ { @@ -8386,40 +9243,40 @@ } }, "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", + "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 (RSI) data for each period." + "description": "Relative strength index data for each period." } }, "summary": "Relative Strength Index (RSI)", "tags": [ - "options:aggregates" + "fx:aggregates" ], "x-polygon-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, "x-polygon-entitlement-market-type": { - "description": "Options data", - "name": "options" + "description": "Forex data", + "name": "fx" } }, "x-polygon-ignore": true }, - "/v1/indicators/rsi/{stockTicker}": { + "/v1/indicators/rsi/{optionsTicker}": { "get": { "description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.", - "operationId": "RSI", + "operationId": "OptionsRSI", "parameters": [ { "description": "The ticker symbol for which to get relative strength index (RSI) data.", - "example": "AAPL", + "example": "O:SPY241220P00720000", "in": "path", - "name": "stockTicker", + "name": "optionsTicker", "required": true, "schema": { "type": "string" @@ -8457,7 +9314,7 @@ } }, { - "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.", + "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", @@ -8563,11 +9420,11 @@ "content": { "application/json": { "example": { - "next_url": "https://api.polygon.io/v1/indicators/rsi/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "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/AAPL/range/1/day/2003-01-01/2022-07-25" + "url": "https://api.polygon.io/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25" }, "values": [ { @@ -8704,39 +9561,40 @@ } }, "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", + "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 data for each period." + "description": "Relative Strength Index (RSI) data for each period." } }, "summary": "Relative Strength Index (RSI)", "tags": [ - "stocks:aggregates" + "options:aggregates" ], "x-polygon-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, "x-polygon-entitlement-market-type": { - "description": "Stocks data", - "name": "stocks" + "description": "Options data", + "name": "options" } - } + }, + "x-polygon-ignore": true }, - "/v1/indicators/sma/{cryptoTicker}": { + "/v1/indicators/rsi/{stockTicker}": { "get": { - "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.", - "operationId": "CryptoSMA", + "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 simple moving average (SMA) data.", - "example": "X:BTC-USD", + "description": "The ticker symbol for which to get relative strength index (RSI) data.", + "example": "AAPL", "in": "path", - "name": "cryptoTicker", + "name": "stockTicker", "required": true, "schema": { "type": "string" @@ -8774,17 +9632,27 @@ } }, { - "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, + "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": 50, + "default": 14, "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).", + "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", @@ -8870,33 +9738,11 @@ "content": { "application/json": { "example": { - "next_url": "https://api.polygon.io/v1/indicators/sma/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "next_url": "https://api.polygon.io/v1/indicators/rsi/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/X:BTCUSD/range/1/day/2003-01-01/2022-07-25" + "url": "https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25" }, "values": [ { @@ -9021,7 +9867,7 @@ }, "type": "object", "x-polygon-go-type": { - "name": "SMAResults" + "name": "RSIResults" } }, "status": { @@ -9033,40 +9879,39 @@ } }, "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", + "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": "Simple Moving Average (SMA) data for each period." + "description": "Relative strength Index data for each period." } }, - "summary": "Simple Moving Average (SMA)", + "summary": "Relative Strength Index (RSI)", "tags": [ - "crpyto:aggregates" + "stocks:aggregates" ], "x-polygon-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, "x-polygon-entitlement-market-type": { - "description": "Crypto data", - "name": "crypto" + "description": "Stocks data", + "name": "stocks" } - }, - "x-polygon-ignore": true + } }, - "/v1/indicators/sma/{fxTicker}": { + "/v1/indicators/sma/{cryptoTicker}": { "get": { "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.", - "operationId": "ForexSMA", + "operationId": "CryptoSMA", "parameters": [ { "description": "The ticker symbol for which to get simple moving average (SMA) data.", - "example": "C:EUR-USD", + "example": "X:BTC-USD", "in": "path", - "name": "fxTicker", + "name": "cryptoTicker", "required": true, "schema": { "type": "string" @@ -9103,16 +9948,6 @@ "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, @@ -9210,7 +10045,7 @@ "content": { "application/json": { "example": { - "next_url": "https://api.polygon.io/v1/indicators/sma/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "next_url": "https://api.polygon.io/v1/indicators/sma/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", "results": { "underlying": { @@ -9236,7 +10071,7 @@ "vw": 74.7026 } ], - "url": "https://api.polygon.io/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25" + "url": "https://api.polygon.io/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25" }, "values": [ { @@ -9373,7 +10208,7 @@ } }, "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", + "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" } @@ -9384,29 +10219,29 @@ }, "summary": "Simple Moving Average (SMA)", "tags": [ - "fx:aggregates" + "crpyto:aggregates" ], "x-polygon-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, "x-polygon-entitlement-market-type": { - "description": "Forex data", - "name": "fx" + "description": "Crypto data", + "name": "crypto" } }, "x-polygon-ignore": true }, - "/v1/indicators/sma/{optionsTicker}": { + "/v1/indicators/sma/{fxTicker}": { "get": { "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.", - "operationId": "OptionsSMA", + "operationId": "ForexSMA", "parameters": [ { "description": "The ticker symbol for which to get simple moving average (SMA) data.", - "example": "O:SPY241220P00720000", + "example": "C:EUR-USD", "in": "path", - "name": "optionsTicker", + "name": "fxTicker", "required": true, "schema": { "type": "string" @@ -9550,7 +10385,7 @@ "content": { "application/json": { "example": { - "next_url": "https://api.polygon.io/v1/indicators/sma/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "next_url": "https://api.polygon.io/v1/indicators/sma/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", "results": { "underlying": { @@ -9576,7 +10411,7 @@ "vw": 74.7026 } ], - "url": "https://api.polygon.io/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25" + "url": "https://api.polygon.io/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25" }, "values": [ { @@ -9713,7 +10548,7 @@ } }, "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", + "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" } @@ -9724,29 +10559,29 @@ }, "summary": "Simple Moving Average (SMA)", "tags": [ - "options:aggregates" + "fx:aggregates" ], "x-polygon-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, "x-polygon-entitlement-market-type": { - "description": "Options data", - "name": "options" + "description": "Forex data", + "name": "fx" } }, "x-polygon-ignore": true }, - "/v1/indicators/sma/{stockTicker}": { + "/v1/indicators/sma/{optionsTicker}": { "get": { "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.", - "operationId": "SMA", + "operationId": "OptionsSMA", "parameters": [ { "description": "The ticker symbol for which to get simple moving average (SMA) data.", - "example": "AAPL", + "example": "O:SPY241220P00720000", "in": "path", - "name": "stockTicker", + "name": "optionsTicker", "required": true, "schema": { "type": "string" @@ -9890,7 +10725,7 @@ "content": { "application/json": { "example": { - "next_url": "https://api.polygon.io/v1/indicators/sma/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "next_url": "https://api.polygon.io/v1/indicators/sma/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", "results": { "underlying": { @@ -9916,7 +10751,7 @@ "vw": 74.7026 } ], - "url": "https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25" + "url": "https://api.polygon.io/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25" }, "values": [ { @@ -10053,7 +10888,7 @@ } }, "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", + "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" } @@ -10064,170 +10899,162 @@ }, "summary": "Simple Moving Average (SMA)", "tags": [ - "stocks:aggregates" + "options:aggregates" ], "x-polygon-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, "x-polygon-entitlement-market-type": { - "description": "Stocks data", - "name": "stocks" + "description": "Options data", + "name": "options" } - } + }, + "x-polygon-ignore": true }, - "/v1/last/crypto/{from}/{to}": { + "/v1/indicators/sma/{stockTicker}": { "get": { - "description": "Get the last trade tick for a cryptocurrency pair.", - "operationId": "LastTradeCrypto", + "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.", + "operationId": "SMA", "parameters": [ { - "description": "The \"from\" symbol of the pair.", - "example": "BTC", + "description": "The ticker symbol for which to get simple moving average (SMA) data.", + "example": "AAPL", "in": "path", - "name": "from", + "name": "stockTicker", "required": true, "schema": { "type": "string" - } + }, + "x-polygon-go-id": "Ticker" }, { - "description": "The \"to\" symbol of the pair.", - "example": "USD", - "in": "path", - "name": "to", - "required": true, + "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "in": "query", + "name": "timestamp", "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" - } - } - }, - "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" - } - }, - "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." + "x-polygon-filter-field": { + "range": true + } }, - "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, + "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": "The \"to\" symbol of the pair.", - "example": "USD", - "in": "path", - "name": "to", - "required": true, + "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" } @@ -10238,133 +11065,481 @@ "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" + "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 }, - "timestamp": { - "description": "The Unix millisecond timestamp.", - "type": "integer", - "x-polygon-go-type": { - "name": "IMilliseconds", - "path": "github.com/polygon-io/ptime" - } + { + "c": 74.3575, + "h": 75.145, + "l": 74.125, + "n": 1, + "o": 74.2875, + "t": 1578027600000, + "v": 146535512, + "vw": 74.7026 } - }, - "type": "object", - "x-polygon-go-type": { - "name": "LastQuoteCurrencies" + ], + "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" - }, - "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", + "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": "The last quote tick for this currency pair." - }, - "default": { - "description": "Unexpected error" + "description": "Simple Moving Average (SMA) data for each period." } }, - "summary": "Last Quote for a Currency Pair", + "summary": "Simple Moving Average (SMA)", "tags": [ - "fx:last:quote" + "stocks:aggregates" ], "x-polygon-entitlement-data-type": { - "description": "NBBO data", - "name": "nbbo" + "description": "Aggregate data", + "name": "aggregates" }, "x-polygon-entitlement-market-type": { - "description": "Forex data", - "name": "fx" + "description": "Stocks data", + "name": "stocks" } } }, - "/v1/marketstatus/now": { + "/v1/last/crypto/{from}/{to}": { "get": { - "description": "Get the current trading status of the exchanges and overall financial markets.\n", + "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": { - "afterHours": true, - "currencies": { - "crypto": "open", - "fx": "open" - }, - "earlyHours": false, - "exchanges": { - "nasdaq": "extended-hours", - "nyse": "extended-hours", - "otc": "closed" + "last": { + "conditions": [ + 1 + ], + "exchange": 4, + "price": 16835.42, + "size": 0.006909, + "timestamp": 1605560885027 }, - "market": "extended-hours", - "serverTime": "2020-11-10T22:37:37.000Z" + "request_id": "d2d779df015fe2b7fbb8e58366610ef7", + "status": "success", + "symbol": "BTC-USD" }, "schema": { "properties": { - "afterHours": { - "description": "Whether or not the market is in post-market hours.", - "type": "boolean" - }, - "currencies": { + "last": { "properties": { - "crypto": { - "description": "The status of the crypto market.", - "type": "string" - }, - "fx": { - "description": "The status of the forex market.", - "type": "string" - } - }, - "type": "object" - }, - "earlyHours": { + "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" + } + } + }, + "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" + } + }, + "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" + } + } + }, + "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" + } + }, + "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" }, @@ -10664,6 +11839,14 @@ "type": "integer" } }, + "required": [ + "p", + "s", + "x", + "c", + "t", + "i" + ], "type": "object" }, "type": "array" @@ -10716,6 +11899,14 @@ "type": "integer" } }, + "required": [ + "p", + "s", + "x", + "c", + "t", + "i" + ], "type": "object" }, "type": "array" @@ -10725,6 +11916,15 @@ "type": "string" } }, + "required": [ + "symbol", + "isUTC", + "day", + "open", + "close", + "openTrades", + "closingTrades" + ], "type": "object" } }, @@ -10860,6 +12060,16 @@ "type": "number" } }, + "required": [ + "status", + "from", + "symbol", + "open", + "high", + "low", + "close", + "volume" + ], "type": "object" } }, @@ -10932,7 +12142,7 @@ "example": { "afterHours": 322.1, "close": 325.12, - "from": "2020-10-14T00:00:00.000Z", + "from": "2020-10-14", "high": 326.2, "low": 322.3, "open": 324.66, @@ -10995,6 +12205,16 @@ "type": "number" } }, + "required": [ + "status", + "from", + "symbol", + "open", + "high", + "low", + "close", + "volume" + ], "type": "object" } }, @@ -11946,12 +13166,370 @@ }, "x-polygon-draft": true }, - "/v2/aggs/grouped/locale/global/market/crypto/{date}": { + "/v1/summaries": { "get": { - "description": "Get the daily open, high, low, and close (OHLC) for the entire cryptocurrency markets.\n", + "description": "Get everything needed to visualize the tick-by-tick movement of a list of tickers.", + "operationId": "SnapshotSummary", "parameters": [ { - "description": "The beginning date for the aggregate window.", + "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.", + "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": "forex" + }, + { + "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" + }, + "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" + }, + "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 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\u2019s 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\u2019s 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\u2019s late trading change amount, difference between price and today\u2019s close if in late trading hours, otherwise difference between last price during late trading and today\u2019s close.", + "format": "double", + "type": "number" + }, + "late_trading_change_percent": { + "description": "Today\u2019s 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.", + "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, forex, option.", + "enum": [ + "stocks", + "crypto", + "options", + "fx" + ], + "type": "string" + } + }, + "required": [ + "ticker", + "name", + "price", + "branding", + "market_status", + "type", + "session", + "options" + ], + "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": "2020-10-14", "in": "path", "name": "date", @@ -12040,6 +13618,13 @@ "type": "string" } }, + "required": [ + "status", + "adjusted", + "queryCount", + "resultsCount", + "request_id" + ], "type": "object" }, { @@ -12090,6 +13675,15 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t", + "T" + ], "type": "object" }, "type": "array" @@ -12221,6 +13815,13 @@ "type": "string" } }, + "required": [ + "status", + "adjusted", + "queryCount", + "resultsCount", + "request_id" + ], "type": "object" }, { @@ -12271,6 +13872,15 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t", + "T" + ], "type": "object" }, "type": "array" @@ -12410,6 +14020,13 @@ "type": "string" } }, + "required": [ + "status", + "adjusted", + "queryCount", + "resultsCount", + "request_id" + ], "type": "object" }, { @@ -12464,6 +14081,15 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "t", + "v", + "T" + ], "type": "object" }, "type": "array" @@ -12558,6 +14184,9 @@ "type": "string" } }, + "required": [ + "ticker" + ], "type": "object" }, { @@ -12583,6 +14212,13 @@ "type": "string" } }, + "required": [ + "status", + "adjusted", + "queryCount", + "resultsCount", + "request_id" + ], "type": "object" }, { @@ -12633,6 +14269,15 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t", + "T" + ], "type": "object" }, "type": "array" @@ -12807,6 +14452,9 @@ "type": "string" } }, + "required": [ + "ticker" + ], "type": "object" }, { @@ -12832,6 +14480,13 @@ "type": "string" } }, + "required": [ + "status", + "adjusted", + "queryCount", + "resultsCount", + "request_id" + ], "type": "object" }, { @@ -12878,6 +14533,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t" + ], "type": "object" }, "type": "array" @@ -12973,6 +14636,9 @@ "type": "string" } }, + "required": [ + "ticker" + ], "type": "object" }, { @@ -12998,6 +14664,13 @@ "type": "string" } }, + "required": [ + "status", + "adjusted", + "queryCount", + "resultsCount", + "request_id" + ], "type": "object" }, { @@ -13048,6 +14721,15 @@ "type": "number" } }, + "required": [ + "T", + "v", + "o", + "c", + "h", + "l", + "t" + ], "type": "object" }, "type": "array" @@ -13212,6 +14894,9 @@ "type": "string" } }, + "required": [ + "ticker" + ], "type": "object" }, { @@ -13237,7 +14922,14 @@ "type": "string" } }, - "type": "object" + "required": [ + "status", + "adjusted", + "queryCount", + "resultsCount", + "request_id" + ], + "type": "object" }, { "properties": { @@ -13283,6 +14975,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t" + ], "type": "object" }, "type": "array" @@ -13378,6 +15078,9 @@ "type": "string" } }, + "required": [ + "ticker" + ], "type": "object" }, { @@ -13403,6 +15106,13 @@ "type": "string" } }, + "required": [ + "status", + "adjusted", + "queryCount", + "resultsCount", + "request_id" + ], "type": "object" }, { @@ -13449,6 +15159,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t" + ], "type": "object" }, "type": "array" @@ -13624,6 +15342,9 @@ "type": "string" } }, + "required": [ + "ticker" + ], "type": "object" }, { @@ -13649,6 +15370,13 @@ "type": "string" } }, + "required": [ + "status", + "adjusted", + "queryCount", + "resultsCount", + "request_id" + ], "type": "object" }, { @@ -13695,6 +15423,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t" + ], "type": "object" }, "type": "array" @@ -13789,6 +15525,9 @@ "type": "string" } }, + "required": [ + "ticker" + ], "type": "object" }, { @@ -13814,6 +15553,13 @@ "type": "string" } }, + "required": [ + "status", + "adjusted", + "queryCount", + "resultsCount", + "request_id" + ], "type": "object" }, { @@ -13860,6 +15606,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t" + ], "type": "object" }, "type": "array" @@ -14034,6 +15788,9 @@ "type": "string" } }, + "required": [ + "ticker" + ], "type": "object" }, { @@ -14059,6 +15816,13 @@ "type": "string" } }, + "required": [ + "status", + "adjusted", + "queryCount", + "resultsCount", + "request_id" + ], "type": "object" }, { @@ -14109,6 +15873,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t" + ], "type": "object" }, "type": "array" @@ -15124,6 +16896,9 @@ "type": "string" } }, + "required": [ + "status" + ], "type": "object" }, { @@ -15165,6 +16940,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "lastTrade": { @@ -15203,6 +16986,14 @@ "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "t", + "x" + ], "type": "object" }, { @@ -15249,6 +17040,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "prevDay": { @@ -15285,6 +17084,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "ticker": { @@ -15306,6 +17113,16 @@ "type": "integer" } }, + "required": [ + "day", + "lastTrade", + "min", + "prevDay", + "ticker", + "todaysChange", + "todaysChangePerc", + "updated" + ], "type": "object" }, "type": "array" @@ -15425,6 +17242,9 @@ "type": "string" } }, + "required": [ + "status" + ], "type": "object" }, { @@ -15434,6 +17254,9 @@ "type": "string" } }, + "required": [ + "request_id" + ], "type": "object" }, { @@ -15474,6 +17297,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "lastTrade": { @@ -15512,6 +17343,14 @@ "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "t", + "x" + ], "type": "object" }, { @@ -15558,6 +17397,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "prevDay": { @@ -15594,6 +17441,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "ticker": { @@ -15615,6 +17470,16 @@ "type": "integer" } }, + "required": [ + "day", + "lastTrade", + "min", + "prevDay", + "ticker", + "todaysChange", + "todaysChangePerc", + "updated" + ], "type": "object" } }, @@ -15746,6 +17611,10 @@ "type": "object" } }, + "required": [ + "p", + "x" + ], "type": "object" }, "type": "array" @@ -15768,6 +17637,10 @@ "type": "object" } }, + "required": [ + "p", + "x" + ], "type": "object" }, "type": "array" @@ -15786,6 +17659,15 @@ "type": "integer" } }, + "required": [ + "ticker", + "bids", + "asks", + "bidCount", + "askCount", + "spread", + "updated" + ], "type": "object" } }, @@ -15944,6 +17826,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "lastTrade": { @@ -15982,6 +17872,14 @@ "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "t", + "x" + ], "type": "object" }, { @@ -16028,6 +17926,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "prevDay": { @@ -16064,6 +17970,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "ticker": { @@ -16085,6 +17999,16 @@ "type": "integer" } }, + "required": [ + "day", + "lastTrade", + "min", + "prevDay", + "ticker", + "todaysChange", + "todaysChangePerc", + "updated" + ], "type": "object" }, "type": "array" @@ -16200,6 +18124,9 @@ "type": "string" } }, + "required": [ + "status" + ], "type": "object" }, { @@ -16236,6 +18163,13 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v" + ], "type": "object" }, "lastQuote": { @@ -16260,6 +18194,12 @@ "type": "integer" } }, + "required": [ + "a", + "b", + "t", + "x" + ], "type": "object" }, "min": { @@ -16291,6 +18231,13 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v" + ], "type": "object" }, "prevDay": { @@ -16327,6 +18274,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "ticker": { @@ -16348,6 +18303,16 @@ "type": "integer" } }, + "required": [ + "day", + "lastQuote", + "min", + "prevDay", + "ticker", + "todaysChange", + "todaysChangePerc", + "updated" + ], "type": "object" }, "type": "array" @@ -16462,6 +18427,9 @@ "type": "string" } }, + "required": [ + "status" + ], "type": "object" }, { @@ -16471,6 +18439,9 @@ "type": "string" } }, + "required": [ + "request_id" + ], "type": "object" }, { @@ -16506,6 +18477,13 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v" + ], "type": "object" }, "lastQuote": { @@ -16530,6 +18508,12 @@ "type": "integer" } }, + "required": [ + "a", + "b", + "t", + "x" + ], "type": "object" }, "min": { @@ -16561,6 +18545,13 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v" + ], "type": "object" }, "prevDay": { @@ -16597,6 +18588,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "ticker": { @@ -16618,6 +18617,16 @@ "type": "integer" } }, + "required": [ + "day", + "lastQuote", + "min", + "prevDay", + "ticker", + "todaysChange", + "todaysChangePerc", + "updated" + ], "type": "object" } }, @@ -16734,6 +18743,9 @@ "type": "string" } }, + "required": [ + "status" + ], "type": "object" }, { @@ -16770,6 +18782,13 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v" + ], "type": "object" }, "lastQuote": { @@ -16794,6 +18813,12 @@ "type": "integer" } }, + "required": [ + "a", + "b", + "t", + "x" + ], "type": "object" }, "min": { @@ -16825,6 +18850,13 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v" + ], "type": "object" }, "prevDay": { @@ -16861,6 +18893,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "ticker": { @@ -16882,6 +18922,16 @@ "type": "integer" } }, + "required": [ + "day", + "lastQuote", + "min", + "prevDay", + "ticker", + "todaysChange", + "todaysChangePerc", + "updated" + ], "type": "object" }, "type": "array" @@ -17027,6 +19077,9 @@ "type": "string" } }, + "required": [ + "status" + ], "type": "object" }, { @@ -17072,6 +19125,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "lastQuote": { @@ -17100,6 +19161,13 @@ "type": "integer" } }, + "required": [ + "p", + "s", + "P", + "S", + "t" + ], "type": "object" }, "lastTrade": { @@ -17134,6 +19202,14 @@ "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "t", + "x" + ], "type": "object" }, "min": { @@ -17178,6 +19254,15 @@ "type": "number" } }, + "required": [ + "av", + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "prevDay": { @@ -17218,6 +19303,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "ticker": { @@ -17367,6 +19460,9 @@ "type": "string" } }, + "required": [ + "status" + ], "type": "object" }, { @@ -17376,6 +19472,9 @@ "type": "string" } }, + "required": [ + "request_id" + ], "type": "object" }, { @@ -17420,6 +19519,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "lastQuote": { @@ -17448,6 +19555,13 @@ "type": "integer" } }, + "required": [ + "p", + "s", + "P", + "S", + "t" + ], "type": "object" }, "lastTrade": { @@ -17482,6 +19596,14 @@ "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "t", + "x" + ], "type": "object" }, "min": { @@ -17526,6 +19648,15 @@ "type": "number" } }, + "required": [ + "av", + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "prevDay": { @@ -17566,6 +19697,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "ticker": { @@ -17725,6 +19864,9 @@ "type": "string" } }, + "required": [ + "status" + ], "type": "object" }, { @@ -17770,6 +19912,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "lastQuote": { @@ -17798,6 +19948,13 @@ "type": "integer" } }, + "required": [ + "p", + "s", + "P", + "S", + "t" + ], "type": "object" }, "lastTrade": { @@ -17832,6 +19989,14 @@ "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "t", + "x" + ], "type": "object" }, "min": { @@ -17876,6 +20041,15 @@ "type": "number" } }, + "required": [ + "av", + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "prevDay": { @@ -17916,6 +20090,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "ticker": { @@ -18192,6 +20374,13 @@ "type": "integer" } }, + "required": [ + "T", + "t", + "y", + "f", + "q" + ], "type": "object" }, { @@ -18257,6 +20446,17 @@ "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "x", + "P", + "S", + "X", + "z" + ], "type": "object" } ] @@ -18503,6 +20703,13 @@ "type": "integer" } }, + "required": [ + "T", + "t", + "y", + "f", + "q" + ], "type": "object" }, { @@ -18546,6 +20753,16 @@ "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "e", + "x", + "r", + "z" + ], "type": "object" } ] @@ -23000,13 +25217,13 @@ } }, { - "description": "Limit the number of results returned, default is 10 and max is 1000.", + "description": "Limit the number of results returned, default is 10 and max is 250.", "in": "query", "name": "limit", "schema": { "default": 10, "example": 10, - "maximum": 1000, + "maximum": 250, "minimum": 1, "type": "integer" } @@ -23059,10 +25276,10 @@ "greeks": { "delta": 1, "gamma": 0, - "implied_volatility": 5, "theta": 0.00229, "vega": 0 }, + "implied_volatility": 5, "last_quote": { "ask": 120.3, "ask_size": 4, @@ -23159,6 +25376,18 @@ "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" @@ -23207,6 +25436,14 @@ "type": "string" } }, + "required": [ + "ticker", + "contract_type", + "exercise_style", + "expiration_date", + "shares_per_contract", + "strike_price" + ], "type": "object", "x-polygon-go-type": { "name": "Details" @@ -23292,7 +25529,16 @@ "type": "string" } }, - "type": "object", + "required": [ + "last_updated", + "timeframe", + "ask", + "ask_size", + "bid_size", + "bid", + "midpoint" + ], + "type": "object", "x-polygon-go-type": { "name": "LastQuote" } @@ -23337,12 +25583,28 @@ "type": "string" } }, + "required": [ + "last_updated", + "timeframe", + "ticker", + "price", + "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" @@ -23355,6 +25617,10 @@ "type": "string" } }, + "required": [ + "status", + "request_id" + ], "type": "object" } } @@ -23387,7 +25653,7 @@ "x-polygon-paginate": { "limit": { "default": 10, - "max": 1000 + "max": 250 }, "sort": { "default": "ticker", @@ -23398,8 +25664,7 @@ ] } } - }, - "x-polygon-draft": true + } }, "/v3/snapshot/options/{underlyingAsset}/{optionContract}": { "get": { @@ -24719,12 +26984,12 @@ } }, { - "description": "Limit the number of results returned, default is 1 and max is 100.", + "description": "Limit the number of results returned, default is 10 and max is 100.", "in": "query", "name": "limit", "schema": { - "default": 1, - "example": 1, + "default": 10, + "example": 10, "maximum": 100, "minimum": 1, "type": "integer" @@ -24749,128 +27014,294 @@ "200": { "content": { "application/json": { - "count": 1, "description": "FIXME", "example": { - "cik": "0000789019", - "company_name": "MICROSOFT CORPORATION", - "end_date": "2020-12-31", - "financials": { - "balance_sheet": { - "assets": { - "label": "Assets", - "order": 100, - "unit": "USD", - "value": 304137000000, - "xpath": "//*[local-name()='Assets' and @id='F_000165']" - }, - "equity": { - "formula": "BS-Impute-07", - "label": "Equity", - "order": 1400, - "unit": "USD", - "value": 130236000000 - }, - "liabilities": { - "label": "Liabilities", - "order": 600, - "unit": "USD", - "value": 173901000000, - "xpath": "//*[local-name()='Liabilities' and @id='F_000193']" - } - }, - "cash_flow_statement": { - "exchange_gains_losses": { - "label": "Exchange Gains/Losses", - "order": 1000, - "unit": "USD", - "value": 14000000, - "xpath": "//*[local-name()='EffectOfExchangeRateOnCashAndCashEquivalents' and @id='F_000327']" - }, - "net_cash_flow": { - "formula": "CF-Impute-20", - "label": "Net Cash Flow", - "order": 1100, - "unit": "USD", - "value": -2773000000 - }, - "net_cash_flow_from_financing_activities": { - "label": "Net Cash Flow From Financing Activities", - "order": 700, - "unit": "USD", - "value": -13634000000, - "xpath": "//*[local-name()='NetCashProvidedByUsedInFinancingActivities' and @id='F_000295']" - } - }, - "comprehensive_income": { - "comprehensive_income_loss": { - "formula": "CI-Impute-04", - "label": "Comprehensive Income/Loss", - "order": 100, - "unit": "USD", - "value": 15720000000 - }, - "comprehensive_income_loss_attributable_to_parent": { - "label": "Comprehensive Income/Loss Attributable To Parent", - "order": 300, - "unit": "USD", - "value": 15720000000, - "xpath": "//*[local-name()='ComprehensiveIncomeNetOfTax' and @id='F_000135']" - }, - "other_comprehensive_income_loss": { - "formula": "CI-Impute-07", - "label": "Other Comprehensive Income/Loss", - "order": 400, - "unit": "USD", - "value": 15720000000 - } - }, - "income_statement": { - "basic_earnings_per_share": { - "label": "Basic Earnings Per Share", - "order": 4200, - "unit": "USD / shares", - "value": 2.05, - "xpath": "//*[local-name()='EarningsPerShareBasic' and @id='F_000099']" - }, - "cost_of_revenue": { - "label": "Cost Of Revenue", - "order": 300, - "unit": "USD", - "value": 14194000000, - "xpath": "//*[local-name()='CostOfGoodsAndServicesSold' and @id='F_000059']" - }, - "gross_profit": { - "label": "Gross Profit", - "order": 800, - "unit": "USD", - "value": 28882000000, - "xpath": "//*[local-name()='GrossProfit' and @id='F_000063']" - }, - "operating_expenses": { - "formula": "IS-Impute-22", - "label": "Operating Expenses", - "order": 1000, - "unit": "USD", - "value": 10985000000 + "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 + } + }, + "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 + } + }, + "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 + } + } }, - "revenues": { - "label": "Revenues", - "order": 100, - "unit": "USD", - "value": 43076000000, - "xpath": "//*[local-name()='RevenueFromContractWithCustomerExcludingAssessedTax' and @id='F_000047']" - } + "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" } - }, - "fiscal_period": "Q2", - "fiscal_year": "2021", - "source_filing_file_url": "https:/api.polygon.io/v1/reference/sec/filings/0001564590-21-002316/files/0001564590-21-002316:12:msft-10q_20201231_htm.xml", - "source_filing_url": "https://api.polygon.io/v1/reference/sec/filings/0001564590-21-002316", - "start_date": "2020-10-01" + ], + "status": "OK" }, - "next_url": "https:/api.polygon.io/vX/reference/financials?", - "request_id": "28173f20a0751f3479afd9e2cc9246ea", "schema": { "properties": { "count": { @@ -24888,6 +27319,9 @@ "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" @@ -24958,46 +27392,605 @@ "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" + "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" + } + }, + "required": [ + "reporting_period", + "cik", + "company_name", + "financials", + "fiscal_period", + "fiscal_year", + "filing_type", + "source_filing_url", + "source_filing_file_url" + ], + "type": "object", + "x-polygon-go-type": { + "name": "ResolvedFinancials", + "path": "github.com/polygon-io/go-app-api-financials/extract" + } + }, + "type": "array" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status", + "request_id", + "count", + "results" + ], + "type": "object" + } + } + }, + "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" + }, + "type": "ticker_change" + }, + { + "date": "2012-05-18", + "ticker_change": { + "ticker": "FB" + }, + "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" + }, + "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": { + "properties": { + "ticker": { + "type": "string" + } + }, + "type": "object" + } + }, + "required": [ + "event_type", + "date" + ], + "type": "object" + } + ] + }, + "type": "array" + }, + "name": { + "type": "string" + } + }, + "type": "object", + "x-polygon-go-type": { + "name": "EventsResults" + } + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "type": "object" + } + } + }, + "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-experimental": {} + } + }, + "/vX/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" + }, + "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 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.", + "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" + } + }, + "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": "object", + "x-polygon-go-type": { + "name": "LastQuote" + } + }, + "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" + } }, - "start_date": { - "description": "The start date of the period that these financials cover in YYYYMMDD format.", - "type": "string" + "required": [ + "last_updated", + "timeframe", + "ticker", + "price", + "change_to_break_even" + ], + "type": "object", + "x-polygon-go-type": { + "name": "UnderlyingAsset" } - }, - "required": [ - "reporting_period", - "cik", - "company_name", - "financials", - "fiscal_period", - "fiscal_year", - "filing_type", - "source_filing_url", - "source_filing_file_url" - ], - "type": "object", - "x-polygon-go-type": { - "name": "ResolvedFinancials", - "path": "github.com/polygon-io/go-app-api-financials/extract" } }, - "type": "array" + "required": [ + "day", + "last_quote", + "underlying_asset", + "details", + "break_even_price", + "implied_volatility", + "open_interest" + ], + "type": "object", + "x-polygon-go-type": { + "name": "OptionSnapshotResult" + } }, "status": { "description": "The status of this request's response.", @@ -25006,168 +27999,45 @@ }, "required": [ "status", - "request_id", - "count", - "results" + "request_id" ], "type": "object" - }, - "status": "OK" + } + }, + "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": "FIXME" + "description": "Snapshot of the option contract." } }, - "summary": "Stock Financials vX", + "summary": "Option Contract", "tags": [ - "reference:stocks" + "options:snapshot" ], - "x-polygon-entitlement-data-type": { - "description": "Reference data", - "name": "reference" - }, - "x-polygon-experimental": {}, - "x-polygon-paginate": { - "limit": { - "default": 1, - "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": [ + "x-polygon-entitlement-allowed-timeframes": [ { - "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": "Real Time Data", + "name": "realtime" }, { - "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" - }, - "type": "ticker_change" - }, - { - "date": "2012-05-18", - "ticker_change": { - "ticker": "FB" - }, - "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" - }, - "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": { - "properties": { - "ticker": { - "type": "string" - } - }, - "type": "object" - } - }, - "required": [ - "event_type", - "date" - ], - "type": "object" - } - ] - }, - "type": "array" - }, - "name": { - "type": "string" - } - }, - "type": "object", - "x-polygon-go-type": { - "name": "EventsResults" - } - }, - "status": { - "description": "The status of this request's response.", - "type": "string" - } - }, - "type": "object" - } - } - }, - "description": "Ticker Events." - }, - "401": { - "description": "Unauthorized - Check our API Key and account status" + "description": "15 minute delayed data", + "name": "delayed" } - }, - "summary": "Ticker Events", - "tags": [ - "reference:tickers:get" ], "x-polygon-entitlement-data-type": { - "description": "Reference data", - "name": "reference" + "description": "Aggregate data", + "name": "aggregates" }, - "x-polygon-experimental": {} - } + "x-polygon-entitlement-market-type": { + "description": "Options data", + "name": "options" + } + }, + "x-polygon-draft": true } }, "security": [ @@ -25263,10 +28133,17 @@ "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}" @@ -25347,10 +28224,17 @@ "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}" @@ -25430,10 +28314,17 @@ "options": { "market": [ { + "launchpad": "shared", "paths": [ "/v2/aggs/ticker/{optionsTicker}/range/{multiplier}/{timespan}/{from}/{to}" ] }, + { + "launchpad": "exclusive", + "paths": [ + "/v1/summaries" + ] + }, { "paths": [ "/v1/open-close/{optionsTicker}/{date}" @@ -25537,10 +28428,17 @@ "stocks": { "market": [ { + "launchpad": "shared", "paths": [ "/v2/aggs/ticker/{stocksTicker}/range/{multiplier}/{timespan}/{from}/{to}" ] }, + { + "launchpad": "exclusive", + "paths": [ + "/v1/summaries" + ] + }, { "paths": [ "/v2/aggs/grouped/locale/us/market/stocks/{date}" diff --git a/polygon/rest/vX.py b/polygon/rest/vX.py index 36af52d2..a7c13a2f 100644 --- a/polygon/rest/vX.py +++ b/polygon/rest/vX.py @@ -54,7 +54,7 @@ def list_stock_financials( :param period_of_report_date_gte: period_of_report_date greater than or equal to. :param timeframe: Query by timeframe. :param include_sources: Whether or not to include the xpath and formula attributes for each financial data point. - :param limit: Limit the number of results returned per-page, default is 1 and max is 100. + :param limit: Limit the number of results returned per-page, default is 10 and max is 100. :param sort: Sort field used for ordering. :param order: Order results based on the sort field. :param params: Any additional query params