From e0bdacd4fac8272ab4712c53e1ba7532d803ca8e Mon Sep 17 00:00:00 2001
From: Vera Harless <53271741+morningvera@users.noreply.github.com>
Date: Tue, 2 Aug 2022 14:04:31 -0400
Subject: [PATCH] use full rest api spec
---
.polygon/rest.json | 29746 ++++++++++++++++++++++++++-----------------
1 file changed, 18093 insertions(+), 11653 deletions(-)
diff --git a/.polygon/rest.json b/.polygon/rest.json
index e9e94a0a..952f2e95 100644
--- a/.polygon/rest.json
+++ b/.polygon/rest.json
@@ -1,4010 +1,5573 @@
{
- "openapi": "3.0.3",
- "info": {
- "title": "Polygon API",
- "description": "The future of fintech.",
- "version": "1.0.0"
- },
- "servers": [
- {
- "url": "https://api.polygon.io",
- "description": "Polygon Platform API"
- },
- {
- "url": "https://api.staging.polygon.io",
- "description": "Polygon Platform API (Staging)"
- }
- ],
- "x-polygon-order": {
- "stocks": {
- "market": [
- {
- "paths": [
- "/v2/aggs/ticker/{stocksTicker}/range/{multiplier}/{timespan}/{from}/{to}"
- ]
- },
- {
- "paths": [
- "/v2/aggs/grouped/locale/us/market/stocks/{date}"
- ]
- },
- {
- "paths": [
- "/v1/open-close/{stocksTicker}/{date}"
- ]
- },
- {
- "paths": [
- "/v2/aggs/ticker/{stocksTicker}/prev"
- ]
- },
- {
- "paths": [
- "/v3/trades/{stockTicker}"
- ]
- },
- {
- "paths": [
- "/v2/ticks/stocks/trades/{ticker}/{date}"
- ]
- },
- {
- "paths": [
- "/v2/last/trade/{stocksTicker}"
- ]
- },
- {
- "paths": [
- "/v3/quotes/{stockTicker}"
- ]
- },
- {
- "paths": [
- "/v2/ticks/stocks/nbbo/{ticker}/{date}"
- ]
- },
- {
- "paths": [
- "/v2/last/nbbo/{stocksTicker}"
- ]
- },
- {
- "paths": [
- "/v2/snapshot/locale/us/markets/stocks/tickers",
- "/v2/snapshot/locale/us/markets/stocks/{direction}",
- "/v2/snapshot/locale/us/markets/stocks/tickers/{stocksTicker}"
- ],
- "group": "Snapshots"
+ "components": {
+ "parameters": {
+ "AggregateAdjusted": {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
}
- ],
- "reference": [
- {
- "paths": [
- "/v3/reference/tickers"
- ]
- },
- {
- "paths": [
- "/v1/meta/symbols/{stocksTicker}/company"
- ]
- },
- {
- "paths": [
- "/v3/reference/tickers/{ticker}"
- ]
- },
- {
- "paths": [
- "/v2/reference/news"
- ]
- },
- {
- "paths": [
- "/v3/reference/tickers/types"
- ]
- },
- {
- "paths": [
- "/v1/marketstatus/upcoming"
- ]
- },
- {
- "paths": [
- "/v1/marketstatus/now"
- ]
- },
- {
- "paths": [
- "/v1/reference/sec/filings",
- "/v1/reference/sec/filings/{filing_id}",
- "/v1/reference/sec/filings/{filing_id}/files",
- "/v1/reference/sec/filings/{filing_id}/files/{file_id}"
- ],
- "group": "SEC Filings"
- },
- {
- "paths": [
- "/v3/reference/splits"
- ]
- },
- {
- "paths": [
- "/v3/reference/dividends"
- ]
- },
- {
- "paths": [
- "/vX/reference/financials"
- ]
- },
- {
- "paths": [
- "/v3/reference/conditions"
- ]
- },
- {
- "paths": [
- "/v3/reference/exchanges"
- ]
+ },
+ "AggregateDate": {
+ "description": "The beginning date for the aggregate window.",
+ "example": "2020-10-14",
+ "in": "path",
+ "name": "date",
+ "required": true,
+ "schema": {
+ "type": "string"
}
- ]
- },
- "options": {
- "market": [
- {
- "paths": [
- "/v2/aggs/ticker/{optionsTicker}/range/{multiplier}/{timespan}/{from}/{to}"
- ]
- },
- {
- "paths": [
- "/v1/open-close/{optionsTicker}/{date}"
- ]
- },
- {
- "paths": [
- "/v2/aggs/ticker/{optionsTicker}/prev"
- ]
- },
- {
- "paths": [
- "/v3/trades/{optionsTicker}"
- ]
- },
- {
- "paths": [
- "/v2/last/trade/{optionsTicker}"
- ]
- },
- {
- "paths": [
- "/v3/quotes/{optionsTicker}"
+ },
+ "AggregateLimitMax50000": {
+ "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on \n\u003ca href=\"https://polygon.io/blog/aggs-api-updates/\" target=\"_blank\" alt=\"Aggregate Data API Improvements\"\u003eAggregate Data API Improvements\u003c/a\u003e.\n",
+ "example": 120,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ "AggregateMultiplier": {
+ "description": "The size of the timespan multiplier.",
+ "example": 1,
+ "in": "path",
+ "name": "multiplier",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ "AggregateSort": {
+ "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
+ "example": "asc",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
]
- },
- {
- "paths": [
- "/v3/snapshot/options/{underlyingAsset}/{optionContract}",
- "/v3/snapshot/options/{underlyingAsset}"
+ }
+ },
+ "AggregateTimeFrom": {
+ "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2021-07-22",
+ "in": "path",
+ "name": "from",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "AggregateTimeTo": {
+ "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2021-07-22",
+ "in": "path",
+ "name": "to",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "AggregateTimespan": {
+ "description": "The size of the time window.",
+ "example": "day",
+ "in": "path",
+ "name": "timespan",
+ "required": true,
+ "schema": {
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
],
- "group": "Snapshots"
+ "type": "string"
}
- ],
- "reference": [
- {
- "paths": [
- "/v3/reference/options/contracts/{options_ticker}"
- ]
- },
- {
- "paths": [
- "/v3/reference/options/contracts"
- ]
- },
- {
- "paths": [
- "/v3/reference/tickers"
- ]
- },
- {
- "paths": [
- "/v1/meta/symbols/{stocksTicker}/company"
- ]
- },
- {
- "paths": [
- "/v3/reference/tickers/{ticker}"
- ]
- },
- {
- "paths": [
- "/v2/reference/news"
- ]
- },
- {
- "paths": [
- "/v3/reference/tickers/types"
- ]
- },
- {
- "paths": [
- "/v1/marketstatus/upcoming"
- ]
- },
- {
- "paths": [
- "/v1/marketstatus/now"
- ]
- },
- {
- "paths": [
- "/v3/reference/conditions"
- ]
- },
- {
- "paths": [
- "/v3/reference/exchanges"
- ]
+ },
+ "CryptoTickerPathParam": {
+ "description": "The ticker symbol of the currency pair.",
+ "example": "X:BTCUSD",
+ "in": "path",
+ "name": "cryptoTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
}
- ]
- },
- "fx": {
- "market": [
- {
- "paths": [
- "/v2/aggs/ticker/{forexTicker}/range/{multiplier}/{timespan}/{from}/{to}"
- ]
- },
- {
- "paths": [
- "/v2/aggs/grouped/locale/global/market/fx/{date}"
- ]
- },
- {
- "paths": [
- "/v2/aggs/ticker/{forexTicker}/prev"
- ]
- },
- {
- "paths": [
- "/v3/quotes/{fxTicker}"
- ]
- },
- {
- "paths": [
- "/v1/historic/forex/{from}/{to}/{date}"
- ]
- },
- {
- "paths": [
- "/v1/last_quote/currencies/{from}/{to}"
- ]
- },
- {
- "paths": [
- "/v1/conversion/{from}/{to}"
- ]
- },
- {
- "paths": [
- "/v2/snapshot/locale/global/markets/forex/tickers",
- "/v2/snapshot/locale/global/markets/forex/{direction}",
- "/v2/snapshot/locale/global/markets/forex/tickers/{ticker}"
- ],
- "group": "Snapshots"
+ },
+ "ForexTickerPathParam": {
+ "description": "The ticker symbol of the currency pair.",
+ "example": "C:EURUSD",
+ "in": "path",
+ "name": "forexTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
}
- ],
- "reference": [
- {
- "paths": [
- "/v3/reference/tickers"
- ]
- },
- {
- "paths": [
- "/v1/marketstatus/upcoming"
- ]
- },
- {
- "paths": [
- "/v1/marketstatus/now"
- ]
- },
- {
- "paths": [
- "/v3/reference/conditions"
- ]
- },
- {
- "paths": [
- "/v3/reference/exchanges"
- ]
+ },
+ "GeneralTickerPathParam": {
+ "description": "The ticker symbol of the asset.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "ticker",
+ "required": true,
+ "schema": {
+ "type": "string"
}
- ]
- },
- "crypto": {
- "market": [
- {
- "paths": [
- "/v2/aggs/ticker/{cryptoTicker}/range/{multiplier}/{timespan}/{from}/{to}"
- ]
- },
- {
- "paths": [
- "/v2/aggs/grouped/locale/global/market/crypto/{date}"
- ]
- },
- {
- "paths": [
- "/v1/open-close/crypto/{from}/{to}/{date}"
- ]
- },
- {
- "paths": [
- "/v2/aggs/ticker/{cryptoTicker}/prev"
- ]
- },
- {
- "paths": [
- "/v3/trades/{cryptoTicker}"
- ]
- },
- {
- "paths": [
- "/v1/historic/crypto/{from}/{to}/{date}"
- ]
- },
- {
- "paths": [
- "/v1/last/crypto/{from}/{to}"
- ]
- },
- {
- "paths": [
- "/v2/snapshot/locale/global/markets/crypto/tickers",
- "/v2/snapshot/locale/global/markets/crypto/{direction}",
- "/v2/snapshot/locale/global/markets/crypto/tickers/{ticker}",
- "/v2/snapshot/locale/global/markets/crypto/tickers/{ticker}/book"
- ],
- "group": "Snapshots"
+ },
+ "IncludeOTC": {
+ "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n",
+ "in": "query",
+ "name": "include_otc",
+ "schema": {
+ "type": "boolean"
}
- ],
- "reference": [
- {
- "paths": [
- "/v3/reference/tickers"
- ]
- },
- {
- "paths": [
- "/v1/marketstatus/upcoming"
- ]
- },
- {
- "paths": [
- "/v1/marketstatus/now"
- ]
- },
- {
- "paths": [
- "/v3/reference/conditions"
- ]
- },
- {
- "paths": [
- "/v3/reference/exchanges"
- ]
+ },
+ "LimitMax10000": {
+ "description": "Limit the size of the response, max 10000.",
+ "example": 100,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
}
- ]
- }
- },
- "tags": [
- {
- "name": "reference",
- "description": "Reference API",
- "x-polygon-sub-tags": [
- "tickers:list",
- "tickers:types",
- "tickers:get",
- "options:contracts:list",
- "news",
- "tickers",
- "stocks",
- "sec:filings",
- "sec:filing",
- "sec:filing:files",
- "sec:filing:file",
- "stocks:market",
- "conditions",
- "stocks:meta:exchanges",
- "crypto",
- "exchanges"
- ]
- },
- {
- "name": "stocks",
- "description": "Stocks API",
- "x-polygon-sub-tags": [
- "trades",
- "quotes",
- "last:trade",
- "last:quote",
- "open-close",
- "aggregates",
- "snapshot"
- ]
- },
- {
- "name": "options",
- "description": "Options API",
- "x-polygon-sub-tags": [
- "trades",
- "quotes",
- "last:trade",
- "last:quote",
- "open-close",
- "aggregates",
- "snapshot"
- ]
+ },
+ "LimitMax50000": {
+ "description": "Limit the size of the response, max 50000 and default 5000.",
+ "example": 10,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ "LimitNoMax": {
+ "description": "Limit the number of results.\n",
+ "example": 5,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ "OptionsTickerPathParam": {
+ "description": "The ticker symbol of the options contract.",
+ "example": "O:TSLA210903C00700000",
+ "in": "path",
+ "name": "optionsTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "ReverseOrder": {
+ "description": "Reverse the order of the results.\n",
+ "example": true,
+ "in": "query",
+ "name": "reverse",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ "SnapshotDirection": {
+ "description": "The direction of the snapshot results to return.\n",
+ "example": "gainers",
+ "in": "path",
+ "name": "direction",
+ "required": true,
+ "schema": {
+ "enum": [
+ "gainers",
+ "losers"
+ ],
+ "type": "string"
+ }
+ },
+ "StocksTickerPathParam": {
+ "description": "The ticker symbol of the stock/equity.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "stocksTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "TickersQueryParam": {
+ "description": "A comma separated list of tickers to get snapshots for.",
+ "in": "query",
+ "name": "tickers",
+ "schema": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ }
},
- {
- "name": "fx",
- "description": "Forex API",
- "x-polygon-sub-tags": [
- "trades",
- "quotes",
- "conversion",
- "last:trade",
- "last:quote",
- "aggregates",
- "snapshot"
- ]
+ "responses": {
+ "Conflict": {
+ "description": "Parameter is invalid or incorrect."
+ },
+ "DefaultError": {
+ "description": "Unexpected error"
+ },
+ "NotFound": {
+ "description": "The specified resource was not found"
+ },
+ "Unauthorized": {
+ "description": "Unauthorized - Check our API Key and account status"
+ }
},
- {
- "name": "crypto",
- "description": "Crypto API",
- "x-polygon-sub-tags": [
- "trades",
- "last:trade",
- "open-close",
- "aggregates",
- "snapshot"
- ]
- }
- ],
- "paths": {
- "/v3/reference/tickers": {
- "get": {
- "summary": "Tickers",
- "description": "Query all ticker symbols which are supported by Polygon.io. This API currently includes Stocks/Equities, Crypto, and Forex.\n",
- "tags": [
- "reference:tickers:list"
- ],
- "parameters": [
+ "schemas": {
+ "Adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "AskExchangeId": {
+ "allOf": [
{
- "name": "ticker",
- "in": "query",
- "description": "Specify a ticker symbol.\nDefaults to empty string which queries all tickers.\n",
- "required": false,
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
},
{
- "name": "type",
- "in": "query",
- "description": "Specify the type of the tickers. Find the types that we support via our [Ticker Types API](https://polygon.io/docs/stocks/get_v3_reference_tickers_types).\nDefaults to empty string which queries all types.\n",
- "required": false,
- "schema": {
- "type": "string",
- "enum": [
- "CS",
- "ADRC",
- "ADRP",
- "ADRR",
- "UNIT",
- "RIGHT",
- "PFD",
- "FUND",
- "SP",
- "WARRANT",
- "INDEX",
- "ETF",
- "ETN",
- "OS",
- "GDR",
- "OTHER",
- "NYRS",
- "AGEN",
- "EQLK",
- "BOND",
- "ADRW",
- "BASKET",
- "LT"
- ]
- }
- },
+ "description": "Ask Exchange Id"
+ }
+ ]
+ },
+ "AskPrice": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "AskSize": {
+ "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.",
+ "type": "integer"
+ },
+ "BidExchangeId": {
+ "allOf": [
{
- "name": "market",
- "in": "query",
- "description": "Filter by market type. By default all markets are included.\n",
- "required": false,
- "schema": {
- "type": "string",
- "enum": [
- "stocks",
- "crypto",
- "fx",
- "otc"
- ]
- }
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
},
{
- "name": "exchange",
- "in": "query",
- "description": "Specify the primary exchange of the asset in the ISO code format. Find more information about the ISO codes [at the ISO org website](https://www.iso20022.org/market-identifier-codes).\nDefaults to empty string which queries all exchanges.\n",
- "required": false,
- "schema": {
- "type": "string"
- }
+ "description": "Bid Exchange Id"
+ }
+ ]
+ },
+ "BidPrice": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "BidSize": {
+ "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.",
+ "type": "integer"
+ },
+ "Close": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "Company": {
+ "properties": {
+ "active": {
+ "description": "Indicates if the security is actively listed. If false, this means the company is no longer listed and cannot be traded.",
+ "type": "boolean"
},
- {
- "name": "cusip",
- "in": "query",
- "description": "Specify the CUSIP code of the asset you want to search for. Find more information about CUSIP codes [at their website](https://www.cusip.com/identifiers.html#/CUSIP).\nDefaults to empty string which queries all CUSIPs.\n\nNote: Although you can query by CUSIP, due to legal reasons we do not return the CUSIP in the response.\n",
- "required": false,
- "schema": {
- "type": "string"
- }
+ "bloomberg": {
+ "description": "The Bloomberg guid for the symbol.",
+ "type": "string"
},
- {
- "name": "cik",
- "in": "query",
- "description": "Specify the CIK of the asset you want to search for. Find more information about CIK codes [at their website](https://www.sec.gov/edgar/searchedgar/cik.htm).\nDefaults to empty string which queries all CIKs.\n",
- "required": false,
- "schema": {
- "type": "string"
- }
+ "ceo": {
+ "description": "The name of the company's current CEO.",
+ "type": "string"
},
- {
- "name": "date",
- "in": "query",
- "description": "Specify a point in time to retrieve tickers available on that date.\nDefaults to the most recent available date.\n",
- "required": false,
- "schema": {
- "oneOf": [
- {
- "type": "string",
- "format": "date-time"
- },
- {
- "type": "string",
- "format": "date"
- }
- ]
- }
+ "cik": {
+ "description": "The official CIK guid used for SEC database/filings.",
+ "type": "string"
},
- {
- "name": "search",
- "in": "query",
- "description": "Search for terms within the ticker and/or company name.\n",
- "required": false,
- "schema": {
+ "country": {
+ "description": "The country in which the company is registered.",
+ "type": "string"
+ },
+ "description": {
+ "description": "A description of the company and what they do/offer.",
+ "type": "string"
+ },
+ "employees": {
+ "description": "The approximate number of employees for the company.",
+ "type": "integer"
+ },
+ "exchange": {
+ "description": "The symbol's primary exchange.",
+ "type": "string"
+ },
+ "exchangeSymbol": {
+ "description": "The exchange code (id) of the symbol's primary exchange.",
+ "type": "string"
+ },
+ "figi": {
+ "description": "The OpenFigi project guid for the symbol. (\u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://openfigi.com/\"\u003ehttps://openfigi.com/\u003c/a\u003e)",
+ "type": "string"
+ },
+ "hq_address": {
+ "description": "The street address for the company's headquarters.",
+ "type": "string"
+ },
+ "hq_country": {
+ "description": "The country in which the company's headquarters is located.",
+ "type": "string"
+ },
+ "hq_state": {
+ "description": "The state in which the company's headquarters is located.",
+ "type": "string"
+ },
+ "industry": {
+ "description": "The industry in which the company operates.",
+ "type": "string"
+ },
+ "lei": {
+ "description": "The Legal Entity Identifier (LEI) guid for the symbol. (\u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Legal_Entity_Identifier\"\u003ehttps://en.wikipedia.org/wiki/Legal_Entity_Identifier\u003c/a\u003e)",
+ "type": "string"
+ },
+ "listdate": {
+ "description": "The date that the symbol was listed on the exchange.",
+ "format": "date",
+ "type": "string"
+ },
+ "logo": {
+ "description": "The URL of the entity's logo.",
+ "type": "string"
+ },
+ "marketcap": {
+ "description": "The current market cap for the company.",
+ "type": "integer"
+ },
+ "name": {
+ "description": "The name of the company/entity.",
+ "type": "string"
+ },
+ "phone": {
+ "description": "The phone number for the company. This is usually a corporate contact number.",
+ "type": "string"
+ },
+ "sector": {
+ "description": "The sector of the indsutry in which the symbol operates.",
+ "type": "string"
+ },
+ "sic": {
+ "description": "Standard Industrial Classification (SIC) id for the symbol. (\u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Standard_Industrial_Classification\"\u003ehttps://en.wikipedia.org/wiki/Legal_Entity_Identifier\u003c/a\u003e)",
+ "type": "integer"
+ },
+ "similar": {
+ "description": "A list of ticker symbols for similar companies.",
+ "items": {
+ "description": "The exchange symbol that this item is traded under.",
"type": "string"
- }
+ },
+ "type": "array"
},
- {
- "name": "active",
- "in": "query",
- "description": "Specify if the tickers returned should be actively traded on the queried date. Default is true.\n",
- "required": false,
- "schema": {
- "type": "boolean"
+ "symbol": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "tags": {
+ "items": {
+ "description": "A list of words related to the company.",
+ "type": "string"
},
- "example": true
+ "type": "array"
},
- {
- "name": "sort",
- "in": "query",
- "description": "The field to sort the results on. Default is ticker.\nIf the `search` query parameter is present, `sort` is ignored and results are ordered by relevance.\n",
- "required": false,
- "schema": {
- "type": "string",
- "enum": [
- "ticker",
- "name",
- "market",
- "locale",
- "primary_exchange",
- "type",
- "currency_symbol",
- "currency_name",
- "base_currency_symbol",
- "base_currency_name",
- "cik",
- "composite_figi",
- "share_class_figi",
- "last_updated_utc",
- "delisted_utc"
- ]
+ "type": {
+ "description": "The type or class of the security. (\u003ca alt=\"Full List of Ticker Types\" href=\"https://polygon.io/docs/stocks/get_v3_reference_tickers_types\"\u003eFull List of Ticker Types\u003c/a\u003e)",
+ "type": "string"
+ },
+ "updated": {
+ "description": "The last time this company record was updated.",
+ "format": "date",
+ "type": "string"
+ },
+ "url": {
+ "description": "The URL of the company's website",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ConditionTypeMap": {
+ "properties": {
+ "condition": {
+ "description": "Polygon.io's mapping for condition codes. For more information, see our \u003ca href=\"https://polygon.io/glossary/us/stocks/trade-conditions\" alt=\"Trade Conditions Glossary\" target=\"_blank\"\u003eTrade Conditions Glossary\u003c/a\u003e.\n",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Conditions": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "Count": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "CryptoExchange": {
+ "items": {
+ "properties": {
+ "id": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "market": {
+ "description": "Market data type this exchange contains ( crypto only currently )",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the exchange",
+ "type": "string"
},
- "example": "ticker"
+ "type": {
+ "description": "Type of exchange feed",
+ "type": "string"
+ },
+ "url": {
+ "description": "URL of this exchange",
+ "type": "string"
+ }
},
- {
- "name": "order",
- "in": "query",
- "description": "The order to sort the results on. Default is asc (ascending).\n",
- "required": false,
- "schema": {
- "type": "string",
- "enum": [
- "asc",
- "desc"
- ]
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "CryptoGroupedResults": {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
},
- "example": "asc"
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "CryptoHistoricTrades": {
+ "properties": {
+ "day": {
+ "description": "The date that was evaluated from the request.",
+ "format": "date",
+ "type": "string"
},
- {
- "example": 10,
- "required": false,
- "name": "limit",
- "in": "query",
- "description": "Limit the size of the response, default is 100 and max is 1000.\n\nIf your query returns more than the max limit and you want to retrieve the next page of results,\nsee the `next_url` response attribute.\n",
- "schema": {
- "type": "integer",
- "minimum": 1,
- "maximum": 1000,
- "default": 100
- }
+ "map": {
+ "description": "A map for shortened result keys.",
+ "type": "object"
+ },
+ "msLatency": {
+ "description": "The milliseconds of latency for the query results.",
+ "type": "integer"
+ },
+ "symbol": {
+ "description": "The symbol pair that was evaluated from the request.",
+ "type": "string"
+ },
+ "ticks": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size of a trade (also known as volume).\n",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
}
- ],
- "responses": {
- "200": {
- "description": "Reference Tickers.",
- "content": {
- "application/json": {
- "schema": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "results": {
- "type": "array",
- "description": "An array of tickers that match your query.\n\nNote: Although you can query by CUSIP, due to legal reasons we do not return the CUSIP in the response.\n",
- "items": {
- "type": "object",
- "properties": {
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "name": {
- "type": "string",
- "description": "The name of the asset. For stocks/equities this will be the companies registered name. For crypto/fx this will be the name of the currency or coin pair.\n"
- },
- "market": {
- "type": "string",
- "description": "The market type of the asset.",
- "enum": [
- "stocks",
- "crypto",
- "fx",
- "otc"
- ]
- },
- "locale": {
- "type": "string",
- "description": "The locale of the asset.",
- "enum": [
- "us",
- "global"
- ]
- },
- "primary_exchange": {
- "type": "string",
- "description": "The ISO code of the primary listing exchange for this asset."
- },
- "type": {
- "type": "string",
- "description": "The type of the asset. Find the types that we support via our [Ticker Types API](https://polygon.io/docs/stocks/get_v3_reference_tickers_types)."
- },
- "active": {
- "type": "boolean",
- "description": "Whether or not the asset is actively traded. False means the asset has been delisted."
- },
- "currency_name": {
- "type": "string",
- "description": "The name of the currency that this asset is traded with."
- },
- "cik": {
- "type": "string",
- "description": "The CIK number for this ticker. Find more information [here](https://en.wikipedia.org/wiki/Central_Index_Key)."
- },
- "composite_figi": {
- "type": "string",
- "description": "The composite OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)"
- },
- "share_class_figi": {
- "type": "string",
- "description": "The share Class OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)"
- },
- "last_updated_utc": {
- "type": "string",
- "format": "date-time",
- "description": "The information is accurate up to this time."
- },
- "delisted_utc": {
- "type": "string",
- "format": "date-time",
- "description": "The last date that the asset was traded."
- }
- },
- "required": [
- "ticker",
- "name",
- "market",
- "locale"
- ]
- }
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "next_url": {
- "type": "string",
- "description": "If present, this value can be used to fetch the next page of data."
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- },
- "count": {
- "type": "integer",
- "description": "The total number of results for this request."
- }
- }
- }
- ]
+ },
+ "type": "object"
+ },
+ "CryptoLastTrade": {
+ "properties": {
+ "last": {
+ "properties": {
+ "conditions": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
},
- "example": {
- "results": [
- {
- "ticker": "A",
- "name": "Agilent Technologies Inc.",
- "market": "stocks",
- "locale": "us",
- "primary_exchange": "XNYS",
- "type": "CS",
- "active": true,
- "currency_name": "usd",
- "cik": "0001090872",
- "composite_figi": "BBG000BWQYZ5",
- "share_class_figi": "BBG001SCTQY4",
- "last_updated_utc": "2021-04-25T00:00:00Z"
- }
- ],
- "status": "OK",
- "request_id": "e70013d92930de90e089dc8fa098888e",
- "count": 1,
- "next_url": "https://api.polygon.io/v3/reference/tickers?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy"
- }
+ "type": "array"
+ },
+ "exchange": {
+ "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
+ "type": "integer"
+ },
+ "price": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "size": {
+ "description": "The size of a trade (also known as volume).\n",
+ "format": "double",
+ "type": "number"
+ },
+ "timestamp": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
}
- }
+ },
+ "type": "object"
},
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
+ "symbol": {
+ "description": "The symbol pair that was evaluated from the request.",
+ "type": "string"
}
},
- "x-polygon-entitlement-data-type": {
- "name": "reference",
- "description": "Reference data"
- }
- }
- },
- "/v3/reference/tickers/{ticker}": {
- "get": {
- "summary": "Ticker Details v3",
- "description": "Get a single ticker supported by Polygon.io. This response will have detailed information about the ticker and the company behind it.\n",
- "tags": [
- "reference:tickers:get"
- ],
- "parameters": [
- {
- "name": "ticker",
- "in": "path",
- "description": "The ticker symbol of the asset.",
- "required": true,
- "schema": {
- "type": "string"
+ "type": "object"
+ },
+ "CryptoOpenClose": {
+ "properties": {
+ "close": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "closingTrades": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size of a trade (also known as volume).\n",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
+ "type": "integer"
+ }
+ },
+ "type": "object"
},
- "example": "AAPL"
+ "type": "array"
},
- {
- "name": "date",
- "in": "query",
- "description": "Specify a point in time to get information about the ticker available on that date.\nWhen retrieving information from SEC filings, we compare this date with the period of report date on the SEC filing.\n\nFor example, consider an SEC filing submitted by AAPL on 2019-07-31, with a period of report date ending on 2019-06-29.\nThat means that the filing was submitted on 2019-07-31, but the filing was created based on information from 2019-06-29.\nIf you were to query for AAPL details on 2019-06-29, the ticker details would include information from the SEC filing.\n\nDefaults to the most recent available date.\n",
- "required": false,
- "schema": {
- "oneOf": [
- {
- "type": "string",
- "format": "date-time"
+ "day": {
+ "description": "The date requested.",
+ "format": "date",
+ "type": "string"
+ },
+ "isUTC": {
+ "description": "Whether or not the timestamps are in UTC timezone.",
+ "type": "boolean"
+ },
+ "open": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "openTrades": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
},
- {
- "type": "string",
- "format": "date"
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size of a trade (also known as volume).\n",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
+ "type": "integer"
}
- ]
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Reference Tickers.",
- "content": {
- "application/json": {
- "schema": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "results": {
- "type": "object",
- "description": "Ticker with details.\n",
- "properties": {
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "name": {
- "type": "string",
- "description": "The name of the asset. For stocks/equities this will be the companies registered name. For crypto/fx this will be the name of the currency or coin pair.\n"
- },
- "market": {
- "type": "string",
- "description": "The market type of the asset.",
- "enum": [
- "stocks",
- "crypto",
- "fx",
- "otc"
- ]
- },
- "locale": {
- "type": "string",
- "description": "The locale of the asset.",
- "enum": [
- "us",
- "global"
- ]
- },
- "primary_exchange": {
- "type": "string",
- "description": "The ISO code of the primary listing exchange for this asset."
- },
- "type": {
- "type": "string",
- "description": "The type of the asset. Find the types that we support via our [Ticker Types API](https://polygon.io/docs/stocks/get_v3_reference_tickers_types)."
- },
- "active": {
- "type": "boolean",
- "description": "Whether or not the asset is actively traded. False means the asset has been delisted."
- },
- "currency_name": {
- "type": "string",
- "description": "The name of the currency that this asset is traded with."
- },
- "cik": {
- "type": "string",
- "description": "The CIK number for this ticker. Find more information [here](https://en.wikipedia.org/wiki/Central_Index_Key)."
- },
- "composite_figi": {
- "type": "string",
- "description": "The composite OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)"
- },
- "share_class_figi": {
- "type": "string",
- "description": "The share Class OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)"
- },
- "delisted_utc": {
- "type": "string",
- "format": "date-time",
- "description": "The last date that the asset was traded."
- },
- "share_class_shares_outstanding": {
- "type": "number",
- "format": "double",
- "description": "The recorded number of outstanding shares for this particular share class."
- },
- "weighted_shares_outstanding": {
- "type": "number",
- "format": "double",
- "description": "The shares outstanding calculated assuming all shares of other share classes are converted to this share class.\n"
- },
- "market_cap": {
- "type": "number",
- "format": "double",
- "description": "The most recent close price of the ticker multiplied by weighted outstanding shares."
- },
- "phone_number": {
- "type": "string",
- "description": "The phone number for the company behind this ticker."
- },
- "address": {
- "type": "object",
- "properties": {
- "address1": {
- "type": "string",
- "description": "The first line of the company's headquarters address."
- },
- "city": {
- "type": "string",
- "description": "The city of the company's headquarters address."
- },
- "state": {
- "type": "string",
- "description": "The state of the company's headquarters address."
- },
- "postal_code": {
- "type": "string",
- "description": "The postal code of the company's headquarters address."
- }
- }
- },
- "sic_code": {
- "type": "string",
- "description": "The standard industrial classification code for this ticker. For a list of SIC Codes, see the SEC's SIC Code List.\n"
- },
- "sic_description": {
- "type": "string",
- "description": "A description of this ticker's SIC code."
- },
- "ticker_root": {
- "type": "string",
- "description": "The root of a specified ticker. For example, the root of BRK.A is BRK."
- },
- "ticker_suffix": {
- "type": "string",
- "description": "The suffix of a specified ticker. For example, the suffix of BRK.A is A."
- },
- "total_employees": {
- "type": "number",
- "description": "The approximate number of employees for the company."
- },
- "list_date": {
- "type": "string",
- "description": "The date that the symbol was first publicly listed in the format YYYY-MM-DD."
- },
- "homepage_url": {
- "type": "string",
- "description": "The URL of the company's website homepage."
- },
- "description": {
- "type": "string",
- "description": "A description of the company and what they do/offer."
- },
- "branding": {
- "type": "object",
- "properties": {
- "logo_url": {
- "type": "string",
- "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.\n"
- },
- "icon_url": {
- "type": "string",
- "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.\n"
- }
- }
- }
- },
- "required": [
- "ticker",
- "name",
- "market",
- "locale",
- "active",
- "currency_name"
- ]
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- },
- "count": {
- "type": "integer",
- "description": "The total number of results for this request."
- }
- }
- }
- ]
- },
- "example": {
- "results": {
- "ticker": "AAPL",
- "name": "Apple Inc.",
- "market": "stocks",
- "locale": "us",
- "primary_exchange": "XNAS",
- "type": "CS",
- "active": true,
- "currency_name": "usd",
- "cik": "0000320193",
- "composite_figi": "BBG000B9XRY4",
- "share_class_figi": "BBG001S5N8V8",
- "share_class_shares_outstanding": 16406400000,
- "weighted_shares_outstanding": 16334371000,
- "market_cap": 2771126040150,
- "phone_number": "(408) 996-1010",
- "address": {
- "address1": "One Apple Park Way",
- "city": "Cupertino",
- "state": "CA",
- "postal_code": "95014"
- },
- "sic_code": "3571",
- "sic_description": "ELECTRONIC COMPUTERS",
- "ticker_root": "AAPL",
- "total_employees": 154000,
- "list_date": "1980-12-12",
- "homepage_url": "https://www.apple.com",
- "description": "Apple designs a wide variety of consumer electronic devices, including smartphones (iPhone), tablets (iPad), PCs (Mac), smartwatches (Apple Watch), AirPods, and TV boxes (Apple TV), among others. The iPhone makes up the majority of Apple's total revenue. In addition, Apple offers its customers a variety of services such as Apple Music, iCloud, Apple Care, Apple TV+, Apple Arcade, Apple Card, and Apple Pay, among others. Apple's products run internally developed software and semiconductors, and the firm is well known for its integration of hardware, software and services. Apple's products are distributed online as well as through company-owned stores and third-party retailers. The company generates roughly 40% of its revenue from the Americas, with the remainder earned internationally.",
- "branding": {
- "logo_url": "https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_logo.svg",
- "icon_url": "https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_icon.png"
- }
- },
- "status": "OK",
- "request_id": "31d59dda-80e5-4721-8496-d0d32a654afe"
- }
- }
- }
- },
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "symbol": {
+ "description": "The symbol pair that was evaluated from the request.",
+ "type": "string"
}
},
- "x-polygon-entitlement-data-type": {
- "name": "reference",
- "description": "Reference data"
- }
- }
- },
- "/v2/reference/news": {
- "get": {
- "summary": "Ticker News",
- "description": "Get the most recent news articles relating to a stock ticker symbol,\nincluding a summary of the article and a link to the original source.\n",
- "tags": [
- "reference:tickers"
- ],
- "parameters": [
- {
- "example": 10,
- "name": "limit",
- "in": "query",
- "description": "Limit the size of the response, default is 100 and max is 1000.\n\nIf your query returns more than the max limit and you want to retrieve the next page of results,\nsee the `next_url` response attribute.\n",
- "schema": {
- "type": "integer",
- "minimum": 1,
- "maximum": 1000,
- "default": 100
- }
+ "type": "object"
+ },
+ "CryptoSnapshotMinute": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- {
- "example": "descending",
- "name": "order",
- "in": "query",
- "description": "Order the results in ascending or descending order.\n",
- "required": false,
- "schema": {
- "type": "string",
- "enum": [
- "asc",
- "ascending",
- "desc",
- "descending"
- ],
- "default": "ascending"
- }
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- {
- "schema": {
- "enum": [
- "published_utc"
- ],
- "default": "published_utc"
- },
- "example": "published_utc",
- "name": "sort",
- "in": "query",
- "description": "The field key to sort the results on.\n"
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- {
- "name": "ticker",
- "schema": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "x-polygon-filter-field": {
- "range": true
- },
- "in": "query",
- "description": "Return results where this field equals the value.\n"
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- {
- "name": "published_utc",
- "schema": {
- "oneOf": [
- {
- "type": "string",
- "format": "date-time"
- },
- {
- "type": "string",
- "format": "date"
- }
- ]
- },
- "x-polygon-filter-field": {
- "range": true
- },
- "in": "query",
- "description": "Return results where this field equals the value.\n"
- }
- ],
- "responses": {
- "200": {
- "description": "An array of news articles.",
- "content": {
- "application/json": {
- "schema": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "results": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "id",
- "publisher",
- "title",
- "author",
- "published_utc",
- "article_url",
- "tickers"
- ],
- "properties": {
- "id": {
- "type": "string",
- "description": "Unique identifier for the article.\n"
- },
- "publisher": {
- "type": "object",
- "required": [
- "name",
- "logo_url",
- "homepage_url"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The publisher's name.\n"
- },
- "logo_url": {
- "type": "string",
- "format": "url",
- "description": "The publisher's logo URL.\n"
- },
- "homepage_url": {
- "type": "string",
- "format": "url",
- "description": "The publisher's homepage URL.\n"
- },
- "favicon_url": {
- "type": "string",
- "format": "url",
- "description": "The publisher's homepage favicon URL.\n"
- }
- }
- },
- "title": {
- "type": "string",
- "description": "The title of the news article.\n"
- },
- "author": {
- "type": "string",
- "description": "The article's author.\n"
- },
- "published_utc": {
- "type": "string",
- "format": "date-time",
- "description": "The date the article was published on.\n"
- },
- "article_url": {
- "type": "string",
- "format": "url",
- "description": "A link to the news article.\n"
- },
- "tickers": {
- "type": "array",
- "description": "The ticker symbols associated with the article.\n",
- "items": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- }
- },
- "amp_url": {
- "type": "string",
- "format": "url",
- "description": "The mobile friendly Accelerated Mobile Page (AMP) URL.\n"
- },
- "image_url": {
- "type": "string",
- "format": "url",
- "description": "The article's image URL.\n"
- },
- "description": {
- "type": "string",
- "description": "A description of the article.\n"
- },
- "keywords": {
- "type": "array",
- "description": "The keywords associated with the article (which will vary depending on\nthe publishing source).\n",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "next_url": {
- "type": "string",
- "description": "If present, this value can be used to fetch the next page of data."
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- },
- "count": {
- "type": "integer",
- "description": "The total number of results for this request."
- }
- }
- }
- ]
- },
- "example": {
- "results": [
- {
- "id": "nJsSJJdwViHZcw5367rZi7_qkXLfMzacXBfpv-vD9UA",
- "publisher": {
- "name": "Benzinga",
- "homepage_url": "https://www.benzinga.com/",
- "logo_url": "https://s3.polygon.io/public/public/assets/news/logos/benzinga.svg",
- "favicon_url": "https://s3.polygon.io/public/public/assets/news/favicons/benzinga.ico"
- },
- "title": "Cathie Wood Adds More Coinbase, Skillz, Trims Square",
- "author": "Rachit Vats",
- "published_utc": "2021-04-26T02:33:17Z",
- "article_url": "https://www.benzinga.com/markets/cryptocurrency/21/04/20784086/cathie-wood-adds-more-coinbase-skillz-trims-square",
- "tickers": [
- "DOCU",
- "DDD",
- "NIU",
- "ARKF",
- "NVDA",
- "SKLZ",
- "PCAR",
- "MASS",
- "PSTI",
- "SPFR",
- "TREE",
- "PHR",
- "IRDM",
- "BEAM",
- "ARKW",
- "ARKK",
- "ARKG",
- "PSTG",
- "SQ",
- "IONS",
- "SYRS"
- ],
- "amp_url": "https://amp.benzinga.com/amp/content/20784086",
- "image_url": "https://cdn2.benzinga.com/files/imagecache/og_image_social_share_1200x630/images/story/2012/andre-francois-mckenzie-auhr4gcqcce-unsplash.jpg?width=720",
- "description": "
Cathie Wood-led Ark Investment Management on Friday snapped up another 221,167 shares of the cryptocurrency exchange Coinbase Global Inc (NASDAQ: COIN) worth about $64.49 million on the stock’s Friday’s dip and also its fourth-straight loss.
\nThe investment firm’s Ark Innovation ETF (NYSE: ARKK) bought the shares of the company that closed 0.63% lower at $291.60 on Friday, giving the cryptocurrency exchange a market cap of $58.09 billion. Coinbase’s market cap has dropped from $85.8 billion on its blockbuster listing earlier this month.
\nThe New York-based company also added another 3,873 shares of the mobile gaming company Skillz Inc (NYSE: SKLZ), just a day after snapping 1.2 million shares of the stock.
\nARKK bought the shares of the company which closed ...
Full story available on Benzinga.com
",
- "keywords": [
- "Sector ETFs",
- "Penny Stocks",
- "Cryptocurrency",
- "Small Cap",
- "Markets",
- "Trading Ideas",
- "ETFs"
- ]
- }
- ],
- "status": "OK",
- "request_id": "831afdb0b8078549fed053476984947a",
- "count": 1,
- "next_url": "https://api.polygon.io:443/v2/reference/news?cursor=eyJsaW1pdCI6MSwic29ydCI6InB1Ymxpc2hlZF91dGMiLCJvcmRlciI6ImFzY2VuZGluZyIsInRpY2tlciI6e30sInB1Ymxpc2hlZF91dGMiOnsiZ3RlIjoiMjAyMS0wNC0yNiJ9LCJzZWFyY2hfYWZ0ZXIiOlsxNjE5NDA0Mzk3MDAwLG51bGxdfQ"
- }
- }
- }
- },
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
- },
- "404": {
- "description": "The specified resource was not found"
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
}
},
- "x-polygon-entitlement-data-type": {
- "name": "reference",
- "description": "Reference data"
- }
- }
- },
- "/v1/marketstatus/upcoming": {
- "get": {
- "summary": "Market Holidays",
- "description": "Get upcoming market holidays and their open/close times.\n",
- "tags": [
- "reference:stocks:market"
- ],
- "responses": {
- "200": {
- "description": "Holidays for each market in the near future.",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "object",
+ "type": "object"
+ },
+ "CryptoSnapshotTicker": {
+ "properties": {
+ "ticker": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "lastTrade": {
+ "allOf": [
+ {
+ "description": "The most recent trade for this ticker."
+ },
+ {
"properties": {
- "exchange": {
- "type": "string",
- "description": "Which market the record is for."
+ "c": {
+ "description": "The trade conditions.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
},
- "name": {
- "type": "string",
- "description": "The name of the holiday."
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
},
- "status": {
- "type": "string",
- "description": "The status of the market on the holiday."
+ "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"
},
- "date": {
- "type": "string",
- "format": "date",
- "description": "The date of the holiday."
+ "s": {
+ "description": "The size (volume) of the trade.",
+ "type": "integer"
},
- "open": {
- "type": "string",
- "format": "date-time",
- "description": "The market open time on the holiday (if it's not closed)."
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
},
- "close": {
- "type": "string",
- "format": "date-time",
- "description": "The market close time on the holiday (if it's not closed)."
+ "x": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
+ "type": "integer"
}
}
}
- },
- "example": [
- {
- "exchange": "NYSE",
- "name": "Thanksgiving",
- "date": "2020-11-26T00:00:00.000Z",
- "status": "closed"
+ ]
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- {
- "exchange": "NASDAQ",
- "name": "Thanksgiving",
- "date": "2020-11-26T00:00:00.000Z",
- "status": "closed"
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- {
- "exchange": "OTC",
- "name": "Thanksgiving",
- "date": "2020-11-26T00:00:00.000Z",
- "status": "closed"
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- {
- "exchange": "NASDAQ",
- "name": "Thanksgiving",
- "date": "2020-11-27T00:00:00.000Z",
- "status": "early-close",
- "open": "2020-11-27T14:30:00.000Z",
- "close": "2020-11-27T18:00:00.000Z"
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- {
- "exchange": "NYSE",
- "name": "Thanksgiving",
- "date": "2020-11-27T00:00:00.000Z",
- "status": "early-close",
- "open": "2020-11-27T14:30:00.000Z",
- "close": "2020-11-27T18:00:00.000Z"
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
}
- ]
- }
- }
- },
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
- },
- "404": {
- "description": "The specified resource was not found"
- },
- "409": {
- "description": "Parameter is invalid or incorrect."
- }
- },
- "x-polygon-entitlement-data-type": {
- "name": "reference",
- "description": "Reference data"
- }
- }
- },
- "/v1/marketstatus/now": {
- "get": {
- "summary": "Market Status",
- "description": "Get the current trading status of the exchanges and overall financial markets.\n",
- "tags": [
- "reference:stocks:market"
- ],
- "responses": {
- "200": {
- "description": "Status of the market and each exchange",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
+ },
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change the from previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "CryptoSnapshotTickerFullBook": {
+ "properties": {
+ "data": {
+ "properties": {
+ "askCount": {
+ "description": "The combined total number of asks in the book.",
+ "format": "double",
+ "type": "number"
+ },
+ "asks": {
+ "items": {
"properties": {
- "market": {
- "type": "string",
- "description": "The status of the market as a whole."
+ "p": {
+ "description": "The price of this book level.",
+ "format": "double",
+ "type": "number"
},
- "earlyHours": {
- "type": "boolean",
- "description": "Whether or not the market is in pre-market hours."
+ "x": {
+ "description": "A map of the exchange ID to number of shares at this price level.\n\u003cbr /\u003e\n\u003cbr /\u003e\n**Example:**\n\u003cbr /\u003e\n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n\u003cbr /\u003e\n\u003cbr /\u003e\nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n",
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "bidCount": {
+ "description": "The combined total number of bids in the book.",
+ "format": "double",
+ "type": "number"
+ },
+ "bids": {
+ "items": {
+ "properties": {
+ "p": {
+ "description": "The price of this book level.",
+ "format": "double",
+ "type": "number"
},
- "afterHours": {
- "type": "boolean",
- "description": "Whether or not the market is in post-market hours."
+ "x": {
+ "description": "A map of the exchange ID to number of shares at this price level.\n\u003cbr /\u003e\n\u003cbr /\u003e\n**Example:**\n\u003cbr /\u003e\n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n\u003cbr /\u003e\n\u003cbr /\u003e\nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n",
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "spread": {
+ "description": "The difference between the best bid and the best ask price accross exchanges.",
+ "format": "double",
+ "type": "number"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "CryptoSnapshotTickers": {
+ "properties": {
+ "tickers": {
+ "items": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "serverTime": {
- "type": "string",
- "format": "date-time",
- "description": "The current time of the server."
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "exchanges": {
- "type": "object",
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "lastTrade": {
+ "allOf": [
+ {
+ "description": "The most recent trade for this ticker."
+ },
+ {
"properties": {
- "nyse": {
- "type": "string",
- "description": "The status of the NYSE market."
+ "c": {
+ "description": "The trade conditions.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
},
- "nasdaq": {
- "type": "string",
- "description": "The status of the Nasdaq market."
+ "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"
},
- "otc": {
- "type": "string",
- "description": "The status of the OTC market."
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size (volume) of the trade.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
}
- }
+ },
+ "type": "object"
},
- "currencies": {
- "type": "object",
+ {
"properties": {
- "fx": {
- "type": "string",
- "description": "The status of the forex market."
- },
- "crypto": {
- "type": "string",
- "description": "The status of the crypto market."
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
+ "type": "integer"
}
}
}
- }
+ ]
},
- "example": {
- "market": "extended-hours",
- "earlyHours": false,
- "afterHours": true,
- "serverTime": "2020-11-10T22:37:37.000Z",
- "exchanges": {
- "nyse": "extended-hours",
- "nasdaq": "extended-hours",
- "otc": "closed"
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
},
- "currencies": {
- "fx": "open",
- "crypto": "open"
- }
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change the from previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
}
- }
- }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "CryptoTick": {
+ "properties": {
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
},
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
+ "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"
},
- "404": {
- "description": "The specified resource was not found"
+ "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"
},
- "409": {
- "description": "Parameter is invalid or incorrect."
+ "s": {
+ "description": "The size of a trade (also known as volume).\n",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
+ "type": "integer"
}
},
- "x-polygon-entitlement-data-type": {
- "name": "reference",
- "description": "Reference data"
- }
- }
- },
- "/v2/ticks/stocks/trades/{ticker}/{date}": {
- "get": {
- "summary": "Trades",
- "description": "Get trades for a given ticker symbol on a specified date.\n",
- "tags": [
- "stocks:trades"
- ],
- "parameters": [
+ "type": "object"
+ },
+ "CryptoTradeExchange": {
+ "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
+ "type": "integer"
+ },
+ "Date": {
+ "oneOf": [
{
- "name": "ticker",
- "in": "path",
- "description": "The ticker symbol we want trades for.",
- "required": true,
- "schema": {
- "type": "string"
- },
- "example": "AAPL"
+ "format": "date-time",
+ "type": "string"
},
{
- "name": "date",
- "in": "path",
- "description": "The date/day of the trades to retrieve in the format YYYY-MM-DD.",
- "required": true,
- "schema": {
- "type": "string",
- "format": "date"
+ "format": "date",
+ "type": "string"
+ }
+ ]
+ },
+ "Exchange": {
+ "items": {
+ "properties": {
+ "code": {
+ "description": "A unique identifier for the exchange internal to Polygon.io. This is not an industry code or ISO standard.",
+ "type": "string"
},
- "example": "2020-10-14"
- },
- {
- "name": "timestamp",
- "in": "query",
- "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",
- "required": false,
- "schema": {
- "type": "integer"
+ "id": {
+ "description": "The ID of the exchange.",
+ "type": "number"
+ },
+ "market": {
+ "description": "The market data type that this exchange contains.",
+ "type": "string"
+ },
+ "mic": {
+ "description": "The Market Identification Code or MIC as defined in ISO 10383 (\u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Market_Identifier_Code\"\u003ehttps://en.wikipedia.org/wiki/Market_Identifier_Code\u003c/a\u003e).",
+ "type": "string"
+ },
+ "name": {
+ "description": "The name of the exchange.",
+ "type": "string"
+ },
+ "tape": {
+ "description": "The tape id of the exchange.",
+ "type": "string"
+ },
+ "type": {
+ "description": "The type of exchange.\n- TRF = Trade Reporting Facility\n- exchange = Reporting exchange on the tape\n",
+ "type": "string"
}
},
- {
- "name": "timestampLimit",
- "in": "query",
- "description": "The maximum timestamp allowed in the results.\n",
- "required": false,
- "schema": {
- "type": "integer"
- }
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "ExchangeId": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "Financial": {
+ "properties": {
+ "cashChange": {
+ "example": 7202000000,
+ "type": "integer"
},
- {
- "name": "reverse",
- "in": "query",
- "description": "Reverse the order of the results.\n",
- "required": false,
- "schema": {
- "type": "boolean"
- },
- "example": true
+ "cashFlow": {
+ "example": 28293000000,
+ "type": "integer"
},
- {
- "name": "limit",
- "in": "query",
- "description": "Limit the size of the response, max 50000 and default 5000.",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "example": 10
+ "costOfRevenue": {
+ "example": 54381000000,
+ "type": "integer"
+ },
+ "currentAssets": {
+ "example": 143810000000,
+ "type": "integer"
+ },
+ "currentCash": {
+ "example": 27491000000,
+ "type": "integer"
+ },
+ "currentDebt": {
+ "example": 18478000000,
+ "type": "integer"
+ },
+ "grossProfit": {
+ "example": 33912000000,
+ "type": "integer"
+ },
+ "netIncome": {
+ "example": 20065000000,
+ "type": "integer"
+ },
+ "operatingExpense": {
+ "example": 7638000000,
+ "type": "integer"
+ },
+ "operatingGainsLosses": {
+ "type": "number"
+ },
+ "operatingIncome": {
+ "example": 26274000000,
+ "type": "integer"
+ },
+ "operatingRevenue": {
+ "example": 88293000000,
+ "type": "integer"
+ },
+ "reportDate": {
+ "description": "Report Date",
+ "example": "2017-12-31T00:00:00.000Z",
+ "format": "date-time",
+ "type": "string"
+ },
+ "reportDateStr": {
+ "description": "Report date as non date format",
+ "example": "2017-12-31",
+ "type": "string"
+ },
+ "researchAndDevelopment": {
+ "example": 3407000000,
+ "type": "integer"
+ },
+ "shareholderEquity": {
+ "example": 140199000000,
+ "type": "integer"
+ },
+ "symbol": {
+ "description": "Stock Symbol",
+ "example": "AAPL",
+ "type": "string"
+ },
+ "totalAssets": {
+ "example": 406794000000,
+ "type": "integer"
+ },
+ "totalCash": {
+ "example": 77153000000,
+ "type": "integer"
+ },
+ "totalDebt": {
+ "example": 122400000000,
+ "type": "integer"
+ },
+ "totalLiabilities": {
+ "example": 266595000000,
+ "type": "integer"
+ },
+ "totalRevenue": {
+ "example": 88293000000,
+ "type": "integer"
}
+ },
+ "required": [
+ "symbol",
+ "reportDate",
+ "reportDateStr"
],
- "responses": {
- "200": {
- "description": "A list of trades.",
- "content": {
- "application/json": {
- "schema": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "results_count": {
- "type": "integer",
- "description": "The total number of results for this request."
- },
- "db_latency": {
- "type": "integer",
- "description": "Latency in milliseconds for the query results from the database."
- },
- "success": {
- "type": "boolean",
- "description": "Whether or not this query was executed successfully."
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "results": {
- "type": "array",
- "items": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "T": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "t": {
- "type": "integer",
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it."
- },
- "y": {
- "type": "integer",
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange."
- },
- "f": {
- "type": "integer",
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message."
- },
- "q": {
- "type": "integer",
- "format": "int64",
- "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n"
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "c": {
- "type": "array",
- "description": "A list of condition codes.\n",
- "items": {
- "type": "integer",
- "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"
- }
- },
- "i": {
- "type": "string",
- "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"
- },
- "p": {
- "type": "number",
- "format": "double",
- "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"
- },
- "s": {
- "type": "number",
- "format": "double",
- "description": "The size of a trade (also known as volume).\n"
- },
- "e": {
- "type": "integer",
- "description": "The trade correction indicator.\n"
- },
- "x": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- },
- "r": {
- "type": "integer",
- "description": "The ID for the Trade Reporting Facility where the trade took place.\n"
- },
- "z": {
- "type": "integer",
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n"
- }
- }
- }
- ]
- }
- }
- }
- }
- ]
- },
- "example": {
- "ticker": "AAPL",
- "results_count": 2,
- "db_latency": 11,
- "success": true,
- "results": [
- {
- "t": 1517562000016036600,
- "y": 1517562000015577000,
- "q": 1063,
- "i": "1",
- "x": 11,
- "s": 100,
- "c": [
- 12,
- 41
- ],
- "p": 171.55,
- "z": 3
- },
- {
- "t": 1517562000016038100,
- "y": 1517562000015577600,
- "q": 1064,
- "i": "2",
- "x": 11,
- "s": 100,
- "c": [
- 12,
- 41
- ],
- "p": 171.55,
- "z": 3
- }
- ],
- "map": {
- "I": {
- "name": "orig_id",
- "type": "string"
- },
- "x": {
- "name": "exchange",
- "type": "int"
- },
- "p": {
- "name": "price",
- "type": "float64"
- },
- "i": {
- "name": "id",
- "type": "string"
- },
- "e": {
- "name": "correction",
- "type": "int"
- },
- "r": {
- "name": "trf_id",
- "type": "int"
- },
- "t": {
- "name": "sip_timestamp",
- "type": "int64"
- },
- "y": {
- "name": "participant_timestamp",
- "type": "int64"
- },
- "f": {
- "name": "trf_timestamp",
- "type": "int64"
- },
- "q": {
- "name": "sequence_number",
- "type": "int64"
- },
- "c": {
- "name": "conditions",
- "type": "int"
- },
- "s": {
- "name": "size",
- "type": "int"
- },
- "z": {
- "name": "tape",
- "type": "int"
- }
- }
- }
- }
- }
+ "type": "object"
+ },
+ "Financials": {
+ "description": "Financials",
+ "properties": {
+ "EBITDAMargin": {
+ "format": "double",
+ "type": "number"
},
- "default": {
- "description": "Unexpected error"
- }
- },
- "x-polygon-entitlement-data-type": {
- "name": "trades",
- "description": "Trade data"
- },
- "x-polygon-entitlement-market-type": {
- "name": "stocks",
- "description": "Stocks data"
- },
- "x-polygon-deprecation": {
- "date": 1654056060000,
- "replaces": {
- "path": "get_v3_trades__stockticker",
- "name": "Trades v3"
- }
- }
- }
- },
- "/v2/ticks/stocks/nbbo/{ticker}/{date}": {
- "get": {
- "summary": "Quotes (NBBO)",
- "description": "Get NBBO quotes for a given ticker symbol on a specified date.\n",
- "tags": [
- "stocks:quotes"
- ],
- "parameters": [
- {
- "name": "ticker",
- "in": "path",
- "description": "The ticker symbol we want quotes for.",
- "required": true,
- "schema": {
- "type": "string"
- },
- "example": "AAPL"
+ "accumulatedOtherComprehensiveIncome": {
+ "type": "integer"
},
- {
- "name": "date",
- "in": "path",
- "description": "The date/day of the quotes to retrieve in the format YYYY-MM-DD.",
- "required": true,
- "schema": {
- "type": "string",
- "format": "date"
- },
- "example": "2020-10-14"
+ "accumulatedRetainedEarningsDeficit": {
+ "type": "integer"
},
- {
- "name": "timestamp",
- "in": "query",
- "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",
- "required": false,
- "schema": {
- "type": "integer"
- }
+ "assetTurnover": {
+ "type": "integer"
},
- {
- "name": "timestampLimit",
- "in": "query",
- "description": "The maximum timestamp allowed in the results.\n",
- "required": false,
- "schema": {
- "type": "integer"
- }
+ "assets": {
+ "type": "integer"
},
- {
- "name": "reverse",
- "in": "query",
- "description": "Reverse the order of the results.\n",
- "required": false,
- "schema": {
- "type": "boolean"
- },
- "example": true
+ "assetsAverage": {
+ "type": "integer"
},
- {
- "name": "limit",
- "in": "query",
- "description": "Limit the size of the response, max 50000 and default 5000.",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "example": 10
- }
- ],
- "responses": {
- "200": {
- "description": "A list of quotes.",
- "content": {
- "application/json": {
- "schema": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "results_count": {
- "type": "integer",
- "description": "The total number of results for this request."
- },
- "db_latency": {
- "type": "integer",
- "description": "Latency in milliseconds for the query results from the database."
- },
- "success": {
- "type": "boolean",
- "description": "Whether or not this query was executed successfully."
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "results": {
- "type": "array",
- "items": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "T": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "t": {
- "type": "integer",
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it."
- },
- "y": {
- "type": "integer",
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange."
- },
- "f": {
- "type": "integer",
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message."
- },
- "q": {
- "type": "integer",
- "format": "int64",
- "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n"
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "c": {
- "type": "array",
- "description": "A list of condition codes.\n",
- "items": {
- "type": "integer",
- "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"
- }
- },
- "i": {
- "type": "array",
- "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n",
- "items": {
- "type": "integer",
- "description": "The indicator code.\n"
- }
- },
- "p": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
- },
- "s": {
- "type": "integer",
- "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price."
- },
- "x": {
- "allOf": [
- {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- },
- {
- "description": "Bid Exchange Id"
- }
- ]
- },
- "P": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
- },
- "S": {
- "type": "integer",
- "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price."
- },
- "X": {
- "allOf": [
- {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- },
- {
- "description": "Ask Exchange Id"
- }
- ]
- },
- "z": {
- "type": "integer",
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n"
- }
- }
- }
- ]
- }
- }
- }
+ "assetsCurrent": {
+ "type": "integer"
+ },
+ "assetsNonCurrent": {
+ "type": "integer"
+ },
+ "averageEquity": {
+ "type": "integer"
+ },
+ "bookValuePerShare": {
+ "format": "double",
+ "type": "number"
+ },
+ "calendarDate": {
+ "example": "2019-03-31",
+ "format": "date-time",
+ "type": "string"
+ },
+ "capitalExpenditure": {
+ "type": "integer"
+ },
+ "cashAndEquivalents": {
+ "type": "integer"
+ },
+ "cashAndEquivalentsUSD": {
+ "type": "integer"
+ },
+ "consolidatedIncome": {
+ "type": "integer"
+ },
+ "costOfRevenue": {
+ "type": "integer"
+ },
+ "currentLiabilities": {
+ "type": "integer"
+ },
+ "currentRatio": {
+ "format": "double",
+ "type": "number"
+ },
+ "debt": {
+ "type": "integer"
+ },
+ "debtCurrent": {
+ "type": "integer"
+ },
+ "debtNonCurrent": {
+ "type": "integer"
+ },
+ "debtToEquityRatio": {
+ "format": "double",
+ "type": "number"
+ },
+ "debtUSD": {
+ "type": "integer"
+ },
+ "deferredRevenue": {
+ "type": "integer"
+ },
+ "deposits": {
+ "type": "integer"
+ },
+ "depreciationAmortizationAndAccretion": {
+ "type": "integer"
+ },
+ "dividendYield": {
+ "type": "integer"
+ },
+ "dividendsPerBasicCommonShare": {
+ "type": "integer"
+ },
+ "earningBeforeInterestTaxes": {
+ "type": "integer"
+ },
+ "earningBeforeInterestTaxesUSD": {
+ "type": "integer"
+ },
+ "earningsBeforeInterestTaxesDepreciationAmortization": {
+ "type": "integer"
+ },
+ "earningsBeforeInterestTaxesDepreciationAmortizationUSD": {
+ "type": "integer"
+ },
+ "earningsBeforeTax": {
+ "type": "integer"
+ },
+ "earningsPerBasicShare": {
+ "format": "double",
+ "type": "number"
+ },
+ "earningsPerBasicShareUSD": {
+ "format": "double",
+ "type": "number"
+ },
+ "earningsPerDilutedShare": {
+ "format": "double",
+ "type": "number"
+ },
+ "effectOfExchangeRateChangesOnCash": {
+ "type": "integer"
+ },
+ "enterpriseValue": {
+ "type": "integer"
+ },
+ "enterpriseValueOverEBIT": {
+ "type": "integer"
+ },
+ "enterpriseValueOverEBITDA": {
+ "format": "double",
+ "type": "number"
+ },
+ "foreignCurrencyUSDExchangeRate": {
+ "type": "integer"
+ },
+ "freeCashFlow": {
+ "type": "integer"
+ },
+ "freeCashFlowPerShare": {
+ "format": "double",
+ "type": "number"
+ },
+ "goodwillAndIntangibleAssets": {
+ "type": "integer"
+ },
+ "grossMargin": {
+ "format": "double",
+ "type": "number"
+ },
+ "grossProfit": {
+ "type": "integer"
+ },
+ "incomeTaxExpense": {
+ "type": "integer"
+ },
+ "interestExpense": {
+ "type": "integer"
+ },
+ "inventory": {
+ "type": "integer"
+ },
+ "investedCapital": {
+ "type": "integer"
+ },
+ "investedCapitalAverage": {
+ "type": "integer"
+ },
+ "investments": {
+ "type": "integer"
+ },
+ "investmentsCurrent": {
+ "type": "integer"
+ },
+ "investmentsNonCurrent": {
+ "type": "integer"
+ },
+ "issuanceDebtSecurities": {
+ "type": "integer"
+ },
+ "issuanceEquityShares": {
+ "type": "integer"
+ },
+ "liabilitiesNonCurrent": {
+ "type": "integer"
+ },
+ "marketCapitalization": {
+ "type": "integer"
+ },
+ "netCashFlow": {
+ "type": "integer"
+ },
+ "netCashFlowBusinessAcquisitionsDisposals": {
+ "type": "integer"
+ },
+ "netCashFlowFromFinancing": {
+ "type": "integer"
+ },
+ "netCashFlowFromInvesting": {
+ "type": "integer"
+ },
+ "netCashFlowFromOperations": {
+ "type": "integer"
+ },
+ "netCashFlowInvestmentAcquisitionsDisposals": {
+ "type": "integer"
+ },
+ "netIncome": {
+ "type": "integer"
+ },
+ "netIncomeCommonStock": {
+ "type": "integer"
+ },
+ "netIncomeCommonStockUSD": {
+ "type": "integer"
+ },
+ "netIncomeToNonControllingInterests": {
+ "type": "integer"
+ },
+ "netLossIncomeFromDiscontinuedOperations": {
+ "type": "integer"
+ },
+ "operatingExpenses": {
+ "type": "integer"
+ },
+ "operatingIncome": {
+ "type": "integer"
+ },
+ "paymentDividendsOtherCashDistributions": {
+ "type": "integer"
+ },
+ "payoutRatio": {
+ "type": "integer"
+ },
+ "period": {
+ "description": "Reporting period.",
+ "enum": [
+ "Q",
+ "T",
+ "QA",
+ "TA",
+ "Y",
+ "YA"
+ ],
+ "example": "Q",
+ "type": "string"
+ },
+ "preferredDividendsIncomeStatementImpact": {
+ "type": "integer"
+ },
+ "priceEarnings": {
+ "format": "double",
+ "type": "number"
+ },
+ "priceSales": {
+ "format": "double",
+ "type": "number"
+ },
+ "priceToBookValue": {
+ "format": "double",
+ "type": "number"
+ },
+ "priceToEarningsRatio": {
+ "format": "double",
+ "type": "number"
+ },
+ "priceToSalesRatio": {
+ "format": "double",
+ "type": "number"
+ },
+ "profitMargin": {
+ "format": "double",
+ "type": "number"
+ },
+ "propertyPlantEquipmentNet": {
+ "type": "integer"
+ },
+ "reportPeriod": {
+ "example": "2019-03-31",
+ "format": "date-time",
+ "type": "string"
+ },
+ "researchAndDevelopmentExpense": {
+ "type": "integer"
+ },
+ "returnOnAverageAssets": {
+ "type": "integer"
+ },
+ "returnOnAverageEquity": {
+ "type": "integer"
+ },
+ "returnOnInvestedCapital": {
+ "type": "integer"
+ },
+ "returnOnSales": {
+ "format": "double",
+ "type": "number"
+ },
+ "revenues": {
+ "type": "integer"
+ },
+ "revenuesUSD": {
+ "type": "integer"
+ },
+ "salesPerShare": {
+ "format": "double",
+ "type": "number"
+ },
+ "sellingGeneralAndAdministrativeExpense": {
+ "type": "integer"
+ },
+ "shareBasedCompensation": {
+ "type": "integer"
+ },
+ "shareFactor": {
+ "type": "integer"
+ },
+ "sharePriceAdjustedClose": {
+ "format": "double",
+ "type": "number"
+ },
+ "shareholdersEquity": {
+ "type": "integer"
+ },
+ "shareholdersEquityUSD": {
+ "type": "integer"
+ },
+ "shares": {
+ "type": "integer"
+ },
+ "tangibleAssetValue": {
+ "type": "integer"
+ },
+ "tangibleAssetsBookValuePerShare": {
+ "format": "double",
+ "type": "number"
+ },
+ "taxAssets": {
+ "type": "integer"
+ },
+ "taxLiabilities": {
+ "type": "integer"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "totalLiabilities": {
+ "type": "integer"
+ },
+ "tradeAndNonTradePayables": {
+ "type": "integer"
+ },
+ "tradeAndNonTradeReceivables": {
+ "type": "integer"
+ },
+ "updated": {
+ "example": "1999-03-28",
+ "format": "date-time",
+ "type": "string"
+ },
+ "weightedAverageShares": {
+ "type": "integer"
+ },
+ "weightedAverageSharesDiluted": {
+ "type": "integer"
+ },
+ "workingCapital": {
+ "type": "integer"
+ }
+ },
+ "required": [
+ "ticker",
+ "exDate",
+ "paymentDate",
+ "ratio",
+ "tofactor",
+ "forfactor"
+ ],
+ "type": "object"
+ },
+ "ForexConversion": {
+ "properties": {
+ "converted": {
+ "description": "The result of the conversion.",
+ "format": "double",
+ "type": "number"
+ },
+ "from": {
+ "description": "The \"from\" currency symbol.",
+ "type": "string"
+ },
+ "initialAmount": {
+ "description": "The amount to convert.",
+ "format": "double",
+ "type": "number"
+ },
+ "last": {
+ "properties": {
+ "ask": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "bid": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "exchange": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/forex/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "timestamp": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "to": {
+ "description": "The \"to\" currency symbol.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ForexExchangeId": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/forex/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "ForexGroupedResults": {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "ForexHistoricTrades": {
+ "properties": {
+ "day": {
+ "description": "The date that was evaluated from the request.",
+ "format": "date",
+ "type": "string"
+ },
+ "map": {
+ "description": "A map for shortened result keys.",
+ "type": "object"
+ },
+ "msLatency": {
+ "description": "The milliseconds of latency for the query results.",
+ "type": "integer"
+ },
+ "pair": {
+ "description": "The currency pair that was evaluated from the request.",
+ "type": "string"
+ },
+ "ticks": {
+ "items": {
+ "properties": {
+ "a": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "b": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/forex/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "ForexPairLastQuote": {
+ "properties": {
+ "last": {
+ "properties": {
+ "ask": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "bid": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "exchange": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/forex/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "timestamp": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "symbol": {
+ "description": "The symbol pair that was evaluated from the request.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ForexPreviousClose": {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "ForexSnapshotLastQuote": {
+ "properties": {
+ "a": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "b": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID on which this quote happened.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "ForexSnapshotPrevDay": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ForexSnapshotTicker": {
+ "properties": {
+ "ticker": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "lastQuote": {
+ "description": "The most recent quote for this ticker.",
+ "properties": {
+ "a": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "b": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID on which this quote happened.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change the from previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "ForexSnapshotTickers": {
+ "properties": {
+ "tickers": {
+ "items": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "lastQuote": {
+ "description": "The most recent quote for this ticker.",
+ "properties": {
+ "a": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "b": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID on which this quote happened.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change the from previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "ForexTickerResults": {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "High": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "Indicators": {
+ "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n",
+ "items": {
+ "description": "The indicator code.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "Locales": {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "locale": {
+ "description": "An abbreviated country name.",
+ "type": "string"
+ },
+ "name": {
+ "description": "The name of the country.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "Low": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "Map": {
+ "description": "A mapping of the keys returned in the results to their descriptive name and data types.",
+ "properties": {
+ "key": {
+ "description": "A dynamic key from the results set",
+ "properties": {
+ "name": {
+ "description": "The descriptive name of this results key",
+ "type": "string"
+ },
+ "type": {
+ "description": "The data type of this results key",
+ "enum": [
+ "string",
+ "int",
+ "int64",
+ "float64"
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "MarketHoliday": {
+ "items": {
+ "properties": {
+ "close": {
+ "description": "The market close time on the holiday (if it's not closed).",
+ "format": "date-time",
+ "type": "string"
+ },
+ "date": {
+ "description": "The date of the holiday.",
+ "format": "date",
+ "type": "string"
+ },
+ "exchange": {
+ "description": "Which market the record is for.",
+ "type": "string"
+ },
+ "name": {
+ "description": "The name of the holiday.",
+ "type": "string"
+ },
+ "open": {
+ "description": "The market open time on the holiday (if it's not closed).",
+ "format": "date-time",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of the market on the holiday.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "MarketStatus": {
+ "properties": {
+ "afterHours": {
+ "description": "Whether or not the market is in post-market hours.",
+ "type": "boolean"
+ },
+ "currencies": {
+ "properties": {
+ "crypto": {
+ "description": "The status of the crypto market.",
+ "type": "string"
+ },
+ "fx": {
+ "description": "The status of the forex market.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "earlyHours": {
+ "description": "Whether or not the market is in pre-market hours.",
+ "type": "boolean"
+ },
+ "exchanges": {
+ "properties": {
+ "nasdaq": {
+ "description": "The status of the Nasdaq market.",
+ "type": "string"
+ },
+ "nyse": {
+ "description": "The status of the NYSE market.",
+ "type": "string"
+ },
+ "otc": {
+ "description": "The status of the OTC market.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "market": {
+ "description": "The status of the market as a whole.",
+ "type": "string"
+ },
+ "serverTime": {
+ "description": "The current time of the server.",
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Markets": {
+ "properties": {
+ "results": {
+ "description": "A list of supported markets.",
+ "items": {
+ "properties": {
+ "desc": {
+ "description": "A description of the market.",
+ "type": "string"
+ },
+ "market": {
+ "description": "The name of the market.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "MsLatency": {
+ "description": "The milliseconds of latency for the query results.",
+ "type": "integer"
+ },
+ "News": {
+ "items": {
+ "properties": {
+ "image": {
+ "description": "A URL of the image for the news article, if found.",
+ "type": "string"
+ },
+ "keywords": {
+ "description": "A list of common keywords related to the news article.",
+ "items": {
+ "description": "Common keywords of the news article.",
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "source": {
+ "description": "The publication source of the article.",
+ "type": "string"
+ },
+ "summary": {
+ "description": "A summary of the news article.",
+ "type": "string"
+ },
+ "symbols": {
+ "description": "A list of ticker symbols relating to the article.",
+ "items": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "timestamp": {
+ "description": "The timestamp of the news article.",
+ "format": "date-time",
+ "type": "string"
+ },
+ "title": {
+ "description": "The title of the news article.",
+ "type": "string"
+ },
+ "url": {
+ "description": "A direct link to the news article from its source publication.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "NumberOfItems": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "OTC": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "Open": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "PaginationHooksBase": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Price": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "QueryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "RatingSection": {
+ "properties": {
+ "current": {
+ "description": "Analyst Rating at current month",
+ "example": 0,
+ "type": "number"
+ },
+ "month1": {
+ "description": "Analyst Ratings at 1 month in the future",
+ "example": 1,
+ "type": "number"
+ },
+ "month2": {
+ "description": "Analyst Ratings at 2 month in the future",
+ "example": 3,
+ "type": "number"
+ },
+ "month3": {
+ "description": "Analyst Ratings at 3 month in the future",
+ "example": 4,
+ "type": "number"
+ },
+ "month4": {
+ "description": "Analyst Ratings at 4 month in the future",
+ "example": 3,
+ "type": "number"
+ },
+ "month5": {
+ "description": "Analyst Ratings at 5 month in the future",
+ "example": 2,
+ "type": "number"
+ }
+ },
+ "required": [
+ "month1",
+ "month2",
+ "month3",
+ "current"
+ ],
+ "type": "object"
+ },
+ "RequestID": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "RequestIdBase": {
+ "properties": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "SequenceNumber": {
+ "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n",
+ "format": "int64",
+ "type": "integer"
+ },
+ "Size": {
+ "description": "The size of a trade (also known as volume).\n",
+ "format": "double",
+ "type": "number"
+ },
+ "SnapshotLastTrade": {
+ "properties": {
+ "c": {
+ "description": "The trade conditions.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size (volume) of the trade.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "SnapshotOHLCV": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "SnapshotOHLCVVW": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "SnapshotOHLCVVWOtc": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "StandardBase": {
+ "allOf": [
+ {
+ "properties": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ },
+ "Status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ "StatusBase": {
+ "properties": {
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "StatusCountBase": {
+ "properties": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "StockSymbol": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "StocksGroupedResults": {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "StocksOpenClose": {
+ "properties": {
+ "afterHours": {
+ "description": "The close price of the ticker symbol in after hours trading.",
+ "format": "double",
+ "type": "number"
+ },
+ "close": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "from": {
+ "description": "The requested date.",
+ "format": "date",
+ "type": "string"
+ },
+ "high": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "low": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "open": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "preMarket": {
+ "description": "The open price of the ticker symbol in pre-market trading.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ "symbol": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "volume": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "StocksSnapshotLastQuote": {
+ "properties": {
+ "P": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "S": {
+ "description": "The ask size in lots.",
+ "type": "integer"
+ },
+ "p": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The bid size in lots.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "StocksSnapshotMinute": {
+ "properties": {
+ "av": {
+ "description": "The accumulated volume.",
+ "type": "integer"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "StocksSnapshotMinuteOTC": {
+ "properties": {
+ "av": {
+ "description": "The accumulated volume.",
+ "type": "integer"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "StocksSnapshotTicker": {
+ "properties": {
+ "ticker": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "lastQuote": {
+ "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
+ "properties": {
+ "P": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "S": {
+ "description": "The ask size in lots.",
+ "type": "integer"
+ },
+ "p": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The bid size in lots.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "lastTrade": {
+ "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.",
+ "properties": {
+ "c": {
+ "description": "The trade conditions.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size (volume) of the trade.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "av": {
+ "description": "The accumulated volume.",
+ "type": "integer"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change the from previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "StocksSnapshotTickers": {
+ "properties": {
+ "tickers": {
+ "items": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
}
- ]
+ },
+ "type": "object"
+ },
+ "lastQuote": {
+ "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
+ "properties": {
+ "P": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "S": {
+ "description": "The ask size in lots.",
+ "type": "integer"
+ },
+ "p": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The bid size in lots.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "lastTrade": {
+ "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.",
+ "properties": {
+ "c": {
+ "description": "The trade conditions.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size (volume) of the trade.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "av": {
+ "description": "The accumulated volume.",
+ "type": "integer"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change the from previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "StocksTickerResultsOTC": {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "StocksV2Base": {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "f": {
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
+ },
+ "q": {
+ "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n",
+ "format": "int64",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "y": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "StocksV2NBBO": {
+ "allOf": [
+ {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "f": {
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
+ },
+ "q": {
+ "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n",
+ "format": "int64",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "y": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "P": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "S": {
+ "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.",
+ "type": "integer"
+ },
+ "X": {
+ "allOf": [
+ {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ {
+ "description": "Ask Exchange Id"
+ }
+ ]
+ },
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
},
- "example": {
- "ticker": "AAPL",
- "success": true,
- "results_count": 2,
- "db_latency": 43,
- "results": [
- {
- "t": 1517562000065700400,
- "y": 1517562000065321200,
- "q": 2060,
- "c": [
- 1
- ],
- "z": 3,
- "p": 102.7,
- "s": 60,
- "x": 11,
- "P": 0,
- "S": 0,
- "X": 0
+ "type": "array"
+ },
+ "i": {
+ "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n",
+ "items": {
+ "description": "The indicator code.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "p": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.",
+ "type": "integer"
+ },
+ "x": {
+ "allOf": [
+ {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ {
+ "description": "Bid Exchange Id"
+ }
+ ]
+ },
+ "z": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ },
+ "StocksV2NBBOs": {
+ "properties": {
+ "results": {
+ "items": {
+ "allOf": [
+ {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "f": {
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
+ },
+ "q": {
+ "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n",
+ "format": "int64",
+ "type": "integer"
},
- {
- "t": 1517562000065791500,
- "y": 1517562000065408300,
- "q": 2061,
- "c": [
- 1
- ],
- "z": 3,
- "p": 170,
- "s": 2,
- "x": 11,
- "P": 0,
- "S": 0,
- "X": 0
- }
- ],
- "map": {
"t": {
- "name": "sip_timestamp",
- "type": "int64"
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
},
"y": {
- "name": "participant_timestamp",
- "type": "int64"
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "P": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "S": {
+ "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.",
+ "type": "integer"
+ },
+ "X": {
+ "allOf": [
+ {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ {
+ "description": "Ask Exchange Id"
+ }
+ ]
+ },
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
},
"i": {
- "name": "indicators",
- "type": "int"
+ "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n",
+ "items": {
+ "description": "The indicator code.\n",
+ "type": "integer"
+ },
+ "type": "array"
},
- "P": {
- "name": "ask_price",
- "type": "float64"
+ "p": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
},
- "X": {
- "name": "ask_exchange",
- "type": "int"
+ "s": {
+ "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.",
+ "type": "integer"
+ },
+ "x": {
+ "allOf": [
+ {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ {
+ "description": "Bid Exchange Id"
+ }
+ ]
+ },
+ "z": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "StocksV2Trade": {
+ "allOf": [
+ {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "f": {
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
+ },
+ "q": {
+ "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n",
+ "format": "int64",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "y": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "e": {
+ "description": "The trade correction indicator.\n",
+ "type": "integer"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "r": {
+ "description": "The ID for the Trade Reporting Facility where the trade took place.\n",
+ "type": "integer"
+ },
+ "s": {
+ "description": "The size of a trade (also known as volume).\n",
+ "format": "double",
+ "type": "number"
+ },
+ "x": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "z": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ },
+ "StocksV2Trades": {
+ "properties": {
+ "results": {
+ "items": {
+ "allOf": [
+ {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
},
"f": {
- "name": "trf_timestamp",
- "type": "int64"
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
},
"q": {
- "name": "sequence_number",
- "type": "int"
+ "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n",
+ "format": "int64",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
},
+ "y": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
"c": {
- "name": "conditions",
- "type": "int"
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "e": {
+ "description": "The trade correction indicator.\n",
+ "type": "integer"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
},
"p": {
- "name": "bid_price",
- "type": "float64"
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "r": {
+ "description": "The ID for the Trade Reporting Facility where the trade took place.\n",
+ "type": "integer"
},
"s": {
- "name": "bid_size",
- "type": "int"
+ "description": "The size of a trade (also known as volume).\n",
+ "format": "double",
+ "type": "number"
},
"x": {
- "name": "bid_exchange",
- "type": "int"
- },
- "S": {
- "name": "ask_size",
- "type": "int"
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
},
"z": {
- "name": "tape",
- "type": "int"
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n",
+ "type": "integer"
}
- }
+ },
+ "type": "object"
}
- }
- }
- },
- "default": {
- "description": "Unexpected error"
+ ]
+ },
+ "type": "array"
}
},
- "x-polygon-entitlement-data-type": {
- "name": "nbbo",
- "description": "NBBO data"
+ "type": "object"
+ },
+ "SymbolPair": {
+ "description": "The symbol pair that was evaluated from the request.",
+ "type": "string"
+ },
+ "Tape": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n",
+ "type": "integer"
+ },
+ "TickerBase": {
+ "properties": {
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
},
- "x-polygon-entitlement-market-type": {
- "name": "stocks",
- "description": "Stocks data"
+ "type": "object"
+ },
+ "TickerResults": {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
},
- "x-polygon-deprecation": {
- "date": 1654056060000,
- "replaces": {
- "path": "get_v3_quotes__stockticker",
- "name": "Quotes (NBBO) v3"
+ "type": "object"
+ },
+ "TickerSymbol": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "Timestamp": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "TimestampExchange": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
+ },
+ "TimestampSIP": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "TimestampTRF": {
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
+ },
+ "TodaysChange": {
+ "description": "The value of the change the from previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "TodaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "TradeDetailsMapItem": {
+ "properties": {
+ "name": {
+ "description": "Name of the trade detail item",
+ "type": "string"
+ },
+ "type": {
+ "description": "Actual type of the trade detail item",
+ "type": "string"
}
- }
- }
- },
- "/v2/last/trade/{stocksTicker}": {
- "get": {
- "summary": "Last Trade",
- "description": "Get the most recent trade for a given stock.\n",
- "tags": [
- "stocks:last:trade"
- ],
- "parameters": [
- {
- "name": "stocksTicker",
- "in": "path",
- "description": "The ticker symbol of the stock/equity.",
- "required": true,
- "schema": {
- "type": "string"
- },
- "example": "AAPL"
+ },
+ "type": "object"
+ },
+ "TradeExchange": {
+ "description": "The exchange that this trade happened on.",
+ "type": "integer"
+ },
+ "TradeId": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "Updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ },
+ "V1LastBase": {
+ "properties": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ "symbol": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
}
- ],
- "responses": {
- "200": {
- "description": "The last trade for this stock.",
- "content": {
- "application/json": {
- "schema": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- },
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "results": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "T": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "t": {
- "type": "integer",
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it."
- },
- "y": {
- "type": "integer",
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange."
- },
- "f": {
- "type": "integer",
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message."
- },
- "q": {
- "type": "integer",
- "format": "int64",
- "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n"
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "c": {
- "type": "array",
- "description": "A list of condition codes.\n",
- "items": {
- "type": "integer",
- "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"
- }
- },
- "i": {
- "type": "string",
- "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"
- },
- "p": {
- "type": "number",
- "format": "double",
- "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"
- },
- "s": {
- "type": "number",
- "format": "double",
- "description": "The size of a trade (also known as volume).\n"
- },
- "e": {
- "type": "integer",
- "description": "The trade correction indicator.\n"
- },
- "x": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- },
- "r": {
- "type": "integer",
- "description": "The ID for the Trade Reporting Facility where the trade took place.\n"
- },
- "z": {
- "type": "integer",
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n"
- }
- }
- }
- ]
- }
- }
- }
- ]
- },
- "example": {
- "request_id": "f05562305bd26ced64b98ed68b3c5d96",
- "status": "OK",
- "results": {
- "T": "AAPL",
- "c": [
- 37
- ],
- "f": 1617901342969796400,
- "i": "118749",
- "p": 129.8473,
- "q": 3135876,
- "r": 202,
- "s": 25,
- "t": 1617901342969834000,
- "x": 4,
- "y": 1617901342968000000,
- "z": 3
- }
- }
- }
- }
+ },
+ "type": "object"
+ },
+ "V2AggsBase": {
+ "properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "V2LastBase": {
+ "properties": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "V2News": {
+ "properties": {
+ "amp_url": {
+ "description": "The mobile friendly Accelerated Mobile Page (AMP) URL.\n",
+ "format": "url",
+ "type": "string"
+ },
+ "article_url": {
+ "description": "A link to the news article.\n",
+ "format": "url",
+ "type": "string"
+ },
+ "author": {
+ "description": "The article's author.\n",
+ "type": "string"
},
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
+ "description": {
+ "description": "A description of the article.\n",
+ "type": "string"
},
- "404": {
- "description": "The specified resource was not found"
- }
- },
- "x-polygon-entitlement-data-type": {
- "name": "trades",
- "description": "Trade data"
- },
- "x-polygon-entitlement-market-type": {
- "name": "stocks",
- "description": "Stocks data"
- },
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "name": "realtime",
- "description": "Real Time Data"
+ "id": {
+ "description": "Unique identifier for the article.\n",
+ "type": "string"
},
- {
- "name": "delayed",
- "description": "15 minute delayed data"
- }
- ]
- }
- },
- "/v2/last/nbbo/{stocksTicker}": {
- "get": {
- "summary": "Last Quote",
- "description": "Get the most recent NBBO (Quote) tick for a given stock.\n",
- "tags": [
- "stocks:last:quote"
- ],
- "parameters": [
- {
- "name": "stocksTicker",
- "in": "path",
- "description": "The ticker symbol of the stock/equity.",
- "required": true,
- "schema": {
+ "image_url": {
+ "description": "The article's image URL.\n",
+ "format": "url",
+ "type": "string"
+ },
+ "keywords": {
+ "description": "The keywords associated with the article (which will vary depending on\nthe publishing source).\n",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "published_utc": {
+ "description": "The date the article was published on.\n",
+ "format": "date-time",
+ "type": "string"
+ },
+ "publisher": {
+ "properties": {
+ "favicon_url": {
+ "description": "The publisher's homepage favicon URL.\n",
+ "format": "url",
+ "type": "string"
+ },
+ "homepage_url": {
+ "description": "The publisher's homepage URL.\n",
+ "format": "url",
+ "type": "string"
+ },
+ "logo_url": {
+ "description": "The publisher's logo URL.\n",
+ "format": "url",
+ "type": "string"
+ },
+ "name": {
+ "description": "The publisher's name.\n",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "logo_url",
+ "homepage_url"
+ ],
+ "type": "object"
+ },
+ "tickers": {
+ "description": "The ticker symbols associated with the article.\n",
+ "items": {
+ "description": "The exchange symbol that this item is traded under.",
"type": "string"
},
- "example": "AAPL"
+ "type": "array"
+ },
+ "title": {
+ "description": "The title of the news article.\n",
+ "type": "string"
}
+ },
+ "required": [
+ "id",
+ "publisher",
+ "title",
+ "author",
+ "published_utc",
+ "article_url",
+ "tickers"
],
- "responses": {
- "200": {
- "description": "The last NBBO tick for this stock.",
- "content": {
- "application/json": {
- "schema": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- },
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "results": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "T": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "t": {
- "type": "integer",
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it."
- },
- "y": {
- "type": "integer",
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange."
- },
- "f": {
- "type": "integer",
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message."
- },
- "q": {
- "type": "integer",
- "format": "int64",
- "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n"
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "c": {
- "type": "array",
- "description": "A list of condition codes.\n",
- "items": {
- "type": "integer",
- "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"
- }
- },
- "i": {
- "type": "array",
- "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n",
- "items": {
- "type": "integer",
- "description": "The indicator code.\n"
- }
- },
- "p": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
- },
- "s": {
- "type": "integer",
- "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price."
- },
- "x": {
- "allOf": [
- {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- },
- {
- "description": "Bid Exchange Id"
- }
- ]
- },
- "P": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
- },
- "S": {
- "type": "integer",
- "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price."
- },
- "X": {
- "allOf": [
- {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- },
- {
- "description": "Ask Exchange Id"
- }
- ]
- },
- "z": {
- "type": "integer",
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n"
- }
- }
- }
- ]
- }
- }
- }
- ]
+ "type": "object"
+ },
+ "V2TicksBase": {
+ "properties": {
+ "db_latency": {
+ "description": "Latency in milliseconds for the query results from the database.",
+ "type": "integer"
+ },
+ "results_count": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "success": {
+ "description": "Whether or not this query was executed successfully.",
+ "type": "boolean"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Volume": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "VolumeWeight": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ },
+ "v3TickerDetails": {
+ "properties": {
+ "results": {
+ "description": "Ticker with details.\n",
+ "properties": {
+ "active": {
+ "description": "Whether or not the asset is actively traded. False means the asset has been delisted.",
+ "type": "boolean"
+ },
+ "address": {
+ "properties": {
+ "address1": {
+ "description": "The first line of the company's headquarters address.",
+ "type": "string"
+ },
+ "city": {
+ "description": "The city of the company's headquarters address.",
+ "type": "string"
+ },
+ "postal_code": {
+ "description": "The postal code of the company's headquarters address.",
+ "type": "string"
+ },
+ "state": {
+ "description": "The state of the company's headquarters address.",
+ "type": "string"
+ }
},
- "example": {
- "request_id": "b84e24636301f19f88e0dfbf9a45ed5c",
- "status": "OK",
- "results": {
- "P": 127.98,
- "S": 7,
- "T": "AAPL",
- "X": 19,
- "p": 127.96,
- "q": 83480742,
- "s": 1,
- "t": 1617827221349730300,
- "x": 11,
- "y": 1617827221349366000,
- "z": 3
+ "type": "object"
+ },
+ "branding": {
+ "properties": {
+ "icon_url": {
+ "description": "A link to this ticker's company's icon. Icon's are generally smaller, square images that represent the company at a glance.\nNote that you must provide an API key when accessing this URL. See the \"Authentication\" section at the top of this page for more details.\n",
+ "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.\n",
+ "type": "string"
}
- }
+ },
+ "type": "object"
+ },
+ "cik": {
+ "description": "The CIK number for this ticker. Find more information [here](https://en.wikipedia.org/wiki/Central_Index_Key).",
+ "type": "string"
+ },
+ "composite_figi": {
+ "description": "The composite OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)",
+ "type": "string"
+ },
+ "currency_name": {
+ "description": "The name of the currency that this asset is traded with.",
+ "type": "string"
+ },
+ "delisted_utc": {
+ "description": "The last date that the asset was traded.",
+ "format": "date-time",
+ "type": "string"
+ },
+ "description": {
+ "description": "A description of the company and what they do/offer.",
+ "type": "string"
+ },
+ "homepage_url": {
+ "description": "The URL of the company's website homepage.",
+ "type": "string"
+ },
+ "list_date": {
+ "description": "The date that the symbol was first publicly listed in the format YYYY-MM-DD.",
+ "type": "string"
+ },
+ "locale": {
+ "description": "The locale of the asset.",
+ "enum": [
+ "us",
+ "global"
+ ],
+ "type": "string"
+ },
+ "market": {
+ "description": "The market type of the asset.",
+ "enum": [
+ "stocks",
+ "crypto",
+ "fx",
+ "otc"
+ ],
+ "type": "string"
+ },
+ "market_cap": {
+ "description": "The most recent close price of the ticker multiplied by weighted outstanding shares.",
+ "format": "double",
+ "type": "number"
+ },
+ "name": {
+ "description": "The name of the asset. For stocks/equities this will be the companies registered name. For crypto/fx this will be the name of the currency or coin pair.\n",
+ "type": "string"
+ },
+ "phone_number": {
+ "description": "The phone number for the company behind this ticker.",
+ "type": "string"
+ },
+ "primary_exchange": {
+ "description": "The ISO code of the primary listing exchange for this asset.",
+ "type": "string"
+ },
+ "share_class_figi": {
+ "description": "The share Class OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)",
+ "type": "string"
+ },
+ "share_class_shares_outstanding": {
+ "description": "The recorded number of outstanding shares for this particular share class.",
+ "format": "double",
+ "type": "number"
+ },
+ "sic_code": {
+ "description": "The standard industrial classification code for this ticker. For a list of SIC Codes, see the SEC's \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://www.sec.gov/info/edgar/siccodes.htm\"\u003eSIC Code List\u003c/a\u003e.\n",
+ "type": "string"
+ },
+ "sic_description": {
+ "description": "A description of this ticker's SIC code.",
+ "type": "string"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "ticker_root": {
+ "description": "The root of a specified ticker. For example, the root of BRK.A is BRK.",
+ "type": "string"
+ },
+ "ticker_suffix": {
+ "description": "The suffix of a specified ticker. For example, the suffix of BRK.A is A.",
+ "type": "string"
+ },
+ "total_employees": {
+ "description": "The approximate number of employees for the company.",
+ "type": "number"
+ },
+ "type": {
+ "description": "The type of the asset. Find the types that we support via our [Ticker Types API](https://polygon.io/docs/stocks/get_v3_reference_tickers_types).",
+ "type": "string"
+ },
+ "weighted_shares_outstanding": {
+ "description": "The shares outstanding calculated assuming all shares of other share classes are converted to this share class.\n",
+ "format": "double",
+ "type": "number"
}
- }
- },
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
- },
- "404": {
- "description": "The specified resource was not found"
+ },
+ "required": [
+ "ticker",
+ "name",
+ "market",
+ "locale",
+ "active",
+ "currency_name"
+ ],
+ "type": "object"
}
},
- "x-polygon-entitlement-data-type": {
- "name": "nbbo",
- "description": "NBBO data"
- },
- "x-polygon-entitlement-market-type": {
- "name": "stocks",
- "description": "Stocks data"
- },
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "name": "realtime",
- "description": "Real Time Data"
- },
- {
- "name": "delayed",
- "description": "15 minute delayed data"
+ "type": "object"
+ },
+ "v3Tickers": {
+ "properties": {
+ "results": {
+ "description": "An array of tickers that match your query.\n\nNote: Although you can query by CUSIP, due to legal reasons we do not return the CUSIP in the response.\n",
+ "items": {
+ "properties": {
+ "active": {
+ "description": "Whether or not the asset is actively traded. False means the asset has been delisted.",
+ "type": "boolean"
+ },
+ "cik": {
+ "description": "The CIK number for this ticker. Find more information [here](https://en.wikipedia.org/wiki/Central_Index_Key).",
+ "type": "string"
+ },
+ "composite_figi": {
+ "description": "The composite OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)",
+ "type": "string"
+ },
+ "currency_name": {
+ "description": "The name of the currency that this asset is traded with.",
+ "type": "string"
+ },
+ "delisted_utc": {
+ "description": "The last date that the asset was traded.",
+ "format": "date-time",
+ "type": "string"
+ },
+ "last_updated_utc": {
+ "description": "The information is accurate up to this time.",
+ "format": "date-time",
+ "type": "string"
+ },
+ "locale": {
+ "description": "The locale of the asset.",
+ "enum": [
+ "us",
+ "global"
+ ],
+ "type": "string"
+ },
+ "market": {
+ "description": "The market type of the asset.",
+ "enum": [
+ "stocks",
+ "crypto",
+ "fx",
+ "otc"
+ ],
+ "type": "string"
+ },
+ "name": {
+ "description": "The name of the asset. For stocks/equities this will be the companies registered name. For crypto/fx this will be the name of the currency or coin pair.\n",
+ "type": "string"
+ },
+ "primary_exchange": {
+ "description": "The ISO code of the primary listing exchange for this asset.",
+ "type": "string"
+ },
+ "share_class_figi": {
+ "description": "The share Class OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)",
+ "type": "string"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "type": {
+ "description": "The type of the asset. Find the types that we support via our [Ticker Types API](https://polygon.io/docs/stocks/get_v3_reference_tickers_types).",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker",
+ "name",
+ "market",
+ "locale"
+ ],
+ "type": "object"
+ },
+ "type": "array"
}
- ]
+ },
+ "type": "object"
}
},
- "/v1/open-close/{stocksTicker}/{date}": {
+ "securitySchemes": {
+ "apiKey": {
+ "in": "query",
+ "name": "apiKey",
+ "type": "apiKey"
+ }
+ }
+ },
+ "info": {
+ "description": "The future of fintech.",
+ "title": "Polygon API",
+ "version": "1.0.0"
+ },
+ "openapi": "3.0.3",
+ "paths": {
+ "/v1/conversion/{from}/{to}": {
"get": {
- "summary": "Daily Open/Close",
- "description": "Get the open, close and afterhours prices of a stock symbol on a certain date.\n",
- "tags": [
- "stocks:open-close"
- ],
+ "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": [
{
- "name": "stocksTicker",
+ "description": "The \"from\" symbol of the pair.",
+ "example": "AUD",
"in": "path",
- "description": "The ticker symbol of the stock/equity.",
+ "name": "from",
"required": true,
"schema": {
"type": "string"
- },
- "example": "AAPL"
- },
- {
- "name": "date",
- "in": "path",
- "description": "The date of the requested open/close in the format YYYY-MM-DD.",
- "required": true,
- "schema": {
- "type": "string",
- "format": "date"
- },
- "example": "2020-10-14"
- },
- {
- "name": "adjusted",
- "in": "query",
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "required": false,
- "schema": {
- "type": "boolean"
- },
- "example": true
- }
- ],
- "responses": {
- "200": {
- "description": "The open/close of this stock symbol.",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- },
- "from": {
- "type": "string",
- "format": "date",
- "description": "The requested date."
- },
- "symbol": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "open": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "high": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "low": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "close": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "volume": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "otc": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
- },
- "preMarket": {
- "type": "integer",
- "description": "The open price of the ticker symbol in pre-market trading."
- },
- "afterHours": {
- "type": "number",
- "format": "double",
- "description": "The close price of the ticker symbol in after hours trading."
- }
- }
- },
- "example": {
- "status": "OK",
- "from": "2020-10-14T00:00:00.000Z",
- "symbol": "AAPL",
- "open": 324.66,
- "high": 326.2,
- "low": 322.3,
- "close": 325.12,
- "volume": 26122646,
- "afterHours": 322.1,
- "preMarket": 324.5
- }
- }
}
},
- "default": {
- "description": "Unexpected error"
- }
- },
- "x-polygon-entitlement-data-type": {
- "name": "aggregates",
- "description": "Aggregate data"
- },
- "x-polygon-entitlement-market-type": {
- "name": "stocks",
- "description": "Stocks data"
- }
- }
- },
- "/v2/aggs/grouped/locale/us/market/stocks/{date}": {
- "get": {
- "summary": "Grouped Daily (Bars)",
- "description": "Get the daily open, high, low, and close (OHLC) for the entire stocks/equities markets.\n",
- "tags": [
- "stocks:aggregates"
- ],
- "parameters": [
{
- "name": "date",
+ "description": "The \"to\" symbol of the pair.",
+ "example": "USD",
"in": "path",
- "description": "The beginning date for the aggregate window.",
+ "name": "to",
"required": true,
"schema": {
"type": "string"
- },
- "example": "2020-10-14"
+ }
},
{
- "name": "adjusted",
+ "description": "The amount to convert, with a decimal.",
+ "example": 100,
"in": "query",
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "required": false,
+ "name": "amount",
+ "required": true,
"schema": {
- "type": "boolean"
- },
- "example": true
+ "default": 100,
+ "type": "number"
+ }
},
{
- "name": "include_otc",
+ "description": "The decimal precision of the conversion. Defaults to 2 which is 2 decimal places accuracy.",
+ "example": 2,
"in": "query",
- "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n",
- "required": false,
+ "name": "precision",
"schema": {
- "type": "boolean"
+ "default": 2,
+ "enum": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "type": "integer"
}
}
],
"responses": {
"200": {
- "description": "Previous day OHLC for ticker",
"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": {
- "allOf": [
- {
- "type": "object",
+ "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": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
+ "ask": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
},
- "adjusted": {
- "type": "boolean",
- "description": "Whether or not this response was adjusted for splits."
+ "bid": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
},
- "queryCount": {
- "type": "integer",
- "description": "The number of aggregates (minute or day) used to generate the response."
+ "exchange": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/forex/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
},
- "resultsCount": {
+ "timestamp": {
+ "description": "The Unix millisecond timestamp.",
"type": "integer",
- "description": "The total number of results for this request."
- },
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "results": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "T": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "n": {
- "type": "integer",
- "description": "The number of transactions in the aggregate window."
- },
- "otc": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
- }
- }
+ "x-polygon-go-type": {
+ "name": "IMilliseconds",
+ "path": "github.com/polygon-io/ptime"
}
}
- }
- }
- ]
- },
- "example": {
- "status": "OK",
- "queryCount": 3,
- "resultsCount": 3,
- "adjusted": true,
- "results": [
- {
- "T": "KIMpL",
- "v": 4369,
- "vw": 26.0407,
- "o": 26.07,
- "c": 25.9102,
- "h": 26.25,
- "l": 25.91,
- "t": 1602705600000,
- "n": 74
+ },
+ "type": "object"
},
- {
- "T": "TANH",
- "v": 25933.6,
- "vw": 23.493,
- "o": 24.5,
- "c": 23.4,
- "h": 24.763,
- "l": 22.65,
- "t": 1602705600000,
- "n": 1096
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
},
- {
- "T": "VSAT",
- "v": 312583,
- "vw": 34.4736,
- "o": 34.9,
- "c": 34.24,
- "h": 35.47,
- "l": 34.21,
- "t": 1602705600000,
- "n": 4966
+ "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"
}
}
- }
+ },
+ "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": {
- "name": "aggregates",
- "description": "Aggregate data"
+ "description": "NBBO data",
+ "name": "nbbo"
},
"x-polygon-entitlement-market-type": {
- "name": "stocks",
- "description": "Stocks data"
+ "description": "Forex data",
+ "name": "fx"
}
}
},
- "/v2/aggs/ticker/{stocksTicker}/prev": {
+ "/v1/historic/crypto/{from}/{to}/{date}": {
"get": {
- "summary": "Previous Close",
- "description": "Get the previous day's open, high, low, and close (OHLC) for the specified stock ticker.\n",
- "tags": [
- "stocks:aggregates"
- ],
+ "description": "Get historic trade ticks for a cryptocurrency pair.\n",
"parameters": [
{
- "name": "stocksTicker",
+ "description": "The \"from\" symbol of the crypto pair.",
+ "example": "BTC",
"in": "path",
- "description": "The ticker symbol of the stock/equity.",
+ "name": "from",
"required": true,
"schema": {
"type": "string"
- },
- "example": "AAPL"
+ }
},
{
- "name": "adjusted",
+ "description": "The \"to\" symbol of the crypto pair.",
+ "example": "USD",
+ "in": "path",
+ "name": "to",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The date/day of the historic ticks to retrieve.",
+ "example": "2020-10-14",
+ "in": "path",
+ "name": "date",
+ "required": true,
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "The timestamp offset, used for pagination. This is the offset at which to start the results. Using the `timestamp` of the last result as the offset will give you the next page of results.\n",
"in": "query",
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "required": false,
+ "name": "offset",
"schema": {
- "type": "boolean"
- },
- "example": true
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Limit the size of the response, max 10000.",
+ "example": 100,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
}
],
"responses": {
"200": {
- "description": "The previous day OHLC for the ticker.",
"content": {
"application/json": {
+ "example": {
+ "day": "2020-10-14T00:00:00.000Z",
+ "map": {
+ "c": "conditions",
+ "p": "price",
+ "s": "size",
+ "t": "timestamp",
+ "x": "exchange"
+ },
+ "msLatency": 1,
+ "status": "success",
+ "symbol": "BTC-USD",
+ "ticks": [
+ {
+ "c": [
+ 2
+ ],
+ "p": 15482.89,
+ "s": 0.00188217,
+ "t": 1604880000067,
+ "x": 1
+ },
+ {
+ "c": [
+ 2
+ ],
+ "p": 15482.11,
+ "s": 0.00161739,
+ "t": 1604880000167,
+ "x": 1
+ }
+ ],
+ "type": "crypto"
+ },
"schema": {
"allOf": [
{
- "type": "object",
- "properties": {
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- }
- }
+ "description": "The status of this request's response.",
+ "type": "string"
},
{
- "type": "object",
"properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
+ "day": {
+ "description": "The date that was evaluated from the request.",
+ "format": "date",
+ "type": "string"
},
- "adjusted": {
- "type": "boolean",
- "description": "Whether or not this response was adjusted for splits."
+ "map": {
+ "description": "A map for shortened result keys.",
+ "type": "object"
},
- "queryCount": {
- "type": "integer",
- "description": "The number of aggregates (minute or day) used to generate the response."
+ "msLatency": {
+ "description": "The milliseconds of latency for the query results.",
+ "type": "integer"
},
- "resultsCount": {
- "type": "integer",
- "description": "The total number of results for this request."
+ "symbol": {
+ "description": "The symbol pair that was evaluated from the request.",
+ "type": "string"
},
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "results": {
- "type": "array",
+ "ticks": {
"items": {
- "type": "object",
"properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
"c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
+ "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"
},
- "v": {
- "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"
+ },
+ "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",
- "description": "The trading volume of the symbol in the given time period."
+ "type": "number"
},
- "vw": {
- "type": "number",
+ "s": {
+ "description": "The size of a trade (also known as volume).\n",
"format": "double",
- "description": "The volume weighted average price."
+ "type": "number"
},
"t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
},
- "n": {
- "type": "integer",
- "description": "The number of transactions in the aggregate window."
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
+ "type": "integer"
}
- }
- }
+ },
+ "type": "object"
+ },
+ "type": "array"
}
- }
+ },
+ "type": "object"
}
]
- },
- "example": {
- "ticker": "AAPL",
- "status": "OK",
- "queryCount": 1,
- "resultsCount": 1,
- "adjusted": true,
- "results": [
- {
- "T": "AAPL",
- "v": 131704427,
- "vw": 116.3058,
- "o": 115.55,
- "c": 115.97,
- "h": 117.59,
- "l": 114.13,
- "t": 1605042000000
- }
- ],
- "request_id": "6a7e466379af0a71039d60cc78e72282"
}
}
- }
+ },
+ "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": {
- "name": "aggregates",
- "description": "Aggregate data"
+ "description": "Trade data",
+ "name": "trades"
},
"x-polygon-entitlement-market-type": {
- "name": "stocks",
- "description": "Stocks data"
+ "description": "Crypto data",
+ "name": "crypto"
}
}
},
- "/v2/aggs/ticker/{stocksTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
+ "/v1/historic/forex/{from}/{to}/{date}": {
"get": {
- "summary": "Aggregates (Bars)",
- "description": "Get aggregate bars for a stock over a given date range in custom time window sizes.\n
\n
\nFor example, if timespan = ‘minute’ and multiplier = ‘5’ then 5-minute bars will be returned.\n",
- "tags": [
- "stocks:aggregates"
- ],
+ "description": "Get historic ticks for a forex currency pair.\n",
"parameters": [
{
- "name": "stocksTicker",
+ "description": "The \"from\" symbol of the currency pair.\n\nExample: For **USD/JPY** the `from` would be **USD**.\n",
+ "example": "AUD",
"in": "path",
- "description": "The ticker symbol of the stock/equity.",
+ "name": "from",
"required": true,
"schema": {
"type": "string"
- },
- "example": "AAPL"
- },
- {
- "name": "multiplier",
- "in": "path",
- "description": "The size of the timespan multiplier.",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "example": 1
- },
- {
- "name": "timespan",
- "in": "path",
- "description": "The size of the time window.",
- "required": true,
- "schema": {
- "type": "string",
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ]
- },
- "example": "day"
+ }
},
{
- "name": "from",
+ "description": "The \"to\" symbol of the currency pair.\n\nExample: For **USD/JPY** the `to` would be **JPY**.\n",
+ "example": "USD",
"in": "path",
- "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "name": "to",
"required": true,
"schema": {
"type": "string"
- },
- "example": "2021-07-22"
+ }
},
{
- "name": "to",
+ "description": "The date/day of the historic ticks to retrieve.",
+ "example": "2020-10-14",
"in": "path",
- "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "name": "date",
"required": true,
"schema": {
+ "format": "date",
"type": "string"
- },
- "example": "2021-07-22"
+ }
},
{
- "name": "adjusted",
+ "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",
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "required": false,
+ "name": "offset",
"schema": {
- "type": "boolean"
- },
- "example": true
+ "type": "integer"
+ }
},
{
- "name": "sort",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ]
- },
+ "description": "Limit the size of the response, max 10000.",
+ "example": 100,
"in": "query",
- "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
- "example": "asc"
- },
- {
"name": "limit",
- "in": "query",
- "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on \nAggregate Data API Improvements.\n",
- "required": false,
"schema": {
"type": "integer"
- },
- "example": 120
+ }
}
],
"responses": {
"200": {
- "description": "Stock Aggregates.",
"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": [
{
- "type": "object",
"properties": {
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
}
- }
+ },
+ "type": "object"
},
{
- "type": "object",
"properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
+ "day": {
+ "description": "The date that was evaluated from the request.",
+ "format": "date",
+ "type": "string"
},
- "adjusted": {
- "type": "boolean",
- "description": "Whether or not this response was adjusted for splits."
+ "map": {
+ "description": "A map for shortened result keys.",
+ "type": "object"
},
- "queryCount": {
- "type": "integer",
- "description": "The number of aggregates (minute or day) used to generate the response."
+ "msLatency": {
+ "description": "The milliseconds of latency for the query results.",
+ "type": "integer"
},
- "resultsCount": {
- "type": "integer",
- "description": "The total number of results for this request."
+ "pair": {
+ "description": "The currency pair that was evaluated from the request.",
+ "type": "string"
},
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "results": {
- "type": "array",
+ "ticks": {
"items": {
- "type": "object",
"properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
+ "a": {
+ "description": "The ask price.",
"format": "double",
- "description": "The trading volume of the symbol in the given time period."
+ "type": "number"
},
- "vw": {
- "type": "number",
+ "b": {
+ "description": "The bid price.",
"format": "double",
- "description": "The volume weighted average price."
+ "type": "number"
},
"t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "n": {
- "type": "integer",
- "description": "The number of transactions in the aggregate window."
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
},
- "otc": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
- }
- }
- }
- }
- }
- }
- ]
- },
- "example": {
- "ticker": "AAPL",
- "status": "OK",
- "queryCount": 2,
- "resultsCount": 2,
- "adjusted": true,
- "results": [
- {
- "v": 135647456,
- "vw": 74.6099,
- "o": 74.06,
- "c": 75.0875,
- "h": 75.15,
- "l": 73.7975,
- "t": 1577941200000,
- "n": 1
- },
- {
- "v": 146535512,
- "vw": 74.7026,
- "o": 74.2875,
- "c": 74.3575,
- "h": 75.145,
- "l": 74.125,
- "t": 1578027600000,
- "n": 1
+ "x": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/forex/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
}
- ],
- "request_id": "6a7e466379af0a71039d60cc78e72282"
+ ]
}
}
- }
+ },
+ "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": {
- "name": "aggregates",
- "description": "Aggregate data"
+ "description": "NBBO data",
+ "name": "nbbo"
},
"x-polygon-entitlement-market-type": {
- "name": "stocks",
- "description": "Stocks data"
+ "description": "Forex data",
+ "name": "fx"
}
}
},
- "/v2/snapshot/locale/us/markets/stocks/tickers": {
+ "/v1/last/crypto/{from}/{to}": {
"get": {
- "summary": "All Tickers",
- "description": "Get the most up-to-date market data for all traded stock symbols.\n
\n
\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n",
- "tags": [
- "stocks:snapshot"
- ],
+ "description": "Get the last trade tick for a cryptocurrency pair.",
+ "operationId": "LastTradeCrypto",
"parameters": [
{
- "name": "tickers",
- "in": "query",
- "description": "A comma separated list of tickers to get snapshots for.",
+ "description": "The \"from\" symbol of the pair.",
+ "example": "BTC",
+ "in": "path",
+ "name": "from",
+ "required": true,
"schema": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": "string"
}
},
{
- "name": "include_otc",
- "in": "query",
- "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n",
- "required": false,
+ "description": "The \"to\" symbol of the pair.",
+ "example": "USD",
+ "in": "path",
+ "name": "to",
+ "required": true,
"schema": {
- "type": "boolean"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Get current state for all tickers",
- "content": {
- "application/json": {
- "schema": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- },
- "count": {
- "type": "integer",
- "description": "The total number of results for this request."
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "tickers": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- },
- "otc": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
- }
- }
- },
- "lastQuote": {
- "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
- "type": "object",
- "properties": {
- "p": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
- },
- "s": {
- "type": "integer",
- "description": "The bid size in lots."
- },
- "P": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
- },
- "S": {
- "type": "integer",
- "description": "The ask size in lots."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- }
- }
- },
- "lastTrade": {
- "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.",
- "type": "object",
- "properties": {
- "c": {
- "type": "array",
- "description": "The trade conditions.",
- "items": {
- "type": "string"
- }
- },
- "i": {
- "type": "string",
- "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"
- },
- "p": {
- "type": "number",
- "format": "double",
- "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"
- },
- "s": {
- "type": "integer",
- "description": "The size (volume) of the trade."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "x": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- }
- }
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "type": "object",
- "properties": {
- "av": {
- "type": "integer",
- "description": "The accumulated volume."
- },
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- },
- "otc": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
- }
- }
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- },
- "otc": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
- }
- }
- },
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "todaysChange": {
- "type": "number",
- "format": "double",
- "description": "The value of the change the from previous day."
- },
- "todaysChangePerc": {
- "type": "number",
- "format": "double",
- "description": "The percentage change since the previous day."
- },
- "updated": {
- "type": "integer",
- "description": "The last updated timestamp."
- }
- }
- }
- }
- }
- }
- ]
- },
- "example": {
- "status": "OK",
- "count": 1,
- "tickers": [
- {
- "day": {
- "c": 20.506,
- "h": 20.64,
- "l": 20.506,
- "o": 20.64,
- "v": 37216,
- "vw": 20.616
- },
- "lastQuote": {
- "P": 20.6,
- "S": 22,
- "p": 20.5,
- "s": 13,
- "t": 1605192959994246100
- },
- "lastTrade": {
- "c": [
- 14,
- 41
- ],
- "i": "71675577320245",
- "p": 20.506,
- "s": 2416,
- "t": 1605192894630916600,
- "x": 4
- },
- "min": {
- "av": 37216,
- "c": 20.506,
- "h": 20.506,
- "l": 20.506,
- "o": 20.506,
- "v": 5000,
- "vw": 20.5105
- },
- "prevDay": {
- "c": 20.63,
- "h": 21,
- "l": 20.5,
- "o": 20.79,
- "v": 292738,
- "vw": 20.6939
+ "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/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
+ "type": "integer"
+ },
+ "type": "array",
+ "x-polygon-go-type": {
+ "name": "[]*int32"
+ }
+ },
+ "exchange": {
+ "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.",
+ "type": "integer"
+ },
+ "price": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
+ "format": "double",
+ "type": "number"
+ },
+ "size": {
+ "description": "The size of a trade (also known as volume).",
+ "format": "double",
+ "type": "number"
+ },
+ "timestamp": {
+ "description": "The Unix millisecond timestamp.",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMilliseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ }
},
- "ticker": "BCAT",
- "todaysChange": -0.124,
- "todaysChangePerc": -0.601,
- "updated": 1605192894630916600
+ "type": "object"
+ },
+ "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"
}
}
- }
+ },
+ "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": {
- "name": "aggregates",
- "description": "Aggregate data"
+ "description": "Trade data",
+ "name": "trades"
},
"x-polygon-entitlement-market-type": {
- "name": "stocks",
- "description": "Stocks data"
- },
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "name": "realtime",
- "description": "Real Time Data"
- },
- {
- "name": "delayed",
- "description": "15 minute delayed data"
- }
- ]
+ "description": "Crypto data",
+ "name": "crypto"
+ }
}
},
- "/v2/snapshot/locale/us/markets/stocks/tickers/{stocksTicker}": {
+ "/v1/last_quote/currencies/{from}/{to}": {
"get": {
- "summary": "Ticker",
- "description": "Get the most up-to-date market data for a single traded stock ticker.\n
\n
\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n",
- "tags": [
- "stocks:snapshot"
- ],
+ "description": "Get the last quote tick for a forex currency pair.",
+ "operationId": "LastQuoteCurrencies",
"parameters": [
{
- "name": "stocksTicker",
+ "description": "The \"from\" symbol of the pair.",
+ "example": "AUD",
"in": "path",
- "description": "The ticker symbol of the stock/equity.",
+ "name": "from",
"required": true,
"schema": {
"type": "string"
- },
- "example": "AAPL"
+ }
+ },
+ {
+ "description": "The \"to\" symbol of the pair.",
+ "example": "USD",
+ "in": "path",
+ "name": "to",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
"200": {
- "description": "Get current state for a ticker",
"content": {
"application/json": {
+ "example": {
+ "last": {
+ "ask": 0.73124,
+ "bid": 0.73122,
+ "exchange": 48,
+ "timestamp": 1605557756000
+ },
+ "request_id": "a73a29dbcab4613eeaf48583d3baacf0",
+ "status": "success",
+ "symbol": "AUD/USD"
+ },
"schema": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
- }
- }
- },
- {
- "type": "object",
+ "properties": {
+ "last": {
"properties": {
- "ticker": {
- "type": "object",
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- },
- "otc": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
- }
- }
- },
- "lastQuote": {
- "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
- "type": "object",
- "properties": {
- "p": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
- },
- "s": {
- "type": "integer",
- "description": "The bid size in lots."
- },
- "P": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
- },
- "S": {
- "type": "integer",
- "description": "The ask size in lots."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- }
- }
- },
- "lastTrade": {
- "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.",
- "type": "object",
- "properties": {
- "c": {
- "type": "array",
- "description": "The trade conditions.",
- "items": {
- "type": "string"
- }
- },
- "i": {
- "type": "string",
- "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"
- },
- "p": {
- "type": "number",
- "format": "double",
- "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"
- },
- "s": {
- "type": "integer",
- "description": "The size (volume) of the trade."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "x": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- }
- }
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "type": "object",
- "properties": {
- "av": {
- "type": "integer",
- "description": "The accumulated volume."
- },
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- },
- "otc": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
- }
- }
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- },
- "otc": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
- }
- }
- },
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "todaysChange": {
- "type": "number",
- "format": "double",
- "description": "The value of the change the from previous day."
- },
- "todaysChangePerc": {
- "type": "number",
- "format": "double",
- "description": "The percentage change since the previous day."
- },
- "updated": {
- "type": "integer",
- "description": "The last updated timestamp."
- }
+ "ask": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "bid": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "exchange": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/forex/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "timestamp": {
+ "description": "The Unix millisecond timestamp.",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "IMilliseconds",
+ "path": "github.com/polygon-io/ptime"
}
}
- }
- }
- ]
- },
- "example": {
- "status": "OK",
- "request_id": "657e430f1ae768891f018e08e03598d8",
- "ticker": {
- "day": {
- "c": 120.4229,
- "h": 120.53,
- "l": 118.81,
- "o": 119.62,
- "v": 28727868,
- "vw": 119.725
- },
- "lastQuote": {
- "P": 120.47,
- "S": 4,
- "p": 120.46,
- "s": 8,
- "t": 1605195918507251700
- },
- "lastTrade": {
- "c": [
- 14,
- 41
- ],
- "i": "4046",
- "p": 120.47,
- "s": 236,
- "t": 1605195918306274000,
- "x": 10
+ },
+ "type": "object"
},
- "min": {
- "av": 28724441,
- "c": 120.4201,
- "h": 120.468,
- "l": 120.37,
- "o": 120.435,
- "v": 270796,
- "vw": 120.4129
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
},
- "prevDay": {
- "c": 119.49,
- "h": 119.63,
- "l": 116.44,
- "o": 117.19,
- "v": 110597265,
- "vw": 118.4998
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
},
- "ticker": "AAPL",
- "todaysChange": 0.98,
- "todaysChangePerc": 0.82,
- "updated": 1605195918306274000
- }
+ "symbol": {
+ "description": "The symbol pair that was evaluated from the request.",
+ "type": "string"
+ }
+ },
+ "type": "object"
}
}
- }
+ },
+ "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": {
- "name": "aggregates",
- "description": "Aggregate data"
+ "description": "NBBO data",
+ "name": "nbbo"
},
"x-polygon-entitlement-market-type": {
- "name": "stocks",
- "description": "Stocks data"
- },
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "name": "realtime",
- "description": "Real Time Data"
+ "description": "Forex data",
+ "name": "fx"
+ }
+ }
+ },
+ "/v1/marketstatus/now": {
+ "get": {
+ "description": "Get the current trading status of the exchanges and overall financial markets.\n",
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "afterHours": true,
+ "currencies": {
+ "crypto": "open",
+ "fx": "open"
+ },
+ "earlyHours": false,
+ "exchanges": {
+ "nasdaq": "extended-hours",
+ "nyse": "extended-hours",
+ "otc": "closed"
+ },
+ "market": "extended-hours",
+ "serverTime": "2020-11-10T22:37:37.000Z"
+ },
+ "schema": {
+ "properties": {
+ "afterHours": {
+ "description": "Whether or not the market is in post-market hours.",
+ "type": "boolean"
+ },
+ "currencies": {
+ "properties": {
+ "crypto": {
+ "description": "The status of the crypto market.",
+ "type": "string"
+ },
+ "fx": {
+ "description": "The status of the forex market.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "earlyHours": {
+ "description": "Whether or not the market is in pre-market hours.",
+ "type": "boolean"
+ },
+ "exchanges": {
+ "properties": {
+ "nasdaq": {
+ "description": "The status of the Nasdaq market.",
+ "type": "string"
+ },
+ "nyse": {
+ "description": "The status of the NYSE market.",
+ "type": "string"
+ },
+ "otc": {
+ "description": "The status of the OTC market.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "market": {
+ "description": "The status of the market as a whole.",
+ "type": "string"
+ },
+ "serverTime": {
+ "description": "The current time of the server.",
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "Status of the market and each exchange"
},
- {
- "name": "delayed",
- "description": "15 minute delayed data"
+ "401": {
+ "description": "Unauthorized - Check our API Key and account status"
+ },
+ "404": {
+ "description": "The specified resource was not found"
+ },
+ "409": {
+ "description": "Parameter is invalid or incorrect."
}
- ]
+ },
+ "summary": "Market Status",
+ "tags": [
+ "reference:stocks:market"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ }
}
},
- "/v2/snapshot/locale/us/markets/stocks/{direction}": {
+ "/v1/marketstatus/upcoming": {
"get": {
- "summary": "Gainers/Losers",
- "description": "Get the most up-to-date market data for the current top 20 gainers or losers of the day in the stocks/equities markets.\n
\n
\nTop gainers are those tickers whose price has increased by the highest percentage since the previous day's close.\nTop losers are those tickers whose price has decreased by the highest percentage since the previous day's close.\n
\n
\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
+ "description": "Get upcoming market holidays and their open/close times.\n",
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": [
+ {
+ "date": "2020-11-26T00:00:00.000Z",
+ "exchange": "NYSE",
+ "name": "Thanksgiving",
+ "status": "closed"
+ },
+ {
+ "date": "2020-11-26T00:00:00.000Z",
+ "exchange": "NASDAQ",
+ "name": "Thanksgiving",
+ "status": "closed"
+ },
+ {
+ "date": "2020-11-26T00:00:00.000Z",
+ "exchange": "OTC",
+ "name": "Thanksgiving",
+ "status": "closed"
+ },
+ {
+ "close": "2020-11-27T18:00:00.000Z",
+ "date": "2020-11-27T00:00:00.000Z",
+ "exchange": "NASDAQ",
+ "name": "Thanksgiving",
+ "open": "2020-11-27T14:30:00.000Z",
+ "status": "early-close"
+ },
+ {
+ "close": "2020-11-27T18:00:00.000Z",
+ "date": "2020-11-27T00:00:00.000Z",
+ "exchange": "NYSE",
+ "name": "Thanksgiving",
+ "open": "2020-11-27T14:30:00.000Z",
+ "status": "early-close"
+ }
+ ],
+ "schema": {
+ "items": {
+ "properties": {
+ "close": {
+ "description": "The market close time on the holiday (if it's not closed).",
+ "format": "date-time",
+ "type": "string"
+ },
+ "date": {
+ "description": "The date of the holiday.",
+ "format": "date",
+ "type": "string"
+ },
+ "exchange": {
+ "description": "Which market the record is for.",
+ "type": "string"
+ },
+ "name": {
+ "description": "The name of the holiday.",
+ "type": "string"
+ },
+ "open": {
+ "description": "The market open time on the holiday (if it's not closed).",
+ "format": "date-time",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of the market on the holiday.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ }
+ },
+ "description": "Holidays for each market in the near future."
+ },
+ "401": {
+ "description": "Unauthorized - Check our API Key and account status"
+ },
+ "404": {
+ "description": "The specified resource was not found"
+ },
+ "409": {
+ "description": "Parameter is invalid or incorrect."
+ }
+ },
+ "summary": "Market Holidays",
"tags": [
- "stocks:snapshot"
+ "reference:stocks:market"
],
+ "x-polygon-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ }
+ }
+ },
+ "/v1/open-close/crypto/{from}/{to}/{date}": {
+ "get": {
+ "description": "Get the open, close prices of a cryptocurrency symbol on a certain day.\n",
"parameters": [
{
- "name": "direction",
+ "description": "The \"from\" symbol of the pair.",
+ "example": "BTC",
+ "in": "path",
+ "name": "from",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The \"to\" symbol of the pair.",
+ "example": "USD",
+ "in": "path",
+ "name": "to",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The date of the requested open/close in the format YYYY-MM-DD.",
+ "example": "2020-10-14",
"in": "path",
- "description": "The direction of the snapshot results to return.\n",
+ "name": "date",
"required": true,
"schema": {
- "type": "string",
- "enum": [
- "gainers",
- "losers"
- ]
- },
- "example": "gainers"
+ "format": "date",
+ "type": "string"
+ }
},
{
- "name": "include_otc",
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
"in": "query",
- "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n",
- "required": false,
+ "name": "adjusted",
"schema": {
"type": "boolean"
}
@@ -4012,3736 +5575,3286 @@
],
"responses": {
"200": {
- "description": "Get the current tickers of the day",
"content": {
"application/json": {
- "schema": {
- "allOf": [
+ "example": {
+ "close": 11050.64,
+ "closingTrades": [
{
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- }
- }
+ "c": [
+ 2
+ ],
+ "i": "973323250",
+ "p": 11050.64,
+ "s": 0.006128,
+ "t": 1602287999795,
+ "x": 4
},
{
- "type": "object",
- "properties": {
- "tickers": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- },
- "otc": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
- }
- }
- },
- "lastQuote": {
- "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
- "type": "object",
- "properties": {
- "p": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
- },
- "s": {
- "type": "integer",
- "description": "The bid size in lots."
- },
- "P": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
- },
- "S": {
- "type": "integer",
- "description": "The ask size in lots."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- }
- }
- },
- "lastTrade": {
- "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.",
- "type": "object",
- "properties": {
- "c": {
- "type": "array",
- "description": "The trade conditions.",
- "items": {
- "type": "string"
- }
- },
- "i": {
- "type": "string",
- "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"
- },
- "p": {
- "type": "number",
- "format": "double",
- "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"
- },
- "s": {
- "type": "integer",
- "description": "The size (volume) of the trade."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "x": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- }
- }
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "type": "object",
- "properties": {
- "av": {
- "type": "integer",
- "description": "The accumulated volume."
- },
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- },
- "otc": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
- }
- }
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- },
- "otc": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
- }
- }
- },
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "todaysChange": {
- "type": "number",
- "format": "double",
- "description": "The value of the change the from previous day."
- },
- "todaysChangePerc": {
- "type": "number",
- "format": "double",
- "description": "The percentage change since the previous day."
- },
- "updated": {
- "type": "integer",
- "description": "The last updated timestamp."
- }
- }
- }
- }
- }
+ "c": [
+ 1
+ ],
+ "i": "105717893",
+ "p": 11049.4,
+ "s": 0.014,
+ "t": 1602287999659,
+ "x": 17
}
- ]
- },
- "example": {
- "status": "OK",
- "tickers": [
+ ],
+ "day": "2020-10-09T00:00:00.000Z",
+ "isUTC": true,
+ "open": 10932.44,
+ "openTrades": [
{
- "day": {
- "c": 14.2284,
- "h": 15.09,
- "l": 14.2,
- "o": 14.33,
- "v": 133963,
- "vw": 14.5311
- },
- "lastQuote": {
- "P": 14.44,
- "S": 11,
- "p": 14.2,
- "s": 25,
- "t": 1605195929997325600
- },
- "lastTrade": {
- "c": [
- 63
- ],
- "i": "79372124707124",
- "p": 14.2284,
- "s": 536,
- "t": 1605195848258266000,
- "x": 4
- },
- "min": {
- "av": 133963,
- "c": 14.2284,
- "h": 14.325,
- "l": 14.2,
- "o": 14.28,
- "v": 6108,
- "vw": 14.2426
+ "c": [
+ 2
+ ],
+ "i": "511235746",
+ "p": 10932.44,
+ "s": 0.002,
+ "t": 1602201600056,
+ "x": 1
+ },
+ {
+ "c": [
+ 2
+ ],
+ "i": "511235751",
+ "p": 10923.76,
+ "s": 0.02,
+ "t": 1602201600141,
+ "x": 4
+ }
+ ],
+ "symbol": "BTC-USD"
+ },
+ "schema": {
+ "properties": {
+ "close": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "closingTrades": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size of a trade (also known as volume).\n",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
+ "type": "integer"
+ }
+ },
+ "type": "object"
},
- "prevDay": {
- "c": 0.73,
- "h": 0.799,
- "l": 0.73,
- "o": 0.75,
- "v": 1568097,
- "vw": 0.7721
+ "type": "array"
+ },
+ "day": {
+ "description": "The date requested.",
+ "format": "date",
+ "type": "string"
+ },
+ "isUTC": {
+ "description": "Whether or not the timestamps are in UTC timezone.",
+ "type": "boolean"
+ },
+ "open": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "openTrades": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size of a trade (also known as volume).\n",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
+ "type": "integer"
+ }
+ },
+ "type": "object"
},
- "ticker": "PDS",
- "todaysChange": 13.498,
- "todaysChangePerc": 1849.096,
- "updated": 1605195848258266000
+ "type": "array"
+ },
+ "symbol": {
+ "description": "The symbol pair that was evaluated from the request.",
+ "type": "string"
}
- ]
+ },
+ "type": "object"
}
}
- }
+ },
+ "description": "The open/close of this symbol."
},
"default": {
"description": "Unexpected error"
}
},
+ "summary": "Daily Open/Close",
+ "tags": [
+ "crypto:open-close"
+ ],
"x-polygon-entitlement-data-type": {
- "name": "aggregates",
- "description": "Aggregate data"
+ "description": "Aggregate data",
+ "name": "aggregates"
},
"x-polygon-entitlement-market-type": {
- "name": "stocks",
- "description": "Stocks data"
- },
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "name": "realtime",
- "description": "Real Time Data"
- },
- {
- "name": "delayed",
- "description": "15 minute delayed data"
- }
- ]
+ "description": "Crypto data",
+ "name": "crypto"
+ }
}
},
- "/v2/last/trade/{optionsTicker}": {
+ "/v1/open-close/{optionsTicker}/{date}": {
"get": {
- "summary": "Last Trade",
- "description": "Get the most recent trade for a given options contract.\n",
- "tags": [
- "options:last:trade"
- ],
+ "description": "Get the open, close and afterhours prices of an options contract on a certain date.\n",
"parameters": [
{
+ "description": "The ticker symbol of the options contract.",
+ "example": "O:TSLA210903C00700000",
+ "in": "path",
"name": "optionsTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The date of the requested open/close in the format YYYY-MM-DD.",
+ "example": "2021-07-22",
"in": "path",
- "description": "The ticker symbol of the options contract.",
+ "name": "date",
"required": true,
"schema": {
+ "format": "date",
"type": "string"
- },
- "example": "O:TSLA210903C00700000"
+ }
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
}
],
"responses": {
"200": {
- "description": "The last trade for this options contract.",
"content": {
"application/json": {
+ "example": {
+ "afterHours": 26.35,
+ "close": 26.35,
+ "from": "2021-07-22",
+ "high": 26.35,
+ "low": 25,
+ "open": 25,
+ "preMarket": 25,
+ "status": "OK",
+ "symbol": "O:TSLA210903C00700000",
+ "volume": 2
+ },
"schema": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- },
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
- }
- }
+ "properties": {
+ "afterHours": {
+ "description": "The close price of the ticker symbol in after hours trading.",
+ "format": "double",
+ "type": "number"
},
- {
- "type": "object",
- "properties": {
- "results": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "T": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "t": {
- "type": "integer",
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it."
- },
- "y": {
- "type": "integer",
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange."
- },
- "f": {
- "type": "integer",
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message."
- },
- "q": {
- "type": "integer",
- "format": "int64",
- "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n"
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "c": {
- "type": "array",
- "description": "A list of condition codes.\n",
- "items": {
- "type": "integer",
- "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"
- }
- },
- "i": {
- "type": "string",
- "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"
- },
- "p": {
- "type": "number",
- "format": "double",
- "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"
- },
- "s": {
- "type": "number",
- "format": "double",
- "description": "The size of a trade (also known as volume).\n"
- },
- "e": {
- "type": "integer",
- "description": "The trade correction indicator.\n"
- },
- "x": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- },
- "r": {
- "type": "integer",
- "description": "The ID for the Trade Reporting Facility where the trade took place.\n"
- },
- "z": {
- "type": "integer",
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n"
- }
- }
- }
- ]
- }
- }
+ "close": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "from": {
+ "description": "The requested date.",
+ "format": "date",
+ "type": "string"
+ },
+ "high": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "low": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "open": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "preMarket": {
+ "description": "The open price of the ticker symbol in pre-market trading.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ "symbol": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "volume": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
}
- ]
- },
- "example": {
- "request_id": "f05562305bd26ced64b98ed68b3c5d96",
- "status": "OK",
- "results": {
- "T": "O:TSLA210903C00700000",
- "c": [
- 227
- ],
- "f": 1617901342969796400,
- "i": "",
- "p": 115.55,
- "q": 1325541950,
- "r": 202,
- "s": 25,
- "t": 1617901342969834000,
- "x": 312
- }
+ },
+ "type": "object"
}
}
- }
- },
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
+ },
+ "description": "The open/close of this stock symbol."
},
- "404": {
- "description": "The specified resource was not found"
+ "default": {
+ "description": "Unexpected error"
}
},
+ "summary": "Daily Open/Close",
+ "tags": [
+ "options:open-close"
+ ],
"x-polygon-entitlement-data-type": {
- "name": "trades",
- "description": "Trade data"
+ "description": "Aggregate data",
+ "name": "aggregates"
},
"x-polygon-entitlement-market-type": {
- "name": "options",
- "description": "Options data"
- },
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "name": "realtime",
- "description": "Real Time Data"
- },
- {
- "name": "delayed",
- "description": "15 minute delayed data"
- }
- ]
+ "description": "Options data",
+ "name": "options"
+ }
}
},
- "/v1/open-close/{optionsTicker}/{date}": {
+ "/v1/open-close/{stocksTicker}/{date}": {
"get": {
- "summary": "Daily Open/Close",
- "description": "Get the open, close and afterhours prices of an options contract on a certain date.\n",
- "tags": [
- "options:open-close"
- ],
+ "description": "Get the open, close and afterhours prices of a stock symbol on a certain date.\n",
"parameters": [
{
- "name": "optionsTicker",
+ "description": "The ticker symbol of the stock/equity.",
+ "example": "AAPL",
"in": "path",
- "description": "The ticker symbol of the options contract.",
+ "name": "stocksTicker",
"required": true,
"schema": {
"type": "string"
- },
- "example": "O:TSLA210903C00700000"
+ }
},
{
- "name": "date",
- "in": "path",
"description": "The date of the requested open/close in the format YYYY-MM-DD.",
+ "example": "2020-10-14",
+ "in": "path",
+ "name": "date",
"required": true,
"schema": {
- "type": "string",
- "format": "date"
- },
- "example": "2021-07-22"
+ "format": "date",
+ "type": "string"
+ }
},
{
- "name": "adjusted",
- "in": "query",
"description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "required": false,
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
"schema": {
"type": "boolean"
- },
- "example": true
+ }
}
],
"responses": {
"200": {
- "description": "The open/close of this stock symbol.",
"content": {
"application/json": {
+ "example": {
+ "afterHours": 322.1,
+ "close": 325.12,
+ "from": "2020-10-14T00:00:00.000Z",
+ "high": 326.2,
+ "low": 322.3,
+ "open": 324.66,
+ "preMarket": 324.5,
+ "status": "OK",
+ "symbol": "AAPL",
+ "volume": 26122646
+ },
"schema": {
- "type": "object",
"properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
+ "afterHours": {
+ "description": "The close price of the ticker symbol in after hours trading.",
+ "format": "double",
+ "type": "number"
+ },
+ "close": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
"from": {
- "type": "string",
+ "description": "The requested date.",
"format": "date",
- "description": "The requested date."
- },
- "symbol": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "open": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
+ "type": "string"
},
"high": {
- "type": "number",
+ "description": "The highest price for the symbol in the given time period.",
"format": "double",
- "description": "The highest price for the symbol in the given time period."
+ "type": "number"
},
"low": {
- "type": "number",
+ "description": "The lowest price for the symbol in the given time period.",
"format": "double",
- "description": "The lowest price for the symbol in the given time period."
+ "type": "number"
},
- "close": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "volume": {
- "type": "number",
+ "open": {
+ "description": "The open price for the symbol in the given time period.",
"format": "double",
- "description": "The trading volume of the symbol in the given time period."
+ "type": "number"
},
"otc": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
},
"preMarket": {
- "type": "integer",
- "description": "The open price of the ticker symbol in pre-market trading."
+ "description": "The open price of the ticker symbol in pre-market trading.",
+ "type": "integer"
},
- "afterHours": {
- "type": "number",
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ "symbol": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "volume": {
+ "description": "The trading volume of the symbol in the given time period.",
"format": "double",
- "description": "The close price of the ticker symbol in after hours trading."
+ "type": "number"
}
- }
- },
- "example": {
- "status": "OK",
- "from": "2021-07-22",
- "symbol": "O:TSLA210903C00700000",
- "open": 25,
- "high": 26.35,
- "low": 25,
- "close": 26.35,
- "volume": 2,
- "afterHours": 26.35,
- "preMarket": 25
+ },
+ "type": "object"
}
}
- }
+ },
+ "description": "The open/close of this stock symbol."
},
"default": {
"description": "Unexpected error"
}
},
+ "summary": "Daily Open/Close",
+ "tags": [
+ "stocks:open-close"
+ ],
"x-polygon-entitlement-data-type": {
- "name": "aggregates",
- "description": "Aggregate data"
+ "description": "Aggregate data",
+ "name": "aggregates"
},
"x-polygon-entitlement-market-type": {
- "name": "options",
- "description": "Options data"
+ "description": "Stocks data",
+ "name": "stocks"
}
}
},
- "/v2/aggs/ticker/{optionsTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
+ "/v1/reference/sec/filings": {
"get": {
- "summary": "Aggregates (Bars)",
- "description": "Get aggregate bars for an option contract over a given date range in custom time window sizes.\n
\n
\nFor example, if timespan = ‘minute’ and multiplier = ‘5’ then 5-minute bars will be returned.\n",
- "tags": [
- "options:aggregates"
- ],
+ "description": "List filings",
+ "operationId": "ListFilings",
"parameters": [
{
- "name": "optionsTicker",
- "in": "path",
- "description": "The ticker symbol of the options contract.",
- "required": true,
+ "description": "Query by filing type.",
+ "in": "query",
+ "name": "type",
+ "schema": {
+ "description": "Filing Type",
+ "enum": [
+ "10-K",
+ "10-Q"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Query by filing date.",
+ "in": "query",
+ "name": "filing_date",
"schema": {
+ "description": "The date when the filing was filed in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
"type": "string"
},
- "example": "O:TSLA210903C00700000"
+ "x-polygon-filter-field": {
+ "range": true
+ }
},
{
- "name": "multiplier",
- "in": "path",
- "description": "The size of the timespan multiplier.",
- "required": true,
+ "description": "Query by period of report.",
+ "in": "query",
+ "name": "period_of_report_date",
"schema": {
- "type": "integer"
+ "description": "The period of report for the filing in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
},
- "example": 1
+ "x-polygon-filter-field": {
+ "range": true
+ }
},
{
- "name": "timespan",
- "in": "path",
- "description": "The size of the time window.",
- "required": true,
+ "description": "If true, query only for filings with an XBRL instance file.\nIf false, query for filings without an XBRL instance file.\nIf this parameter is not provided, query for filings with or without XBRL instance files.",
+ "in": "query",
+ "name": "has_xbrl",
"schema": {
- "type": "string",
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ]
+ "nullable": true,
+ "type": "boolean"
},
- "example": "day"
+ "x-polygon-go-id": "HasXBRL"
},
{
- "name": "from",
- "in": "path",
- "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "required": true,
+ "description": "Query by entity company name.",
+ "in": "query",
+ "name": "entities.company_data.name",
"schema": {
+ "example": "Facebook Inc",
"type": "string"
},
- "example": "2021-07-22"
+ "x-polygon-filter-field": {
+ "search": true
+ }
},
{
- "name": "to",
- "in": "path",
- "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "required": true,
+ "description": "Query by entity company CIK.",
+ "in": "query",
+ "name": "entities.company_data.cik",
"schema": {
+ "description": "Central Index Key (CIK) Number",
"type": "string"
- },
- "example": "2021-07-22"
+ }
},
{
- "name": "adjusted",
+ "description": "Query by entity company ticker.",
"in": "query",
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "required": false,
+ "name": "entities.company_data.ticker",
"schema": {
- "type": "boolean"
- },
- "example": true
+ "description": "Ticker",
+ "type": "string"
+ }
},
{
- "name": "sort",
+ "description": "Query by entity company SIC.",
+ "in": "query",
+ "name": "entities.company_data.sic",
+ "schema": {
+ "description": "Standard Industrial Classification (SIC)",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by filing_date.",
+ "in": "query",
+ "name": "filing_date.gte",
+ "schema": {
+ "description": "The date when the filing was filed in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by filing_date.",
+ "in": "query",
+ "name": "filing_date.gt",
+ "schema": {
+ "description": "The date when the filing was filed in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by filing_date.",
+ "in": "query",
+ "name": "filing_date.lte",
+ "schema": {
+ "description": "The date when the filing was filed in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by filing_date.",
+ "in": "query",
+ "name": "filing_date.lt",
+ "schema": {
+ "description": "The date when the filing was filed in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by period_of_report_date.",
+ "in": "query",
+ "name": "period_of_report_date.gte",
+ "schema": {
+ "description": "The period of report for the filing in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by period_of_report_date.",
+ "in": "query",
+ "name": "period_of_report_date.gt",
+ "schema": {
+ "description": "The period of report for the filing in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by period_of_report_date.",
+ "in": "query",
+ "name": "period_of_report_date.lte",
+ "schema": {
+ "description": "The period of report for the filing in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by period_of_report_date.",
+ "in": "query",
+ "name": "period_of_report_date.lt",
+ "schema": {
+ "description": "The period of report for the filing in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by entities.company_data.name.",
+ "in": "query",
+ "name": "entities.company_data.name.search",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
"schema": {
"enum": [
"asc",
"desc"
- ]
- },
- "in": "query",
- "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
- "example": "asc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
},
{
- "name": "limit",
+ "description": "Limit the number of results returned, default is 10 and max is 1000.",
"in": "query",
- "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on \nAggregate Data API Improvements.\n",
- "required": false,
+ "name": "limit",
"schema": {
+ "default": 10,
+ "example": 10,
+ "maximum": 1000,
+ "minimum": 1,
"type": "integer"
- },
- "example": 120
+ }
+ },
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "filing_date",
+ "enum": [
+ "filing_date",
+ "period_of_report_date"
+ ],
+ "example": "filing_date",
+ "type": "string"
+ }
}
],
"responses": {
"200": {
- "description": "Options Aggregates.",
- "content": {
- "application/json": {
- "schema": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- },
- "adjusted": {
- "type": "boolean",
- "description": "Whether or not this response was adjusted for splits."
- },
- "queryCount": {
- "type": "integer",
- "description": "The number of aggregates (minute or day) used to generate the response."
- },
- "resultsCount": {
- "type": "integer",
- "description": "The total number of results for this request."
- },
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
- }
- }
+ "content": {
+ "application/json": {
+ "description": "FIXME",
+ "example": {},
+ "schema": {
+ "properties": {
+ "count": {
+ "type": "integer"
},
- {
- "type": "object",
- "properties": {
- "results": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
+ "next_url": {
+ "type": "string"
+ },
+ "request_id": {
+ "type": "string"
+ },
+ "results": {
+ "items": {
+ "properties": {
+ "accession_number": {
+ "description": "Filing Accession Number",
+ "type": "string"
+ },
+ "entities": {
+ "description": "Entities related to the filing (e.g. the document filers).",
+ "items": {
+ "description": "A filing entity (e.g. the document filer).",
+ "properties": {
+ "company_data": {
+ "properties": {
+ "cik": {
+ "description": "Central Index Key (CIK) Number",
+ "type": "string"
+ },
+ "name": {
+ "example": "Facebook Inc",
+ "type": "string"
+ },
+ "sic": {
+ "description": "Standard Industrial Classification (SIC)",
+ "type": "string"
+ },
+ "ticker": {
+ "description": "Ticker",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "cik",
+ "sic"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "SECCompanyData",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
+ },
+ "relation": {
+ "description": "Relationship of this entity to the filing.",
+ "enum": [
+ "filer"
+ ],
+ "type": "string"
+ }
},
- "n": {
- "type": "integer",
- "description": "The number of transactions in the aggregate window."
+ "required": [
+ "relation"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "SECFilingEntity",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
}
- }
+ },
+ "type": "array"
+ },
+ "files_count": {
+ "description": "The number of files associated with the filing.",
+ "format": "int64",
+ "type": "integer"
+ },
+ "filing_date": {
+ "description": "The date when the filing was filed in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ },
+ "id": {
+ "description": "Unique identifier for the filing.",
+ "type": "string"
+ },
+ "period_of_report_date": {
+ "description": "The period of report for the filing in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ },
+ "source_url": {
+ "description": "The source URL is a link back to the upstream source for this filing\ndocument.",
+ "example": "https://www.sec.gov/Archives/edgar/data/0001326801/000132680119000037/0001326801-19-000037-index.html",
+ "format": "uri",
+ "type": "string"
+ },
+ "type": {
+ "description": "Filing Type",
+ "enum": [
+ "10-K",
+ "10-Q"
+ ],
+ "type": "string"
}
+ },
+ "required": [
+ "id",
+ "accession_number",
+ "type",
+ "filing_date",
+ "period_of_report_date",
+ "files_count",
+ "source_url",
+ "download_url",
+ "entities"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "SECFiling",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
}
- }
- }
- ]
- },
- "example": {
- "ticker": "O:RDFN211119C00025000",
- "queryCount": 2,
- "resultsCount": 2,
- "adjusted": true,
- "results": [
- {
- "v": 2,
- "vw": 26.2,
- "o": 26.2,
- "c": 26.2,
- "h": 26.2,
- "l": 26.2,
- "t": 1632369600000,
- "n": 1
+ },
+ "type": "array"
},
- {
- "v": 2,
- "vw": 28.3,
- "o": 28.3,
- "c": 28.3,
- "h": 28.3,
- "l": 28.3,
- "t": 1632456000000,
- "n": 1
+ "status": {
+ "type": "string"
}
+ },
+ "required": [
+ "status",
+ "request_id",
+ "count",
+ "results"
],
- "status": "OK",
- "request_id": "5585acde-5085-42d6-95b2-2e388a28370a",
- "count": 2
+ "type": "object"
}
}
- }
- },
- "default": {
- "description": "Unexpected error"
+ },
+ "description": "FIXME"
}
},
+ "summary": "SEC Filings",
+ "tags": [
+ "reference:sec:filings"
+ ],
"x-polygon-entitlement-data-type": {
- "name": "aggregates",
- "description": "Aggregate data"
+ "description": "Reference data",
+ "name": "reference"
},
- "x-polygon-entitlement-market-type": {
- "name": "options",
- "description": "Options data"
+ "x-polygon-paginate": {
+ "sort": {
+ "default": "filing_date",
+ "enum": [
+ "filing_date",
+ "period_of_report_date"
+ ]
+ }
}
- }
+ },
+ "x-polygon-draft": true
},
- "/v2/aggs/ticker/{optionsTicker}/prev": {
+ "/v1/reference/sec/filings/{filing_id}": {
"get": {
- "summary": "Previous Close",
- "description": "Get the previous day's open, high, low, and close (OHLC) for the specified option contract.\n",
- "tags": [
- "options:aggregates"
- ],
+ "description": "Get filing",
+ "operationId": "GetFiling",
"parameters": [
{
- "name": "optionsTicker",
+ "description": "Select by filing id.",
"in": "path",
- "description": "The ticker symbol of the options contract.",
- "required": true,
+ "name": "filing_id",
"schema": {
+ "description": "Unique identifier for the filing.",
"type": "string"
- },
- "example": "O:TSLA210903C00700000"
- },
- {
- "name": "adjusted",
- "in": "query",
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "required": false,
- "schema": {
- "type": "boolean"
- },
- "example": true
+ }
}
],
"responses": {
"200": {
- "description": "The previous day OHLC for the options contract.",
"content": {
"application/json": {
+ "description": "FIXME",
+ "example": {},
"schema": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- },
- "adjusted": {
- "type": "boolean",
- "description": "Whether or not this response was adjusted for splits."
- },
- "queryCount": {
- "type": "integer",
- "description": "The number of aggregates (minute or day) used to generate the response."
- },
- "resultsCount": {
- "type": "integer",
- "description": "The total number of results for this request."
- },
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
- }
- }
+ "properties": {
+ "accession_number": {
+ "description": "Filing Accession Number",
+ "type": "string"
},
- {
- "type": "object",
- "properties": {
- "results": {
- "type": "array",
- "items": {
- "type": "object",
+ "entities": {
+ "description": "Entities related to the filing (e.g. the document filers).",
+ "items": {
+ "description": "A filing entity (e.g. the document filer).",
+ "properties": {
+ "company_data": {
"properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
+ "cik": {
+ "description": "Central Index Key (CIK) Number",
+ "type": "string"
},
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
+ "name": {
+ "example": "Facebook Inc",
+ "type": "string"
},
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
+ "sic": {
+ "description": "Standard Industrial Classification (SIC)",
+ "type": "string"
},
- "n": {
- "type": "integer",
- "description": "The number of transactions in the aggregate window."
+ "ticker": {
+ "description": "Ticker",
+ "type": "string"
}
+ },
+ "required": [
+ "name",
+ "cik",
+ "sic"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "SECCompanyData",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
}
+ },
+ "relation": {
+ "description": "Relationship of this entity to the filing.",
+ "enum": [
+ "filer"
+ ],
+ "type": "string"
}
+ },
+ "required": [
+ "relation"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "SECFilingEntity",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
}
- }
- }
- ]
- },
- "example": {
- "ticker": "O:TSLA210903C00700000",
- "status": "OK",
- "queryCount": 1,
- "resultsCount": 1,
- "adjusted": true,
- "results": [
- {
- "T": "O:TSLA210903C00700000",
- "v": 131704427,
- "vw": 116.3058,
- "o": 115.55,
- "c": 115.97,
- "h": 117.59,
- "l": 114.13,
- "t": 1605042000000,
- "n": 2
+ },
+ "type": "array"
+ },
+ "files_count": {
+ "description": "The number of files associated with the filing.",
+ "format": "int64",
+ "type": "integer"
+ },
+ "filing_date": {
+ "description": "The date when the filing was filed in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ },
+ "id": {
+ "description": "Unique identifier for the filing.",
+ "type": "string"
+ },
+ "period_of_report_date": {
+ "description": "The period of report for the filing in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ },
+ "source_url": {
+ "description": "The source URL is a link back to the upstream source for this filing\ndocument.",
+ "example": "https://www.sec.gov/Archives/edgar/data/0001326801/000132680119000037/0001326801-19-000037-index.html",
+ "format": "uri",
+ "type": "string"
+ },
+ "type": {
+ "description": "Filing Type",
+ "enum": [
+ "10-K",
+ "10-Q"
+ ],
+ "type": "string"
}
+ },
+ "required": [
+ "id",
+ "accession_number",
+ "type",
+ "filing_date",
+ "period_of_report_date",
+ "files_count",
+ "source_url",
+ "download_url",
+ "entities"
],
- "request_id": "6a7e466379af0a71039d60cc78e72282"
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "SECFiling",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ }
}
}
- }
- },
- "default": {
- "description": "Unexpected error"
+ },
+ "description": "FIXME"
}
},
+ "summary": "SEC Filing",
+ "tags": [
+ "reference:sec:filing"
+ ],
"x-polygon-entitlement-data-type": {
- "name": "aggregates",
- "description": "Aggregate data"
- },
- "x-polygon-entitlement-market-type": {
- "name": "options",
- "description": "Options data"
+ "description": "Reference data",
+ "name": "reference"
}
- }
+ },
+ "x-polygon-draft": true
},
- "/v1/historic/forex/{from}/{to}/{date}": {
+ "/v1/reference/sec/filings/{filing_id}/files": {
"get": {
- "summary": "Historic Forex Ticks",
- "description": "Get historic ticks for a forex currency pair.\n",
- "tags": [
- "fx:trades"
- ],
+ "description": "List filing files",
+ "operationId": "ListFilingFiles",
"parameters": [
{
- "name": "from",
+ "description": "Select by filing id.",
"in": "path",
- "description": "The \"from\" symbol of the currency pair.\n\nExample: For **USD/JPY** the `from` would be **USD**.\n",
- "required": true,
+ "name": "filing_id",
"schema": {
+ "description": "Unique identifier for the filing.",
"type": "string"
+ }
+ },
+ {
+ "description": "Query by file sequence number.",
+ "in": "query",
+ "name": "sequence",
+ "schema": {
+ "description": "File Sequence Number",
+ "format": "int64",
+ "max": 999,
+ "min": 1,
+ "type": "integer"
},
- "example": "AUD"
+ "x-polygon-filter-field": {
+ "range": true
+ }
},
{
- "name": "to",
- "in": "path",
- "description": "The \"to\" symbol of the currency pair.\n\nExample: For **USD/JPY** the `to` would be **JPY**.\n",
- "required": true,
+ "description": "Query by file name.",
+ "in": "query",
+ "name": "filename",
"schema": {
+ "description": "The name for the file.",
"type": "string"
},
- "example": "USD"
+ "x-polygon-filter-field": {
+ "range": true
+ }
},
{
- "name": "date",
- "in": "path",
- "description": "The date/day of the historic ticks to retrieve.",
- "required": true,
+ "description": "Search by sequence.",
+ "in": "query",
+ "name": "sequence.gte",
"schema": {
- "type": "string",
- "format": "date"
- },
- "example": "2020-10-14"
+ "description": "File Sequence Number",
+ "format": "int64",
+ "max": 999,
+ "min": 1,
+ "type": "integer"
+ }
},
{
- "name": "offset",
+ "description": "Search by sequence.",
"in": "query",
- "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",
- "required": false,
+ "name": "sequence.gt",
"schema": {
+ "description": "File Sequence Number",
+ "format": "int64",
+ "max": 999,
+ "min": 1,
"type": "integer"
}
},
{
- "name": "limit",
+ "description": "Search by sequence.",
"in": "query",
- "description": "Limit the size of the response, max 10000.",
- "required": false,
+ "name": "sequence.lte",
"schema": {
+ "description": "File Sequence Number",
+ "format": "int64",
+ "max": 999,
+ "min": 1,
"type": "integer"
- },
- "example": 100
- }
- ],
- "responses": {
- "200": {
- "description": "An array of forex ticks",
- "content": {
- "application/json": {
- "schema": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "day": {
- "type": "string",
- "format": "date",
- "description": "The date that was evaluated from the request."
- },
- "map": {
- "type": "object",
- "description": "A map for shortened result keys."
- },
- "msLatency": {
- "type": "integer",
- "description": "The milliseconds of latency for the query results."
- },
- "pair": {
- "type": "string",
- "description": "The currency pair that was evaluated from the request."
- },
- "ticks": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "a": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
- },
- "b": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
- },
- "x": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- }
- }
- }
- }
- }
- }
- ]
- },
- "example": {
- "day": "2020-10-14",
- "map": {
- "ap": "ask",
- "bp": "bid",
- "t": "timestamp"
- },
- "msLatency": "0",
- "pair": "AUD/USD",
- "status": "success",
- "ticks": [
- {
- "x": 48,
- "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
- }
- ],
- "type": "forex"
- }
- }
}
},
- "default": {
- "description": "Unexpected error"
- }
- },
- "x-polygon-entitlement-data-type": {
- "name": "nbbo",
- "description": "NBBO data"
- },
- "x-polygon-entitlement-market-type": {
- "name": "fx",
- "description": "Forex data"
- },
- "x-polygon-deprecation": {
- "date": 1654056060000,
- "replaces": {
- "path": "get_v3_quotes__fxticker",
- "name": "Quotes (BBO) v3"
- }
- }
- }
- },
- "/v1/conversion/{from}/{to}": {
- "get": {
- "summary": "Real-time Currency Conversion",
- "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.\n",
- "tags": [
- "fx:conversion"
- ],
- "parameters": [
{
- "name": "from",
- "in": "path",
- "description": "The \"from\" symbol of the pair.",
- "required": true,
+ "description": "Search by sequence.",
+ "in": "query",
+ "name": "sequence.lt",
+ "schema": {
+ "description": "File Sequence Number",
+ "format": "int64",
+ "max": 999,
+ "min": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Search by filename.",
+ "in": "query",
+ "name": "filename.gte",
"schema": {
+ "description": "The name for the file.",
"type": "string"
- },
- "example": "AUD"
+ }
},
{
- "name": "to",
- "in": "path",
- "description": "The \"to\" symbol of the pair.",
- "required": true,
+ "description": "Search by filename.",
+ "in": "query",
+ "name": "filename.gt",
"schema": {
+ "description": "The name for the file.",
"type": "string"
- },
- "example": "USD"
+ }
},
{
- "name": "amount",
+ "description": "Search by filename.",
"in": "query",
- "description": "The amount to convert, with a decimal.",
- "required": false,
+ "name": "filename.lte",
"schema": {
- "type": "integer"
- },
- "example": 100
+ "description": "The name for the file.",
+ "type": "string"
+ }
},
{
- "name": "precision",
+ "description": "Search by filename.",
"in": "query",
- "description": "The decimal precision of the conversion. Defaults to 2 which is 2 decimal places accuracy.",
- "required": false,
+ "name": "filename.lt",
"schema": {
- "type": "integer",
- "enum": [
- 0,
- 1,
- 2,
- 3,
- 4
- ]
- },
- "example": 2
- }
- ],
- "responses": {
- "200": {
- "description": "The last tick for this currency pair, plus the converted amount for the requested amount.",
- "content": {
- "application/json": {
- "schema": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "last": {
- "type": "object",
- "properties": {
- "ask": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
- },
- "bid": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
- },
- "exchange": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- },
- "timestamp": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- }
- }
- },
- "from": {
- "type": "string",
- "description": "The \"from\" currency symbol."
- },
- "to": {
- "type": "string",
- "description": "The \"to\" currency symbol."
- },
- "initialAmount": {
- "type": "number",
- "format": "double",
- "description": "The amount to convert."
- },
- "converted": {
- "type": "number",
- "format": "double",
- "description": "The result of the conversion."
- }
- }
- }
- ]
- },
- "example": {
- "status": "success",
- "last": {
- "bid": 1.3672596,
- "ask": 1.3673344,
- "exchange": 48,
- "timestamp": 1605555313000
- },
- "from": "AUD",
- "to": "USD",
- "initialAmount": 100,
- "converted": 73.14
- }
- }
+ "description": "The name for the file.",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
}
},
- "default": {
- "description": "Unexpected error"
- }
- },
- "x-polygon-entitlement-data-type": {
- "name": "nbbo",
- "description": "NBBO data"
- },
- "x-polygon-entitlement-market-type": {
- "name": "fx",
- "description": "Forex data"
- }
- }
- },
- "/v1/last_quote/currencies/{from}/{to}": {
- "get": {
- "summary": "Last Quote for a Currency Pair",
- "description": "Get the last quote tick for a forex currency pair.\n",
- "tags": [
- "fx:last:quote"
- ],
- "parameters": [
{
- "name": "from",
- "in": "path",
- "description": "The \"from\" symbol of the pair.",
- "required": true,
+ "description": "Limit the number of results returned, default is 10 and max is 1000.",
+ "in": "query",
+ "name": "limit",
"schema": {
- "type": "string"
- },
- "example": "AUD"
+ "default": 10,
+ "example": 10,
+ "maximum": 1000,
+ "minimum": 1,
+ "type": "integer"
+ }
},
{
- "name": "to",
- "in": "path",
- "description": "The \"to\" symbol of the pair.",
- "required": true,
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
"schema": {
+ "default": "sequence",
+ "enum": [
+ "sequence",
+ "filename"
+ ],
+ "example": "sequence",
"type": "string"
- },
- "example": "USD"
+ }
}
],
"responses": {
"200": {
- "description": "The last quote tick for this currency pair.",
"content": {
"application/json": {
+ "description": "FIXME",
+ "example": {},
"schema": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- }
- }
+ "properties": {
+ "count": {
+ "type": "integer"
},
- {
- "type": "object",
- "properties": {
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
- }
- }
+ "next_url": {
+ "type": "string"
},
- {
- "type": "object",
- "properties": {
- "last": {
- "type": "object",
- "properties": {
- "ask": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
- },
- "bid": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
- },
- "exchange": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- },
- "timestamp": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- }
+ "request_id": {
+ "type": "string"
+ },
+ "results": {
+ "items": {
+ "description": "File associated with the filing.\n\nThis provides information to uniquly identify the additional data and a URL\nwhere the file may be downloaded.",
+ "properties": {
+ "description": {
+ "description": "A description for the contents of the file.",
+ "type": "string"
+ },
+ "filename": {
+ "description": "The name for the file.",
+ "type": "string"
+ },
+ "id": {
+ "description": "An identifier unique to the filing for this data entry.",
+ "example": "1",
+ "type": "string"
+ },
+ "sequence": {
+ "description": "File Sequence Number",
+ "format": "int64",
+ "max": 999,
+ "min": 1,
+ "type": "integer"
+ },
+ "size_bytes": {
+ "description": "The size of the file in bytes.",
+ "format": "int64",
+ "type": "integer"
+ },
+ "source_url": {
+ "description": "The source URL is a link back to the upstream source for this file.",
+ "format": "uri",
+ "type": "string"
+ },
+ "type": {
+ "description": "The type of document contained in the file.",
+ "type": "string"
}
},
- "symbol": {
- "type": "string",
- "description": "The symbol pair that was evaluated from the request."
+ "required": [
+ "id",
+ "file",
+ "description",
+ "type",
+ "size_bytes",
+ "sequence",
+ "source_url"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "SECFilingFile",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
}
- }
+ },
+ "type": "array"
+ },
+ "status": {
+ "type": "string"
}
- ]
- },
- "example": {
- "last": {
- "ask": 0.73124,
- "bid": 0.73122,
- "exchange": 48,
- "timestamp": 1605557756000
},
- "request_id": "a73a29dbcab4613eeaf48583d3baacf0",
- "status": "success",
- "symbol": "AUD/USD"
+ "required": [
+ "status",
+ "request_id",
+ "count",
+ "results"
+ ],
+ "type": "object"
}
}
- }
- },
- "default": {
- "description": "Unexpected error"
+ },
+ "description": "FIXME"
}
},
+ "summary": "SEC Filing Files",
+ "tags": [
+ "reference:sec:filing:files"
+ ],
"x-polygon-entitlement-data-type": {
- "name": "nbbo",
- "description": "NBBO data"
+ "description": "Reference data",
+ "name": "reference"
},
- "x-polygon-entitlement-market-type": {
- "name": "fx",
- "description": "Forex data"
+ "x-polygon-paginate": {
+ "sort": {
+ "default": "sequence",
+ "enum": [
+ "sequence",
+ "filename"
+ ]
+ }
}
- }
+ },
+ "x-polygon-draft": true
},
- "/v2/aggs/grouped/locale/global/market/fx/{date}": {
+ "/v1/reference/sec/filings/{filing_id}/files/{file_id}": {
"get": {
- "summary": "Grouped Daily (Bars)",
- "description": "Get the daily open, high, low, and close (OHLC) for the entire forex markets.\n",
- "tags": [
- "fx:aggregates"
- ],
+ "description": "Get filing file",
+ "operationId": "GetFilingFile",
"parameters": [
{
- "name": "date",
+ "description": "Select by filing id.",
"in": "path",
- "description": "The beginning date for the aggregate window.",
- "required": true,
+ "name": "filing_id",
"schema": {
+ "description": "Unique identifier for the filing.",
"type": "string"
- },
- "example": "2020-10-14"
+ }
},
{
- "name": "adjusted",
- "in": "query",
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "required": false,
+ "description": "Select by file id.",
+ "in": "path",
+ "name": "file_id",
"schema": {
- "type": "boolean"
- },
- "example": true
+ "description": "An identifier unique to the filing for this data entry.",
+ "example": "1",
+ "type": "string"
+ }
}
- ],
- "responses": {
- "200": {
- "description": "Previous day OHLC for ticker",
- "content": {
- "application/json": {
- "schema": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- },
- "adjusted": {
- "type": "boolean",
- "description": "Whether or not this response was adjusted for splits."
- },
- "queryCount": {
- "type": "integer",
- "description": "The number of aggregates (minute or day) used to generate the response."
- },
- "resultsCount": {
- "type": "integer",
- "description": "The total number of results for this request."
- },
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "results": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "T": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "n": {
- "type": "integer",
- "description": "The number of transactions in the aggregate window."
- }
- }
- }
- }
- }
- }
- ]
- },
- "example": {
- "status": "OK",
- "queryCount": 3,
- "resultsCount": 3,
- "adjusted": true,
- "results": [
- {
- "T": "C:ILSCHF",
- "v": 689,
- "vw": 0.2702,
- "o": 0.2698,
- "c": 0.2704,
- "h": 0.2706,
- "l": 0.2693,
- "t": 1602719999999,
- "n": 689
- },
- {
- "T": "C:GBPCAD",
- "v": 407324,
- "vw": 1.7062,
- "o": 1.69955,
- "c": 1.71103,
- "h": 1.71642,
- "l": 1.69064,
- "t": 1602719999999,
- "n": 407324
- },
- {
- "T": "C:DKKAUD",
- "v": 10639,
- "vw": 0.2202,
- "o": 0.22,
- "c": 0.2214,
- "h": 0.2214,
- "l": 0.2195,
- "t": 1602719999999,
- "n": 10639
- }
- ]
- }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "description": "JavaScript Object Notation (JSON)",
+ "example": {}
+ },
+ "application/octet-stream": {
+ "description": "Binary format",
+ "example": {}
+ },
+ "application/pdf": {
+ "description": "Adobe Portable Document Format (PDF)",
+ "example": {}
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
+ "description": "Microsoft Excel (OpenXML)",
+ "example": {}
+ },
+ "application/xml": {
+ "description": "Extensible Markup Language (XML)",
+ "example": {}
+ },
+ "application/zip": {
+ "description": "ZIP archive",
+ "example": {}
+ },
+ "image/gif": {
+ "description": "Graphics Interchange Format (GIF)",
+ "example": {}
+ },
+ "image/jpeg": {
+ "description": "Joint Photographic Experts Group (JPEG) image",
+ "example": {}
+ },
+ "image/png": {
+ "description": "Portable Network Graphics (PNG)",
+ "example": {}
+ },
+ "text/css": {
+ "description": "Cascading Style Sheets (CSS)",
+ "example": {}
+ },
+ "text/html": {
+ "description": "HyperText Markup Language (HTML)",
+ "example": {}
+ },
+ "text/javascript": {
+ "description": "JavaScript",
+ "example": {}
+ },
+ "text/plain": {
+ "description": "Text",
+ "example": {}
}
- }
- },
- "default": {
- "description": "Unexpected error"
+ },
+ "description": "The file data."
}
},
+ "summary": "SEC Filing File",
+ "tags": [
+ "reference:sec:filing:file"
+ ],
"x-polygon-entitlement-data-type": {
- "name": "aggregates",
- "description": "Aggregate data"
- },
- "x-polygon-entitlement-market-type": {
- "name": "fx",
- "description": "Forex data"
+ "description": "Reference data",
+ "name": "reference"
}
- }
+ },
+ "x-polygon-draft": true
},
- "/v2/aggs/ticker/{forexTicker}/prev": {
+ "/v2/aggs/grouped/locale/global/market/crypto/{date}": {
"get": {
- "summary": "Previous Close",
- "description": "Get the previous day's open, high, low, and close (OHLC) for the specified forex pair.\n",
- "tags": [
- "fx:aggregates"
- ],
+ "description": "Get the daily open, high, low, and close (OHLC) for the entire cryptocurrency markets.\n",
"parameters": [
{
- "name": "forexTicker",
+ "description": "The beginning date for the aggregate window.",
+ "example": "2020-10-14",
"in": "path",
- "description": "The ticker symbol of the currency pair.",
+ "name": "date",
"required": true,
"schema": {
"type": "string"
- },
- "example": "C:EURUSD"
+ }
},
{
- "name": "adjusted",
- "in": "query",
"description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "required": false,
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
"schema": {
"type": "boolean"
- },
- "example": true
+ }
}
],
"responses": {
"200": {
- "description": "The previous day OHLC for the ticker.",
"content": {
"application/json": {
- "schema": {
- "allOf": [
+ "example": {
+ "adjusted": true,
+ "queryCount": 3,
+ "results": [
{
- "type": "object",
- "properties": {
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- }
- }
+ "T": "X:ARDRUSD",
+ "c": 0.0550762,
+ "h": 0.0550762,
+ "l": 0.0550762,
+ "n": 18388,
+ "o": 0.0550762,
+ "t": 1580676480000,
+ "v": 2,
+ "vw": 0.0551
},
{
- "type": "object",
+ "T": "X:NGCUSD",
+ "c": 0.0272983,
+ "h": 0.0273733,
+ "l": 0.0272983,
+ "n": 18,
+ "o": 0.0273733,
+ "t": 1580674080000,
+ "v": 4734,
+ "vw": 0.0273
+ },
+ {
+ "T": "X:ZSCUSD",
+ "c": 0.00028531,
+ "h": 0.00028531,
+ "l": 0.00028531,
+ "n": 151,
+ "o": 0.00028531,
+ "t": 1580671080000,
+ "v": 390,
+ "vw": 0.0003
+ }
+ ],
+ "resultsCount": 3,
+ "status": "OK"
+ },
+ "schema": {
+ "allOf": [
+ {
"properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- },
"adjusted": {
- "type": "boolean",
- "description": "Whether or not this response was adjusted for splits."
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
},
"queryCount": {
- "type": "integer",
- "description": "The number of aggregates (minute or day) used to generate the response."
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
},
"resultsCount": {
- "type": "integer",
- "description": "The total number of results for this request."
+ "description": "The total number of results for this request.",
+ "type": "integer"
},
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
}
- }
+ },
+ "type": "object"
},
{
- "type": "object",
"properties": {
"results": {
- "type": "array",
"items": {
- "type": "object",
"properties": {
"T": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
},
"c": {
- "type": "number",
+ "description": "The close price for the symbol in the given time period.",
"format": "double",
- "description": "The close price for the symbol in the given time period."
+ "type": "number"
},
"h": {
- "type": "number",
+ "description": "The highest price for the symbol in the given time period.",
"format": "double",
- "description": "The highest price for the symbol in the given time period."
+ "type": "number"
},
"l": {
- "type": "number",
+ "description": "The lowest price for the symbol in the given time period.",
"format": "double",
- "description": "The lowest price for the symbol in the given time period."
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
"t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
},
- "vw": {
- "type": "number",
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
"format": "double",
- "description": "The volume weighted average price."
+ "type": "number"
},
- "n": {
- "type": "integer",
- "description": "The number of transactions in the aggregate window."
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
}
- }
- }
+ },
+ "type": "object"
+ },
+ "type": "array"
}
- }
- }
- ]
- },
- "example": {
- "ticker": "C:EURUSD",
- "status": "OK",
- "request_id": "08ec061fb85115678d68452c0a609cb7",
- "queryCount": 1,
- "resultsCount": 1,
- "adjusted": true,
- "results": [
- {
- "T": "C:EURUSD",
- "v": 180300,
- "vw": 1.055,
- "o": 1.05252,
- "c": 1.06206,
- "h": 1.0631,
- "l": 1.0505,
- "t": 1651708799999,
- "n": 180300
+ },
+ "type": "object"
}
]
}
}
- }
+ },
+ "description": "The previous day OHLC for the ticker."
},
"default": {
"description": "Unexpected error"
}
},
+ "summary": "Grouped Daily (Bars)",
+ "tags": [
+ "crypto:aggregates"
+ ],
"x-polygon-entitlement-data-type": {
- "name": "aggregates",
- "description": "Aggregate data"
+ "description": "Aggregate data",
+ "name": "aggregates"
},
"x-polygon-entitlement-market-type": {
- "name": "fx",
- "description": "Forex data"
+ "description": "Crypto data",
+ "name": "crypto"
}
}
},
- "/v2/aggs/ticker/{forexTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
+ "/v2/aggs/grouped/locale/global/market/fx/{date}": {
"get": {
- "summary": "Aggregates (Bars)",
- "description": "Get aggregate bars for a forex pair over a given date range in custom time window sizes.\n
\n
\nFor example, if timespan = ‘minute’ and multiplier = ‘5’ then 5-minute bars will be returned.\n",
- "tags": [
- "fx:aggregates"
- ],
+ "description": "Get the daily open, high, low, and close (OHLC) for the entire forex markets.\n",
"parameters": [
{
- "name": "forexTicker",
- "in": "path",
- "description": "The ticker symbol of the currency pair.",
- "required": true,
- "schema": {
- "type": "string"
- },
- "example": "C:EURUSD"
- },
- {
- "name": "multiplier",
- "in": "path",
- "description": "The size of the timespan multiplier.",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "example": 1
- },
- {
- "name": "timespan",
- "in": "path",
- "description": "The size of the time window.",
- "required": true,
- "schema": {
- "type": "string",
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ]
- },
- "example": "day"
- },
- {
- "name": "from",
- "in": "path",
- "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "required": true,
- "schema": {
- "type": "string"
- },
- "example": "2021-07-22"
- },
- {
- "name": "to",
+ "description": "The beginning date for the aggregate window.",
+ "example": "2020-10-14",
"in": "path",
- "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "name": "date",
"required": true,
"schema": {
"type": "string"
- },
- "example": "2021-07-22"
+ }
},
{
- "name": "adjusted",
- "in": "query",
"description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "required": false,
- "schema": {
- "type": "boolean"
- },
- "example": true
- },
- {
- "name": "sort",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ]
- },
- "in": "query",
- "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
- "example": "asc"
- },
- {
- "name": "limit",
+ "example": true,
"in": "query",
- "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on \nAggregate Data API Improvements.\n",
- "required": false,
+ "name": "adjusted",
"schema": {
- "type": "integer"
- },
- "example": 120
+ "type": "boolean"
+ }
}
],
"responses": {
"200": {
- "description": "Forex Aggregates.",
"content": {
"application/json": {
- "schema": {
- "allOf": [
+ "example": {
+ "adjusted": true,
+ "queryCount": 3,
+ "results": [
+ {
+ "T": "C:ILSCHF",
+ "c": 0.2704,
+ "h": 0.2706,
+ "l": 0.2693,
+ "n": 689,
+ "o": 0.2698,
+ "t": 1602719999999,
+ "v": 689,
+ "vw": 0.2702
+ },
{
- "type": "object",
- "properties": {
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- }
- }
+ "T": "C:GBPCAD",
+ "c": 1.71103,
+ "h": 1.71642,
+ "l": 1.69064,
+ "n": 407324,
+ "o": 1.69955,
+ "t": 1602719999999,
+ "v": 407324,
+ "vw": 1.7062
},
{
- "type": "object",
+ "T": "C:DKKAUD",
+ "c": 0.2214,
+ "h": 0.2214,
+ "l": 0.2195,
+ "n": 10639,
+ "o": 0.22,
+ "t": 1602719999999,
+ "v": 10639,
+ "vw": 0.2202
+ }
+ ],
+ "resultsCount": 3,
+ "status": "OK"
+ },
+ "schema": {
+ "allOf": [
+ {
"properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- },
"adjusted": {
- "type": "boolean",
- "description": "Whether or not this response was adjusted for splits."
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
},
"queryCount": {
- "type": "integer",
- "description": "The number of aggregates (minute or day) used to generate the response."
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
},
"resultsCount": {
- "type": "integer",
- "description": "The total number of results for this request."
+ "description": "The total number of results for this request.",
+ "type": "integer"
},
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
}
- }
+ },
+ "type": "object"
},
{
- "type": "object",
"properties": {
"results": {
- "type": "array",
"items": {
- "type": "object",
"properties": {
- "o": {
- "type": "number",
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
"format": "double",
- "description": "The open price for the symbol in the given time period."
+ "type": "number"
},
"h": {
- "type": "number",
+ "description": "The highest price for the symbol in the given time period.",
"format": "double",
- "description": "The highest price for the symbol in the given time period."
+ "type": "number"
},
"l": {
- "type": "number",
+ "description": "The lowest price for the symbol in the given time period.",
"format": "double",
- "description": "The lowest price for the symbol in the given time period."
+ "type": "number"
},
- "c": {
- "type": "number",
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
"format": "double",
- "description": "The close price for the symbol in the given time period."
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
},
"v": {
- "type": "number",
+ "description": "The trading volume of the symbol in the given time period.",
"format": "double",
- "description": "The trading volume of the symbol in the given time period."
+ "type": "number"
},
"vw": {
- "type": "number",
+ "description": "The volume weighted average price.",
"format": "double",
- "description": "The volume weighted average price."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "n": {
- "type": "integer",
- "description": "The number of transactions in the aggregate window."
+ "type": "number"
}
- }
- }
+ },
+ "type": "object"
+ },
+ "type": "array"
}
- }
+ },
+ "type": "object"
}
]
- },
- "example": {
- "ticker": "C:EURUSD",
- "status": "OK",
- "queryCount": 1,
- "resultsCount": 1,
- "adjusted": true,
- "results": [
- {
- "v": 125329,
- "vw": 1.1789,
- "o": 1.17921,
- "c": 1.17721,
- "h": 1.18305,
- "l": 1.1756,
- "t": 1626912000000,
- "n": 125329
- }
- ],
- "request_id": "79c061995d8b627b736170bc9653f15d"
}
}
- }
+ },
+ "description": "Previous day OHLC for ticker"
},
"default": {
"description": "Unexpected error"
}
},
+ "summary": "Grouped Daily (Bars)",
+ "tags": [
+ "fx:aggregates"
+ ],
"x-polygon-entitlement-data-type": {
- "name": "aggregates",
- "description": "Aggregate data"
+ "description": "Aggregate data",
+ "name": "aggregates"
},
"x-polygon-entitlement-market-type": {
- "name": "fx",
- "description": "Forex data"
+ "description": "Forex data",
+ "name": "fx"
}
}
},
- "/v2/snapshot/locale/global/markets/forex/tickers/{ticker}": {
+ "/v2/aggs/grouped/locale/us/market/stocks/{date}": {
"get": {
- "summary": "Ticker",
- "description": "Get the current minute, day, and previous day’s aggregate, as well as the last trade and quote for a single traded currency symbol.\n
\n
\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
- "tags": [
- "fx:snapshot"
- ],
+ "description": "Get the daily open, high, low, and close (OHLC) for the entire stocks/equities markets.\n",
"parameters": [
{
- "name": "ticker",
+ "description": "The beginning date for the aggregate window.",
+ "example": "2020-10-14",
"in": "path",
- "description": "The forex ticker.",
+ "name": "date",
"required": true,
"schema": {
"type": "string"
- },
- "example": "C:EURUSD"
+ }
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n",
+ "in": "query",
+ "name": "include_otc",
+ "schema": {
+ "type": "boolean"
+ }
}
],
"responses": {
"200": {
- "description": "Get current state for a ticker",
"content": {
"application/json": {
- "schema": {
- "allOf": [
+ "example": {
+ "adjusted": true,
+ "queryCount": 3,
+ "results": [
{
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- }
- }
+ "T": "KIMpL",
+ "c": 25.9102,
+ "h": 26.25,
+ "l": 25.91,
+ "n": 74,
+ "o": 26.07,
+ "t": 1602705600000,
+ "v": 4369,
+ "vw": 26.0407
},
{
- "type": "object",
- "properties": {
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
- }
- }
+ "T": "TANH",
+ "c": 23.4,
+ "h": 24.763,
+ "l": 22.65,
+ "n": 1096,
+ "o": 24.5,
+ "t": 1602705600000,
+ "v": 25933.6,
+ "vw": 23.493
},
{
- "type": "object",
+ "T": "VSAT",
+ "c": 34.24,
+ "h": 35.47,
+ "l": 34.21,
+ "n": 4966,
+ "o": 34.9,
+ "t": 1602705600000,
+ "v": 312583,
+ "vw": 34.4736
+ }
+ ],
+ "resultsCount": 3,
+ "status": "OK"
+ },
+ "schema": {
+ "allOf": [
+ {
"properties": {
- "ticker": {
- "type": "object",
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- }
- }
- },
- "lastQuote": {
- "description": "The most recent quote for this ticker.",
- "type": "object",
- "properties": {
- "a": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
- },
- "b": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "x": {
- "type": "integer",
- "description": "The exchange ID on which this quote happened."
- }
- }
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- }
- }
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- }
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
}
},
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "todaysChange": {
- "type": "number",
- "format": "double",
- "description": "The value of the change the from previous day."
- },
- "todaysChangePerc": {
- "type": "number",
- "format": "double",
- "description": "The percentage change since the previous day."
- },
- "updated": {
- "type": "integer",
- "description": "The last updated timestamp."
- }
- }
+ "type": "object"
+ },
+ "type": "array"
}
- }
+ },
+ "type": "object"
}
]
- },
- "example": {
- "request_id": "ad76e76ce183002c5937a7f02dfebde4",
- "status": "OK",
- "ticker": {
- "day": {
- "c": 1.18403,
- "h": 1.1906,
- "l": 1.18001,
- "o": 1.18725,
- "v": 83578
- },
- "lastQuote": {
- "a": 1.18403,
- "b": 1.18398,
- "i": 0,
- "t": 1606163759000,
- "x": 48
- },
- "min": {
- "c": 1.18396,
- "h": 1.18423,
- "l": 1.1838,
- "o": 1.18404,
- "v": 41
- },
- "prevDay": {
- "c": 1.18724,
- "h": 1.18727,
- "l": 1.18725,
- "o": 1.18725,
- "v": 5,
- "vw": 0
- },
- "ticker": "C:EURUSD",
- "todaysChange": -0.00316,
- "todaysChangePerc": -0.27458312,
- "updated": 1606163759000
- }
}
}
- }
+ },
+ "description": "Previous day OHLC for ticker"
},
"default": {
"description": "Unexpected error"
}
},
+ "summary": "Grouped Daily (Bars)",
+ "tags": [
+ "stocks:aggregates"
+ ],
"x-polygon-entitlement-data-type": {
- "name": "aggregates",
- "description": "Aggregate data"
+ "description": "Aggregate data",
+ "name": "aggregates"
},
"x-polygon-entitlement-market-type": {
- "name": "fx",
- "description": "Forex data"
- },
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "name": "realtime",
- "description": "Real Time Data"
- },
- {
- "name": "delayed",
- "description": "15 minute delayed data"
- }
- ]
+ "description": "Stocks data",
+ "name": "stocks"
+ }
}
},
- "/v2/snapshot/locale/global/markets/forex/tickers": {
+ "/v2/aggs/ticker/{cryptoTicker}/prev": {
"get": {
- "summary": "All Tickers",
- "description": "Get the current minute, day, and previous day’s aggregate, as well as the last trade and quote for all traded forex symbols.\n
\n
\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n",
- "tags": [
- "fx:snapshot"
- ],
+ "description": "Get the previous day's open, high, low, and close (OHLC) for the specified cryptocurrency pair.\n",
"parameters": [
{
- "name": "tickers",
+ "description": "The ticker symbol of the currency pair.",
+ "example": "X:BTCUSD",
+ "in": "path",
+ "name": "cryptoTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
"in": "query",
- "description": "A comma separated list of tickers to get snapshots for.",
+ "name": "adjusted",
"schema": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": "boolean"
}
}
],
"responses": {
"200": {
- "description": "Get current state for all tickers",
"content": {
"application/json": {
+ "example": {
+ "adjusted": true,
+ "queryCount": 1,
+ "request_id": "b2170df985474b6d21a6eeccfb6bee67",
+ "results": [
+ {
+ "T": "X:BTCUSD",
+ "c": 16035.9,
+ "h": 16180,
+ "l": 15639.2,
+ "o": 15937.1,
+ "t": 1605416400000,
+ "v": 95045.16897951,
+ "vw": 15954.2111
+ }
+ ],
+ "resultsCount": 1,
+ "status": "OK",
+ "ticker": "X:BTCUSD"
+ },
"schema": {
"allOf": [
{
- "type": "object",
"properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
}
- }
+ },
+ "type": "object"
},
{
- "type": "object",
"properties": {
- "tickers": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- }
- }
- },
- "lastQuote": {
- "description": "The most recent quote for this ticker.",
- "type": "object",
- "properties": {
- "a": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
- },
- "b": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "x": {
- "type": "integer",
- "description": "The exchange ID on which this quote happened."
- }
- }
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- }
- }
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- }
- }
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
},
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "todaysChange": {
- "type": "number",
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
"format": "double",
- "description": "The value of the change the from previous day."
+ "type": "number"
},
- "todaysChangePerc": {
- "type": "number",
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
"format": "double",
- "description": "The percentage change since the previous day."
+ "type": "number"
},
- "updated": {
- "type": "integer",
- "description": "The last updated timestamp."
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
}
- }
- }
+ },
+ "type": "object"
+ },
+ "type": "array"
}
- }
- }
- ]
- },
- "example": {
- "status": "OK",
- "tickers": [
- {
- "day": {
- "c": 0.11778221,
- "h": 0.11812263,
- "l": 0.11766631,
- "o": 0.11797149,
- "v": 77794
- },
- "lastQuote": {
- "a": 0.11780678,
- "b": 0.11777952,
- "t": 1605280919000,
- "x": 48
- },
- "min": {
- "c": 0.117769,
- "h": 0.11779633,
- "l": 0.11773698,
- "o": 0.11778,
- "v": 202
- },
- "prevDay": {
- "c": 0.11797258,
- "h": 0.11797258,
- "l": 0.11797149,
- "o": 0.11797149,
- "v": 2,
- "vw": 0
},
- "ticker": "C:HKDCHF",
- "todaysChange": -0.00019306,
- "todaysChangePerc": -0.1636482,
- "updated": 1605280919000
+ "type": "object"
}
]
}
}
- }
+ },
+ "description": "The previous day OHLC for a ticker."
},
"default": {
"description": "Unexpected error"
}
},
+ "summary": "Previous Close",
+ "tags": [
+ "crypto:aggregates"
+ ],
"x-polygon-entitlement-data-type": {
- "name": "aggregates",
- "description": "Aggregate data"
+ "description": "Aggregate data",
+ "name": "aggregates"
},
"x-polygon-entitlement-market-type": {
- "name": "fx",
- "description": "Forex data"
- },
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "name": "realtime",
- "description": "Real Time Data"
- },
- {
- "name": "delayed",
- "description": "15 minute delayed data"
- }
- ]
+ "description": "Crypto data",
+ "name": "crypto"
+ }
}
},
- "/v2/snapshot/locale/global/markets/forex/{direction}": {
+ "/v2/aggs/ticker/{cryptoTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
"get": {
- "summary": "Gainers/Losers",
- "description": "Get the current top 20 gainers or losers of the day in forex markets.\n
\n
\nTop gainers are those tickers whose price has increased by the highest percentage since the previous day's close.\nTop losers are those tickers whose price has decreased by the highest percentage since the previous day's close.\n
\n
\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
- "tags": [
- "fx:snapshot"
- ],
+ "description": "Get aggregate bars for a cryptocurrency pair over a given date range in custom time window sizes.\n\u003cbr /\u003e\n\u003cbr /\u003e\nFor example, if timespan = ‘minute’ and multiplier = ‘5’ then 5-minute bars will be returned.\n",
"parameters": [
{
- "name": "direction",
+ "description": "The ticker symbol of the currency pair.",
+ "example": "X:BTCUSD",
"in": "path",
- "description": "The direction of the snapshot results to return.\n",
+ "name": "cryptoTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The size of the timespan multiplier.",
+ "example": 1,
+ "in": "path",
+ "name": "multiplier",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The size of the time window.",
+ "example": "day",
+ "in": "path",
+ "name": "timespan",
"required": true,
"schema": {
- "type": "string",
"enum": [
- "gainers",
- "losers"
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2021-07-22",
+ "in": "path",
+ "name": "from",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2021-07-22",
+ "in": "path",
+ "name": "to",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
+ "example": "asc",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
]
- },
- "example": "gainers"
+ }
+ },
+ {
+ "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on \n\u003ca href=\"https://polygon.io/blog/aggs-api-updates/\" target=\"_blank\" alt=\"Aggregate Data API Improvements\"\u003eAggregate Data API Improvements\u003c/a\u003e.\n",
+ "example": 120,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
}
],
"responses": {
"200": {
- "description": "Get the current gainers / losers of the day",
"content": {
"application/json": {
+ "example": {
+ "adjusted": true,
+ "queryCount": 2,
+ "request_id": "0cf72b6da685bcd386548ffe2895904a",
+ "results": [
+ {
+ "c": 10094.75,
+ "h": 10429.26,
+ "l": 9490,
+ "n": 1,
+ "o": 9557.9,
+ "t": 1590984000000,
+ "v": 303067.6562332156,
+ "vw": 9874.5529
+ },
+ {
+ "c": 9492.62,
+ "h": 10222.72,
+ "l": 9135.68,
+ "n": 1,
+ "o": 10096.87,
+ "t": 1591070400000,
+ "v": 323339.6922892879,
+ "vw": 9729.5701
+ }
+ ],
+ "resultsCount": 2,
+ "status": "OK",
+ "ticker": "X:BTCUSD"
+ },
"schema": {
"allOf": [
{
- "type": "object",
"properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
}
- }
+ },
+ "type": "object"
},
{
- "type": "object",
"properties": {
- "tickers": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- }
- }
- },
- "lastQuote": {
- "description": "The most recent quote for this ticker.",
- "type": "object",
- "properties": {
- "a": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
- },
- "b": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "x": {
- "type": "integer",
- "description": "The exchange ID on which this quote happened."
- }
- }
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- }
- }
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- }
- }
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
},
- "todaysChange": {
- "type": "number",
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
"format": "double",
- "description": "The value of the change the from previous day."
+ "type": "number"
},
- "todaysChangePerc": {
- "type": "number",
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
"format": "double",
- "description": "The percentage change since the previous day."
+ "type": "number"
},
- "updated": {
- "type": "integer",
- "description": "The last updated timestamp."
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
}
- }
- }
+ },
+ "type": "object"
+ },
+ "type": "array"
}
- }
- }
- ]
- },
- "example": {
- "status": "OK",
- "tickers": [
- {
- "day": {
- "c": 0.886156,
- "h": 0.887111,
- "l": 0.8825327,
- "o": 0.8844732,
- "v": 1041
- },
- "lastQuote": {
- "a": 0.8879606,
- "b": 0.886156,
- "t": 1605283204000,
- "x": 48
},
- "min": {
- "c": 0.886156,
- "h": 0.886156,
- "l": 0.886156,
- "o": 0.886156,
- "v": 1
- },
- "prevDay": {
- "c": 0.8428527,
- "h": 0.889773,
- "l": 0.8428527,
- "o": 0.8848539,
- "v": 1078,
- "vw": 0
- },
- "ticker": "C:PLNILS",
- "todaysChange": 0.0433033,
- "todaysChangePerc": 5.13770674,
- "updated": 1605330008999
+ "type": "object"
}
]
}
}
- }
+ },
+ "description": "Cryptocurrency Aggregates."
},
"default": {
"description": "Unexpected error"
}
},
+ "summary": "Aggregates (Bars)",
+ "tags": [
+ "crypto:aggregates"
+ ],
"x-polygon-entitlement-data-type": {
- "name": "aggregates",
- "description": "Aggregate data"
+ "description": "Aggregate data",
+ "name": "aggregates"
},
"x-polygon-entitlement-market-type": {
- "name": "fx",
- "description": "Forex data"
- },
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "name": "realtime",
- "description": "Real Time Data"
- },
- {
- "name": "delayed",
- "description": "15 minute delayed data"
- }
- ]
+ "description": "Crypto data",
+ "name": "crypto"
+ }
}
},
- "/v1/last/crypto/{from}/{to}": {
+ "/v2/aggs/ticker/{forexTicker}/prev": {
"get": {
- "summary": "Last Trade for a Crypto Pair",
- "description": "Get the last trade tick for a cryptocurrency pair.\n",
- "tags": [
- "crypto:last:trade"
- ],
+ "description": "Get the previous day's open, high, low, and close (OHLC) for the specified forex pair.\n",
"parameters": [
{
- "name": "from",
+ "description": "The ticker symbol of the currency pair.",
+ "example": "C:EURUSD",
"in": "path",
- "description": "The \"from\" symbol of the pair.",
+ "name": "forexTicker",
"required": true,
"schema": {
"type": "string"
- },
- "example": "BTC"
+ }
},
{
- "name": "to",
- "in": "path",
- "description": "The \"to\" symbol of the pair.",
- "required": true,
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
"schema": {
- "type": "string"
- },
- "example": "USD"
+ "type": "boolean"
+ }
}
],
"responses": {
"200": {
- "description": "The last tick for this currency pair.",
"content": {
"application/json": {
+ "example": {
+ "adjusted": true,
+ "queryCount": 1,
+ "request_id": "08ec061fb85115678d68452c0a609cb7",
+ "results": [
+ {
+ "T": "C:EURUSD",
+ "c": 1.06206,
+ "h": 1.0631,
+ "l": 1.0505,
+ "n": 180300,
+ "o": 1.05252,
+ "t": 1651708799999,
+ "v": 180300,
+ "vw": 1.055
+ }
+ ],
+ "resultsCount": 1,
+ "status": "OK",
+ "ticker": "C:EURUSD"
+ },
"schema": {
"allOf": [
{
- "type": "object",
"properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
}
- }
+ },
+ "type": "object"
},
{
- "type": "object",
"properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
"request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
}
- }
+ },
+ "type": "object"
},
{
- "type": "object",
"properties": {
- "last": {
- "type": "object",
- "properties": {
- "conditions": {
- "type": "array",
- "description": "A list of condition codes.\n",
- "items": {
- "type": "integer",
- "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"
+ "results": {
+ "items": {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
}
- },
- "exchange": {
- "type": "integer",
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n"
- },
- "price": {
- "type": "number",
- "format": "double",
- "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"
- },
- "size": {
- "type": "number",
- "format": "double",
- "description": "The size of a trade (also known as volume).\n"
- },
- "timestamp": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- }
- }
- },
- "symbol": {
- "type": "string",
- "description": "The symbol pair that was evaluated from the request."
- }
- }
- }
- ]
- },
- "example": {
- "last": {
- "conditions": [
- 1
- ],
- "exchange": 4,
- "price": 16835.42,
- "size": 0.006909,
- "timestamp": 1605560885027
- },
- "request_id": "d2d779df015fe2b7fbb8e58366610ef7",
- "status": "success",
- "symbol": "BTC-USD"
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
}
}
- }
+ },
+ "description": "The previous day OHLC for the ticker."
},
"default": {
"description": "Unexpected error"
}
},
+ "summary": "Previous Close",
+ "tags": [
+ "fx:aggregates"
+ ],
"x-polygon-entitlement-data-type": {
- "name": "trades",
- "description": "Trade data"
+ "description": "Aggregate data",
+ "name": "aggregates"
},
"x-polygon-entitlement-market-type": {
- "name": "crypto",
- "description": "Crypto data"
+ "description": "Forex data",
+ "name": "fx"
}
}
},
- "/v1/open-close/crypto/{from}/{to}/{date}": {
+ "/v2/aggs/ticker/{forexTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
"get": {
- "summary": "Daily Open/Close",
- "description": "Get the open, close prices of a cryptocurrency symbol on a certain day.\n",
- "tags": [
- "crypto:open-close"
- ],
+ "description": "Get aggregate bars for a forex pair over a given date range in custom time window sizes.\n\u003cbr /\u003e\n\u003cbr /\u003e\nFor example, if timespan = ‘minute’ and multiplier = ‘5’ then 5-minute bars will be returned.\n",
"parameters": [
{
- "name": "from",
+ "description": "The ticker symbol of the currency pair.",
+ "example": "C:EURUSD",
"in": "path",
- "description": "The \"from\" symbol of the pair.",
+ "name": "forexTicker",
"required": true,
"schema": {
"type": "string"
- },
- "example": "BTC"
+ }
},
{
- "name": "to",
+ "description": "The size of the timespan multiplier.",
+ "example": 1,
"in": "path",
- "description": "The \"to\" symbol of the pair.",
+ "name": "multiplier",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The size of the time window.",
+ "example": "day",
+ "in": "path",
+ "name": "timespan",
"required": true,
"schema": {
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
"type": "string"
- },
- "example": "USD"
+ }
},
{
- "name": "date",
+ "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2021-07-22",
"in": "path",
- "description": "The date of the requested open/close in the format YYYY-MM-DD.",
+ "name": "from",
"required": true,
"schema": {
- "type": "string",
- "format": "date"
- },
- "example": "2020-10-14"
+ "type": "string"
+ }
+ },
+ {
+ "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2021-07-22",
+ "in": "path",
+ "name": "to",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
},
{
- "name": "adjusted",
- "in": "query",
"description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "required": false,
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
"schema": {
"type": "boolean"
- },
- "example": true
+ }
+ },
+ {
+ "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
+ "example": "asc",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ]
+ }
+ },
+ {
+ "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on \n\u003ca href=\"https://polygon.io/blog/aggs-api-updates/\" target=\"_blank\" alt=\"Aggregate Data API Improvements\"\u003eAggregate Data API Improvements\u003c/a\u003e.\n",
+ "example": 120,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
}
],
"responses": {
"200": {
- "description": "The open/close of this symbol.",
"content": {
"application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "symbol": {
- "type": "string",
- "description": "The symbol pair that was evaluated from the request."
- },
- "isUTC": {
- "type": "boolean",
- "description": "Whether or not the timestamps are in UTC timezone."
- },
- "day": {
- "type": "string",
- "format": "date",
- "description": "The date requested."
- },
- "open": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "close": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "openTrades": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "p": {
- "type": "number",
- "format": "double",
- "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"
- },
- "s": {
- "type": "number",
- "format": "double",
- "description": "The size of a trade (also known as volume).\n"
- },
- "x": {
- "type": "integer",
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n"
- },
- "c": {
- "type": "array",
- "description": "A list of condition codes.\n",
- "items": {
- "type": "integer",
- "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"
- }
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "i": {
- "type": "string",
- "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"
- }
- }
- }
- },
- "closingTrades": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "p": {
- "type": "number",
- "format": "double",
- "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"
- },
- "s": {
- "type": "number",
- "format": "double",
- "description": "The size of a trade (also known as volume).\n"
- },
- "x": {
- "type": "integer",
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n"
- },
- "c": {
- "type": "array",
- "description": "A list of condition codes.\n",
- "items": {
- "type": "integer",
- "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"
- }
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "i": {
- "type": "string",
- "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"
- }
- }
- }
- }
- }
- },
"example": {
- "symbol": "BTC-USD",
- "isUTC": true,
- "day": "2020-10-09T00:00:00.000Z",
- "open": 10932.44,
- "close": 11050.64,
- "openTrades": [
- {
- "s": 0.002,
- "p": 10932.44,
- "x": 1,
- "t": 1602201600056,
- "c": [
- 2
- ],
- "i": "511235746"
- },
+ "adjusted": true,
+ "queryCount": 1,
+ "request_id": "79c061995d8b627b736170bc9653f15d",
+ "results": [
{
- "s": 0.02,
- "p": 10923.76,
- "x": 4,
- "t": 1602201600141,
- "c": [
- 2
- ],
- "i": "511235751"
+ "c": 1.17721,
+ "h": 1.18305,
+ "l": 1.1756,
+ "n": 125329,
+ "o": 1.17921,
+ "t": 1626912000000,
+ "v": 125329,
+ "vw": 1.1789
}
],
- "closingTrades": [
+ "resultsCount": 1,
+ "status": "OK",
+ "ticker": "C:EURUSD"
+ },
+ "schema": {
+ "allOf": [
{
- "s": 0.006128,
- "p": 11050.64,
- "x": 4,
- "t": 1602287999795,
- "c": [
- 2
- ],
- "i": "973323250"
+ "properties": {
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "type": "object"
},
{
- "s": 0.014,
- "p": 11049.4,
- "x": 17,
- "t": 1602287999659,
- "c": [
- 1
- ],
- "i": "105717893"
+ "properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
}
]
}
}
- }
+ },
+ "description": "Forex Aggregates."
},
"default": {
"description": "Unexpected error"
}
},
+ "summary": "Aggregates (Bars)",
+ "tags": [
+ "fx:aggregates"
+ ],
"x-polygon-entitlement-data-type": {
- "name": "aggregates",
- "description": "Aggregate data"
+ "description": "Aggregate data",
+ "name": "aggregates"
},
"x-polygon-entitlement-market-type": {
- "name": "crypto",
- "description": "Crypto data"
+ "description": "Forex data",
+ "name": "fx"
}
}
},
- "/v1/historic/crypto/{from}/{to}/{date}": {
+ "/v2/aggs/ticker/{optionsTicker}/prev": {
"get": {
- "summary": "Historic Crypto Trades",
- "description": "Get historic trade ticks for a cryptocurrency pair.\n",
- "tags": [
- "crypto:trades"
- ],
+ "description": "Get the previous day's open, high, low, and close (OHLC) for the specified option contract.\n",
"parameters": [
{
- "name": "from",
- "in": "path",
- "description": "The \"from\" symbol of the crypto pair.",
- "required": true,
- "schema": {
- "type": "string"
- },
- "example": "BTC"
- },
- {
- "name": "to",
+ "description": "The ticker symbol of the options contract.",
+ "example": "O:TSLA210903C00700000",
"in": "path",
- "description": "The \"to\" symbol of the crypto pair.",
+ "name": "optionsTicker",
"required": true,
"schema": {
"type": "string"
- },
- "example": "USD"
- },
- {
- "name": "date",
- "in": "path",
- "description": "The date/day of the historic ticks to retrieve.",
- "required": true,
- "schema": {
- "type": "string",
- "format": "date"
- },
- "example": "2020-10-14"
- },
- {
- "name": "offset",
- "in": "query",
- "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",
- "required": false,
- "schema": {
- "type": "integer"
}
},
{
- "name": "limit",
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
"in": "query",
- "description": "Limit the size of the response, max 10000.",
- "required": false,
+ "name": "adjusted",
"schema": {
- "type": "integer"
- },
- "example": 100
+ "type": "boolean"
+ }
}
],
"responses": {
"200": {
- "description": "An array of crypto trade ticks.",
"content": {
"application/json": {
+ "example": {
+ "adjusted": true,
+ "queryCount": 1,
+ "request_id": "6a7e466379af0a71039d60cc78e72282",
+ "results": [
+ {
+ "T": "O:TSLA210903C00700000",
+ "c": 115.97,
+ "h": 117.59,
+ "l": 114.13,
+ "n": 2,
+ "o": 115.55,
+ "t": 1605042000000,
+ "v": 131704427,
+ "vw": 116.3058
+ }
+ ],
+ "resultsCount": 1,
+ "status": "OK",
+ "ticker": "O:TSLA210903C00700000"
+ },
"schema": {
"allOf": [
{
- "type": "string",
- "description": "The status of this request's response."
+ "properties": {
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "type": "object"
},
{
- "type": "object",
"properties": {
- "day": {
- "type": "string",
- "format": "date",
- "description": "The date that was evaluated from the request."
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
},
- "map": {
- "type": "object",
- "description": "A map for shortened result keys."
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
},
- "msLatency": {
- "type": "integer",
- "description": "The milliseconds of latency for the query results."
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
},
- "symbol": {
- "type": "string",
- "description": "The symbol pair that was evaluated from the request."
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
},
- "ticks": {
- "type": "array",
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "results": {
"items": {
- "type": "object",
"properties": {
- "p": {
- "type": "number",
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
"format": "double",
- "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"
+ "type": "number"
},
- "s": {
- "type": "number",
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
"format": "double",
- "description": "The size of a trade (also known as volume).\n"
+ "type": "number"
},
- "x": {
- "type": "integer",
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n"
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "c": {
- "type": "array",
- "description": "A list of condition codes.\n",
- "items": {
- "type": "integer",
- "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"
- }
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
"t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
},
- "i": {
- "type": "string",
- "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"
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
}
- }
- }
+ },
+ "type": "object"
+ },
+ "type": "array"
}
- }
+ },
+ "type": "object"
}
]
- },
- "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": [
- {
- "s": 0.00188217,
- "p": 15482.89,
- "x": 1,
- "t": 1604880000067,
- "c": [
- 2
- ]
- },
- {
- "s": 0.00161739,
- "p": 15482.11,
- "x": 1,
- "t": 1604880000167,
- "c": [
- 2
- ]
- }
- ],
- "type": "crypto"
}
}
- }
+ },
+ "description": "The previous day OHLC for the options contract."
},
"default": {
"description": "Unexpected error"
}
},
+ "summary": "Previous Close",
+ "tags": [
+ "options:aggregates"
+ ],
"x-polygon-entitlement-data-type": {
- "name": "trades",
- "description": "Trade data"
+ "description": "Aggregate data",
+ "name": "aggregates"
},
"x-polygon-entitlement-market-type": {
- "name": "crypto",
- "description": "Crypto data"
- },
- "x-polygon-deprecation": {
- "date": 1654056060000,
- "replaces": {
- "path": "get_v3_trades__cryptoticker",
- "name": "Trades v3"
- }
+ "description": "Options data",
+ "name": "options"
}
}
},
- "/v2/aggs/grouped/locale/global/market/crypto/{date}": {
+ "/v2/aggs/ticker/{optionsTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
"get": {
- "summary": "Grouped Daily (Bars)",
- "description": "Get the daily open, high, low, and close (OHLC) for the entire cryptocurrency markets.\n",
- "tags": [
- "crypto:aggregates"
- ],
+ "description": "Get aggregate bars for an option contract over a given date range in custom time window sizes.\n\u003cbr /\u003e\n\u003cbr /\u003e\nFor example, if timespan = ‘minute’ and multiplier = ‘5’ then 5-minute bars will be returned.\n",
"parameters": [
{
- "name": "date",
+ "description": "The ticker symbol of the options contract.",
+ "example": "O:TSLA210903C00700000",
"in": "path",
- "description": "The beginning date for the aggregate window.",
+ "name": "optionsTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The size of the timespan multiplier.",
+ "example": 1,
+ "in": "path",
+ "name": "multiplier",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The size of the time window.",
+ "example": "day",
+ "in": "path",
+ "name": "timespan",
+ "required": true,
+ "schema": {
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2021-07-22",
+ "in": "path",
+ "name": "from",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2021-07-22",
+ "in": "path",
+ "name": "to",
"required": true,
"schema": {
- "type": "string"
- },
- "example": "2020-10-14"
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
+ "example": "asc",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ]
+ }
},
{
- "name": "adjusted",
+ "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on \n\u003ca href=\"https://polygon.io/blog/aggs-api-updates/\" target=\"_blank\" alt=\"Aggregate Data API Improvements\"\u003eAggregate Data API Improvements\u003c/a\u003e.\n",
+ "example": 120,
"in": "query",
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "required": false,
+ "name": "limit",
"schema": {
- "type": "boolean"
- },
- "example": true
+ "type": "integer"
+ }
}
],
"responses": {
"200": {
- "description": "The previous day OHLC for the ticker.",
"content": {
"application/json": {
+ "example": {
+ "adjusted": true,
+ "count": 2,
+ "queryCount": 2,
+ "request_id": "5585acde-5085-42d6-95b2-2e388a28370a",
+ "results": [
+ {
+ "c": 26.2,
+ "h": 26.2,
+ "l": 26.2,
+ "n": 1,
+ "o": 26.2,
+ "t": 1632369600000,
+ "v": 2,
+ "vw": 26.2
+ },
+ {
+ "c": 28.3,
+ "h": 28.3,
+ "l": 28.3,
+ "n": 1,
+ "o": 28.3,
+ "t": 1632456000000,
+ "v": 2,
+ "vw": 28.3
+ }
+ ],
+ "resultsCount": 2,
+ "status": "OK",
+ "ticker": "O:RDFN211119C00025000"
+ },
"schema": {
"allOf": [
{
- "type": "object",
"properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
"adjusted": {
- "type": "boolean",
- "description": "Whether or not this response was adjusted for splits."
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
},
"queryCount": {
- "type": "integer",
- "description": "The number of aggregates (minute or day) used to generate the response."
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
},
"resultsCount": {
- "type": "integer",
- "description": "The total number of results for this request."
+ "description": "The total number of results for this request.",
+ "type": "integer"
},
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
}
- }
+ },
+ "type": "object"
},
{
- "type": "object",
"properties": {
"results": {
- "type": "array",
"items": {
- "type": "object",
"properties": {
- "T": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "o": {
- "type": "number",
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
"format": "double",
- "description": "The open price for the symbol in the given time period."
+ "type": "number"
},
"h": {
- "type": "number",
+ "description": "The highest price for the symbol in the given time period.",
"format": "double",
- "description": "The highest price for the symbol in the given time period."
+ "type": "number"
},
"l": {
- "type": "number",
+ "description": "The lowest price for the symbol in the given time period.",
"format": "double",
- "description": "The lowest price for the symbol in the given time period."
+ "type": "number"
},
- "c": {
- "type": "number",
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
"format": "double",
- "description": "The close price for the symbol in the given time period."
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
},
"v": {
- "type": "number",
+ "description": "The trading volume of the symbol in the given time period.",
"format": "double",
- "description": "The trading volume of the symbol in the given time period."
+ "type": "number"
},
"vw": {
- "type": "number",
+ "description": "The volume weighted average price.",
"format": "double",
- "description": "The volume weighted average price."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "n": {
- "type": "integer",
- "description": "The number of transactions in the aggregate window."
+ "type": "number"
}
- }
- }
+ },
+ "type": "object"
+ },
+ "type": "array"
}
- }
- }
- ]
- },
- "example": {
- "status": "OK",
- "queryCount": 3,
- "resultsCount": 3,
- "adjusted": true,
- "results": [
- {
- "T": "X:ARDRUSD",
- "v": 2,
- "vw": 0.0551,
- "o": 0.0550762,
- "c": 0.0550762,
- "h": 0.0550762,
- "l": 0.0550762,
- "t": 1580676480000,
- "n": 18388
- },
- {
- "T": "X:NGCUSD",
- "v": 4734,
- "vw": 0.0273,
- "o": 0.0273733,
- "c": 0.0272983,
- "h": 0.0273733,
- "l": 0.0272983,
- "t": 1580674080000,
- "n": 18
- },
- {
- "T": "X:ZSCUSD",
- "v": 390,
- "vw": 0.0003,
- "o": 0.00028531,
- "c": 0.00028531,
- "h": 0.00028531,
- "l": 0.00028531,
- "t": 1580671080000,
- "n": 151
+ },
+ "type": "object"
}
]
}
}
- }
+ },
+ "description": "Options Aggregates."
},
"default": {
"description": "Unexpected error"
}
},
+ "summary": "Aggregates (Bars)",
+ "tags": [
+ "options:aggregates"
+ ],
"x-polygon-entitlement-data-type": {
- "name": "aggregates",
- "description": "Aggregate data"
+ "description": "Aggregate data",
+ "name": "aggregates"
},
"x-polygon-entitlement-market-type": {
- "name": "crypto",
- "description": "Crypto data"
+ "description": "Options data",
+ "name": "options"
}
}
},
- "/v2/aggs/ticker/{cryptoTicker}/prev": {
+ "/v2/aggs/ticker/{stocksTicker}/prev": {
"get": {
- "summary": "Previous Close",
- "description": "Get the previous day's open, high, low, and close (OHLC) for the specified cryptocurrency pair.\n",
- "tags": [
- "crypto:aggregates"
- ],
+ "description": "Get the previous day's open, high, low, and close (OHLC) for the specified stock ticker.\n",
"parameters": [
{
- "name": "cryptoTicker",
+ "description": "The ticker symbol of the stock/equity.",
+ "example": "AAPL",
"in": "path",
- "description": "The ticker symbol of the currency pair.",
+ "name": "stocksTicker",
"required": true,
"schema": {
"type": "string"
- },
- "example": "X:BTCUSD"
+ }
},
{
- "name": "adjusted",
- "in": "query",
"description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "required": false,
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
"schema": {
"type": "boolean"
- },
- "example": true
+ }
}
],
"responses": {
"200": {
- "description": "The previous day OHLC for a ticker.",
"content": {
"application/json": {
+ "example": {
+ "adjusted": true,
+ "queryCount": 1,
+ "request_id": "6a7e466379af0a71039d60cc78e72282",
+ "results": [
+ {
+ "T": "AAPL",
+ "c": 115.97,
+ "h": 117.59,
+ "l": 114.13,
+ "o": 115.55,
+ "t": 1605042000000,
+ "v": 131704427,
+ "vw": 116.3058
+ }
+ ],
+ "resultsCount": 1,
+ "status": "OK",
+ "ticker": "AAPL"
+ },
"schema": {
"allOf": [
{
- "type": "object",
"properties": {
"ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
}
- }
+ },
+ "type": "object"
},
{
- "type": "object",
"properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- },
"adjusted": {
- "type": "boolean",
- "description": "Whether or not this response was adjusted for splits."
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
},
"queryCount": {
- "type": "integer",
- "description": "The number of aggregates (minute or day) used to generate the response."
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
},
"resultsCount": {
- "type": "integer",
- "description": "The total number of results for this request."
+ "description": "The total number of results for this request.",
+ "type": "integer"
},
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
}
- }
+ },
+ "type": "object"
},
{
- "type": "object",
"properties": {
"results": {
- "type": "array",
"items": {
- "type": "object",
"properties": {
- "T": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "o": {
- "type": "number",
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
"format": "double",
- "description": "The open price for the symbol in the given time period."
+ "type": "number"
},
"h": {
- "type": "number",
+ "description": "The highest price for the symbol in the given time period.",
"format": "double",
- "description": "The highest price for the symbol in the given time period."
+ "type": "number"
},
"l": {
- "type": "number",
+ "description": "The lowest price for the symbol in the given time period.",
"format": "double",
- "description": "The lowest price for the symbol in the given time period."
+ "type": "number"
},
- "c": {
- "type": "number",
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
"format": "double",
- "description": "The close price for the symbol in the given time period."
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
},
"v": {
- "type": "number",
+ "description": "The trading volume of the symbol in the given time period.",
"format": "double",
- "description": "The trading volume of the symbol in the given time period."
+ "type": "number"
},
"vw": {
- "type": "number",
+ "description": "The volume weighted average price.",
"format": "double",
- "description": "The volume weighted average price."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "n": {
- "type": "integer",
- "description": "The number of transactions in the aggregate window."
+ "type": "number"
}
- }
- }
+ },
+ "type": "object"
+ },
+ "type": "array"
}
- }
- }
- ]
- },
- "example": {
- "ticker": "X:BTCUSD",
- "status": "OK",
- "request_id": "b2170df985474b6d21a6eeccfb6bee67",
- "queryCount": 1,
- "resultsCount": 1,
- "adjusted": true,
- "results": [
- {
- "T": "X:BTCUSD",
- "v": 95045.16897951,
- "vw": 15954.2111,
- "o": 15937.1,
- "c": 16035.9,
- "h": 16180,
- "l": 15639.2,
- "t": 1605416400000
+ },
+ "type": "object"
}
]
}
}
- }
+ },
+ "description": "The previous day OHLC for the ticker."
},
"default": {
"description": "Unexpected error"
}
},
+ "summary": "Previous Close",
+ "tags": [
+ "stocks:aggregates"
+ ],
"x-polygon-entitlement-data-type": {
- "name": "aggregates",
- "description": "Aggregate data"
+ "description": "Aggregate data",
+ "name": "aggregates"
},
"x-polygon-entitlement-market-type": {
- "name": "crypto",
- "description": "Crypto data"
+ "description": "Stocks data",
+ "name": "stocks"
}
}
},
- "/v2/aggs/ticker/{cryptoTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
+ "/v2/aggs/ticker/{stocksTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
"get": {
- "summary": "Aggregates (Bars)",
- "description": "Get aggregate bars for a cryptocurrency pair over a given date range in custom time window sizes.\n
\n
\nFor example, if timespan = ‘minute’ and multiplier = ‘5’ then 5-minute bars will be returned.\n",
- "tags": [
- "crypto:aggregates"
- ],
+ "description": "Get aggregate bars for a stock over a given date range in custom time window sizes.\n\u003cbr /\u003e\n\u003cbr /\u003e\nFor example, if timespan = ‘minute’ and multiplier = ‘5’ then 5-minute bars will be returned.\n",
"parameters": [
{
- "name": "cryptoTicker",
+ "description": "The ticker symbol of the stock/equity.",
+ "example": "AAPL",
"in": "path",
- "description": "The ticker symbol of the currency pair.",
+ "name": "stocksTicker",
"required": true,
"schema": {
"type": "string"
- },
- "example": "X:BTCUSD"
+ }
},
{
- "name": "multiplier",
- "in": "path",
"description": "The size of the timespan multiplier.",
+ "example": 1,
+ "in": "path",
+ "name": "multiplier",
"required": true,
"schema": {
"type": "integer"
- },
- "example": 1
+ }
},
{
- "name": "timespan",
- "in": "path",
"description": "The size of the time window.",
+ "example": "day",
+ "in": "path",
+ "name": "timespan",
"required": true,
"schema": {
- "type": "string",
"enum": [
"minute",
"hour",
@@ -7750,1044 +8863,1196 @@
"month",
"quarter",
"year"
- ]
- },
- "example": "day"
+ ],
+ "type": "string"
+ }
},
{
- "name": "from",
- "in": "path",
"description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2021-07-22",
+ "in": "path",
+ "name": "from",
"required": true,
"schema": {
"type": "string"
- },
- "example": "2021-07-22"
+ }
},
{
- "name": "to",
- "in": "path",
"description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2021-07-22",
+ "in": "path",
+ "name": "to",
"required": true,
"schema": {
"type": "string"
- },
- "example": "2021-07-22"
+ }
},
{
- "name": "adjusted",
- "in": "query",
"description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "required": false,
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
"schema": {
"type": "boolean"
- },
- "example": true
+ }
},
{
+ "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
+ "example": "asc",
+ "in": "query",
"name": "sort",
"schema": {
"enum": [
"asc",
"desc"
]
- },
- "in": "query",
- "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
- "example": "asc"
+ }
},
{
- "name": "limit",
+ "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on \n\u003ca href=\"https://polygon.io/blog/aggs-api-updates/\" target=\"_blank\" alt=\"Aggregate Data API Improvements\"\u003eAggregate Data API Improvements\u003c/a\u003e.\n",
+ "example": 120,
"in": "query",
- "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on \nAggregate Data API Improvements.\n",
- "required": false,
+ "name": "limit",
"schema": {
"type": "integer"
- },
- "example": 120
+ }
}
],
"responses": {
"200": {
- "description": "Cryptocurrency Aggregates.",
"content": {
"application/json": {
+ "example": {
+ "adjusted": true,
+ "queryCount": 2,
+ "request_id": "6a7e466379af0a71039d60cc78e72282",
+ "results": [
+ {
+ "c": 75.0875,
+ "h": 75.15,
+ "l": 73.7975,
+ "n": 1,
+ "o": 74.06,
+ "t": 1577941200000,
+ "v": 135647456,
+ "vw": 74.6099
+ },
+ {
+ "c": 74.3575,
+ "h": 75.145,
+ "l": 74.125,
+ "n": 1,
+ "o": 74.2875,
+ "t": 1578027600000,
+ "v": 146535512,
+ "vw": 74.7026
+ }
+ ],
+ "resultsCount": 2,
+ "status": "OK",
+ "ticker": "AAPL"
+ },
"schema": {
"allOf": [
{
- "type": "object",
"properties": {
"ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
}
- }
+ },
+ "type": "object"
},
{
- "type": "object",
"properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- },
"adjusted": {
- "type": "boolean",
- "description": "Whether or not this response was adjusted for splits."
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
},
"queryCount": {
- "type": "integer",
- "description": "The number of aggregates (minute or day) used to generate the response."
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
},
"resultsCount": {
- "type": "integer",
- "description": "The total number of results for this request."
+ "description": "The total number of results for this request.",
+ "type": "integer"
},
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
}
- }
+ },
+ "type": "object"
},
{
- "type": "object",
"properties": {
"results": {
- "type": "array",
"items": {
- "type": "object",
"properties": {
- "o": {
- "type": "number",
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
"format": "double",
- "description": "The open price for the symbol in the given time period."
+ "type": "number"
},
"h": {
- "type": "number",
+ "description": "The highest price for the symbol in the given time period.",
"format": "double",
- "description": "The highest price for the symbol in the given time period."
+ "type": "number"
},
"l": {
- "type": "number",
+ "description": "The lowest price for the symbol in the given time period.",
"format": "double",
- "description": "The lowest price for the symbol in the given time period."
+ "type": "number"
},
- "c": {
- "type": "number",
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
"format": "double",
- "description": "The close price for the symbol in the given time period."
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
},
"v": {
- "type": "number",
+ "description": "The trading volume of the symbol in the given time period.",
"format": "double",
- "description": "The trading volume of the symbol in the given time period."
+ "type": "number"
},
"vw": {
- "type": "number",
+ "description": "The volume weighted average price.",
"format": "double",
- "description": "The volume weighted average price."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "n": {
- "type": "integer",
- "description": "The number of transactions in the aggregate window."
+ "type": "number"
}
- }
- }
+ },
+ "type": "object"
+ },
+ "type": "array"
}
- }
+ },
+ "type": "object"
}
]
- },
+ }
+ }
+ },
+ "description": "Stock Aggregates."
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Aggregates (Bars)",
+ "tags": [
+ "stocks:aggregates"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
+ }
+ }
+ },
+ "/v2/last/nbbo/{stocksTicker}": {
+ "get": {
+ "description": "Get the most recent NBBO (Quote) tick for a given stock.",
+ "operationId": "LastQuote",
+ "parameters": [
+ {
+ "description": "The ticker symbol of the stock/equity.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "stocksTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-go-id": "Ticker"
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
"example": {
- "ticker": "X:BTCUSD",
- "status": "OK",
- "queryCount": 2,
- "resultsCount": 2,
- "adjusted": true,
- "results": [
- {
- "v": 303067.6562332156,
- "vw": 9874.5529,
- "o": 9557.9,
- "c": 10094.75,
- "h": 10429.26,
- "l": 9490,
- "t": 1590984000000,
- "n": 1
+ "request_id": "b84e24636301f19f88e0dfbf9a45ed5c",
+ "results": {
+ "P": 127.98,
+ "S": 7,
+ "T": "AAPL",
+ "X": 19,
+ "p": 127.96,
+ "q": 83480742,
+ "s": 1,
+ "t": 1617827221349730300,
+ "x": 11,
+ "y": 1617827221349366000,
+ "z": 3
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
},
- {
- "v": 323339.6922892879,
- "vw": 9729.5701,
- "o": 10096.87,
- "c": 9492.62,
- "h": 10222.72,
- "l": 9135.68,
- "t": 1591070400000,
- "n": 1
+ "results": {
+ "properties": {
+ "P": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "S": {
+ "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.",
+ "type": "integer"
+ },
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "X": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "c": {
+ "description": "A list of condition codes.",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
+ "type": "integer"
+ },
+ "type": "array",
+ "x-polygon-go-type": {
+ "name": "[]*int32"
+ }
+ },
+ "f": {
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
+ },
+ "i": {
+ "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).",
+ "items": {
+ "description": "The indicator code.",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "p": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "q": {
+ "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).",
+ "format": "int64",
+ "type": "integer"
+ },
+ "s": {
+ "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "y": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
+ },
+ "z": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ",
+ "type": "integer"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "LastQuoteResult"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
}
- ],
- "request_id": "0cf72b6da685bcd386548ffe2895904a"
+ },
+ "type": "object"
}
}
- }
+ },
+ "description": "The last NBBO tick for this stock."
},
- "default": {
- "description": "Unexpected error"
+ "401": {
+ "description": "Unauthorized - Check our API Key and account status"
+ },
+ "404": {
+ "description": "The specified resource was not found"
}
},
+ "summary": "Last Quote",
+ "tags": [
+ "stocks:last:quote"
+ ],
+ "x-polygon-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
+ },
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
+ }
+ ],
"x-polygon-entitlement-data-type": {
- "name": "aggregates",
- "description": "Aggregate data"
+ "description": "NBBO data",
+ "name": "nbbo"
},
"x-polygon-entitlement-market-type": {
- "name": "crypto",
- "description": "Crypto data"
+ "description": "Stocks data",
+ "name": "stocks"
}
}
},
- "/v2/snapshot/locale/global/markets/crypto/tickers": {
+ "/v2/last/trade/{optionsTicker}": {
"get": {
- "summary": "All Tickers",
- "description": "Get the current minute, day, and previous day’s aggregate, as well as the last trade and quote for all traded cryptocurrency symbols.\n
\n
\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n",
- "tags": [
- "crypto:snapshot"
- ],
+ "description": "Get the most recent trade for a given options contract.",
+ "operationId": "LastTradeOptions",
"parameters": [
{
- "name": "tickers",
- "in": "query",
- "description": "A comma separated list of tickers to get snapshots for.",
+ "description": "The ticker symbol of the options contract.",
+ "example": "O:TSLA210903C00700000",
+ "in": "path",
+ "name": "optionsTicker",
+ "required": true,
"schema": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": "string"
}
}
],
"responses": {
"200": {
- "description": "Get current state for all tickers",
"content": {
"application/json": {
+ "example": {
+ "request_id": "f05562305bd26ced64b98ed68b3c5d96",
+ "results": {
+ "T": "O:TSLA210903C00700000",
+ "c": [
+ 227
+ ],
+ "f": 1617901342969796400,
+ "i": "",
+ "p": 115.55,
+ "q": 1325541950,
+ "r": 202,
+ "s": 25,
+ "t": 1617901342969834000,
+ "x": 312
+ },
+ "status": "OK"
+ },
"schema": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- }
- }
+ "properties": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
},
- {
- "type": "object",
+ "results": {
"properties": {
- "tickers": {
- "type": "array",
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "c": {
+ "description": "A list of condition codes.",
"items": {
- "type": "object",
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- }
- }
- },
- "lastTrade": {
- "allOf": [
- {
- "description": "The most recent trade for this ticker."
- },
- {
- "type": "object",
- "properties": {
- "c": {
- "type": "array",
- "description": "The trade conditions.",
- "items": {
- "type": "string"
- }
- },
- "i": {
- "type": "string",
- "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"
- },
- "p": {
- "type": "number",
- "format": "double",
- "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"
- },
- "s": {
- "type": "integer",
- "description": "The size (volume) of the trade."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "x": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- }
- }
- },
- {
- "properties": {
- "x": {
- "type": "integer",
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n"
- }
- }
- }
- ]
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- }
- }
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- }
- }
- },
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "todaysChange": {
- "type": "number",
- "format": "double",
- "description": "The value of the change the from previous day."
- },
- "todaysChangePerc": {
- "type": "number",
- "format": "double",
- "description": "The percentage change since the previous day."
- },
- "updated": {
- "type": "integer",
- "description": "The last updated timestamp."
- }
- }
+ "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.",
+ "type": "integer"
+ },
+ "type": "array",
+ "x-polygon-go-type": {
+ "name": "[]*int32"
}
+ },
+ "e": {
+ "description": "The trade correction indicator.",
+ "type": "integer"
+ },
+ "f": {
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
+ "format": "double",
+ "type": "number"
+ },
+ "q": {
+ "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).",
+ "format": "int64",
+ "type": "integer"
+ },
+ "r": {
+ "description": "The ID for the Trade Reporting Facility where the trade took place.",
+ "type": "integer"
+ },
+ "s": {
+ "description": "The size of a trade (also known as volume).",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "y": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
+ },
+ "z": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ",
+ "type": "integer"
}
- }
- }
- ]
- },
- "example": {
- "status": "OK",
- "tickers": [
- {
- "day": {
- "c": 0.296,
- "h": 0.59714,
- "l": 0.23706,
- "o": 0.28,
- "v": 4097699.5691991993,
- "vw": 0
- },
- "lastTrade": {
- "c": [
- 1
- ],
- "i": 413131,
- "p": 0.293,
- "s": 13.6191,
- "t": 1605292686010,
- "x": 17
- },
- "min": {
- "c": 0.296,
- "h": 0.296,
- "l": 0.294,
- "o": 0.296,
- "v": 123.4866,
- "vw": 0
- },
- "prevDay": {
- "c": 0.281,
- "h": 0.59714,
- "l": 0.23706,
- "o": 0.27,
- "v": 6070178.786154971,
- "vw": 0.4076
},
- "ticker": "X:FSNUSD",
- "todaysChange": 0.012,
- "todaysChangePerc": 4.270463,
- "updated": 1605330008999
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "LastTradeResult"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
}
- ]
+ },
+ "type": "object"
}
}
- }
+ },
+ "description": "The last trade for this options contract."
},
- "default": {
- "description": "Unexpected error"
+ "401": {
+ "description": "Unauthorized - Check our API Key and account status"
+ },
+ "404": {
+ "description": "The specified resource was not found"
}
},
- "x-polygon-entitlement-data-type": {
- "name": "aggregates",
- "description": "Aggregate data"
- },
- "x-polygon-entitlement-market-type": {
- "name": "crypto",
- "description": "Crypto data"
- },
+ "summary": "Last Trade",
+ "tags": [
+ "options:last:trade"
+ ],
"x-polygon-entitlement-allowed-timeframes": [
{
- "name": "realtime",
- "description": "Real Time Data"
+ "description": "Real Time Data",
+ "name": "realtime"
},
{
- "name": "delayed",
- "description": "15 minute delayed data"
+ "description": "15 minute delayed data",
+ "name": "delayed"
}
- ]
- }
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Trade data",
+ "name": "trades"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Options data",
+ "name": "options"
+ }
+ },
+ "x-polygon-ignore": true
},
- "/v2/snapshot/locale/global/markets/crypto/tickers/{ticker}": {
+ "/v2/last/trade/{stocksTicker}": {
"get": {
- "summary": "Ticker",
- "description": "Get the current minute, day, and previous day’s aggregate, as well as the last trade and quote for a single traded cryptocurrency symbol.\n
\n
\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
- "tags": [
- "crypto:snapshot"
- ],
+ "description": "Get the most recent trade for a given stock.",
+ "operationId": "LastTrade",
"parameters": [
{
- "name": "ticker",
+ "description": "The ticker symbol of the stock/equity.",
+ "example": "AAPL",
"in": "path",
- "description": "Ticker of the snapshot",
+ "name": "stocksTicker",
"required": true,
"schema": {
"type": "string"
},
- "example": "X:BTCUSD"
+ "x-polygon-go-id": "Ticker"
}
],
"responses": {
"200": {
- "description": "Get current state for a ticker",
"content": {
"application/json": {
+ "example": {
+ "request_id": "f05562305bd26ced64b98ed68b3c5d96",
+ "results": {
+ "T": "AAPL",
+ "c": [
+ 37
+ ],
+ "f": 1617901342969796400,
+ "i": "118749",
+ "p": 129.8473,
+ "q": 3135876,
+ "r": 202,
+ "s": 25,
+ "t": 1617901342969834000,
+ "x": 4,
+ "y": 1617901342968000000,
+ "z": 3
+ },
+ "status": "OK"
+ },
"schema": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
- }
- }
+ "properties": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
},
- {
- "type": "object",
+ "results": {
"properties": {
- "ticker": {
- "type": "object",
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- }
- }
- },
- "lastTrade": {
- "allOf": [
- {
- "description": "The most recent trade for this ticker."
- },
- {
- "type": "object",
- "properties": {
- "c": {
- "type": "array",
- "description": "The trade conditions.",
- "items": {
- "type": "string"
- }
- },
- "i": {
- "type": "string",
- "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"
- },
- "p": {
- "type": "number",
- "format": "double",
- "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"
- },
- "s": {
- "type": "integer",
- "description": "The size (volume) of the trade."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "x": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- }
- }
- },
- {
- "properties": {
- "x": {
- "type": "integer",
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n"
- }
- }
- }
- ]
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- }
- }
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- }
- }
- },
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "todaysChange": {
- "type": "number",
- "format": "double",
- "description": "The value of the change the from previous day."
- },
- "todaysChangePerc": {
- "type": "number",
- "format": "double",
- "description": "The percentage change since the previous day."
- },
- "updated": {
- "type": "integer",
- "description": "The last updated timestamp."
- }
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "c": {
+ "description": "A list of condition codes.",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
+ "type": "integer"
+ },
+ "type": "array",
+ "x-polygon-go-type": {
+ "name": "[]*int32"
}
+ },
+ "e": {
+ "description": "The trade correction indicator.",
+ "type": "integer"
+ },
+ "f": {
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
+ "format": "double",
+ "type": "number"
+ },
+ "q": {
+ "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).",
+ "format": "int64",
+ "type": "integer"
+ },
+ "r": {
+ "description": "The ID for the Trade Reporting Facility where the trade took place.",
+ "type": "integer"
+ },
+ "s": {
+ "description": "The size of a trade (also known as volume).",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "y": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
+ },
+ "z": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ",
+ "type": "integer"
}
- }
- }
- ]
- },
- "example": {
- "request_id": "ad92e92ce183112c593717f00dfebd2c",
- "status": "OK",
- "ticker": {
- "day": {
- "c": 16260.85,
- "h": 16428.4,
- "l": 15830.4,
- "o": 16418.07,
- "v": 105008.84231068,
- "vw": 0
- },
- "lastTrade": {
- "c": [
- 2
- ],
- "i": "464569520",
- "p": 16242.31,
- "s": 0.001933,
- "t": 1605294230780,
- "x": 4
- },
- "min": {
- "c": 16235.1,
- "h": 16264.29,
- "l": 16129.3,
- "o": 16257.51,
- "v": 19.30791925,
- "vw": 0
- },
- "prevDay": {
- "c": 16399.24,
- "h": 16418.07,
- "l": 16399.24,
- "o": 16418.07,
- "v": 0.99167108,
- "vw": 16402.6893
- },
- "ticker": "X:BTCUSD",
- "todaysChange": -156.93,
- "todaysChangePerc": -0.956935,
- "updated": 1605330008999
- }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "LastTradeResult"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
}
}
- }
+ },
+ "description": "The last trade for this stock."
},
- "default": {
- "description": "Unexpected error"
+ "401": {
+ "description": "Unauthorized - Check our API Key and account status"
+ },
+ "404": {
+ "description": "The specified resource was not found"
}
},
- "x-polygon-entitlement-data-type": {
- "name": "aggregates",
- "description": "Aggregate data"
- },
- "x-polygon-entitlement-market-type": {
- "name": "crypto",
- "description": "Crypto data"
- },
+ "summary": "Last Trade",
+ "tags": [
+ "stocks:last:trade"
+ ],
"x-polygon-entitlement-allowed-timeframes": [
{
- "name": "realtime",
- "description": "Real Time Data"
+ "description": "Real Time Data",
+ "name": "realtime"
},
{
- "name": "delayed",
- "description": "15 minute delayed data"
+ "description": "15 minute delayed data",
+ "name": "delayed"
}
- ]
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Trade data",
+ "name": "trades"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
+ }
}
},
- "/v2/snapshot/locale/global/markets/crypto/tickers/{ticker}/book": {
+ "/v2/reference/news": {
"get": {
- "summary": "Ticker Full Book (L2)",
- "description": "Get the current level 2 book of a single ticker. This is the combined book from all of the exchanges.\n
\n
\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
- "tags": [
- "crypto:snapshot"
- ],
+ "description": "Get the most recent news articles relating to a stock ticker symbol, including a summary of the article and a link to the original source.",
+ "operationId": "ListNews",
"parameters": [
{
+ "description": "Return results that contain this ticker.",
+ "in": "query",
"name": "ticker",
- "in": "path",
- "description": "The cryptocurrency ticker.",
- "required": true,
"schema": {
+ "description": "The exchange symbol that this item is traded under.",
"type": "string"
},
- "example": "X:BTCUSD"
+ "x-polygon-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "Return results published on, before, or after this date.",
+ "in": "query",
+ "name": "published_utc",
+ "schema": {
+ "oneOf": [
+ {
+ "format": "date-time",
+ "type": "string"
+ },
+ {
+ "format": "date",
+ "type": "string"
+ }
+ ]
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "Search by ticker.",
+ "in": "query",
+ "name": "ticker.gte",
+ "schema": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by ticker.",
+ "in": "query",
+ "name": "ticker.gt",
+ "schema": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by ticker.",
+ "in": "query",
+ "name": "ticker.lte",
+ "schema": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by ticker.",
+ "in": "query",
+ "name": "ticker.lt",
+ "schema": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by published_utc.",
+ "in": "query",
+ "name": "published_utc.gte",
+ "schema": {
+ "oneOf": [
+ {
+ "format": "date-time",
+ "type": "string"
+ },
+ {
+ "format": "date",
+ "type": "string"
+ }
+ ]
+ }
+ },
+ {
+ "description": "Search by published_utc.",
+ "in": "query",
+ "name": "published_utc.gt",
+ "schema": {
+ "oneOf": [
+ {
+ "format": "date-time",
+ "type": "string"
+ },
+ {
+ "format": "date",
+ "type": "string"
+ }
+ ]
+ }
+ },
+ {
+ "description": "Search by published_utc.",
+ "in": "query",
+ "name": "published_utc.lte",
+ "schema": {
+ "oneOf": [
+ {
+ "format": "date-time",
+ "type": "string"
+ },
+ {
+ "format": "date",
+ "type": "string"
+ }
+ ]
+ }
+ },
+ {
+ "description": "Search by published_utc.",
+ "in": "query",
+ "name": "published_utc.lt",
+ "schema": {
+ "oneOf": [
+ {
+ "format": "date-time",
+ "type": "string"
+ },
+ {
+ "format": "date",
+ "type": "string"
+ }
+ ]
+ }
+ },
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 1000.",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "example": 10,
+ "maximum": 1000,
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "published_utc",
+ "enum": [
+ "published_utc"
+ ],
+ "example": "published_utc",
+ "type": "string"
+ }
}
],
"responses": {
"200": {
- "description": "Get current level 2 book for a ticker",
"content": {
"application/json": {
- "schema": {
- "allOf": [
+ "example": {
+ "count": 1,
+ "next_url": "https://api.polygon.io:443/v2/reference/news?cursor=eyJsaW1pdCI6MSwic29ydCI6InB1Ymxpc2hlZF91dGMiLCJvcmRlciI6ImFzY2VuZGluZyIsInRpY2tlciI6e30sInB1Ymxpc2hlZF91dGMiOnsiZ3RlIjoiMjAyMS0wNC0yNiJ9LCJzZWFyY2hfYWZ0ZXIiOlsxNjE5NDA0Mzk3MDAwLG51bGxdfQ",
+ "request_id": "831afdb0b8078549fed053476984947a",
+ "results": [
{
- "type": "string",
- "description": "The status of this request's response."
+ "amp_url": "https://amp.benzinga.com/amp/content/20784086",
+ "article_url": "https://www.benzinga.com/markets/cryptocurrency/21/04/20784086/cathie-wood-adds-more-coinbase-skillz-trims-square",
+ "author": "Rachit Vats",
+ "description": "\u003cp\u003eCathie Wood-led Ark Investment Management on Friday snapped up another 221,167 shares of the cryptocurrency exchange \u003cstrong\u003eCoinbase Global Inc \u003c/strong\u003e(NASDAQ: \u003ca class=\"ticker\" href=\"https://www.benzinga.com/stock/coin#NASDAQ\"\u003eCOIN\u003c/a\u003e) worth about $64.49 million on the stock\u0026rsquo;s Friday\u0026rsquo;s dip and also its fourth-straight loss.\u003c/p\u003e\n\u003cp\u003eThe investment firm\u0026rsquo;s \u003cstrong\u003eArk Innovation ETF\u003c/strong\u003e (NYSE: \u003ca class=\"ticker\" href=\"https://www.benzinga.com/stock/arkk#NYSE\"\u003eARKK\u003c/a\u003e) bought the shares of the company that closed 0.63% lower at $291.60 on Friday, giving the cryptocurrency exchange a market cap of $58.09 billion. Coinbase\u0026rsquo;s market cap has dropped from $85.8 billion on its blockbuster listing earlier this month.\u003c/p\u003e\n\u003cp\u003eThe New York-based company also added another 3,873 shares of the mobile gaming company \u003cstrong\u003eSkillz Inc\u003c/strong\u003e (NYSE: \u003ca class=\"ticker\" href=\"https://www.benzinga.com/stock/sklz#NYSE\"\u003eSKLZ\u003c/a\u003e), \u003ca href=\"http://www.benzinga.com/markets/cryptocurrency/21/04/20762794/cathie-woods-ark-loads-up-another-1-2-million-shares-in-skillz-also-adds-coinbase-draftkin\"\u003ejust a day after\u003c/a\u003e snapping 1.2 million shares of the stock.\u003c/p\u003e\n\u003cp\u003eARKK bought the shares of the company which closed ...\u003c/p\u003e\u003cp\u003e\u003ca href=https://www.benzinga.com/markets/cryptocurrency/21/04/20784086/cathie-wood-adds-more-coinbase-skillz-trims-square alt=Cathie Wood Adds More Coinbase, Skillz, Trims Square\u003eFull story available on Benzinga.com\u003c/a\u003e\u003c/p\u003e",
+ "id": "nJsSJJdwViHZcw5367rZi7_qkXLfMzacXBfpv-vD9UA",
+ "image_url": "https://cdn2.benzinga.com/files/imagecache/og_image_social_share_1200x630/images/story/2012/andre-francois-mckenzie-auhr4gcqcce-unsplash.jpg?width=720",
+ "keywords": [
+ "Sector ETFs",
+ "Penny Stocks",
+ "Cryptocurrency",
+ "Small Cap",
+ "Markets",
+ "Trading Ideas",
+ "ETFs"
+ ],
+ "published_utc": "2021-04-26T02:33:17Z",
+ "publisher": {
+ "favicon_url": "https://s3.polygon.io/public/public/assets/news/favicons/benzinga.ico",
+ "homepage_url": "https://www.benzinga.com/",
+ "logo_url": "https://s3.polygon.io/public/public/assets/news/logos/benzinga.svg",
+ "name": "Benzinga"
+ },
+ "tickers": [
+ "DOCU",
+ "DDD",
+ "NIU",
+ "ARKF",
+ "NVDA",
+ "SKLZ",
+ "PCAR",
+ "MASS",
+ "PSTI",
+ "SPFR",
+ "TREE",
+ "PHR",
+ "IRDM",
+ "BEAM",
+ "ARKW",
+ "ARKK",
+ "ARKG",
+ "PSTG",
+ "SQ",
+ "IONS",
+ "SYRS"
+ ],
+ "title": "Cathie Wood Adds More Coinbase, Skillz, Trims Square"
+ }
+ ],
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
},
- {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "bids": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "p": {
- "type": "number",
- "format": "double",
- "description": "The price of this book level."
- },
- "x": {
- "type": "object",
- "description": "A map of the exchange ID to number of shares at this price level.\n
\n
\n**Example:**\n
\n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n
\n
\nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n"
- }
- }
- }
- },
- "asks": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "p": {
- "type": "number",
- "format": "double",
- "description": "The price of this book level."
- },
- "x": {
- "type": "object",
- "description": "A map of the exchange ID to number of shares at this price level.\n
\n
\n**Example:**\n
\n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n
\n
\nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n"
- }
- }
- }
- },
- "bidCount": {
- "type": "number",
- "format": "double",
- "description": "The combined total number of bids in the book."
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "items": {
+ "properties": {
+ "amp_url": {
+ "description": "The mobile friendly Accelerated Mobile Page (AMP) URL.",
+ "type": "string"
+ },
+ "article_url": {
+ "description": "A link to the news article.",
+ "type": "string"
+ },
+ "author": {
+ "description": "The article's author.",
+ "type": "string"
+ },
+ "description": {
+ "description": "A description of the article.",
+ "type": "string"
+ },
+ "id": {
+ "description": "Unique identifier for the article.",
+ "type": "string"
+ },
+ "image_url": {
+ "description": "The article's image URL.",
+ "type": "string"
+ },
+ "keywords": {
+ "description": "The keywords associated with the article (which will vary depending on\nthe publishing source).",
+ "items": {
+ "type": "string"
},
- "askCount": {
- "type": "number",
- "format": "double",
- "description": "The combined total number of asks in the book."
+ "type": "array"
+ },
+ "published_utc": {
+ "description": "The date the article was published on.",
+ "format": "date-time",
+ "type": "string"
+ },
+ "publisher": {
+ "properties": {
+ "favicon_url": {
+ "description": "The publisher's homepage favicon URL.",
+ "type": "string"
+ },
+ "homepage_url": {
+ "description": "The publisher's homepage URL.",
+ "type": "string"
+ },
+ "logo_url": {
+ "description": "The publisher's logo URL.",
+ "type": "string"
+ },
+ "name": {
+ "description": "The publisher's name.",
+ "type": "string"
+ }
},
- "spread": {
- "type": "number",
- "format": "double",
- "description": "The difference between the best bid and the best ask price accross exchanges."
+ "required": [
+ "name",
+ "logo_url",
+ "homepage_url"
+ ],
+ "type": "object"
+ },
+ "tickers": {
+ "description": "The ticker symbols associated with the article.",
+ "items": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
},
- "updated": {
- "type": "integer",
- "description": "The last updated timestamp."
- }
+ "type": "array"
+ },
+ "title": {
+ "description": "The title of the news article.",
+ "type": "string"
}
- }
- }
- }
- ]
- },
- "example": {
- "status": "OK",
- "data": {
- "ticker": "X:BTCUSD",
- "bids": [
- {
- "p": 16303.17,
- "x": {
- "1": 2
- }
- },
- {
- "p": 16302.94,
- "x": {
- "1": 0.02859424,
- "6": 0.023455
- }
- }
- ],
- "asks": [
- {
- "p": 11454,
- "x": {
- "2": 1
+ },
+ "required": [
+ "id",
+ "publisher",
+ "title",
+ "author",
+ "published_utc",
+ "article_url",
+ "tickers"
+ ],
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "NewsArticleMetadata",
+ "path": "github.com/polygon-io/go-lib-models/v2/globals"
}
},
- {
- "p": 11455,
- "x": {
- "2": 1
- }
- }
- ],
- "bidCount": 694.951789670001,
- "askCount": 593.1412981600005,
- "spread": -4849.17,
- "updated": 1605295074162
- }
+ "type": "array"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
}
}
- }
+ },
+ "description": "An array of news articles."
},
- "default": {
- "description": "Unexpected error"
+ "401": {
+ "description": "Unauthorized - Check our API Key and account status"
+ },
+ "404": {
+ "description": "The specified resource was not found"
}
},
+ "summary": "Ticker News",
+ "tags": [
+ "reference:news"
+ ],
"x-polygon-entitlement-data-type": {
- "name": "aggregates",
- "description": "Aggregate data"
+ "description": "Reference data",
+ "name": "reference"
},
- "x-polygon-entitlement-market-type": {
- "name": "crypto",
- "description": "Crypto data"
- },
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "name": "realtime",
- "description": "Real Time Data"
- },
- {
- "name": "delayed",
- "description": "15 minute delayed data"
+ "x-polygon-paginate": {
+ "sort": {
+ "default": "published_utc",
+ "enum": [
+ "published_utc"
+ ],
+ "limit": {
+ "default": 10,
+ "maximum": 1000,
+ "minimum": 1
+ }
}
- ]
+ }
}
},
- "/v2/snapshot/locale/global/markets/crypto/{direction}": {
+ "/v2/snapshot/locale/global/markets/crypto/tickers": {
"get": {
- "summary": "Gainers/Losers",
- "description": "Get the current top 20 gainers or losers of the day in cryptocurrency markets.\n
\n
\nTop gainers are those tickers whose price has increased by the highest percentage since the previous day's close.\nTop losers are those tickers whose price has decreased by the highest percentage since the previous day's close.\n
\n
\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
- "tags": [
- "crypto:snapshot"
- ],
+ "description": "Get the current minute, day, and previous day’s aggregate, as well as the last trade and quote for all traded cryptocurrency symbols.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n",
"parameters": [
{
- "name": "direction",
- "in": "path",
- "description": "The direction of the snapshot results to return.\n",
- "required": true,
+ "description": "A comma separated list of tickers to get snapshots for.",
+ "in": "query",
+ "name": "tickers",
"schema": {
- "type": "string",
- "enum": [
- "gainers",
- "losers"
- ]
- },
- "example": "gainers"
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
}
],
"responses": {
"200": {
- "description": "Get the current gainers / losers of the day",
"content": {
"application/json": {
+ "example": {
+ "status": "OK",
+ "tickers": [
+ {
+ "day": {
+ "c": 0.296,
+ "h": 0.59714,
+ "l": 0.23706,
+ "o": 0.28,
+ "v": 4097699.5691991993,
+ "vw": 0
+ },
+ "lastTrade": {
+ "c": [
+ 1
+ ],
+ "i": 413131,
+ "p": 0.293,
+ "s": 13.6191,
+ "t": 1605292686010,
+ "x": 17
+ },
+ "min": {
+ "c": 0.296,
+ "h": 0.296,
+ "l": 0.294,
+ "o": 0.296,
+ "v": 123.4866,
+ "vw": 0
+ },
+ "prevDay": {
+ "c": 0.281,
+ "h": 0.59714,
+ "l": 0.23706,
+ "o": 0.27,
+ "v": 6070178.786154971,
+ "vw": 0.4076
+ },
+ "ticker": "X:FSNUSD",
+ "todaysChange": 0.012,
+ "todaysChangePerc": 4.270463,
+ "updated": 1605330008999
+ }
+ ]
+ },
"schema": {
"allOf": [
{
- "type": "string",
- "description": "The status of this request's response."
+ "properties": {
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
},
{
- "type": "object",
"properties": {
"tickers": {
- "type": "array",
"items": {
- "type": "object",
"properties": {
"day": {
"description": "The most recent daily bar for this ticker.",
- "type": "object",
"properties": {
- "o": {
- "type": "number",
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
"format": "double",
- "description": "The open price for the symbol in the given time period."
+ "type": "number"
},
"h": {
- "type": "number",
+ "description": "The highest price for the symbol in the given time period.",
"format": "double",
- "description": "The highest price for the symbol in the given time period."
+ "type": "number"
},
"l": {
- "type": "number",
+ "description": "The lowest price for the symbol in the given time period.",
"format": "double",
- "description": "The lowest price for the symbol in the given time period."
+ "type": "number"
},
- "c": {
- "type": "number",
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
"format": "double",
- "description": "The close price for the symbol in the given time period."
+ "type": "number"
},
"v": {
- "type": "number",
+ "description": "The trading volume of the symbol in the given time period.",
"format": "double",
- "description": "The trading volume of the symbol in the given time period."
+ "type": "number"
},
"vw": {
- "type": "number",
+ "description": "The volume weighted average price.",
"format": "double",
- "description": "The volume weighted average price."
+ "type": "number"
}
- }
+ },
+ "type": "object"
},
"lastTrade": {
"allOf": [
@@ -8795,43 +10060,43 @@
"description": "The most recent trade for this ticker."
},
{
- "type": "object",
"properties": {
"c": {
- "type": "array",
"description": "The trade conditions.",
"items": {
"type": "string"
- }
+ },
+ "type": "array"
},
"i": {
- "type": "string",
- "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"
+ "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": {
- "type": "number",
+ "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",
- "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"
+ "type": "number"
},
"s": {
- "type": "integer",
- "description": "The size (volume) of the trade."
+ "description": "The size (volume) of the trade.",
+ "type": "integer"
},
"t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
},
"x": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
}
- }
+ },
+ "type": "object"
},
{
"properties": {
"x": {
- "type": "integer",
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n"
+ "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
+ "type": "integer"
}
}
}
@@ -8839,4754 +10104,9929 @@
},
"min": {
"description": "The most recent minute bar for this ticker.",
- "type": "object",
"properties": {
- "o": {
- "type": "number",
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
"format": "double",
- "description": "The open price for the symbol in the given time period."
+ "type": "number"
},
"h": {
- "type": "number",
+ "description": "The highest price for the symbol in the given time period.",
"format": "double",
- "description": "The highest price for the symbol in the given time period."
+ "type": "number"
},
"l": {
- "type": "number",
+ "description": "The lowest price for the symbol in the given time period.",
"format": "double",
- "description": "The lowest price for the symbol in the given time period."
+ "type": "number"
},
- "c": {
- "type": "number",
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
"format": "double",
- "description": "The close price for the symbol in the given time period."
+ "type": "number"
},
"v": {
- "type": "number",
+ "description": "The trading volume of the symbol in the given time period.",
"format": "double",
- "description": "The trading volume of the symbol in the given time period."
+ "type": "number"
},
"vw": {
- "type": "number",
+ "description": "The volume weighted average price.",
"format": "double",
- "description": "The volume weighted average price."
+ "type": "number"
}
- }
+ },
+ "type": "object"
},
"prevDay": {
"description": "The previous day's bar for this ticker.",
- "type": "object",
"properties": {
- "o": {
- "type": "number",
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
"format": "double",
- "description": "The open price for the symbol in the given time period."
+ "type": "number"
},
"h": {
- "type": "number",
+ "description": "The highest price for the symbol in the given time period.",
"format": "double",
- "description": "The highest price for the symbol in the given time period."
+ "type": "number"
},
"l": {
- "type": "number",
+ "description": "The lowest price for the symbol in the given time period.",
"format": "double",
- "description": "The lowest price for the symbol in the given time period."
+ "type": "number"
},
- "c": {
- "type": "number",
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
"format": "double",
- "description": "The close price for the symbol in the given time period."
+ "type": "number"
},
"v": {
- "type": "number",
+ "description": "The trading volume of the symbol in the given time period.",
"format": "double",
- "description": "The trading volume of the symbol in the given time period."
+ "type": "number"
},
"vw": {
- "type": "number",
+ "description": "The volume weighted average price.",
"format": "double",
- "description": "The volume weighted average price."
+ "type": "number"
}
- }
+ },
+ "type": "object"
},
"ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
},
"todaysChange": {
- "type": "number",
+ "description": "The value of the change the from previous day.",
"format": "double",
- "description": "The value of the change the from previous day."
+ "type": "number"
},
"todaysChangePerc": {
- "type": "number",
- "format": "double",
- "description": "The percentage change since the previous day."
- },
- "updated": {
- "type": "integer",
- "description": "The last updated timestamp."
- }
- }
- }
- }
- }
- }
- ]
- },
- "example": {
- "status": "OK",
- "tickers": [
- {
- "day": {
- "c": 0.0374,
- "h": 0.062377,
- "l": 0.01162,
- "o": 0.044834,
- "v": 27313165.159427017,
- "vw": 0
- },
- "lastTrade": {
- "c": [
- 2
- ],
- "i": "517478762",
- "p": 0.0374,
- "s": 499,
- "t": 1604409649544,
- "x": 2
- },
- "min": {
- "c": 0.062377,
- "h": 0.062377,
- "l": 0.062377,
- "o": 0.062377,
- "v": 35420,
- "vw": 0
- },
- "prevDay": {
- "c": 0.01162,
- "h": 0.044834,
- "l": 0.01162,
- "o": 0.044834,
- "v": 53616273.36827199,
- "vw": 0.0296
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
},
- "ticker": "X:DRNUSD",
- "todaysChange": 0.02578,
- "todaysChangePerc": 221.858864,
- "updated": 1605330008999
+ "type": "object"
}
]
}
}
- }
+ },
+ "description": "Get current state for all tickers"
},
"default": {
"description": "Unexpected error"
}
},
- "x-polygon-entitlement-data-type": {
- "name": "aggregates",
- "description": "Aggregate data"
- },
- "x-polygon-entitlement-market-type": {
- "name": "crypto",
- "description": "Crypto data"
- },
+ "summary": "All Tickers",
+ "tags": [
+ "crypto:snapshot"
+ ],
"x-polygon-entitlement-allowed-timeframes": [
{
- "name": "realtime",
- "description": "Real Time Data"
+ "description": "Real Time Data",
+ "name": "realtime"
},
{
- "name": "delayed",
- "description": "15 minute delayed data"
- }
- ]
- }
- }
- },
- "components": {
- "schemas": {
- "TickerBase": {
- "type": "object",
- "properties": {
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- }
- }
- },
- "StatusBase": {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- }
- }
- },
- "StatusCountBase": {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- },
- "count": {
- "type": "integer",
- "description": "The total number of results for this request."
- }
- }
- },
- "RequestIdBase": {
- "type": "object",
- "properties": {
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
+ "description": "15 minute delayed data",
+ "name": "delayed"
}
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
}
- },
- "StandardBase": {
- "allOf": [
+ }
+ },
+ "/v2/snapshot/locale/global/markets/crypto/tickers/{ticker}": {
+ "get": {
+ "description": "Get the current minute, day, and previous day’s aggregate, as well as the last trade and quote for a single traded cryptocurrency symbol.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
+ "parameters": [
{
- "type": "object",
- "properties": {
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
- }
+ "description": "Ticker of the snapshot",
+ "example": "X:BTCUSD",
+ "in": "path",
+ "name": "ticker",
+ "required": true,
+ "schema": {
+ "type": "string"
}
- },
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- },
- "count": {
- "type": "integer",
- "description": "The total number of results for this request."
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "request_id": "ad92e92ce183112c593717f00dfebd2c",
+ "status": "OK",
+ "ticker": {
+ "day": {
+ "c": 16260.85,
+ "h": 16428.4,
+ "l": 15830.4,
+ "o": 16418.07,
+ "v": 105008.84231068,
+ "vw": 0
+ },
+ "lastTrade": {
+ "c": [
+ 2
+ ],
+ "i": "464569520",
+ "p": 16242.31,
+ "s": 0.001933,
+ "t": 1605294230780,
+ "x": 4
+ },
+ "min": {
+ "c": 16235.1,
+ "h": 16264.29,
+ "l": 16129.3,
+ "o": 16257.51,
+ "v": 19.30791925,
+ "vw": 0
+ },
+ "prevDay": {
+ "c": 16399.24,
+ "h": 16418.07,
+ "l": 16399.24,
+ "o": 16418.07,
+ "v": 0.99167108,
+ "vw": 16402.6893
+ },
+ "ticker": "X:BTCUSD",
+ "todaysChange": -156.93,
+ "todaysChangePerc": -0.956935,
+ "updated": 1605330008999
+ }
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "ticker": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "lastTrade": {
+ "allOf": [
+ {
+ "description": "The most recent trade for this ticker."
+ },
+ {
+ "properties": {
+ "c": {
+ "description": "The trade conditions.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size (volume) of the trade.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
+ "type": "integer"
+ }
+ }
+ }
+ ]
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change the from previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
}
- }
- }
- ]
- },
- "PaginationHooksBase": {
- "type": "object",
- "properties": {
- "next_url": {
- "type": "string",
- "description": "If present, this value can be used to fetch the next page of data."
- }
- }
- },
- "V1LastBase": {
- "type": "object",
- "properties": {
- "symbol": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- },
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
- }
- }
- },
- "V2LastBase": {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- },
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
- }
- }
- },
- "V2TicksBase": {
- "type": "object",
- "properties": {
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "results_count": {
- "type": "integer",
- "description": "The total number of results for this request."
- },
- "db_latency": {
- "type": "integer",
- "description": "Latency in milliseconds for the query results from the database."
+ },
+ "description": "Get current state for a ticker"
},
- "success": {
- "type": "boolean",
- "description": "Whether or not this query was executed successfully."
+ "default": {
+ "description": "Unexpected error"
}
- }
- },
- "V2AggsBase": {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- },
- "adjusted": {
- "type": "boolean",
- "description": "Whether or not this response was adjusted for splits."
- },
- "queryCount": {
- "type": "integer",
- "description": "The number of aggregates (minute or day) used to generate the response."
- },
- "resultsCount": {
- "type": "integer",
- "description": "The total number of results for this request."
+ },
+ "summary": "Ticker",
+ "tags": [
+ "crypto:snapshot"
+ ],
+ "x-polygon-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
},
- "request_id": {
- "type": "string",
- "description": "A request id assigned by the server."
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
}
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
}
- },
- "News": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "symbols": {
- "type": "array",
- "description": "A list of ticker symbols relating to the article.",
- "items": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- }
- },
- "title": {
- "type": "string",
- "description": "The title of the news article."
- },
- "url": {
- "type": "string",
- "description": "A direct link to the news article from its source publication."
- },
- "source": {
- "type": "string",
- "description": "The publication source of the article."
- },
- "summary": {
- "type": "string",
- "description": "A summary of the news article."
- },
- "image": {
- "type": "string",
- "description": "A URL of the image for the news article, if found."
- },
- "timestamp": {
- "type": "string",
- "format": "date-time",
- "description": "The timestamp of the news article."
- },
- "keywords": {
- "type": "array",
- "description": "A list of common keywords related to the news article.",
- "items": {
- "type": "string",
- "description": "Common keywords of the news article."
- }
+ }
+ },
+ "/v2/snapshot/locale/global/markets/crypto/tickers/{ticker}/book": {
+ "get": {
+ "description": "Get the current level 2 book of a single ticker. This is the combined book from all of the exchanges.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
+ "parameters": [
+ {
+ "description": "The cryptocurrency ticker.",
+ "example": "X:BTCUSD",
+ "in": "path",
+ "name": "ticker",
+ "required": true,
+ "schema": {
+ "type": "string"
}
}
- }
- },
- "Financial": {
- "type": "object",
- "required": [
- "symbol",
- "reportDate",
- "reportDateStr"
],
- "properties": {
- "symbol": {
- "type": "string",
- "example": "AAPL",
- "description": "Stock Symbol"
- },
- "reportDate": {
- "type": "string",
- "format": "date-time",
- "example": "2017-12-31T00:00:00.000Z",
- "description": "Report Date"
- },
- "reportDateStr": {
- "type": "string",
- "example": "2017-12-31",
- "description": "Report date as non date format"
- },
- "grossProfit": {
- "type": "integer",
- "example": 33912000000
- },
- "costOfRevenue": {
- "type": "integer",
- "example": 54381000000
- },
- "operatingRevenue": {
- "type": "integer",
- "example": 88293000000
- },
- "totalRevenue": {
- "type": "integer",
- "example": 88293000000
- },
- "operatingIncome": {
- "type": "integer",
- "example": 26274000000
- },
- "netIncome": {
- "type": "integer",
- "example": 20065000000
- },
- "researchAndDevelopment": {
- "type": "integer",
- "example": 3407000000
- },
- "operatingExpense": {
- "type": "integer",
- "example": 7638000000
- },
- "currentAssets": {
- "type": "integer",
- "example": 143810000000
- },
- "totalAssets": {
- "type": "integer",
- "example": 406794000000
- },
- "totalLiabilities": {
- "type": "integer",
- "example": 266595000000
- },
- "currentCash": {
- "type": "integer",
- "example": 27491000000
- },
- "currentDebt": {
- "type": "integer",
- "example": 18478000000
- },
- "totalCash": {
- "type": "integer",
- "example": 77153000000
- },
- "totalDebt": {
- "type": "integer",
- "example": 122400000000
- },
- "shareholderEquity": {
- "type": "integer",
- "example": 140199000000
- },
- "cashChange": {
- "type": "integer",
- "example": 7202000000
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "data": {
+ "askCount": 593.1412981600005,
+ "asks": [
+ {
+ "p": 11454,
+ "x": {
+ "2": 1
+ }
+ },
+ {
+ "p": 11455,
+ "x": {
+ "2": 1
+ }
+ }
+ ],
+ "bidCount": 694.951789670001,
+ "bids": [
+ {
+ "p": 16303.17,
+ "x": {
+ "1": 2
+ }
+ },
+ {
+ "p": 16302.94,
+ "x": {
+ "1": 0.02859424,
+ "6": 0.023455
+ }
+ }
+ ],
+ "spread": -4849.17,
+ "ticker": "X:BTCUSD",
+ "updated": 1605295074162
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "allOf": [
+ {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ {
+ "properties": {
+ "data": {
+ "properties": {
+ "askCount": {
+ "description": "The combined total number of asks in the book.",
+ "format": "double",
+ "type": "number"
+ },
+ "asks": {
+ "items": {
+ "properties": {
+ "p": {
+ "description": "The price of this book level.",
+ "format": "double",
+ "type": "number"
+ },
+ "x": {
+ "description": "A map of the exchange ID to number of shares at this price level.\n\u003cbr /\u003e\n\u003cbr /\u003e\n**Example:**\n\u003cbr /\u003e\n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n\u003cbr /\u003e\n\u003cbr /\u003e\nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n",
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "bidCount": {
+ "description": "The combined total number of bids in the book.",
+ "format": "double",
+ "type": "number"
+ },
+ "bids": {
+ "items": {
+ "properties": {
+ "p": {
+ "description": "The price of this book level.",
+ "format": "double",
+ "type": "number"
+ },
+ "x": {
+ "description": "A map of the exchange ID to number of shares at this price level.\n\u003cbr /\u003e\n\u003cbr /\u003e\n**Example:**\n\u003cbr /\u003e\n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n\u003cbr /\u003e\n\u003cbr /\u003e\nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n",
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "spread": {
+ "description": "The difference between the best bid and the best ask price accross exchanges.",
+ "format": "double",
+ "type": "number"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ }
+ },
+ "description": "Get current level 2 book for a ticker"
},
- "cashFlow": {
- "type": "integer",
- "example": 28293000000
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Ticker Full Book (L2)",
+ "tags": [
+ "crypto:snapshot"
+ ],
+ "x-polygon-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
},
- "operatingGainsLosses": {
- "type": "number",
- "example": null
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
}
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
}
- },
- "Exchange": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "number",
- "description": "The ID of the exchange."
- },
- "type": {
- "type": "string",
- "description": "The type of exchange.\n- TRF = Trade Reporting Facility\n- exchange = Reporting exchange on the tape\n"
- },
- "market": {
- "type": "string",
- "description": "The market data type that this exchange contains."
- },
- "mic": {
- "type": "string",
- "description": "The Market Identification Code or MIC as defined in ISO 10383 (https://en.wikipedia.org/wiki/Market_Identifier_Code)."
- },
- "name": {
- "type": "string",
- "description": "The name of the exchange."
- },
- "tape": {
- "type": "string",
- "description": "The tape id of the exchange."
- },
- "code": {
- "type": "string",
- "description": "A unique identifier for the exchange internal to Polygon.io. This is not an industry code or ISO standard."
+ }
+ },
+ "/v2/snapshot/locale/global/markets/crypto/{direction}": {
+ "get": {
+ "description": "Get the current top 20 gainers or losers of the day in cryptocurrency markets.\n\u003cbr /\u003e\n\u003cbr /\u003e\nTop gainers are those tickers whose price has increased by the highest percentage since the previous day's close.\nTop losers are those tickers whose price has decreased by the highest percentage since the previous day's close.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
+ "parameters": [
+ {
+ "description": "The direction of the snapshot results to return.\n",
+ "example": "gainers",
+ "in": "path",
+ "name": "direction",
+ "required": true,
+ "schema": {
+ "enum": [
+ "gainers",
+ "losers"
+ ],
+ "type": "string"
}
}
- }
- },
- "ConditionTypeMap": {
- "type": "object",
- "properties": {
- "condition": {
- "type": "string",
- "description": "Polygon.io's mapping for condition codes. For more information, see our Trade Conditions Glossary.\n"
- }
- }
- },
- "MarketStatus": {
- "type": "object",
- "properties": {
- "market": {
- "type": "string",
- "description": "The status of the market as a whole."
- },
- "earlyHours": {
- "type": "boolean",
- "description": "Whether or not the market is in pre-market hours."
- },
- "afterHours": {
- "type": "boolean",
- "description": "Whether or not the market is in post-market hours."
- },
- "serverTime": {
- "type": "string",
- "format": "date-time",
- "description": "The current time of the server."
- },
- "exchanges": {
- "type": "object",
- "properties": {
- "nyse": {
- "type": "string",
- "description": "The status of the NYSE market."
- },
- "nasdaq": {
- "type": "string",
- "description": "The status of the Nasdaq market."
- },
- "otc": {
- "type": "string",
- "description": "The status of the OTC market."
- }
- }
- },
- "currencies": {
- "type": "object",
- "properties": {
- "fx": {
- "type": "string",
- "description": "The status of the forex market."
- },
- "crypto": {
- "type": "string",
- "description": "The status of the crypto market."
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "status": "OK",
+ "tickers": [
+ {
+ "day": {
+ "c": 0.0374,
+ "h": 0.062377,
+ "l": 0.01162,
+ "o": 0.044834,
+ "v": 27313165.159427017,
+ "vw": 0
+ },
+ "lastTrade": {
+ "c": [
+ 2
+ ],
+ "i": "517478762",
+ "p": 0.0374,
+ "s": 499,
+ "t": 1604409649544,
+ "x": 2
+ },
+ "min": {
+ "c": 0.062377,
+ "h": 0.062377,
+ "l": 0.062377,
+ "o": 0.062377,
+ "v": 35420,
+ "vw": 0
+ },
+ "prevDay": {
+ "c": 0.01162,
+ "h": 0.044834,
+ "l": 0.01162,
+ "o": 0.044834,
+ "v": 53616273.36827199,
+ "vw": 0.0296
+ },
+ "ticker": "X:DRNUSD",
+ "todaysChange": 0.02578,
+ "todaysChangePerc": 221.858864,
+ "updated": 1605330008999
+ }
+ ]
+ },
+ "schema": {
+ "allOf": [
+ {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ {
+ "properties": {
+ "tickers": {
+ "items": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "lastTrade": {
+ "allOf": [
+ {
+ "description": "The most recent trade for this ticker."
+ },
+ {
+ "properties": {
+ "c": {
+ "description": "The trade conditions.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size (volume) of the trade.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n",
+ "type": "integer"
+ }
+ }
+ }
+ ]
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change the from previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
}
- }
- }
- }
- },
- "MarketHoliday": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "exchange": {
- "type": "string",
- "description": "Which market the record is for."
- },
- "name": {
- "type": "string",
- "description": "The name of the holiday."
- },
- "status": {
- "type": "string",
- "description": "The status of the market on the holiday."
- },
- "date": {
- "type": "string",
- "format": "date",
- "description": "The date of the holiday."
- },
- "open": {
- "type": "string",
- "format": "date-time",
- "description": "The market open time on the holiday (if it's not closed)."
},
- "close": {
- "type": "string",
- "format": "date-time",
- "description": "The market close time on the holiday (if it's not closed)."
- }
- }
- }
- },
- "RatingSection": {
- "type": "object",
- "required": [
- "month1",
- "month2",
- "month3",
- "current"
- ],
- "properties": {
- "current": {
- "type": "number",
- "example": 0,
- "description": "Analyst Rating at current month"
- },
- "month1": {
- "type": "number",
- "example": 1,
- "description": "Analyst Ratings at 1 month in the future"
- },
- "month2": {
- "type": "number",
- "example": 3,
- "description": "Analyst Ratings at 2 month in the future"
- },
- "month3": {
- "type": "number",
- "example": 4,
- "description": "Analyst Ratings at 3 month in the future"
- },
- "month4": {
- "type": "number",
- "example": 3,
- "description": "Analyst Ratings at 4 month in the future"
+ "description": "Get the current gainers / losers of the day"
},
- "month5": {
- "type": "number",
- "example": 2,
- "description": "Analyst Ratings at 5 month in the future"
+ "default": {
+ "description": "Unexpected error"
}
- }
- },
- "TradeDetailsMapItem": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "description": "Actual type of the trade detail item"
+ },
+ "summary": "Gainers/Losers",
+ "tags": [
+ "crypto:snapshot"
+ ],
+ "x-polygon-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
},
- "name": {
- "type": "string",
- "description": "Name of the trade detail item"
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
}
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
}
- },
- "Company": {
- "type": "object",
- "properties": {
- "logo": {
- "type": "string",
- "description": "The URL of the entity's logo."
- },
- "exchange": {
- "type": "string",
- "description": "The symbol's primary exchange."
- },
- "exchangeSymbol": {
- "type": "string",
- "description": "The exchange code (id) of the symbol's primary exchange."
- },
- "type": {
- "type": "string",
- "description": "The type or class of the security. (Full List of Ticker Types)"
- },
- "name": {
- "type": "string",
- "description": "The name of the company/entity."
- },
- "symbol": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "listdate": {
- "type": "string",
- "format": "date",
- "description": "The date that the symbol was listed on the exchange."
- },
- "cik": {
- "type": "string",
- "description": "The official CIK guid used for SEC database/filings."
- },
- "bloomberg": {
- "type": "string",
- "description": "The Bloomberg guid for the symbol."
- },
- "figi": {
- "type": "string",
- "description": "The OpenFigi project guid for the symbol. (https://openfigi.com/)"
- },
- "lei": {
- "type": "string",
- "description": "The Legal Entity Identifier (LEI) guid for the symbol. (https://en.wikipedia.org/wiki/Legal_Entity_Identifier)"
- },
- "sic": {
- "type": "integer",
- "description": "Standard Industrial Classification (SIC) id for the symbol. (https://en.wikipedia.org/wiki/Legal_Entity_Identifier)"
- },
- "country": {
- "type": "string",
- "description": "The country in which the company is registered."
- },
- "industry": {
- "type": "string",
- "description": "The industry in which the company operates."
- },
- "sector": {
- "type": "string",
- "description": "The sector of the indsutry in which the symbol operates."
- },
- "marketcap": {
- "type": "integer",
- "description": "The current market cap for the company."
- },
- "employees": {
- "type": "integer",
- "description": "The approximate number of employees for the company."
- },
- "phone": {
- "type": "string",
- "description": "The phone number for the company. This is usually a corporate contact number."
- },
- "ceo": {
- "type": "string",
- "description": "The name of the company's current CEO."
- },
- "url": {
- "type": "string",
- "description": "The URL of the company's website"
- },
- "description": {
- "type": "string",
- "description": "A description of the company and what they do/offer."
- },
- "hq_address": {
- "type": "string",
- "description": "The street address for the company's headquarters."
- },
- "hq_state": {
- "type": "string",
- "description": "The state in which the company's headquarters is located."
- },
- "hq_country": {
- "type": "string",
- "description": "The country in which the company's headquarters is located."
- },
- "similar": {
- "type": "array",
- "description": "A list of ticker symbols for similar companies.",
- "items": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- }
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string",
- "description": "A list of words related to the company."
+ }
+ },
+ "/v2/snapshot/locale/global/markets/forex/tickers": {
+ "get": {
+ "description": "Get the current minute, day, and previous day’s aggregate, as well as the last trade and quote for all traded forex symbols.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n",
+ "parameters": [
+ {
+ "description": "A comma separated list of tickers to get snapshots for.",
+ "in": "query",
+ "name": "tickers",
+ "schema": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
}
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "status": "OK",
+ "tickers": [
+ {
+ "day": {
+ "c": 0.11778221,
+ "h": 0.11812263,
+ "l": 0.11766631,
+ "o": 0.11797149,
+ "v": 77794
+ },
+ "lastQuote": {
+ "a": 0.11780678,
+ "b": 0.11777952,
+ "t": 1605280919000,
+ "x": 48
+ },
+ "min": {
+ "c": 0.117769,
+ "h": 0.11779633,
+ "l": 0.11773698,
+ "o": 0.11778,
+ "v": 202
+ },
+ "prevDay": {
+ "c": 0.11797258,
+ "h": 0.11797258,
+ "l": 0.11797149,
+ "o": 0.11797149,
+ "v": 2,
+ "vw": 0
+ },
+ "ticker": "C:HKDCHF",
+ "todaysChange": -0.00019306,
+ "todaysChangePerc": -0.1636482,
+ "updated": 1605280919000
+ }
+ ]
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "tickers": {
+ "items": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "lastQuote": {
+ "description": "The most recent quote for this ticker.",
+ "properties": {
+ "a": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "b": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID on which this quote happened.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change the from previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ }
+ },
+ "description": "Get current state for all tickers"
},
- "updated": {
- "type": "string",
- "format": "date",
- "description": "The last time this company record was updated."
- },
- "active": {
- "type": "boolean",
- "description": "Indicates if the security is actively listed. If false, this means the company is no longer listed and cannot be traded."
+ "default": {
+ "description": "Unexpected error"
}
- }
- },
- "Adjusted": {
- "type": "boolean",
- "description": "Whether or not this response was adjusted for splits."
- },
- "AskExchangeId": {
- "allOf": [
+ },
+ "summary": "All Tickers",
+ "tags": [
+ "fx:snapshot"
+ ],
+ "x-polygon-entitlement-allowed-timeframes": [
{
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
+ "description": "Real Time Data",
+ "name": "realtime"
},
{
- "description": "Ask Exchange Id"
+ "description": "15 minute delayed data",
+ "name": "delayed"
}
- ]
- },
- "AskPrice": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
- },
- "AskSize": {
- "type": "integer",
- "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price."
- },
- "BidExchangeId": {
- "allOf": [
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Forex data",
+ "name": "fx"
+ }
+ }
+ },
+ "/v2/snapshot/locale/global/markets/forex/tickers/{ticker}": {
+ "get": {
+ "description": "Get the current minute, day, and previous day’s aggregate, as well as the last trade and quote for a single traded currency symbol.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
+ "parameters": [
{
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
+ "description": "The forex ticker.",
+ "example": "C:EURUSD",
+ "in": "path",
+ "name": "ticker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "request_id": "ad76e76ce183002c5937a7f02dfebde4",
+ "status": "OK",
+ "ticker": {
+ "day": {
+ "c": 1.18403,
+ "h": 1.1906,
+ "l": 1.18001,
+ "o": 1.18725,
+ "v": 83578
+ },
+ "lastQuote": {
+ "a": 1.18403,
+ "b": 1.18398,
+ "i": 0,
+ "t": 1606163759000,
+ "x": 48
+ },
+ "min": {
+ "c": 1.18396,
+ "h": 1.18423,
+ "l": 1.1838,
+ "o": 1.18404,
+ "v": 41
+ },
+ "prevDay": {
+ "c": 1.18724,
+ "h": 1.18727,
+ "l": 1.18725,
+ "o": 1.18725,
+ "v": 5,
+ "vw": 0
+ },
+ "ticker": "C:EURUSD",
+ "todaysChange": -0.00316,
+ "todaysChangePerc": -0.27458312,
+ "updated": 1606163759000
+ }
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "ticker": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "lastQuote": {
+ "description": "The most recent quote for this ticker.",
+ "properties": {
+ "a": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "b": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID on which this quote happened.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change the from previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ }
+ },
+ "description": "Get current state for a ticker"
},
- {
- "description": "Bid Exchange Id"
+ "default": {
+ "description": "Unexpected error"
}
- ]
- },
- "BidPrice": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
- },
- "BidSize": {
- "type": "integer",
- "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price."
- },
- "Close": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "Conditions": {
- "type": "array",
- "description": "A list of condition codes.\n",
- "items": {
- "type": "integer",
- "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"
- }
- },
- "Count": {
- "type": "integer",
- "description": "The total number of results for this request."
- },
- "Date": {
- "oneOf": [
+ },
+ "summary": "Ticker",
+ "tags": [
+ "fx:snapshot"
+ ],
+ "x-polygon-entitlement-allowed-timeframes": [
{
- "type": "string",
- "format": "date-time"
+ "description": "Real Time Data",
+ "name": "realtime"
},
{
- "type": "string",
- "format": "date"
+ "description": "15 minute delayed data",
+ "name": "delayed"
}
- ]
- },
- "ExchangeId": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- },
- "ForexExchangeId": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- },
- "High": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "Indicators": {
- "type": "array",
- "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n",
- "items": {
- "type": "integer",
- "description": "The indicator code.\n"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Forex data",
+ "name": "fx"
}
- },
- "Low": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "Map": {
- "type": "object",
- "description": "A mapping of the keys returned in the results to their descriptive name and data types.",
- "properties": {
- "key": {
- "type": "object",
- "description": "A dynamic key from the results set",
- "properties": {
- "name": {
- "type": "string",
- "description": "The descriptive name of this results key"
- },
- "type": {
- "type": "string",
- "description": "The data type of this results key",
- "enum": [
- "string",
- "int",
- "int64",
- "float64"
- ]
- }
+ }
+ },
+ "/v2/snapshot/locale/global/markets/forex/{direction}": {
+ "get": {
+ "description": "Get the current top 20 gainers or losers of the day in forex markets.\n\u003cbr /\u003e\n\u003cbr /\u003e\nTop gainers are those tickers whose price has increased by the highest percentage since the previous day's close.\nTop losers are those tickers whose price has decreased by the highest percentage since the previous day's close.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
+ "parameters": [
+ {
+ "description": "The direction of the snapshot results to return.\n",
+ "example": "gainers",
+ "in": "path",
+ "name": "direction",
+ "required": true,
+ "schema": {
+ "enum": [
+ "gainers",
+ "losers"
+ ],
+ "type": "string"
}
}
- }
- },
- "MsLatency": {
- "type": "integer",
- "description": "The milliseconds of latency for the query results."
- },
- "NumberOfItems": {
- "type": "integer",
- "description": "The number of transactions in the aggregate window."
- },
- "OTC": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
- },
- "Open": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "Price": {
- "type": "number",
- "format": "double",
- "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"
- },
- "QueryCount": {
- "type": "integer",
- "description": "The number of aggregates (minute or day) used to generate the response."
- },
- "RequestID": {
- "type": "string",
- "description": "A request id assigned by the server."
- },
- "Size": {
- "type": "number",
- "format": "double",
- "description": "The size of a trade (also known as volume).\n"
- },
- "SequenceNumber": {
- "type": "integer",
- "format": "int64",
- "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n"
- },
- "Status": {
- "type": "string",
- "description": "The status of this request's response."
- },
- "StockSymbol": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "SymbolPair": {
- "type": "string",
- "description": "The symbol pair that was evaluated from the request."
- },
- "Timestamp": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "TimestampSIP": {
- "type": "integer",
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it."
- },
- "TimestampExchange": {
- "type": "integer",
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange."
- },
- "TimestampTRF": {
- "type": "integer",
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message."
- },
- "Tape": {
- "type": "integer",
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n"
- },
- "TodaysChange": {
- "type": "number",
- "format": "double",
- "description": "The value of the change the from previous day."
- },
- "TodaysChangePerc": {
- "type": "number",
- "format": "double",
- "description": "The percentage change since the previous day."
- },
- "TradeExchange": {
- "type": "integer",
- "description": "The exchange that this trade happened on."
- },
- "TradeId": {
- "type": "string",
- "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"
- },
- "Updated": {
- "type": "integer",
- "description": "The last updated timestamp."
- },
- "Volume": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "VolumeWeight": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- },
- "TickerResults": {
- "type": "object",
- "properties": {
- "results": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "status": "OK",
+ "tickers": [
+ {
+ "day": {
+ "c": 0.886156,
+ "h": 0.887111,
+ "l": 0.8825327,
+ "o": 0.8844732,
+ "v": 1041
+ },
+ "lastQuote": {
+ "a": 0.8879606,
+ "b": 0.886156,
+ "t": 1605283204000,
+ "x": 48
+ },
+ "min": {
+ "c": 0.886156,
+ "h": 0.886156,
+ "l": 0.886156,
+ "o": 0.886156,
+ "v": 1
+ },
+ "prevDay": {
+ "c": 0.8428527,
+ "h": 0.889773,
+ "l": 0.8428527,
+ "o": 0.8848539,
+ "v": 1078,
+ "vw": 0
+ },
+ "ticker": "C:PLNILS",
+ "todaysChange": 0.0433033,
+ "todaysChangePerc": 5.13770674,
+ "updated": 1605330008999
+ }
+ ]
},
- "n": {
- "type": "integer",
- "description": "The number of transactions in the aggregate window."
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "tickers": {
+ "items": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "lastQuote": {
+ "description": "The most recent quote for this ticker.",
+ "properties": {
+ "a": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "b": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID on which this quote happened.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change the from previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
}
}
- }
+ },
+ "description": "Get the current gainers / losers of the day"
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Gainers/Losers",
+ "tags": [
+ "fx:snapshot"
+ ],
+ "x-polygon-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
+ },
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
}
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Forex data",
+ "name": "fx"
}
- },
- "StocksGroupedResults": {
- "type": "object",
- "properties": {
- "results": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "T": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "n": {
- "type": "integer",
- "description": "The number of transactions in the aggregate window."
- },
- "otc": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
- }
- }
+ }
+ },
+ "/v2/snapshot/locale/us/markets/stocks/tickers": {
+ "get": {
+ "description": "Get the most up-to-date market data for all traded stock symbols.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 3:30am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n",
+ "parameters": [
+ {
+ "description": "A comma separated list of tickers to get snapshots for.",
+ "in": "query",
+ "name": "tickers",
+ "schema": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ {
+ "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n",
+ "in": "query",
+ "name": "include_otc",
+ "schema": {
+ "type": "boolean"
}
}
- }
- },
- "StocksTickerResultsOTC": {
- "type": "object",
- "properties": {
- "results": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "n": {
- "type": "integer",
- "description": "The number of transactions in the aggregate window."
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "count": 1,
+ "status": "OK",
+ "tickers": [
+ {
+ "day": {
+ "c": 20.506,
+ "h": 20.64,
+ "l": 20.506,
+ "o": 20.64,
+ "v": 37216,
+ "vw": 20.616
+ },
+ "lastQuote": {
+ "P": 20.6,
+ "S": 22,
+ "p": 20.5,
+ "s": 13,
+ "t": 1605192959994246100
+ },
+ "lastTrade": {
+ "c": [
+ 14,
+ 41
+ ],
+ "i": "71675577320245",
+ "p": 20.506,
+ "s": 2416,
+ "t": 1605192894630916600,
+ "x": 4
+ },
+ "min": {
+ "av": 37216,
+ "c": 20.506,
+ "h": 20.506,
+ "l": 20.506,
+ "o": 20.506,
+ "v": 5000,
+ "vw": 20.5105
+ },
+ "prevDay": {
+ "c": 20.63,
+ "h": 21,
+ "l": 20.5,
+ "o": 20.79,
+ "v": 292738,
+ "vw": 20.6939
+ },
+ "ticker": "BCAT",
+ "todaysChange": -0.124,
+ "todaysChangePerc": -0.601,
+ "updated": 1605192894630916600
+ }
+ ]
},
- "otc": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "tickers": {
+ "items": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "lastQuote": {
+ "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
+ "properties": {
+ "P": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "S": {
+ "description": "The ask size in lots.",
+ "type": "integer"
+ },
+ "p": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The bid size in lots.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "lastTrade": {
+ "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.",
+ "properties": {
+ "c": {
+ "description": "The trade conditions.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size (volume) of the trade.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "av": {
+ "description": "The accumulated volume.",
+ "type": "integer"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change the from previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
}
}
- }
+ },
+ "description": "Get current state for all tickers"
+ },
+ "default": {
+ "description": "Unexpected error"
}
- }
- },
- "ForexGroupedResults": {
- "type": "object",
- "properties": {
- "results": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "T": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "n": {
- "type": "integer",
- "description": "The number of transactions in the aggregate window."
- }
- }
- }
+ },
+ "summary": "All Tickers",
+ "tags": [
+ "stocks:snapshot"
+ ],
+ "x-polygon-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
+ },
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
}
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
}
- },
- "ForexTickerResults": {
- "type": "object",
- "properties": {
- "results": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "n": {
- "type": "integer",
- "description": "The number of transactions in the aggregate window."
- }
- }
+ }
+ },
+ "/v2/snapshot/locale/us/markets/stocks/tickers/{stocksTicker}": {
+ "get": {
+ "description": "Get the most up-to-date market data for a single traded stock ticker.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 3:30am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n",
+ "parameters": [
+ {
+ "description": "The ticker symbol of the stock/equity.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "stocksTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
}
}
- }
- },
- "CryptoGroupedResults": {
- "type": "object",
- "properties": {
- "results": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "T": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "request_id": "657e430f1ae768891f018e08e03598d8",
+ "status": "OK",
+ "ticker": {
+ "day": {
+ "c": 120.4229,
+ "h": 120.53,
+ "l": 118.81,
+ "o": 119.62,
+ "v": 28727868,
+ "vw": 119.725
+ },
+ "lastQuote": {
+ "P": 120.47,
+ "S": 4,
+ "p": 120.46,
+ "s": 8,
+ "t": 1605195918507251700
+ },
+ "lastTrade": {
+ "c": [
+ 14,
+ 41
+ ],
+ "i": "4046",
+ "p": 120.47,
+ "s": 236,
+ "t": 1605195918306274000,
+ "x": 10
+ },
+ "min": {
+ "av": 28724441,
+ "c": 120.4201,
+ "h": 120.468,
+ "l": 120.37,
+ "o": 120.435,
+ "v": 270796,
+ "vw": 120.4129
+ },
+ "prevDay": {
+ "c": 119.49,
+ "h": 119.63,
+ "l": 116.44,
+ "o": 117.19,
+ "v": 110597265,
+ "vw": 118.4998
+ },
+ "ticker": "AAPL",
+ "todaysChange": 0.98,
+ "todaysChangePerc": 0.82,
+ "updated": 1605195918306274000
+ }
},
- "n": {
- "type": "integer",
- "description": "The number of transactions in the aggregate window."
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "ticker": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "lastQuote": {
+ "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
+ "properties": {
+ "P": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "S": {
+ "description": "The ask size in lots.",
+ "type": "integer"
+ },
+ "p": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The bid size in lots.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "lastTrade": {
+ "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.",
+ "properties": {
+ "c": {
+ "description": "The trade conditions.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size (volume) of the trade.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "av": {
+ "description": "The accumulated volume.",
+ "type": "integer"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change the from previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ }
+ ]
}
}
- }
- }
- }
- },
- "SnapshotLastTrade": {
- "type": "object",
- "properties": {
- "c": {
- "type": "array",
- "description": "The trade conditions.",
- "items": {
- "type": "string"
- }
- },
- "i": {
- "type": "string",
- "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"
- },
- "p": {
- "type": "number",
- "format": "double",
- "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"
- },
- "s": {
- "type": "integer",
- "description": "The size (volume) of the trade."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "x": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- }
- }
- },
- "SnapshotOHLCV": {
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
+ },
+ "description": "Get current state for a ticker"
},
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
+ "default": {
+ "description": "Unexpected error"
}
- }
- },
- "SnapshotOHLCVVW": {
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
+ },
+ "summary": "Ticker",
+ "tags": [
+ "stocks:snapshot"
+ ],
+ "x-polygon-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
},
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
}
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
}
- },
- "SnapshotOHLCVVWOtc": {
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
+ }
+ },
+ "/v2/snapshot/locale/us/markets/stocks/{direction}": {
+ "get": {
+ "description": "Get the most up-to-date market data for the current top 20 gainers or losers of the day in the stocks/equities markets.\n\u003cbr /\u003e\n\u003cbr /\u003e\nTop gainers are those tickers whose price has increased by the highest percentage since the previous day's close.\nTop losers are those tickers whose price has decreased by the highest percentage since the previous day's close.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 3:30am EST and gets populated as data is received from the exchanges.\n",
+ "parameters": [
+ {
+ "description": "The direction of the snapshot results to return.\n",
+ "example": "gainers",
+ "in": "path",
+ "name": "direction",
+ "required": true,
+ "schema": {
+ "enum": [
+ "gainers",
+ "losers"
+ ],
+ "type": "string"
+ }
},
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
+ {
+ "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n",
+ "in": "query",
+ "name": "include_otc",
+ "schema": {
+ "type": "boolean"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "status": "OK",
+ "tickers": [
+ {
+ "day": {
+ "c": 14.2284,
+ "h": 15.09,
+ "l": 14.2,
+ "o": 14.33,
+ "v": 133963,
+ "vw": 14.5311
+ },
+ "lastQuote": {
+ "P": 14.44,
+ "S": 11,
+ "p": 14.2,
+ "s": 25,
+ "t": 1605195929997325600
+ },
+ "lastTrade": {
+ "c": [
+ 63
+ ],
+ "i": "79372124707124",
+ "p": 14.2284,
+ "s": 536,
+ "t": 1605195848258266000,
+ "x": 4
+ },
+ "min": {
+ "av": 133963,
+ "c": 14.2284,
+ "h": 14.325,
+ "l": 14.2,
+ "o": 14.28,
+ "v": 6108,
+ "vw": 14.2426
+ },
+ "prevDay": {
+ "c": 0.73,
+ "h": 0.799,
+ "l": 0.73,
+ "o": 0.75,
+ "v": 1568097,
+ "vw": 0.7721
+ },
+ "ticker": "PDS",
+ "todaysChange": 13.498,
+ "todaysChangePerc": 1849.096,
+ "updated": 1605195848258266000
+ }
+ ]
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "tickers": {
+ "items": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "lastQuote": {
+ "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
+ "properties": {
+ "P": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "S": {
+ "description": "The ask size in lots.",
+ "type": "integer"
+ },
+ "p": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The bid size in lots.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "lastTrade": {
+ "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.",
+ "properties": {
+ "c": {
+ "description": "The trade conditions.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size (volume) of the trade.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "av": {
+ "description": "The accumulated volume.",
+ "type": "integer"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change the from previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ }
+ },
+ "description": "Get the current tickers of the day"
},
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Gainers/Losers",
+ "tags": [
+ "stocks:snapshot"
+ ],
+ "x-polygon-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
},
- "otc": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
}
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
}
- },
- "StocksSnapshotLastQuote": {
- "type": "object",
- "properties": {
- "p": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
+ }
+ },
+ "/v2/ticks/stocks/nbbo/{ticker}/{date}": {
+ "get": {
+ "description": "Get NBBO quotes for a given ticker symbol on a specified date.\n",
+ "parameters": [
+ {
+ "description": "The ticker symbol we want quotes for.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "ticker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
},
- "s": {
- "type": "integer",
- "description": "The bid size in lots."
+ {
+ "description": "The date/day of the quotes to retrieve in the format YYYY-MM-DD.",
+ "example": "2020-10-14",
+ "in": "path",
+ "name": "date",
+ "required": true,
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
},
- "P": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
+ {
+ "description": "The timestamp offset, used for pagination. This is the offset at which to start the results. Using the `timestamp` of the last result as the offset will give you the next page of results.\n",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "integer"
+ }
},
- "S": {
- "type": "integer",
- "description": "The ask size in lots."
+ {
+ "description": "The maximum timestamp allowed in the results.\n",
+ "in": "query",
+ "name": "timestampLimit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Reverse the order of the results.\n",
+ "example": true,
+ "in": "query",
+ "name": "reverse",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "Limit the size of the response, max 50000 and default 5000.",
+ "example": 10,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "db_latency": 43,
+ "map": {
+ "P": {
+ "name": "ask_price",
+ "type": "float64"
+ },
+ "S": {
+ "name": "ask_size",
+ "type": "int"
+ },
+ "X": {
+ "name": "ask_exchange",
+ "type": "int"
+ },
+ "c": {
+ "name": "conditions",
+ "type": "int"
+ },
+ "f": {
+ "name": "trf_timestamp",
+ "type": "int64"
+ },
+ "i": {
+ "name": "indicators",
+ "type": "int"
+ },
+ "p": {
+ "name": "bid_price",
+ "type": "float64"
+ },
+ "q": {
+ "name": "sequence_number",
+ "type": "int"
+ },
+ "s": {
+ "name": "bid_size",
+ "type": "int"
+ },
+ "t": {
+ "name": "sip_timestamp",
+ "type": "int64"
+ },
+ "x": {
+ "name": "bid_exchange",
+ "type": "int"
+ },
+ "y": {
+ "name": "participant_timestamp",
+ "type": "int64"
+ },
+ "z": {
+ "name": "tape",
+ "type": "int"
+ }
+ },
+ "results": [
+ {
+ "P": 0,
+ "S": 0,
+ "X": 0,
+ "c": [
+ 1
+ ],
+ "p": 102.7,
+ "q": 2060,
+ "s": 60,
+ "t": 1517562000065700400,
+ "x": 11,
+ "y": 1517562000065321200,
+ "z": 3
+ },
+ {
+ "P": 0,
+ "S": 0,
+ "X": 0,
+ "c": [
+ 1
+ ],
+ "p": 170,
+ "q": 2061,
+ "s": 2,
+ "t": 1517562000065791500,
+ "x": 11,
+ "y": 1517562000065408300,
+ "z": 3
+ }
+ ],
+ "results_count": 2,
+ "success": true,
+ "ticker": "AAPL"
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "db_latency": {
+ "description": "Latency in milliseconds for the query results from the database.",
+ "type": "integer"
+ },
+ "results_count": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "success": {
+ "description": "Whether or not this query was executed successfully.",
+ "type": "boolean"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "results": {
+ "items": {
+ "allOf": [
+ {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "f": {
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
+ },
+ "q": {
+ "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n",
+ "format": "int64",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "y": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "P": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "S": {
+ "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.",
+ "type": "integer"
+ },
+ "X": {
+ "allOf": [
+ {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ {
+ "description": "Ask Exchange Id"
+ }
+ ]
+ },
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n",
+ "items": {
+ "description": "The indicator code.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "p": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.",
+ "type": "integer"
+ },
+ "x": {
+ "allOf": [
+ {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ {
+ "description": "Bid Exchange Id"
+ }
+ ]
+ },
+ "z": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ }
+ },
+ "description": "A list of quotes."
},
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Quotes (NBBO)",
+ "tags": [
+ "stocks:quotes"
+ ],
+ "x-polygon-deprecation": {
+ "date": 1654056060000,
+ "replaces": {
+ "name": "Quotes (NBBO) v3",
+ "path": "get_v3_quotes__stockticker"
}
+ },
+ "x-polygon-entitlement-data-type": {
+ "description": "NBBO data",
+ "name": "nbbo"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
}
- },
- "StocksSnapshotMinute": {
- "type": "object",
- "properties": {
- "av": {
- "type": "integer",
- "description": "The accumulated volume."
+ }
+ },
+ "/v2/ticks/stocks/trades/{ticker}/{date}": {
+ "get": {
+ "description": "Get trades for a given ticker symbol on a specified date.\n",
+ "parameters": [
+ {
+ "description": "The ticker symbol we want trades for.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "ticker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
},
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
+ {
+ "description": "The date/day of the trades to retrieve in the format YYYY-MM-DD.",
+ "example": "2020-10-14",
+ "in": "path",
+ "name": "date",
+ "required": true,
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
},
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
+ {
+ "description": "The timestamp offset, used for pagination. This is the offset at which to start the results. Using the `timestamp` of the last result as the offset will give you the next page of results.\n",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "integer"
+ }
},
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
+ {
+ "description": "The maximum timestamp allowed in the results.\n",
+ "in": "query",
+ "name": "timestampLimit",
+ "schema": {
+ "type": "integer"
+ }
},
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
+ {
+ "description": "Reverse the order of the results.\n",
+ "example": true,
+ "in": "query",
+ "name": "reverse",
+ "schema": {
+ "type": "boolean"
+ }
},
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
+ {
+ "description": "Limit the size of the response, max 50000 and default 5000.",
+ "example": 10,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "db_latency": 11,
+ "map": {
+ "I": {
+ "name": "orig_id",
+ "type": "string"
+ },
+ "c": {
+ "name": "conditions",
+ "type": "int"
+ },
+ "e": {
+ "name": "correction",
+ "type": "int"
+ },
+ "f": {
+ "name": "trf_timestamp",
+ "type": "int64"
+ },
+ "i": {
+ "name": "id",
+ "type": "string"
+ },
+ "p": {
+ "name": "price",
+ "type": "float64"
+ },
+ "q": {
+ "name": "sequence_number",
+ "type": "int64"
+ },
+ "r": {
+ "name": "trf_id",
+ "type": "int"
+ },
+ "s": {
+ "name": "size",
+ "type": "int"
+ },
+ "t": {
+ "name": "sip_timestamp",
+ "type": "int64"
+ },
+ "x": {
+ "name": "exchange",
+ "type": "int"
+ },
+ "y": {
+ "name": "participant_timestamp",
+ "type": "int64"
+ },
+ "z": {
+ "name": "tape",
+ "type": "int"
+ }
+ },
+ "results": [
+ {
+ "c": [
+ 12,
+ 41
+ ],
+ "i": "1",
+ "p": 171.55,
+ "q": 1063,
+ "s": 100,
+ "t": 1517562000016036600,
+ "x": 11,
+ "y": 1517562000015577000,
+ "z": 3
+ },
+ {
+ "c": [
+ 12,
+ 41
+ ],
+ "i": "2",
+ "p": 171.55,
+ "q": 1064,
+ "s": 100,
+ "t": 1517562000016038100,
+ "x": 11,
+ "y": 1517562000015577600,
+ "z": 3
+ }
+ ],
+ "results_count": 2,
+ "success": true,
+ "ticker": "AAPL"
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "db_latency": {
+ "description": "Latency in milliseconds for the query results from the database.",
+ "type": "integer"
+ },
+ "results_count": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "success": {
+ "description": "Whether or not this query was executed successfully.",
+ "type": "boolean"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "results": {
+ "items": {
+ "allOf": [
+ {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "f": {
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
+ },
+ "q": {
+ "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n",
+ "format": "int64",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "y": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "e": {
+ "description": "The trade correction indicator.\n",
+ "type": "integer"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "r": {
+ "description": "The ID for the Trade Reporting Facility where the trade took place.\n",
+ "type": "integer"
+ },
+ "s": {
+ "description": "The size of a trade (also known as volume).\n",
+ "format": "double",
+ "type": "number"
+ },
+ "x": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "z": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ }
+ },
+ "description": "A list of trades."
},
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Trades",
+ "tags": [
+ "stocks:trades"
+ ],
+ "x-polygon-deprecation": {
+ "date": 1654056060000,
+ "replaces": {
+ "name": "Trades v3",
+ "path": "get_v3_trades__stockticker"
}
+ },
+ "x-polygon-entitlement-data-type": {
+ "description": "Trade data",
+ "name": "trades"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
}
- },
- "StocksSnapshotMinuteOTC": {
- "type": "object",
- "properties": {
- "av": {
- "type": "integer",
- "description": "The accumulated volume."
+ }
+ },
+ "/v3/quotes/{fxTicker}": {
+ "get": {
+ "description": "Get BBO quotes for a ticker symbol in a given time range.",
+ "operationId": "QuotesFx",
+ "parameters": [
+ {
+ "description": "The ticker symbol to get quotes for.",
+ "example": "C:EUR-USD",
+ "in": "path",
+ "name": "fxTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
},
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
},
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
+ {
+ "description": "Search by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
},
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
+ {
+ "description": "Search by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
},
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
+ {
+ "description": "Search by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
},
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
+ {
+ "description": "Search by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
},
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
},
- "otc": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 50000.",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "example": 10,
+ "maximum": 50000,
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "timestamp",
+ "enum": [
+ "timestamp"
+ ],
+ "example": "timestamp",
+ "type": "string"
+ }
}
- }
- },
- "StocksSnapshotTickers": {
- "type": "object",
- "properties": {
- "tickers": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v3/quotes/C:EUR-USD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": [
+ {
+ "ask_exchange": 48,
+ "ask_price": 1.18565,
+ "bid_exchange": 48,
+ "bid_price": 1.18558,
+ "participant_timestamp": 1625097600000000000
},
- "otc": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
+ {
+ "ask_exchange": 48,
+ "ask_price": 1.18565,
+ "bid_exchange": 48,
+ "bid_price": 1.18559,
+ "participant_timestamp": 1625097600000000000
}
- }
+ ],
+ "status": "OK"
},
- "lastQuote": {
- "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
- "type": "object",
+ "schema": {
"properties": {
- "p": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
- },
- "s": {
- "type": "integer",
- "description": "The bid size in lots."
- },
- "P": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
- },
- "S": {
- "type": "integer",
- "description": "The ask size in lots."
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
},
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- }
- }
- },
- "lastTrade": {
- "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.",
- "type": "object",
- "properties": {
- "c": {
- "type": "array",
- "description": "The trade conditions.",
+ "results": {
"items": {
- "type": "string"
- }
- },
- "i": {
- "type": "string",
- "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"
- },
- "p": {
- "type": "number",
- "format": "double",
- "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"
- },
- "s": {
- "type": "integer",
- "description": "The size (volume) of the trade."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "x": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- }
- }
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "type": "object",
- "properties": {
- "av": {
- "type": "integer",
- "description": "The accumulated volume."
- },
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- },
- "otc": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
- }
- }
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
+ "properties": {
+ "ask_exchange": {
+ "description": "The ask exchange ID",
+ "type": "integer"
+ },
+ "ask_price": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "bid_exchange": {
+ "description": "The bid exchange ID",
+ "type": "integer"
+ },
+ "bid_price": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "participant_timestamp": {
+ "description": "The nanosecond Exchange Unix Timestamp. This is the timestamp of when the quote was generated at the exchange.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
},
- "otc": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
}
- }
- },
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "todaysChange": {
- "type": "number",
- "format": "double",
- "description": "The value of the change the from previous day."
- },
- "todaysChangePerc": {
- "type": "number",
- "format": "double",
- "description": "The percentage change since the previous day."
- },
- "updated": {
- "type": "integer",
- "description": "The last updated timestamp."
+ },
+ "type": "object"
}
}
- }
+ },
+ "description": "A list of quotes."
+ }
+ },
+ "summary": "Quotes (BBO)",
+ "tags": [
+ "fx:quotes"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "NBBO data",
+ "name": "nbbo"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Forex data",
+ "name": "fx"
+ },
+ "x-polygon-paginate": {
+ "limit": {
+ "max": 50000
+ },
+ "order": {
+ "default": "desc"
+ },
+ "sort": {
+ "default": "timestamp",
+ "enum": [
+ "timestamp"
+ ]
+ }
+ },
+ "x-polygon-replaces": {
+ "date": 1654056060000,
+ "replaces": {
+ "name": "Historic Forex Ticks",
+ "path": "get_v1_historic_forex__from___to___date"
}
}
},
- "StocksSnapshotTicker": {
- "type": "object",
- "properties": {
- "ticker": {
- "type": "object",
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- },
- "otc": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
- }
- }
- },
- "lastQuote": {
- "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
- "type": "object",
- "properties": {
- "p": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
- },
- "s": {
- "type": "integer",
- "description": "The bid size in lots."
- },
- "P": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
- },
- "S": {
- "type": "integer",
- "description": "The ask size in lots."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- }
- }
- },
- "lastTrade": {
- "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.",
- "type": "object",
- "properties": {
- "c": {
- "type": "array",
- "description": "The trade conditions.",
- "items": {
- "type": "string"
+ "x-polygon-ignore": true
+ },
+ "/v3/quotes/{optionsTicker}": {
+ "get": {
+ "description": "Get quotes for an options ticker symbol in a given time range.",
+ "operationId": "QuotesOptions",
+ "parameters": [
+ {
+ "description": "The ticker symbol to get quotes for.",
+ "example": "O:SPY241220P00720000",
+ "in": "path",
+ "name": "optionsTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-go-id": "Ticker"
+ },
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "Search by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 50000.",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "example": 10,
+ "maximum": 50000,
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "timestamp",
+ "enum": [
+ "timestamp"
+ ],
+ "example": "timestamp",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v3/quotes/O:SPY241220P00720000?cursor=YXA9NzY5Nzg0NzAxJmFzPSZsaW1pdD0xMCZvcmRlcj1kZXNjJnNvcnQ9dGltZXN0YW1wJnRpbWVzdGFtcC5sdGU9MjAyMi0wMi0xN1QxNyUzQTI1JTNBMTMuMDA5MzU2MDMyWg",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": [
+ {
+ "ask_exchange": 323,
+ "ask_price": 282,
+ "ask_size": 10,
+ "bid_exchange": 316,
+ "bid_price": 277.5,
+ "bid_size": 1,
+ "sequence_number": 789539218,
+ "sip_timestamp": 1645119125346243600
+ },
+ {
+ "ask_exchange": 301,
+ "ask_price": 282,
+ "ask_size": 1,
+ "bid_exchange": 323,
+ "bid_price": 277.5,
+ "bid_size": 10,
+ "sequence_number": 788994206,
+ "sip_timestamp": 1645119118474271000
+ }
+ ],
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "results": {
+ "items": {
+ "properties": {
+ "ask_exchange": {
+ "description": "The ask exchange ID",
+ "type": "integer"
+ },
+ "ask_price": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "ask_size": {
+ "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "bid_exchange": {
+ "description": "The bid exchange ID",
+ "type": "integer"
+ },
+ "bid_price": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "bid_size": {
+ "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "sequence_number": {
+ "description": "The sequence number represents the sequence in which quote events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).",
+ "format": "int64",
+ "type": "integer"
+ },
+ "sip_timestamp": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this quote from the exchange which produced it.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
}
},
- "i": {
- "type": "string",
- "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"
- },
- "p": {
- "type": "number",
- "format": "double",
- "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"
- },
- "s": {
- "type": "integer",
- "description": "The size (volume) of the trade."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "x": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- }
- }
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "type": "object",
- "properties": {
- "av": {
- "type": "integer",
- "description": "The accumulated volume."
- },
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- },
- "otc": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
- }
- }
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- },
- "otc": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
- }
+ "type": "object"
}
- },
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "todaysChange": {
- "type": "number",
- "format": "double",
- "description": "The value of the change the from previous day."
- },
- "todaysChangePerc": {
- "type": "number",
- "format": "double",
- "description": "The percentage change since the previous day."
- },
- "updated": {
- "type": "integer",
- "description": "The last updated timestamp."
}
- }
+ },
+ "description": "A list of quotes."
}
- }
- },
- "ForexSnapshotLastQuote": {
- "type": "object",
- "properties": {
- "a": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
- },
- "b": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
+ },
+ "summary": "Quotes",
+ "tags": [
+ "options:quotes"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "NBBO data",
+ "name": "nbbo"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Options data",
+ "name": "options"
+ },
+ "x-polygon-paginate": {
+ "limit": {
+ "max": 50000
},
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
+ "order": {
+ "default": "desc"
},
- "x": {
- "type": "integer",
- "description": "The exchange ID on which this quote happened."
+ "sort": {
+ "default": "timestamp",
+ "enum": [
+ "timestamp"
+ ]
}
}
},
- "ForexSnapshotPrevDay": {
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
+ "x-polygon-ignore": true
+ },
+ "/v3/quotes/{stockTicker}": {
+ "get": {
+ "description": "Get NBBO quotes for a ticker symbol in a given time range.",
+ "operationId": "Quotes",
+ "parameters": [
+ {
+ "description": "The ticker symbol to get quotes for.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "stockTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-go-id": "Ticker"
},
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
},
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
+ {
+ "description": "Search by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
},
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
+ {
+ "description": "Search by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
},
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
+ {
+ "description": "Search by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
},
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
+ {
+ "description": "Search by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 50000.",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "example": 10,
+ "maximum": 50000,
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "timestamp",
+ "enum": [
+ "timestamp"
+ ],
+ "example": "timestamp",
+ "type": "string"
+ }
}
- }
- },
- "ForexSnapshotTicker": {
- "type": "object",
- "properties": {
- "ticker": {
- "type": "object",
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- }
- }
- },
- "lastQuote": {
- "description": "The most recent quote for this ticker.",
- "type": "object",
- "properties": {
- "a": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
- },
- "b": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "x": {
- "type": "integer",
- "description": "The exchange ID on which this quote happened."
- }
- }
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- }
- }
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v3/quotes/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": [
+ {
+ "ask_exchange": 0,
+ "ask_price": 0,
+ "ask_size": 0,
+ "bid_exchange": 11,
+ "bid_price": 102.7,
+ "bid_size": 60,
+ "conditions": [
+ 1
+ ],
+ "participant_timestamp": 1517562000065321200,
+ "sequence_number": 2060,
+ "sip_timestamp": 1517562000065700400,
+ "tape": 3
+ },
+ {
+ "ask_exchange": 0,
+ "ask_price": 0,
+ "ask_size": 0,
+ "bid_exchange": 11,
+ "bid_price": 170,
+ "bid_size": 2,
+ "conditions": [
+ 1
+ ],
+ "participant_timestamp": 1517562000065408300,
+ "sequence_number": 2061,
+ "sip_timestamp": 1517562000065791500,
+ "tape": 3
+ }
+ ],
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "results": {
+ "items": {
+ "properties": {
+ "ask_exchange": {
+ "description": "The ask exchange ID",
+ "type": "integer"
+ },
+ "ask_price": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "ask_size": {
+ "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "bid_exchange": {
+ "description": "The bid exchange ID",
+ "type": "integer"
+ },
+ "bid_price": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "bid_size": {
+ "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "conditions": {
+ "description": "A list of condition codes.",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "indicators": {
+ "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).",
+ "items": {
+ "description": "The indicator code.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "participant_timestamp": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "sequence_number": {
+ "description": "The sequence number represents the sequence in which quote events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11). Values reset after each trading session/day.",
+ "format": "int64",
+ "type": "integer"
+ },
+ "sip_timestamp": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this quote from the exchange which produced it.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "tape": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ",
+ "format": "int32",
+ "type": "integer"
+ },
+ "trf_timestamp": {
+ "description": "The nanosecond accuracy TRF (Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this quote.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
},
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- }
+ "type": "object"
}
- },
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "todaysChange": {
- "type": "number",
- "format": "double",
- "description": "The value of the change the from previous day."
- },
- "todaysChangePerc": {
- "type": "number",
- "format": "double",
- "description": "The percentage change since the previous day."
- },
- "updated": {
- "type": "integer",
- "description": "The last updated timestamp."
}
- }
+ },
+ "description": "A list of quotes."
+ }
+ },
+ "summary": "Quotes (NBBO)",
+ "tags": [
+ "stocks:quotes"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "NBBO data",
+ "name": "nbbo"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
+ },
+ "x-polygon-paginate": {
+ "limit": {
+ "max": 50000
+ },
+ "order": {
+ "default": "desc"
+ },
+ "sort": {
+ "default": "timestamp",
+ "enum": [
+ "timestamp"
+ ]
+ }
+ },
+ "x-polygon-replaces": {
+ "date": 1654056060000,
+ "replaces": {
+ "name": "Quotes (NBBO)",
+ "path": "get_v2_ticks_stocks_nbbo__ticker___date"
}
}
- },
- "ForexSnapshotTickers": {
- "type": "object",
- "properties": {
- "tickers": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "type": "object",
+ }
+ },
+ "/v3/reference/conditions": {
+ "get": {
+ "description": "List all conditions that Polygon.io uses.",
+ "operationId": "ListConditions",
+ "parameters": [
+ {
+ "description": "Filter for conditions within a given asset class.",
+ "in": "query",
+ "name": "asset_class",
+ "schema": {
+ "description": "An identifier for a group of similar financial instruments.",
+ "enum": [
+ "stocks",
+ "options",
+ "crypto",
+ "fx"
+ ],
+ "example": "stocks",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Filter by data type.",
+ "in": "query",
+ "name": "data_type",
+ "schema": {
+ "description": "The type of financial data represented by a data model.",
+ "enum": [
+ "trade",
+ "bbo",
+ "nbbo"
+ ],
+ "example": "trade",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Filter for conditions with a given ID.",
+ "in": "query",
+ "name": "id",
+ "schema": {
+ "description": "An identifier used by Polygon.io for this condition. Unique per data type.",
+ "example": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Filter by SIP. If the condition contains a mapping for that SIP, the condition will be returned.",
+ "in": "query",
+ "name": "sip",
+ "schema": {
+ "description": "One of the SIPs.",
+ "enum": [
+ "CTA",
+ "UTP",
+ "OPRA"
+ ],
+ "example": "CTA",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 1000.",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "example": 10,
+ "maximum": 1000,
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "asset_class",
+ "enum": [
+ "asset_class",
+ "id",
+ "type",
+ "name",
+ "data_types",
+ "legacy"
+ ],
+ "example": "asset_class",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "example": {
+ "count": 1,
+ "request_id": "31d59dda-80e5-4721-8496-d0d32a654afe",
+ "results": [
+ {
+ "asset_class": "stocks",
+ "data_types": [
+ "trade"
+ ],
+ "id": 2,
+ "name": "Average Price Trade",
+ "sip_mapping": {
+ "CTA": "B",
+ "UTP": "W"
+ },
+ "type": "condition",
+ "update_rules": {
+ "consolidated": {
+ "updates_high_low": false,
+ "updates_open_close": false,
+ "updates_volume": true
+ },
+ "market_center": {
+ "updates_high_low": false,
+ "updates_open_close": false,
+ "updates_volume": true
+ }
+ }
+ }
+ ],
+ "status": "OK"
+ },
"properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
+ "count": {
+ "description": "The total number of results for this request.",
+ "example": 1,
+ "type": "integer"
},
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- }
- }
- },
- "lastQuote": {
- "description": "The most recent quote for this ticker.",
- "type": "object",
- "properties": {
- "a": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
},
- "b": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
+ "request_id": {
+ "description": "A request ID assigned by the server.",
+ "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
+ "type": "string"
},
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
+ "results": {
+ "description": "An array of conditions that match your query.",
+ "items": {
+ "description": "A condition generally refers to any extra information passed in a trade or a quote. These conditions\nmay or may not affect the behavior of aggregates.",
+ "properties": {
+ "abbreviation": {
+ "description": "A commonly-used abbreviation for this condition.",
+ "type": "string"
+ },
+ "asset_class": {
+ "description": "An identifier for a group of similar financial instruments.",
+ "enum": [
+ "stocks",
+ "options",
+ "crypto",
+ "fx"
+ ],
+ "example": "stocks",
+ "type": "string"
+ },
+ "data_types": {
+ "description": "Data types that this condition applies to.",
+ "items": {
+ "description": "The type of financial data represented by a data model.",
+ "enum": [
+ "trade",
+ "bbo",
+ "nbbo"
+ ],
+ "example": "trade",
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "description": {
+ "description": "A short description of the semantics of this condition.",
+ "type": "string"
+ },
+ "exchange": {
+ "description": "If present, mapping this condition from a Polygon.io code to a SIP symbol depends on this attribute.\nIn other words, data with this condition attached comes exclusively from the given exchange.",
+ "type": "integer"
+ },
+ "id": {
+ "description": "An identifier used by Polygon.io for this condition. Unique per data type.",
+ "example": 1,
+ "type": "integer"
+ },
+ "legacy": {
+ "description": "If true, this condition is from an old version of the SIPs' specs and no longer is used.\nOther conditions may or may not reuse the same symbol as this one.",
+ "type": "boolean"
+ },
+ "name": {
+ "description": "The name of this condition.",
+ "example": "Acquisition",
+ "type": "string"
+ },
+ "sip_mapping": {
+ "description": "A mapping to a symbol for each SIP that has this condition.",
+ "properties": {
+ "CTA": {
+ "type": "string"
+ },
+ "OPRA": {
+ "type": "string"
+ },
+ "UTP": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": {
+ "description": "An identifier for a collection of related conditions.",
+ "enum": [
+ "sale_condition",
+ "quote_condition",
+ "sip_generated_flag",
+ "financial_status_indicator",
+ "short_sale_restriction_indicator",
+ "settlement_condition",
+ "market_condition",
+ "trade_thru_exempt"
+ ],
+ "type": "string"
+ },
+ "update_rules": {
+ "description": "A list of aggregation rules.",
+ "properties": {
+ "consolidated": {
+ "description": "Describes aggregation rules on a consolidated (all exchanges) basis.",
+ "properties": {
+ "updates_high_low": {
+ "description": "Whether or not trades with this condition update the high/low.",
+ "type": "boolean"
+ },
+ "updates_open_close": {
+ "description": "Whether or not trades with this condition update the open/close.",
+ "type": "boolean"
+ },
+ "updates_volume": {
+ "description": "Whether or not trades with this condition update the volume.",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "updates_high_low",
+ "updates_open_close",
+ "updates_volume"
+ ],
+ "type": "object"
+ },
+ "market_center": {
+ "description": "Describes aggregation rules on a per-market-center basis.",
+ "properties": {
+ "updates_high_low": {
+ "description": "Whether or not trades with this condition update the high/low.",
+ "type": "boolean"
+ },
+ "updates_open_close": {
+ "description": "Whether or not trades with this condition update the open/close.",
+ "type": "boolean"
+ },
+ "updates_volume": {
+ "description": "Whether or not trades with this condition update the volume.",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "updates_high_low",
+ "updates_open_close",
+ "updates_volume"
+ ],
+ "type": "object"
+ }
+ },
+ "required": [
+ "consolidated",
+ "market_center"
+ ],
+ "type": "object"
+ }
+ },
+ "required": [
+ "id",
+ "type",
+ "name",
+ "asset_class",
+ "sip_mapping",
+ "data_types"
+ ],
+ "type": "object"
+ },
+ "type": "array"
},
- "x": {
- "type": "integer",
- "description": "The exchange ID on which this quote happened."
+ "status": {
+ "description": "The status of this request's response.",
+ "example": "OK",
+ "type": "string"
}
- }
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "type": "object",
+ },
+ "required": [
+ "status",
+ "request_id",
+ "count",
+ "results"
+ ],
+ "type": "object"
+ }
+ }
+ },
+ "description": "OK"
+ },
+ "400": {
+ "content": {
+ "application/json": {
+ "schema": {
"properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
+ "count": {
+ "description": "The total number of results for this request.",
+ "example": 1,
+ "type": "integer"
},
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
},
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
+ "request_id": {
+ "description": "A request ID assigned by the server.",
+ "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
+ "type": "string"
},
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
+ "results": {
+ "description": "An array of conditions that match your query.",
+ "items": {
+ "description": "A condition generally refers to any extra information passed in a trade or a quote. These conditions\nmay or may not affect the behavior of aggregates.",
+ "properties": {
+ "abbreviation": {
+ "description": "A commonly-used abbreviation for this condition.",
+ "type": "string"
+ },
+ "asset_class": {
+ "description": "An identifier for a group of similar financial instruments.",
+ "enum": [
+ "stocks",
+ "options",
+ "crypto",
+ "fx"
+ ],
+ "example": "stocks",
+ "type": "string"
+ },
+ "data_types": {
+ "description": "Data types that this condition applies to.",
+ "items": {
+ "description": "The type of financial data represented by a data model.",
+ "enum": [
+ "trade",
+ "bbo",
+ "nbbo"
+ ],
+ "example": "trade",
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "description": {
+ "description": "A short description of the semantics of this condition.",
+ "type": "string"
+ },
+ "exchange": {
+ "description": "If present, mapping this condition from a Polygon.io code to a SIP symbol depends on this attribute.\nIn other words, data with this condition attached comes exclusively from the given exchange.",
+ "type": "integer"
+ },
+ "id": {
+ "description": "An identifier used by Polygon.io for this condition. Unique per data type.",
+ "example": 1,
+ "type": "integer"
+ },
+ "legacy": {
+ "description": "If true, this condition is from an old version of the SIPs' specs and no longer is used.\nOther conditions may or may not reuse the same symbol as this one.",
+ "type": "boolean"
+ },
+ "name": {
+ "description": "The name of this condition.",
+ "example": "Acquisition",
+ "type": "string"
+ },
+ "sip_mapping": {
+ "description": "A mapping to a symbol for each SIP that has this condition.",
+ "properties": {
+ "CTA": {
+ "type": "string"
+ },
+ "OPRA": {
+ "type": "string"
+ },
+ "UTP": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": {
+ "description": "An identifier for a collection of related conditions.",
+ "enum": [
+ "sale_condition",
+ "quote_condition",
+ "sip_generated_flag",
+ "financial_status_indicator",
+ "short_sale_restriction_indicator",
+ "settlement_condition",
+ "market_condition",
+ "trade_thru_exempt"
+ ],
+ "type": "string"
+ },
+ "update_rules": {
+ "description": "A list of aggregation rules.",
+ "properties": {
+ "consolidated": {
+ "description": "Describes aggregation rules on a consolidated (all exchanges) basis.",
+ "properties": {
+ "updates_high_low": {
+ "description": "Whether or not trades with this condition update the high/low.",
+ "type": "boolean"
+ },
+ "updates_open_close": {
+ "description": "Whether or not trades with this condition update the open/close.",
+ "type": "boolean"
+ },
+ "updates_volume": {
+ "description": "Whether or not trades with this condition update the volume.",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "updates_high_low",
+ "updates_open_close",
+ "updates_volume"
+ ],
+ "type": "object"
+ },
+ "market_center": {
+ "description": "Describes aggregation rules on a per-market-center basis.",
+ "properties": {
+ "updates_high_low": {
+ "description": "Whether or not trades with this condition update the high/low.",
+ "type": "boolean"
+ },
+ "updates_open_close": {
+ "description": "Whether or not trades with this condition update the open/close.",
+ "type": "boolean"
+ },
+ "updates_volume": {
+ "description": "Whether or not trades with this condition update the volume.",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "updates_high_low",
+ "updates_open_close",
+ "updates_volume"
+ ],
+ "type": "object"
+ }
+ },
+ "required": [
+ "consolidated",
+ "market_center"
+ ],
+ "type": "object"
+ }
+ },
+ "required": [
+ "id",
+ "type",
+ "name",
+ "asset_class",
+ "sip_mapping",
+ "data_types"
+ ],
+ "type": "object"
+ },
+ "type": "array"
},
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
+ "status": {
+ "description": "The status of this request's response.",
+ "example": "OK",
+ "type": "string"
}
- }
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "type": "object",
+ },
+ "required": [
+ "status",
+ "request_id",
+ "count",
+ "results"
+ ],
+ "type": "object"
+ }
+ }
+ },
+ "description": "a query parameter was malformed"
+ },
+ "default": {
+ "content": {
+ "application/json": {
+ "schema": {
"properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
+ "count": {
+ "description": "The total number of results for this request.",
+ "example": 1,
+ "type": "integer"
},
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
},
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
+ "request_id": {
+ "description": "A request ID assigned by the server.",
+ "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
+ "type": "string"
},
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
+ "results": {
+ "description": "An array of conditions that match your query.",
+ "items": {
+ "description": "A condition generally refers to any extra information passed in a trade or a quote. These conditions\nmay or may not affect the behavior of aggregates.",
+ "properties": {
+ "abbreviation": {
+ "description": "A commonly-used abbreviation for this condition.",
+ "type": "string"
+ },
+ "asset_class": {
+ "description": "An identifier for a group of similar financial instruments.",
+ "enum": [
+ "stocks",
+ "options",
+ "crypto",
+ "fx"
+ ],
+ "example": "stocks",
+ "type": "string"
+ },
+ "data_types": {
+ "description": "Data types that this condition applies to.",
+ "items": {
+ "description": "The type of financial data represented by a data model.",
+ "enum": [
+ "trade",
+ "bbo",
+ "nbbo"
+ ],
+ "example": "trade",
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "description": {
+ "description": "A short description of the semantics of this condition.",
+ "type": "string"
+ },
+ "exchange": {
+ "description": "If present, mapping this condition from a Polygon.io code to a SIP symbol depends on this attribute.\nIn other words, data with this condition attached comes exclusively from the given exchange.",
+ "type": "integer"
+ },
+ "id": {
+ "description": "An identifier used by Polygon.io for this condition. Unique per data type.",
+ "example": 1,
+ "type": "integer"
+ },
+ "legacy": {
+ "description": "If true, this condition is from an old version of the SIPs' specs and no longer is used.\nOther conditions may or may not reuse the same symbol as this one.",
+ "type": "boolean"
+ },
+ "name": {
+ "description": "The name of this condition.",
+ "example": "Acquisition",
+ "type": "string"
+ },
+ "sip_mapping": {
+ "description": "A mapping to a symbol for each SIP that has this condition.",
+ "properties": {
+ "CTA": {
+ "type": "string"
+ },
+ "OPRA": {
+ "type": "string"
+ },
+ "UTP": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": {
+ "description": "An identifier for a collection of related conditions.",
+ "enum": [
+ "sale_condition",
+ "quote_condition",
+ "sip_generated_flag",
+ "financial_status_indicator",
+ "short_sale_restriction_indicator",
+ "settlement_condition",
+ "market_condition",
+ "trade_thru_exempt"
+ ],
+ "type": "string"
+ },
+ "update_rules": {
+ "description": "A list of aggregation rules.",
+ "properties": {
+ "consolidated": {
+ "description": "Describes aggregation rules on a consolidated (all exchanges) basis.",
+ "properties": {
+ "updates_high_low": {
+ "description": "Whether or not trades with this condition update the high/low.",
+ "type": "boolean"
+ },
+ "updates_open_close": {
+ "description": "Whether or not trades with this condition update the open/close.",
+ "type": "boolean"
+ },
+ "updates_volume": {
+ "description": "Whether or not trades with this condition update the volume.",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "updates_high_low",
+ "updates_open_close",
+ "updates_volume"
+ ],
+ "type": "object"
+ },
+ "market_center": {
+ "description": "Describes aggregation rules on a per-market-center basis.",
+ "properties": {
+ "updates_high_low": {
+ "description": "Whether or not trades with this condition update the high/low.",
+ "type": "boolean"
+ },
+ "updates_open_close": {
+ "description": "Whether or not trades with this condition update the open/close.",
+ "type": "boolean"
+ },
+ "updates_volume": {
+ "description": "Whether or not trades with this condition update the volume.",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "updates_high_low",
+ "updates_open_close",
+ "updates_volume"
+ ],
+ "type": "object"
+ }
+ },
+ "required": [
+ "consolidated",
+ "market_center"
+ ],
+ "type": "object"
+ }
+ },
+ "required": [
+ "id",
+ "type",
+ "name",
+ "asset_class",
+ "sip_mapping",
+ "data_types"
+ ],
+ "type": "object"
+ },
+ "type": "array"
},
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
+ "status": {
+ "description": "The status of this request's response.",
+ "example": "OK",
+ "type": "string"
}
- }
- },
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "todaysChange": {
- "type": "number",
- "format": "double",
- "description": "The value of the change the from previous day."
- },
- "todaysChangePerc": {
- "type": "number",
- "format": "double",
- "description": "The percentage change since the previous day."
- },
- "updated": {
- "type": "integer",
- "description": "The last updated timestamp."
+ },
+ "required": [
+ "status",
+ "request_id",
+ "count",
+ "results"
+ ],
+ "type": "object"
}
}
+ },
+ "description": "an unknown error occurred"
+ }
+ },
+ "summary": "Conditions",
+ "tags": [
+ "reference:conditions"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ },
+ "x-polygon-paginate": {
+ "limit": {
+ "default": 10,
+ "max": 1000
+ },
+ "sort": {
+ "default": "asset_class",
+ "enum": [
+ "asset_class",
+ "id",
+ "type",
+ "name",
+ "data_types",
+ "legacy"
+ ]
+ }
+ }
+ }
+ },
+ "/v3/reference/dividends": {
+ "get": {
+ "description": "Get a list of historical cash dividends, including the ticker symbol,\ndeclaration date, ex-dividend date, record date, pay date, frequency,\nand amount.",
+ "operationId": "ListDividends",
+ "parameters": [
+ {
+ "description": "Return the dividends that contain this ticker.",
+ "in": "query",
+ "name": "ticker",
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true,
+ "type": "string"
+ }
+ },
+ {
+ "description": "Query by ex-dividend date with the format YYYY-MM-DD.",
+ "in": "query",
+ "name": "ex_dividend_date",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true,
+ "type": "string"
+ }
+ },
+ {
+ "description": "Query by record date with the format YYYY-MM-DD.",
+ "in": "query",
+ "name": "record_date",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true,
+ "type": "string"
+ }
+ },
+ {
+ "description": "Query by declaration date with the format YYYY-MM-DD.",
+ "in": "query",
+ "name": "declaration_date",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true,
+ "type": "string"
+ }
+ },
+ {
+ "description": "Query by pay date with the format YYYY-MM-DD.",
+ "in": "query",
+ "name": "pay_date",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true,
+ "type": "string"
+ }
+ },
+ {
+ "description": "Query by the number of times per year the dividend is paid out. Possible values are 0 (one-time), 1 (annually), 2 (bi-annually), 4 (quarterly), and 12 (monthly).",
+ "in": "query",
+ "name": "frequency",
+ "schema": {
+ "enum": [
+ 0,
+ 1,
+ 2,
+ 4,
+ 12
+ ],
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Query by the cash amount of the dividend.",
+ "in": "query",
+ "name": "cash_amount",
+ "schema": {
+ "type": "number"
+ },
+ "x-polygon-filter-field": {
+ "range": true,
+ "type": "number"
+ }
+ },
+ {
+ "description": "Query by the type of dividend. Dividends that have been paid and/or are expected to be paid on consistent schedules are denoted as CD.\nSpecial Cash dividends that have been paid that are infrequent or unusual, and/or can not be expected to occur in the future are denoted as SC.",
+ "in": "query",
+ "name": "dividend_type",
+ "schema": {
+ "description": "The type of dividend. Dividends that have been paid and/or are expected to be paid on consistent schedules are denoted as CD.\nSpecial Cash dividends that have been paid that are infrequent or unusual, and/or can not be expected to occur in the future are denoted as SC.\nLong-Term and Short-Term capital gain distributions are denoted as LT and ST, respectively.",
+ "enum": [
+ "CD",
+ "SC",
+ "LT",
+ "ST"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by ticker.",
+ "in": "query",
+ "name": "ticker.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by ticker.",
+ "in": "query",
+ "name": "ticker.gt",
+ "schema": {
+ "type": "string"
}
- }
- }
- },
- "CryptoSnapshotMinute": {
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
},
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
+ {
+ "description": "Search by ticker.",
+ "in": "query",
+ "name": "ticker.lte",
+ "schema": {
+ "type": "string"
+ }
},
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
+ {
+ "description": "Search by ticker.",
+ "in": "query",
+ "name": "ticker.lt",
+ "schema": {
+ "type": "string"
+ }
},
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
+ {
+ "description": "Search by ex_dividend_date.",
+ "in": "query",
+ "name": "ex_dividend_date.gte",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
},
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
+ {
+ "description": "Search by ex_dividend_date.",
+ "in": "query",
+ "name": "ex_dividend_date.gt",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
},
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- }
- }
- },
- "CryptoSnapshotTicker": {
- "type": "object",
- "properties": {
- "ticker": {
- "type": "object",
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- }
- }
- },
- "lastTrade": {
- "allOf": [
- {
- "description": "The most recent trade for this ticker."
- },
- {
- "type": "object",
- "properties": {
- "c": {
- "type": "array",
- "description": "The trade conditions.",
- "items": {
- "type": "string"
- }
- },
- "i": {
- "type": "string",
- "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"
- },
- "p": {
- "type": "number",
- "format": "double",
- "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"
- },
- "s": {
- "type": "integer",
- "description": "The size (volume) of the trade."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "x": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- }
- }
- },
- {
- "properties": {
- "x": {
- "type": "integer",
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n"
- }
- }
- }
- ]
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- }
- }
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- }
- }
- },
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "todaysChange": {
- "type": "number",
- "format": "double",
- "description": "The value of the change the from previous day."
- },
- "todaysChangePerc": {
- "type": "number",
- "format": "double",
- "description": "The percentage change since the previous day."
- },
- "updated": {
- "type": "integer",
- "description": "The last updated timestamp."
- }
+ {
+ "description": "Search by ex_dividend_date.",
+ "in": "query",
+ "name": "ex_dividend_date.lte",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by ex_dividend_date.",
+ "in": "query",
+ "name": "ex_dividend_date.lt",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by record_date.",
+ "in": "query",
+ "name": "record_date.gte",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by record_date.",
+ "in": "query",
+ "name": "record_date.gt",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by record_date.",
+ "in": "query",
+ "name": "record_date.lte",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by record_date.",
+ "in": "query",
+ "name": "record_date.lt",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by declaration_date.",
+ "in": "query",
+ "name": "declaration_date.gte",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by declaration_date.",
+ "in": "query",
+ "name": "declaration_date.gt",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by declaration_date.",
+ "in": "query",
+ "name": "declaration_date.lte",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by declaration_date.",
+ "in": "query",
+ "name": "declaration_date.lt",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by pay_date.",
+ "in": "query",
+ "name": "pay_date.gte",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by pay_date.",
+ "in": "query",
+ "name": "pay_date.gt",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by pay_date.",
+ "in": "query",
+ "name": "pay_date.lte",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by pay_date.",
+ "in": "query",
+ "name": "pay_date.lt",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by cash_amount.",
+ "in": "query",
+ "name": "cash_amount.gte",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "description": "Search by cash_amount.",
+ "in": "query",
+ "name": "cash_amount.gt",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "description": "Search by cash_amount.",
+ "in": "query",
+ "name": "cash_amount.lte",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "description": "Search by cash_amount.",
+ "in": "query",
+ "name": "cash_amount.lt",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 1000.",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "example": 10,
+ "maximum": 1000,
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "ex_dividend_date",
+ "enum": [
+ "ex_dividend_date",
+ "pay_date",
+ "declaration_date",
+ "record_date",
+ "cash_amount",
+ "ticker"
+ ],
+ "example": "ex_dividend_date",
+ "type": "string"
}
}
- }
- },
- "CryptoSnapshotTickers": {
- "type": "object",
- "properties": {
- "tickers": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- }
- }
- },
- "lastTrade": {
- "allOf": [
- {
- "description": "The most recent trade for this ticker."
- },
- {
- "type": "object",
- "properties": {
- "c": {
- "type": "array",
- "description": "The trade conditions.",
- "items": {
- "type": "string"
- }
- },
- "i": {
- "type": "string",
- "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"
- },
- "p": {
- "type": "number",
- "format": "double",
- "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"
- },
- "s": {
- "type": "integer",
- "description": "The size (volume) of the trade."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "x": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- }
- }
- },
- {
- "properties": {
- "x": {
- "type": "integer",
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n"
- }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "description": "A list of dividends.",
+ "example": {
+ "next_url": "https://api.polygon.io/v3/reference/dividends/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "results": [
+ {
+ "cash_amount": 0.22,
+ "declaration_date": "2021-10-28",
+ "dividend_type": "CD",
+ "ex_dividend_date": "2021-11-05",
+ "frequency": 4,
+ "pay_date": "2021-11-11",
+ "record_date": "2021-11-08",
+ "ticker": "AAPL"
+ },
+ {
+ "cash_amount": 0.22,
+ "declaration_date": "2021-07-27",
+ "dividend_type": "CD",
+ "ex_dividend_date": "2021-08-06",
+ "frequency": 4,
+ "pay_date": "2021-08-12",
+ "record_date": "2021-08-09",
+ "ticker": "AAPL"
}
- }
- ]
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "type": "object",
- "properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- }
- }
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "type": "object",
+ ],
+ "status": "OK"
+ },
"properties": {
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
},
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- }
- }
- },
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "todaysChange": {
- "type": "number",
- "format": "double",
- "description": "The value of the change the from previous day."
- },
- "todaysChangePerc": {
- "type": "number",
- "format": "double",
- "description": "The percentage change since the previous day."
- },
- "updated": {
- "type": "integer",
- "description": "The last updated timestamp."
- }
- }
- }
- }
- }
- },
- "CryptoSnapshotTickerFullBook": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "bids": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "p": {
- "type": "number",
- "format": "double",
- "description": "The price of this book level."
+ "request_id": {
+ "type": "string"
},
- "x": {
- "type": "object",
- "description": "A map of the exchange ID to number of shares at this price level.\n
\n
\n**Example:**\n
\n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n
\n
\nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n"
- }
- }
- }
- },
- "asks": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "p": {
- "type": "number",
- "format": "double",
- "description": "The price of this book level."
+ "results": {
+ "items": {
+ "properties": {
+ "cash_amount": {
+ "description": "The cash amount of the dividend per share owned.",
+ "type": "number"
+ },
+ "currency": {
+ "description": "The currency in which the dividend is paid.",
+ "type": "string"
+ },
+ "declaration_date": {
+ "description": "The date that the dividend was announced.",
+ "type": "string"
+ },
+ "dividend_type": {
+ "description": "The type of dividend. Dividends that have been paid and/or are expected to be paid on consistent schedules are denoted as CD.\nSpecial Cash dividends that have been paid that are infrequent or unusual, and/or can not be expected to occur in the future are denoted as SC.\nLong-Term and Short-Term capital gain distributions are denoted as LT and ST, respectively.",
+ "enum": [
+ "CD",
+ "SC",
+ "LT",
+ "ST"
+ ],
+ "type": "string"
+ },
+ "ex_dividend_date": {
+ "description": "The date that the stock first trades without the dividend, determined by the exchange.",
+ "type": "string"
+ },
+ "frequency": {
+ "description": "The number of times per year the dividend is paid out. Possible values are 0 (one-time), 1 (annually), 2 (bi-annually), 4 (quarterly), and 12 (monthly).",
+ "type": "integer"
+ },
+ "pay_date": {
+ "description": "The date that the dividend is paid out.",
+ "type": "string"
+ },
+ "record_date": {
+ "description": "The date that the stock must be held to receive the dividend, set by the company.",
+ "type": "string"
+ },
+ "ticker": {
+ "description": "The ticker symbol of the dividend.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker",
+ "declaration_date",
+ "ex_dividend_date",
+ "record_date",
+ "pay_date",
+ "frequency",
+ "cash_amount",
+ "dividend_type"
+ ],
+ "type": "object",
+ "x-polygon-go-struct-tags": {
+ "tags": [
+ "db"
+ ]
+ }
+ },
+ "type": "array"
},
- "x": {
- "type": "object",
- "description": "A map of the exchange ID to number of shares at this price level.\n
\n
\n**Example:**\n
\n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n
\n
\nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n"
+ "status": {
+ "type": "string"
}
- }
+ },
+ "required": [
+ "request_id"
+ ],
+ "type": "object"
}
- },
- "bidCount": {
- "type": "number",
- "format": "double",
- "description": "The combined total number of bids in the book."
- },
- "askCount": {
- "type": "number",
- "format": "double",
- "description": "The combined total number of asks in the book."
- },
- "spread": {
- "type": "number",
- "format": "double",
- "description": "The difference between the best bid and the best ask price accross exchanges."
- },
- "updated": {
- "type": "integer",
- "description": "The last updated timestamp."
}
- }
+ },
+ "description": "OK"
+ }
+ },
+ "summary": "Dividends v3",
+ "tags": [
+ "reference:dividends"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ },
+ "x-polygon-paginate": {
+ "limit": {
+ "default": 10,
+ "max": 1000
+ },
+ "sort": {
+ "default": "ex_dividend_date",
+ "enum": [
+ "ex_dividend_date",
+ "pay_date",
+ "declaration_date",
+ "record_date",
+ "cash_amount",
+ "ticker"
+ ]
}
}
},
- "v3Tickers": {
- "type": "object",
- "properties": {
- "results": {
- "type": "array",
- "description": "An array of tickers that match your query.\n\nNote: Although you can query by CUSIP, due to legal reasons we do not return the CUSIP in the response.\n",
- "items": {
- "type": "object",
- "properties": {
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "name": {
- "type": "string",
- "description": "The name of the asset. For stocks/equities this will be the companies registered name. For crypto/fx this will be the name of the currency or coin pair.\n"
- },
- "market": {
- "type": "string",
- "description": "The market type of the asset.",
- "enum": [
- "stocks",
- "crypto",
- "fx",
- "otc"
- ]
- },
- "locale": {
- "type": "string",
- "description": "The locale of the asset.",
- "enum": [
- "us",
- "global"
- ]
- },
- "primary_exchange": {
- "type": "string",
- "description": "The ISO code of the primary listing exchange for this asset."
- },
- "type": {
- "type": "string",
- "description": "The type of the asset. Find the types that we support via our [Ticker Types API](https://polygon.io/docs/stocks/get_v3_reference_tickers_types)."
- },
- "active": {
- "type": "boolean",
- "description": "Whether or not the asset is actively traded. False means the asset has been delisted."
- },
- "currency_name": {
- "type": "string",
- "description": "The name of the currency that this asset is traded with."
- },
- "cik": {
- "type": "string",
- "description": "The CIK number for this ticker. Find more information [here](https://en.wikipedia.org/wiki/Central_Index_Key)."
- },
- "composite_figi": {
- "type": "string",
- "description": "The composite OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)"
- },
- "share_class_figi": {
- "type": "string",
- "description": "The share Class OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)"
- },
- "last_updated_utc": {
- "type": "string",
- "format": "date-time",
- "description": "The information is accurate up to this time."
- },
- "delisted_utc": {
- "type": "string",
- "format": "date-time",
- "description": "The last date that the asset was traded."
- }
- },
- "required": [
- "ticker",
- "name",
- "market",
- "locale"
- ]
+ "post": {
+ "description": "Manually add Polygon a dividend.",
+ "operationId": "CreateDividend",
+ "parameters": [
+ {
+ "description": "If true don't trigger overlay",
+ "in": "query",
+ "name": "skip_overlay_trigger",
+ "schema": {
+ "type": "boolean"
}
}
- }
- },
- "v3TickerDetails": {
- "type": "object",
- "properties": {
- "results": {
- "type": "object",
- "description": "Ticker with details.\n",
- "properties": {
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "name": {
- "type": "string",
- "description": "The name of the asset. For stocks/equities this will be the companies registered name. For crypto/fx this will be the name of the currency or coin pair.\n"
- },
- "market": {
- "type": "string",
- "description": "The market type of the asset.",
- "enum": [
- "stocks",
- "crypto",
- "fx",
- "otc"
- ]
- },
- "locale": {
- "type": "string",
- "description": "The locale of the asset.",
- "enum": [
- "us",
- "global"
- ]
- },
- "primary_exchange": {
- "type": "string",
- "description": "The ISO code of the primary listing exchange for this asset."
- },
- "type": {
- "type": "string",
- "description": "The type of the asset. Find the types that we support via our [Ticker Types API](https://polygon.io/docs/stocks/get_v3_reference_tickers_types)."
- },
- "active": {
- "type": "boolean",
- "description": "Whether or not the asset is actively traded. False means the asset has been delisted."
- },
- "currency_name": {
- "type": "string",
- "description": "The name of the currency that this asset is traded with."
- },
- "cik": {
- "type": "string",
- "description": "The CIK number for this ticker. Find more information [here](https://en.wikipedia.org/wiki/Central_Index_Key)."
- },
- "composite_figi": {
- "type": "string",
- "description": "The composite OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)"
- },
- "share_class_figi": {
- "type": "string",
- "description": "The share Class OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)"
- },
- "delisted_utc": {
- "type": "string",
- "format": "date-time",
- "description": "The last date that the asset was traded."
- },
- "share_class_shares_outstanding": {
- "type": "number",
- "format": "double",
- "description": "The recorded number of outstanding shares for this particular share class."
- },
- "weighted_shares_outstanding": {
- "type": "number",
- "format": "double",
- "description": "The shares outstanding calculated assuming all shares of other share classes are converted to this share class.\n"
- },
- "market_cap": {
- "type": "number",
- "format": "double",
- "description": "The most recent close price of the ticker multiplied by weighted outstanding shares."
- },
- "phone_number": {
- "type": "string",
- "description": "The phone number for the company behind this ticker."
- },
- "address": {
- "type": "object",
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
"properties": {
- "address1": {
- "type": "string",
- "description": "The first line of the company's headquarters address."
+ "cash_amount": {
+ "description": "The cash amount of the dividend per share owned.",
+ "type": "number"
},
- "city": {
- "type": "string",
- "description": "The city of the company's headquarters address."
+ "currency": {
+ "description": "The currency in which the dividend is paid.",
+ "type": "string"
},
- "state": {
- "type": "string",
- "description": "The state of the company's headquarters address."
+ "declaration_date": {
+ "description": "The date that the dividend was announced.",
+ "type": "string"
},
- "postal_code": {
- "type": "string",
- "description": "The postal code of the company's headquarters address."
+ "dividend_type": {
+ "description": "The type of dividend. Dividends that have been paid and/or are expected to be paid on consistent schedules are denoted as CD.\nSpecial Cash dividends that have been paid that are infrequent or unusual, and/or can not be expected to occur in the future are denoted as SC.\nLong-Term and Short-Term capital gain distributions are denoted as LT and ST, respectively.",
+ "enum": [
+ "CD",
+ "SC",
+ "LT",
+ "ST"
+ ],
+ "type": "string"
+ },
+ "ex_dividend_date": {
+ "description": "The date that the stock first trades without the dividend, determined by the exchange.",
+ "type": "string"
+ },
+ "frequency": {
+ "description": "The number of times per year the dividend is paid out. Possible values are 0 (one-time), 1 (annually), 2 (bi-annually), 4 (quarterly), and 12 (monthly).",
+ "type": "integer"
+ },
+ "pay_date": {
+ "description": "The date that the dividend is paid out.",
+ "type": "string"
+ },
+ "record_date": {
+ "description": "The date that the stock must be held to receive the dividend, set by the company.",
+ "type": "string"
+ },
+ "ticker": {
+ "description": "The ticker symbol of the dividend.",
+ "type": "string"
}
- }
- },
- "sic_code": {
- "type": "string",
- "description": "The standard industrial classification code for this ticker. For a list of SIC Codes, see the SEC's SIC Code List.\n"
- },
- "sic_description": {
- "type": "string",
- "description": "A description of this ticker's SIC code."
- },
- "ticker_root": {
- "type": "string",
- "description": "The root of a specified ticker. For example, the root of BRK.A is BRK."
- },
- "ticker_suffix": {
- "type": "string",
- "description": "The suffix of a specified ticker. For example, the suffix of BRK.A is A."
- },
- "total_employees": {
- "type": "number",
- "description": "The approximate number of employees for the company."
- },
- "list_date": {
- "type": "string",
- "description": "The date that the symbol was first publicly listed in the format YYYY-MM-DD."
- },
- "homepage_url": {
- "type": "string",
- "description": "The URL of the company's website homepage."
- },
- "description": {
- "type": "string",
- "description": "A description of the company and what they do/offer."
- },
- "branding": {
+ },
+ "required": [
+ "ticker",
+ "declaration_date",
+ "ex_dividend_date",
+ "record_date",
+ "pay_date",
+ "frequency",
+ "cash_amount",
+ "dividend_type"
+ ],
"type": "object",
- "properties": {
- "logo_url": {
- "type": "string",
- "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.\n"
+ "x-polygon-go-struct-tags": {
+ "tags": [
+ "db"
+ ]
+ }
+ }
+ }
+ },
+ "description": "Pass the desired dividend in the request body.",
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "request_id": {
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "cash_amount": {
+ "description": "The cash amount of the dividend per share owned.",
+ "type": "number"
+ },
+ "currency": {
+ "description": "The currency in which the dividend is paid.",
+ "type": "string"
+ },
+ "declaration_date": {
+ "description": "The date that the dividend was announced.",
+ "type": "string"
+ },
+ "dividend_type": {
+ "description": "The type of dividend. Dividends that have been paid and/or are expected to be paid on consistent schedules are denoted as CD.\nSpecial Cash dividends that have been paid that are infrequent or unusual, and/or can not be expected to occur in the future are denoted as SC.\nLong-Term and Short-Term capital gain distributions are denoted as LT and ST, respectively.",
+ "enum": [
+ "CD",
+ "SC",
+ "LT",
+ "ST"
+ ],
+ "type": "string"
+ },
+ "ex_dividend_date": {
+ "description": "The date that the stock first trades without the dividend, determined by the exchange.",
+ "type": "string"
+ },
+ "frequency": {
+ "description": "The number of times per year the dividend is paid out. Possible values are 0 (one-time), 1 (annually), 2 (bi-annually), 4 (quarterly), and 12 (monthly).",
+ "type": "integer"
+ },
+ "pay_date": {
+ "description": "The date that the dividend is paid out.",
+ "type": "string"
+ },
+ "record_date": {
+ "description": "The date that the stock must be held to receive the dividend, set by the company.",
+ "type": "string"
+ },
+ "ticker": {
+ "description": "The ticker symbol of the dividend.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker",
+ "declaration_date",
+ "ex_dividend_date",
+ "record_date",
+ "pay_date",
+ "frequency",
+ "cash_amount",
+ "dividend_type"
+ ],
+ "type": "object",
+ "x-polygon-go-struct-tags": {
+ "tags": [
+ "db"
+ ]
+ }
+ },
+ "status": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "request_id"
+ ],
+ "type": "object"
+ }
+ }
+ },
+ "description": "OK"
+ },
+ "400": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "error": {
+ "type": "string"
+ },
+ "request_id": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "request_id",
+ "error"
+ ],
+ "type": "object"
+ }
+ }
+ },
+ "description": "the requested update was unable to be performed due to an invalid request body"
+ },
+ "409": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "error": {
+ "type": "string"
+ },
+ "request_id": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
},
- "icon_url": {
- "type": "string",
- "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.\n"
- }
+ "required": [
+ "request_id",
+ "error"
+ ],
+ "type": "object"
}
}
},
- "required": [
- "ticker",
- "name",
- "market",
- "locale",
- "active",
- "currency_name"
- ]
+ "description": "a dividend already exists for this date and ticker"
+ },
+ "default": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "error": {
+ "type": "string"
+ },
+ "request_id": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "request_id",
+ "error"
+ ],
+ "type": "object"
+ }
+ }
+ },
+ "description": "unknown error"
}
- }
- },
- "TickerSymbol": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "Financials": {
- "type": "object",
- "description": "Financials",
- "required": [
- "ticker",
- "exDate",
- "paymentDate",
- "ratio",
- "tofactor",
- "forfactor"
+ },
+ "summary": "Dividends v3",
+ "tags": [
+ "reference:stocks"
],
- "properties": {
- "ticker": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "period": {
- "type": "string",
- "example": "Q",
- "description": "Reporting period.",
- "enum": [
- "Q",
- "T",
- "QA",
- "TA",
- "Y",
- "YA"
- ]
- },
- "calendarDate": {
- "type": "string",
- "format": "date-time",
- "example": "2019-03-31"
- },
- "reportPeriod": {
- "type": "string",
- "format": "date-time",
- "example": "2019-03-31"
- },
- "updated": {
- "type": "string",
- "format": "date-time",
- "example": "1999-03-28"
- },
- "accumulatedOtherComprehensiveIncome": {
- "type": "integer"
- },
- "assets": {
- "type": "integer"
- },
- "assetsAverage": {
- "type": "integer"
- },
- "assetsCurrent": {
- "type": "integer"
- },
- "assetTurnover": {
- "type": "integer"
- },
- "assetsNonCurrent": {
- "type": "integer"
- },
- "bookValuePerShare": {
- "type": "number",
- "format": "double"
- },
- "capitalExpenditure": {
- "type": "integer"
- },
- "cashAndEquivalents": {
- "type": "integer"
- },
- "cashAndEquivalentsUSD": {
- "type": "integer"
- },
- "costOfRevenue": {
- "type": "integer"
- },
- "consolidatedIncome": {
- "type": "integer"
- },
- "currentRatio": {
- "type": "number",
- "format": "double"
- },
- "debtToEquityRatio": {
- "type": "number",
- "format": "double"
- },
- "debt": {
- "type": "integer"
- },
- "debtCurrent": {
- "type": "integer"
- },
- "debtNonCurrent": {
- "type": "integer"
- },
- "debtUSD": {
- "type": "integer"
- },
- "deferredRevenue": {
- "type": "integer"
- },
- "depreciationAmortizationAndAccretion": {
- "type": "integer"
- },
- "deposits": {
- "type": "integer"
- },
- "dividendYield": {
- "type": "integer"
- },
- "dividendsPerBasicCommonShare": {
- "type": "integer"
- },
- "earningBeforeInterestTaxes": {
- "type": "integer"
- },
- "earningsBeforeInterestTaxesDepreciationAmortization": {
- "type": "integer"
- },
- "EBITDAMargin": {
- "type": "number",
- "format": "double"
- },
- "earningsBeforeInterestTaxesDepreciationAmortizationUSD": {
- "type": "integer"
- },
- "earningBeforeInterestTaxesUSD": {
- "type": "integer"
- },
- "earningsBeforeTax": {
- "type": "integer"
- },
- "earningsPerBasicShare": {
- "type": "number",
- "format": "double"
- },
- "earningsPerDilutedShare": {
- "type": "number",
- "format": "double"
- },
- "earningsPerBasicShareUSD": {
- "type": "number",
- "format": "double"
+ "x-polygon-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ }
+ }
+ },
+ "/v3/reference/exchanges": {
+ "get": {
+ "description": "List all exchanges that Polygon.io knows about.",
+ "operationId": "ListExchanges",
+ "parameters": [
+ {
+ "description": "Filter by asset class.",
+ "in": "query",
+ "name": "asset_class",
+ "schema": {
+ "description": "An identifier for a group of similar financial instruments.",
+ "enum": [
+ "stocks",
+ "options",
+ "crypto",
+ "fx"
+ ],
+ "example": "stocks",
+ "type": "string"
+ }
},
- "shareholdersEquity": {
- "type": "integer"
+ {
+ "description": "Filter by locale.",
+ "in": "query",
+ "name": "locale",
+ "schema": {
+ "description": "An identifier for a geographical location.",
+ "enum": [
+ "us",
+ "global"
+ ],
+ "example": "us",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "example": 1,
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request ID assigned by the server.",
+ "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
+ "type": "string"
+ },
+ "results": {
+ "items": {
+ "description": "An entity that reports trades.",
+ "properties": {
+ "acronym": {
+ "description": "A commonly used abbreviation for this exchange.",
+ "example": "AMEX",
+ "type": "string"
+ },
+ "asset_class": {
+ "description": "An identifier for a group of similar financial instruments.",
+ "enum": [
+ "stocks",
+ "options",
+ "crypto",
+ "fx"
+ ],
+ "example": "stocks",
+ "type": "string"
+ },
+ "id": {
+ "description": "A unique identifier used by Polygon.io for this exchange.",
+ "example": 1,
+ "type": "integer"
+ },
+ "locale": {
+ "description": "An identifier for a geographical location.",
+ "enum": [
+ "us",
+ "global"
+ ],
+ "example": "us",
+ "type": "string"
+ },
+ "mic": {
+ "description": "The Market Identifer Code of this exchange (see ISO 10383).",
+ "example": "XASE",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of this exchange.",
+ "example": "NYSE American, LLC",
+ "type": "string"
+ },
+ "operating_mic": {
+ "description": "The MIC of the entity that operates this exchange.",
+ "example": "XNYS",
+ "type": "string"
+ },
+ "participant_id": {
+ "description": "The ID used by SIP's to represent this exchange.",
+ "example": "A",
+ "type": "string"
+ },
+ "type": {
+ "description": "Represents the type of exchange.",
+ "enum": [
+ "exchange",
+ "TRF",
+ "SIP"
+ ],
+ "example": "exchange",
+ "type": "string"
+ },
+ "url": {
+ "description": "A link to this exchange's website, if one exists.",
+ "example": "https://www.nyse.com/markets/nyse-american",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "type",
+ "asset_class",
+ "locale",
+ "name"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "example": "OK",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ }
+ },
+ "description": "OK"
},
- "averageEquity": {
- "type": "integer"
+ "400": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "example": 1,
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request ID assigned by the server.",
+ "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "example": "OK",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ }
+ },
+ "description": "a query parameter was malformed"
},
- "shareholdersEquityUSD": {
- "type": "integer"
+ "default": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "example": 1,
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request ID assigned by the server.",
+ "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "example": "OK",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ }
+ },
+ "description": "an unknown error occurred"
+ }
+ },
+ "summary": "Exchanges",
+ "tags": [
+ "reference:exchanges"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ }
+ }
+ },
+ "/v3/reference/options/contracts": {
+ "get": {
+ "description": "Query for historical options contracts. This provides both active and expired options contracts.",
+ "operationId": "ListOptionsContracts",
+ "parameters": [
+ {
+ "description": "This parameter has been deprecated. To search by specific options ticker, use the Options Contract endpoint [here](https://polygon.io/docs/options/get_v3_reference_options_contracts__options_ticker).",
+ "in": "query",
+ "name": "ticker",
+ "schema": {
+ "type": "string"
+ }
},
- "enterpriseValue": {
- "type": "integer"
+ {
+ "description": "Query for contracts relating to an underlying stock ticker.",
+ "in": "query",
+ "name": "underlying_ticker",
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true,
+ "type": "string"
+ }
},
- "enterpriseValueOverEBIT": {
- "type": "integer"
+ {
+ "description": "Query by the type of contract.",
+ "in": "query",
+ "name": "contract_type",
+ "schema": {
+ "enum": [
+ "call",
+ "put"
+ ],
+ "type": "string"
+ }
},
- "enterpriseValueOverEBITDA": {
- "type": "number",
- "format": "double"
+ {
+ "description": "Query by contract expiration with date format YYYY-MM-DD.",
+ "in": "query",
+ "name": "expiration_date",
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
},
- "freeCashFlow": {
- "type": "integer"
+ {
+ "description": "Specify a point in time for contracts as of this date with format YYYY-MM-DD. Defaults to today's date.",
+ "in": "query",
+ "name": "as_of",
+ "schema": {
+ "type": "string"
+ }
},
- "freeCashFlowPerShare": {
- "type": "number",
- "format": "double"
+ {
+ "description": "Query by strike price of a contract.",
+ "in": "query",
+ "name": "strike_price",
+ "schema": {
+ "type": "number"
+ },
+ "x-polygon-filter-field": {
+ "range": true,
+ "type": "number"
+ }
},
- "foreignCurrencyUSDExchangeRate": {
- "type": "integer"
+ {
+ "description": "Query for expired contracts. Default is false.",
+ "in": "query",
+ "name": "expired",
+ "schema": {
+ "type": "boolean"
+ }
},
- "grossProfit": {
- "type": "integer"
+ {
+ "description": "Search by underlying_ticker.",
+ "in": "query",
+ "name": "underlying_ticker.gte",
+ "schema": {
+ "type": "string"
+ }
},
- "grossMargin": {
- "type": "number",
- "format": "double"
+ {
+ "description": "Search by underlying_ticker.",
+ "in": "query",
+ "name": "underlying_ticker.gt",
+ "schema": {
+ "type": "string"
+ }
},
- "goodwillAndIntangibleAssets": {
- "type": "integer"
+ {
+ "description": "Search by underlying_ticker.",
+ "in": "query",
+ "name": "underlying_ticker.lte",
+ "schema": {
+ "type": "string"
+ }
},
- "interestExpense": {
- "type": "integer"
+ {
+ "description": "Search by underlying_ticker.",
+ "in": "query",
+ "name": "underlying_ticker.lt",
+ "schema": {
+ "type": "string"
+ }
},
- "investedCapital": {
- "type": "integer"
+ {
+ "description": "Search by expiration_date.",
+ "in": "query",
+ "name": "expiration_date.gte",
+ "schema": {
+ "type": "string"
+ }
},
- "investedCapitalAverage": {
- "type": "integer"
+ {
+ "description": "Search by expiration_date.",
+ "in": "query",
+ "name": "expiration_date.gt",
+ "schema": {
+ "type": "string"
+ }
},
- "inventory": {
- "type": "integer"
+ {
+ "description": "Search by expiration_date.",
+ "in": "query",
+ "name": "expiration_date.lte",
+ "schema": {
+ "type": "string"
+ }
},
- "investments": {
- "type": "integer"
+ {
+ "description": "Search by expiration_date.",
+ "in": "query",
+ "name": "expiration_date.lt",
+ "schema": {
+ "type": "string"
+ }
},
- "investmentsCurrent": {
- "type": "integer"
+ {
+ "description": "Search by strike_price.",
+ "in": "query",
+ "name": "strike_price.gte",
+ "schema": {
+ "type": "number"
+ }
},
- "investmentsNonCurrent": {
- "type": "integer"
+ {
+ "description": "Search by strike_price.",
+ "in": "query",
+ "name": "strike_price.gt",
+ "schema": {
+ "type": "number"
+ }
},
- "totalLiabilities": {
- "type": "integer"
+ {
+ "description": "Search by strike_price.",
+ "in": "query",
+ "name": "strike_price.lte",
+ "schema": {
+ "type": "number"
+ }
},
- "currentLiabilities": {
- "type": "integer"
+ {
+ "description": "Search by strike_price.",
+ "in": "query",
+ "name": "strike_price.lt",
+ "schema": {
+ "type": "number"
+ }
},
- "liabilitiesNonCurrent": {
- "type": "integer"
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
},
- "marketCapitalization": {
- "type": "integer"
+ {
+ "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"
+ }
},
- "netCashFlow": {
- "type": "integer"
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "ticker",
+ "enum": [
+ "ticker",
+ "underlying_ticker",
+ "expiration_date",
+ "strike_price"
+ ],
+ "example": "ticker",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "request_id": "603902c0-a5a5-406f-bd08-f030f92418fa",
+ "results": [
+ {
+ "cfi": "OCASPS",
+ "contract_type": "call",
+ "exercise_style": "american",
+ "expiration_date": "2021-11-19",
+ "primary_exchange": "BATO",
+ "shares_per_contract": 100,
+ "strike_price": 85,
+ "ticker": "O:AAPL211119C00085000",
+ "underlying_ticker": "AAPL"
+ },
+ {
+ "additional_underlyings": [
+ {
+ "amount": 44,
+ "type": "equity",
+ "underlying": "VMW"
+ },
+ {
+ "amount": 6.53,
+ "type": "currency",
+ "underlying": "USD"
+ }
+ ],
+ "cfi": "OCASPS",
+ "contract_type": "call",
+ "exercise_style": "american",
+ "expiration_date": "2021-11-19",
+ "primary_exchange": "BATO",
+ "shares_per_contract": 100,
+ "strike_price": 90,
+ "ticker": "O:AAPL211119C00090000",
+ "underlying_ticker": "AAPL"
+ }
+ ],
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "type": "string"
+ },
+ "results": {
+ "items": {
+ "properties": {
+ "additional_underlyings": {
+ "description": "If an option contract has additional underlyings or deliverables associated with it, they will appear here.\nSee \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"https://www.optionseducation.org/referencelibrary/faq/splits-mergers-spinoffs-bankruptcies\"\u003ehere\u003c/a\u003e for some examples of what might cause a contract to have additional underlyings.",
+ "items": {
+ "properties": {
+ "amount": {
+ "description": "The number of shares per contract of the additional underlying, or the cash-in-lieu amount of the currency.",
+ "type": "number"
+ },
+ "type": {
+ "description": "The type of the additional underlying asset, either equity or currency.",
+ "type": "string"
+ },
+ "underlying": {
+ "description": "The name of the additional underlying asset.",
+ "type": "string"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "AdditionalUnderlying"
+ }
+ },
+ "type": "array",
+ "x-polygon-go-type": {
+ "name": "AdditionalUnderlyings"
+ }
+ },
+ "cfi": {
+ "description": "The 6 letter CFI code of the contract (defined in \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/ISO_10962\"\u003eISO 10962\u003c/a\u003e)",
+ "type": "string"
+ },
+ "contract_type": {
+ "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".",
+ "type": "string"
+ },
+ "correction": {
+ "description": "The correction number for this option contract.",
+ "type": "integer"
+ },
+ "exercise_style": {
+ "description": "The exercise style of this contract. See \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Option_style\"\u003ethis link\u003c/a\u003e for more details on exercise styles.",
+ "enum": [
+ "american",
+ "european",
+ "bermudan"
+ ],
+ "type": "string"
+ },
+ "expiration_date": {
+ "description": "The contract's expiration date in YYYY-MM-DD format.",
+ "type": "string",
+ "x-polygon-go-type": {
+ "name": "IDaysPolygonDateString",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "primary_exchange": {
+ "description": "The MIC code of the primarcy exchange that this contract is listed on.",
+ "type": "string"
+ },
+ "shares_per_contract": {
+ "description": "The number of shares per contract for this contract.",
+ "type": "number"
+ },
+ "strike_price": {
+ "description": "The strike price of the option contract.",
+ "type": "number"
+ },
+ "ticker": {
+ "description": "The ticker for the option contract.",
+ "type": "string"
+ },
+ "underlying_ticker": {
+ "description": "The underlying ticker that the option contract relates to.",
+ "type": "string"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "OptionsContract"
+ }
+ },
+ "type": "array"
+ },
+ "status": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "A list of options contracts"
+ }
+ },
+ "summary": "Options Contracts",
+ "tags": [
+ "reference:options:contracts:list"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ },
+ "x-polygon-paginate": {
+ "limit": {
+ "default": 10,
+ "max": 1000
},
- "netCashFlowBusinessAcquisitionsDisposals": {
- "type": "integer"
+ "sort": {
+ "default": "ticker",
+ "enum": [
+ "ticker",
+ "underlying_ticker",
+ "expiration_date",
+ "strike_price"
+ ]
+ }
+ }
+ }
+ },
+ "/v3/reference/options/contracts/{options_ticker}": {
+ "get": {
+ "description": "Get an options contract",
+ "operationId": "GetOptionsContract",
+ "parameters": [
+ {
+ "description": "Query for a contract by options ticker. You can learn more about the structure of options tickers [here](https://polygon.io/blog/how-to-read-a-stock-options-ticker/).",
+ "example": "O:EVRI240119C00002500",
+ "in": "path",
+ "name": "options_ticker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
},
- "issuanceEquityShares": {
- "type": "integer"
+ {
+ "description": "Specify a point in time for the contract as of this date with format YYYY-MM-DD. Defaults to today's date.",
+ "in": "query",
+ "name": "as_of",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "request_id": "603902c0-a5a5-406f-bd08-f030f92418fa",
+ "results": {
+ "additional_underlyings": [
+ {
+ "amount": 44,
+ "type": "equity",
+ "underlying": "VMW"
+ },
+ {
+ "amount": 6.53,
+ "type": "currency",
+ "underlying": "USD"
+ }
+ ],
+ "cfi": "OCASPS",
+ "contract_type": "call",
+ "exercise_style": "american",
+ "expiration_date": "2021-11-19",
+ "primary_exchange": "BATO",
+ "shares_per_contract": 100,
+ "strike_price": 85,
+ "ticker": "O:AAPL211119C00085000",
+ "underlying_ticker": "AAPL"
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "request_id": {
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "additional_underlyings": {
+ "description": "If an option contract has additional underlyings or deliverables associated with it, they will appear here.\nSee \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"https://www.optionseducation.org/referencelibrary/faq/splits-mergers-spinoffs-bankruptcies\"\u003ehere\u003c/a\u003e for some examples of what might cause a contract to have additional underlyings.",
+ "items": {
+ "properties": {
+ "amount": {
+ "description": "The number of shares per contract of the additional underlying, or the cash-in-lieu amount of the currency.",
+ "type": "number"
+ },
+ "type": {
+ "description": "The type of the additional underlying asset, either equity or currency.",
+ "type": "string"
+ },
+ "underlying": {
+ "description": "The name of the additional underlying asset.",
+ "type": "string"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "AdditionalUnderlying"
+ }
+ },
+ "type": "array",
+ "x-polygon-go-type": {
+ "name": "AdditionalUnderlyings"
+ }
+ },
+ "cfi": {
+ "description": "The 6 letter CFI code of the contract (defined in \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/ISO_10962\"\u003eISO 10962\u003c/a\u003e)",
+ "type": "string"
+ },
+ "contract_type": {
+ "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".",
+ "type": "string"
+ },
+ "correction": {
+ "description": "The correction number for this option contract.",
+ "type": "integer"
+ },
+ "exercise_style": {
+ "description": "The exercise style of this contract. See \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Option_style\"\u003ethis link\u003c/a\u003e for more details on exercise styles.",
+ "enum": [
+ "american",
+ "european",
+ "bermudan"
+ ],
+ "type": "string"
+ },
+ "expiration_date": {
+ "description": "The contract's expiration date in YYYY-MM-DD format.",
+ "type": "string",
+ "x-polygon-go-type": {
+ "name": "IDaysPolygonDateString",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "primary_exchange": {
+ "description": "The MIC code of the primarcy exchange that this contract is listed on.",
+ "type": "string"
+ },
+ "shares_per_contract": {
+ "description": "The number of shares per contract for this contract.",
+ "type": "number"
+ },
+ "strike_price": {
+ "description": "The strike price of the option contract.",
+ "type": "number"
+ },
+ "ticker": {
+ "description": "The ticker for the option contract.",
+ "type": "string"
+ },
+ "underlying_ticker": {
+ "description": "The underlying ticker that the option contract relates to.",
+ "type": "string"
+ }
+ },
+ "type": "object",
+ "x-polygon-go-type": {
+ "name": "OptionsContract"
+ }
+ },
+ "status": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "A specific options contract"
+ }
+ },
+ "summary": "Options Contract",
+ "tags": [
+ "reference:options:contract"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ }
+ }
+ },
+ "/v3/reference/splits": {
+ "get": {
+ "description": "Get a list of historical stock splits, including the ticker symbol, the execution date, and the factors of the split ratio.",
+ "operationId": "ListStockSplits",
+ "parameters": [
+ {
+ "description": "Return the stock splits that contain this ticker.",
+ "in": "query",
+ "name": "ticker",
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true,
+ "type": "string"
+ }
},
- "issuanceDebtSecurities": {
- "type": "integer"
+ {
+ "description": "Query by execution date with the format YYYY-MM-DD.",
+ "in": "query",
+ "name": "execution_date",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true,
+ "type": "string"
+ }
},
- "paymentDividendsOtherCashDistributions": {
- "type": "integer"
+ {
+ "description": "Query for reverse stock splits. A split ratio where split_from is greater than split_to represents a reverse split. By default this filter is not used.",
+ "in": "query",
+ "name": "reverse_split",
+ "schema": {
+ "nullable": true,
+ "type": "boolean"
+ }
},
- "netCashFlowFromFinancing": {
- "type": "integer"
+ {
+ "description": "Search by ticker.",
+ "in": "query",
+ "name": "ticker.gte",
+ "schema": {
+ "type": "string"
+ }
},
- "netCashFlowFromInvesting": {
- "type": "integer"
+ {
+ "description": "Search by ticker.",
+ "in": "query",
+ "name": "ticker.gt",
+ "schema": {
+ "type": "string"
+ }
},
- "netCashFlowInvestmentAcquisitionsDisposals": {
- "type": "integer"
+ {
+ "description": "Search by ticker.",
+ "in": "query",
+ "name": "ticker.lte",
+ "schema": {
+ "type": "string"
+ }
},
- "netCashFlowFromOperations": {
- "type": "integer"
+ {
+ "description": "Search by ticker.",
+ "in": "query",
+ "name": "ticker.lt",
+ "schema": {
+ "type": "string"
+ }
},
- "effectOfExchangeRateChangesOnCash": {
- "type": "integer"
+ {
+ "description": "Search by execution_date.",
+ "in": "query",
+ "name": "execution_date.gte",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
},
- "netIncome": {
- "type": "integer"
+ {
+ "description": "Search by execution_date.",
+ "in": "query",
+ "name": "execution_date.gt",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
},
- "netIncomeCommonStock": {
- "type": "integer"
+ {
+ "description": "Search by execution_date.",
+ "in": "query",
+ "name": "execution_date.lte",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
},
- "netIncomeCommonStockUSD": {
- "type": "integer"
+ {
+ "description": "Search by execution_date.",
+ "in": "query",
+ "name": "execution_date.lt",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
},
- "netLossIncomeFromDiscontinuedOperations": {
- "type": "integer"
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
},
- "netIncomeToNonControllingInterests": {
- "type": "integer"
+ {
+ "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"
+ }
},
- "profitMargin": {
- "type": "number",
- "format": "double"
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "execution_date",
+ "enum": [
+ "execution_date",
+ "ticker"
+ ],
+ "example": "execution_date",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v3/splits/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "results": [
+ {
+ "execution_date": "2020-08-31",
+ "split_from": 1,
+ "split_to": 4,
+ "ticker": "AAPL"
+ },
+ {
+ "execution_date": "2005-02-28",
+ "split_from": 1,
+ "split_to": 2,
+ "ticker": "AAPL"
+ }
+ ],
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "type": "string"
+ },
+ "results": {
+ "items": {
+ "properties": {
+ "execution_date": {
+ "description": "The execution date of the stock split. On this date the stock split was applied.",
+ "type": "string"
+ },
+ "split_from": {
+ "description": "The second number in the split ratio.\n\nFor example: In a 2-for-1 split, split_from would be 1.",
+ "format": "float",
+ "type": "number"
+ },
+ "split_to": {
+ "description": "The first number in the split ratio.\n\nFor example: In a 2-for-1 split, split_to would be 2.",
+ "format": "float",
+ "type": "number"
+ },
+ "ticker": {
+ "description": "The ticker symbol of the stock split.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "split_from",
+ "split_to"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "A list of stock splits."
+ }
+ },
+ "summary": "Stock Splits v3",
+ "tags": [
+ "reference:stocks"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ },
+ "x-polygon-paginate": {
+ "limit": {
+ "default": 10,
+ "max": 1000
},
- "operatingExpenses": {
- "type": "integer"
+ "sort": {
+ "default": "execution_date",
+ "enum": [
+ "execution_date",
+ "ticker"
+ ]
+ }
+ }
+ }
+ },
+ "/v3/reference/tickers": {
+ "get": {
+ "description": "Query all ticker symbols which are supported by Polygon.io. This API currently includes Stocks/Equities, Crypto, and Forex.\n",
+ "parameters": [
+ {
+ "description": "Specify a ticker symbol.\nDefaults to empty string which queries all tickers.\n",
+ "in": "query",
+ "name": "ticker",
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
},
- "operatingIncome": {
- "type": "integer"
+ {
+ "description": "Specify the type of the tickers. Find the types that we support via our [Ticker Types API](https://polygon.io/docs/stocks/get_v3_reference_tickers_types).\nDefaults to empty string which queries all types.\n",
+ "in": "query",
+ "name": "type",
+ "schema": {
+ "enum": [
+ "CS",
+ "ADRC",
+ "ADRP",
+ "ADRR",
+ "UNIT",
+ "RIGHT",
+ "PFD",
+ "FUND",
+ "SP",
+ "WARRANT",
+ "INDEX",
+ "ETF",
+ "ETN",
+ "OS",
+ "GDR",
+ "OTHER",
+ "NYRS",
+ "AGEN",
+ "EQLK",
+ "BOND",
+ "ADRW",
+ "BASKET",
+ "LT"
+ ],
+ "type": "string"
+ }
},
- "tradeAndNonTradePayables": {
- "type": "integer"
+ {
+ "description": "Filter by market type. By default all markets are included.\n",
+ "in": "query",
+ "name": "market",
+ "schema": {
+ "enum": [
+ "stocks",
+ "crypto",
+ "fx",
+ "otc"
+ ],
+ "type": "string"
+ }
},
- "payoutRatio": {
- "type": "integer"
+ {
+ "description": "Specify the primary exchange of the asset in the ISO code format. Find more information about the ISO codes [at the ISO org website](https://www.iso20022.org/market-identifier-codes).\nDefaults to empty string which queries all exchanges.\n",
+ "in": "query",
+ "name": "exchange",
+ "schema": {
+ "type": "string"
+ }
},
- "priceToBookValue": {
- "type": "number",
- "format": "double"
+ {
+ "description": "Specify the CUSIP code of the asset you want to search for. Find more information about CUSIP codes [at their website](https://www.cusip.com/identifiers.html#/CUSIP).\nDefaults to empty string which queries all CUSIPs.\n\nNote: Although you can query by CUSIP, due to legal reasons we do not return the CUSIP in the response.\n",
+ "in": "query",
+ "name": "cusip",
+ "schema": {
+ "type": "string"
+ }
},
- "priceEarnings": {
- "type": "number",
- "format": "double"
+ {
+ "description": "Specify the CIK of the asset you want to search for. Find more information about CIK codes [at their website](https://www.sec.gov/edgar/searchedgar/cik.htm).\nDefaults to empty string which queries all CIKs.\n",
+ "in": "query",
+ "name": "cik",
+ "schema": {
+ "type": "string"
+ }
},
- "priceToEarningsRatio": {
- "type": "number",
- "format": "double"
+ {
+ "description": "Specify a point in time to retrieve tickers available on that date.\nDefaults to the most recent available date.\n",
+ "in": "query",
+ "name": "date",
+ "schema": {
+ "oneOf": [
+ {
+ "format": "date-time",
+ "type": "string"
+ },
+ {
+ "format": "date",
+ "type": "string"
+ }
+ ]
+ }
},
- "propertyPlantEquipmentNet": {
- "type": "integer"
+ {
+ "description": "Search for terms within the ticker and/or company name.\n",
+ "in": "query",
+ "name": "search",
+ "schema": {
+ "type": "string"
+ }
},
- "preferredDividendsIncomeStatementImpact": {
- "type": "integer"
+ {
+ "description": "Specify if the tickers returned should be actively traded on the queried date. Default is true.\n",
+ "example": true,
+ "in": "query",
+ "name": "active",
+ "schema": {
+ "type": "boolean"
+ }
},
- "sharePriceAdjustedClose": {
- "type": "number",
- "format": "double"
+ {
+ "description": "The field to sort the results on. Default is ticker.\nIf the `search` query parameter is present, `sort` is ignored and results are ordered by relevance.\n",
+ "example": "ticker",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "enum": [
+ "ticker",
+ "name",
+ "market",
+ "locale",
+ "primary_exchange",
+ "type",
+ "currency_symbol",
+ "currency_name",
+ "base_currency_symbol",
+ "base_currency_name",
+ "cik",
+ "composite_figi",
+ "share_class_figi",
+ "last_updated_utc",
+ "delisted_utc"
+ ],
+ "type": "string"
+ }
},
- "priceSales": {
- "type": "number",
- "format": "double"
+ {
+ "description": "The order to sort the results on. Default is asc (ascending).\n",
+ "example": "asc",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
+ }
},
- "priceToSalesRatio": {
- "type": "number",
- "format": "double"
+ {
+ "description": "Limit the size of the response, default is 100 and max is 1000.\n\nIf your query returns more than the max limit and you want to retrieve the next page of results,\nsee the `next_url` response attribute.\n",
+ "example": 10,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 100,
+ "maximum": 1000,
+ "minimum": 1,
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "count": 1,
+ "next_url": "https://api.polygon.io/v3/reference/tickers?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "e70013d92930de90e089dc8fa098888e",
+ "results": [
+ {
+ "active": true,
+ "cik": "0001090872",
+ "composite_figi": "BBG000BWQYZ5",
+ "currency_name": "usd",
+ "last_updated_utc": "2021-04-25T00:00:00Z",
+ "locale": "us",
+ "market": "stocks",
+ "name": "Agilent Technologies Inc.",
+ "primary_exchange": "XNYS",
+ "share_class_figi": "BBG001SCTQY4",
+ "ticker": "A",
+ "type": "CS"
+ }
+ ],
+ "status": "OK"
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "results": {
+ "description": "An array of tickers that match your query.\n\nNote: Although you can query by CUSIP, due to legal reasons we do not return the CUSIP in the response.\n",
+ "items": {
+ "properties": {
+ "active": {
+ "description": "Whether or not the asset is actively traded. False means the asset has been delisted.",
+ "type": "boolean"
+ },
+ "cik": {
+ "description": "The CIK number for this ticker. Find more information [here](https://en.wikipedia.org/wiki/Central_Index_Key).",
+ "type": "string"
+ },
+ "composite_figi": {
+ "description": "The composite OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)",
+ "type": "string"
+ },
+ "currency_name": {
+ "description": "The name of the currency that this asset is traded with.",
+ "type": "string"
+ },
+ "delisted_utc": {
+ "description": "The last date that the asset was traded.",
+ "format": "date-time",
+ "type": "string"
+ },
+ "last_updated_utc": {
+ "description": "The information is accurate up to this time.",
+ "format": "date-time",
+ "type": "string"
+ },
+ "locale": {
+ "description": "The locale of the asset.",
+ "enum": [
+ "us",
+ "global"
+ ],
+ "type": "string"
+ },
+ "market": {
+ "description": "The market type of the asset.",
+ "enum": [
+ "stocks",
+ "crypto",
+ "fx",
+ "otc"
+ ],
+ "type": "string"
+ },
+ "name": {
+ "description": "The name of the asset. For stocks/equities this will be the companies registered name. For crypto/fx this will be the name of the currency or coin pair.\n",
+ "type": "string"
+ },
+ "primary_exchange": {
+ "description": "The ISO code of the primary listing exchange for this asset.",
+ "type": "string"
+ },
+ "share_class_figi": {
+ "description": "The share Class OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)",
+ "type": "string"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "type": {
+ "description": "The type of the asset. Find the types that we support via our [Ticker Types API](https://polygon.io/docs/stocks/get_v3_reference_tickers_types).",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker",
+ "name",
+ "market",
+ "locale"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ }
+ },
+ "description": "Reference Tickers."
},
- "tradeAndNonTradeReceivables": {
- "type": "integer"
+ "401": {
+ "description": "Unauthorized - Check our API Key and account status"
+ }
+ },
+ "summary": "Tickers",
+ "tags": [
+ "reference:tickers:list"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ }
+ }
+ },
+ "/v3/reference/tickers/types": {
+ "get": {
+ "description": "List all ticker types that Polygon.io has.",
+ "operationId": "ListTickerTypes",
+ "parameters": [
+ {
+ "description": "Filter by asset class.",
+ "in": "query",
+ "name": "asset_class",
+ "schema": {
+ "description": "An identifier for a group of similar financial instruments.",
+ "enum": [
+ "stocks",
+ "options",
+ "crypto",
+ "fx"
+ ],
+ "example": "stocks",
+ "type": "string"
+ }
},
- "accumulatedRetainedEarningsDeficit": {
- "type": "integer"
+ {
+ "description": "Filter by locale.",
+ "in": "query",
+ "name": "locale",
+ "schema": {
+ "description": "An identifier for a geographical location.",
+ "enum": [
+ "us",
+ "global"
+ ],
+ "example": "us",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "example": 1,
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request ID assigned by the server.",
+ "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
+ "type": "string"
+ },
+ "results": {
+ "items": {
+ "description": "Describes the type of financial instrument represented by a ticker.",
+ "properties": {
+ "asset_class": {
+ "description": "An identifier for a group of similar financial instruments.",
+ "enum": [
+ "stocks",
+ "options",
+ "crypto",
+ "fx"
+ ],
+ "example": "stocks",
+ "type": "string"
+ },
+ "code": {
+ "description": "A code used by Polygon.io to refer to this ticker type.",
+ "example": "CS",
+ "type": "string"
+ },
+ "description": {
+ "description": "A short description of this ticker type.",
+ "example": "Common Stock",
+ "type": "string"
+ },
+ "locale": {
+ "description": "An identifier for a geographical location.",
+ "enum": [
+ "us",
+ "global"
+ ],
+ "example": "us",
+ "type": "string"
+ }
+ },
+ "required": [
+ "code",
+ "description",
+ "asset_class",
+ "locale"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "example": "OK",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ }
+ },
+ "description": "OK"
},
- "revenues": {
- "type": "integer"
+ "400": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "example": 1,
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request ID assigned by the server.",
+ "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "example": "OK",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ }
+ },
+ "description": "a query parameter was malformed"
},
- "revenuesUSD": {
- "type": "integer"
+ "default": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "example": 1,
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request ID assigned by the server.",
+ "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "example": "OK",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ }
+ },
+ "description": "an unknown error occurred"
+ }
+ },
+ "summary": "Ticker Types",
+ "tags": [
+ "reference:tickers:types"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ }
+ }
+ },
+ "/v3/reference/tickers/{ticker}": {
+ "get": {
+ "description": "Get a single ticker supported by Polygon.io. This response will have detailed information about the ticker and the company behind it.\n",
+ "parameters": [
+ {
+ "description": "The ticker symbol of the asset.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "ticker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
},
- "researchAndDevelopmentExpense": {
- "type": "integer"
+ {
+ "description": "Specify a point in time to get information about the ticker available on that date.\nWhen retrieving information from SEC filings, we compare this date with the period of report date on the SEC filing.\n\nFor example, consider an SEC filing submitted by AAPL on 2019-07-31, with a period of report date ending on 2019-06-29.\nThat means that the filing was submitted on 2019-07-31, but the filing was created based on information from 2019-06-29.\nIf you were to query for AAPL details on 2019-06-29, the ticker details would include information from the SEC filing.\n\nDefaults to the most recent available date.\n",
+ "in": "query",
+ "name": "date",
+ "schema": {
+ "oneOf": [
+ {
+ "format": "date-time",
+ "type": "string"
+ },
+ {
+ "format": "date",
+ "type": "string"
+ }
+ ]
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "request_id": "31d59dda-80e5-4721-8496-d0d32a654afe",
+ "results": {
+ "active": true,
+ "address": {
+ "address1": "One Apple Park Way",
+ "city": "Cupertino",
+ "postal_code": "95014",
+ "state": "CA"
+ },
+ "branding": {
+ "icon_url": "https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_icon.png",
+ "logo_url": "https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_logo.svg"
+ },
+ "cik": "0000320193",
+ "composite_figi": "BBG000B9XRY4",
+ "currency_name": "usd",
+ "description": "Apple designs a wide variety of consumer electronic devices, including smartphones (iPhone), tablets (iPad), PCs (Mac), smartwatches (Apple Watch), AirPods, and TV boxes (Apple TV), among others. The iPhone makes up the majority of Apple's total revenue. In addition, Apple offers its customers a variety of services such as Apple Music, iCloud, Apple Care, Apple TV+, Apple Arcade, Apple Card, and Apple Pay, among others. Apple's products run internally developed software and semiconductors, and the firm is well known for its integration of hardware, software and services. Apple's products are distributed online as well as through company-owned stores and third-party retailers. The company generates roughly 40% of its revenue from the Americas, with the remainder earned internationally.",
+ "homepage_url": "https://www.apple.com",
+ "list_date": "1980-12-12",
+ "locale": "us",
+ "market": "stocks",
+ "market_cap": 2771126040150,
+ "name": "Apple Inc.",
+ "phone_number": "(408) 996-1010",
+ "primary_exchange": "XNAS",
+ "share_class_figi": "BBG001S5N8V8",
+ "share_class_shares_outstanding": 16406400000,
+ "sic_code": "3571",
+ "sic_description": "ELECTRONIC COMPUTERS",
+ "ticker": "AAPL",
+ "ticker_root": "AAPL",
+ "total_employees": 154000,
+ "type": "CS",
+ "weighted_shares_outstanding": 16334371000
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "results": {
+ "description": "Ticker with details.\n",
+ "properties": {
+ "active": {
+ "description": "Whether or not the asset is actively traded. False means the asset has been delisted.",
+ "type": "boolean"
+ },
+ "address": {
+ "properties": {
+ "address1": {
+ "description": "The first line of the company's headquarters address.",
+ "type": "string"
+ },
+ "city": {
+ "description": "The city of the company's headquarters address.",
+ "type": "string"
+ },
+ "postal_code": {
+ "description": "The postal code of the company's headquarters address.",
+ "type": "string"
+ },
+ "state": {
+ "description": "The state of the company's headquarters address.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "branding": {
+ "properties": {
+ "icon_url": {
+ "description": "A link to this ticker's company's icon. Icon's are generally smaller, square images that represent the company at a glance.\nNote that you must provide an API key when accessing this URL. See the \"Authentication\" section at the top of this page for more details.\n",
+ "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.\n",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "cik": {
+ "description": "The CIK number for this ticker. Find more information [here](https://en.wikipedia.org/wiki/Central_Index_Key).",
+ "type": "string"
+ },
+ "composite_figi": {
+ "description": "The composite OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)",
+ "type": "string"
+ },
+ "currency_name": {
+ "description": "The name of the currency that this asset is traded with.",
+ "type": "string"
+ },
+ "delisted_utc": {
+ "description": "The last date that the asset was traded.",
+ "format": "date-time",
+ "type": "string"
+ },
+ "description": {
+ "description": "A description of the company and what they do/offer.",
+ "type": "string"
+ },
+ "homepage_url": {
+ "description": "The URL of the company's website homepage.",
+ "type": "string"
+ },
+ "list_date": {
+ "description": "The date that the symbol was first publicly listed in the format YYYY-MM-DD.",
+ "type": "string"
+ },
+ "locale": {
+ "description": "The locale of the asset.",
+ "enum": [
+ "us",
+ "global"
+ ],
+ "type": "string"
+ },
+ "market": {
+ "description": "The market type of the asset.",
+ "enum": [
+ "stocks",
+ "crypto",
+ "fx",
+ "otc"
+ ],
+ "type": "string"
+ },
+ "market_cap": {
+ "description": "The most recent close price of the ticker multiplied by weighted outstanding shares.",
+ "format": "double",
+ "type": "number"
+ },
+ "name": {
+ "description": "The name of the asset. For stocks/equities this will be the companies registered name. For crypto/fx this will be the name of the currency or coin pair.\n",
+ "type": "string"
+ },
+ "phone_number": {
+ "description": "The phone number for the company behind this ticker.",
+ "type": "string"
+ },
+ "primary_exchange": {
+ "description": "The ISO code of the primary listing exchange for this asset.",
+ "type": "string"
+ },
+ "share_class_figi": {
+ "description": "The share Class OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)",
+ "type": "string"
+ },
+ "share_class_shares_outstanding": {
+ "description": "The recorded number of outstanding shares for this particular share class.",
+ "format": "double",
+ "type": "number"
+ },
+ "sic_code": {
+ "description": "The standard industrial classification code for this ticker. For a list of SIC Codes, see the SEC's \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://www.sec.gov/info/edgar/siccodes.htm\"\u003eSIC Code List\u003c/a\u003e.\n",
+ "type": "string"
+ },
+ "sic_description": {
+ "description": "A description of this ticker's SIC code.",
+ "type": "string"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "ticker_root": {
+ "description": "The root of a specified ticker. For example, the root of BRK.A is BRK.",
+ "type": "string"
+ },
+ "ticker_suffix": {
+ "description": "The suffix of a specified ticker. For example, the suffix of BRK.A is A.",
+ "type": "string"
+ },
+ "total_employees": {
+ "description": "The approximate number of employees for the company.",
+ "type": "number"
+ },
+ "type": {
+ "description": "The type of the asset. Find the types that we support via our [Ticker Types API](https://polygon.io/docs/stocks/get_v3_reference_tickers_types).",
+ "type": "string"
+ },
+ "weighted_shares_outstanding": {
+ "description": "The shares outstanding calculated assuming all shares of other share classes are converted to this share class.\n",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "ticker",
+ "name",
+ "market",
+ "locale",
+ "active",
+ "currency_name"
+ ],
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ }
+ },
+ "description": "Reference Tickers."
},
- "returnOnAverageAssets": {
- "type": "integer"
+ "401": {
+ "description": "Unauthorized - Check our API Key and account status"
+ }
+ },
+ "summary": "Ticker Details v3",
+ "tags": [
+ "reference:tickers:get"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ }
+ }
+ },
+ "/v3/snapshot/options/{underlyingAsset}": {
+ "get": {
+ "description": "Get the snapshot of all options contracts for an underlying ticker.",
+ "operationId": "OptionsChain",
+ "parameters": [
+ {
+ "description": "The underlying ticker symbol of the option contract.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "underlyingAsset",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
},
- "returnOnAverageEquity": {
- "type": "integer"
+ {
+ "description": "Query by strike price of a contract.",
+ "in": "query",
+ "name": "strike_price",
+ "schema": {
+ "type": "number"
+ },
+ "x-polygon-filter-field": {
+ "range": true,
+ "type": "number"
+ }
},
- "returnOnInvestedCapital": {
- "type": "integer"
+ {
+ "description": "Query by contract expiration with date format YYYY-MM-DD.",
+ "in": "query",
+ "name": "expiration_date",
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
},
- "returnOnSales": {
- "type": "number",
- "format": "double"
+ {
+ "description": "Query by the type of contract.",
+ "in": "query",
+ "name": "contract_type",
+ "schema": {
+ "enum": [
+ "call",
+ "put"
+ ],
+ "type": "string"
+ }
},
- "shareBasedCompensation": {
- "type": "integer"
+ {
+ "description": "Search by strike_price.",
+ "in": "query",
+ "name": "strike_price.gte",
+ "schema": {
+ "type": "number"
+ }
},
- "sellingGeneralAndAdministrativeExpense": {
- "type": "integer"
+ {
+ "description": "Search by strike_price.",
+ "in": "query",
+ "name": "strike_price.gt",
+ "schema": {
+ "type": "number"
+ }
},
- "shareFactor": {
- "type": "integer"
+ {
+ "description": "Search by strike_price.",
+ "in": "query",
+ "name": "strike_price.lte",
+ "schema": {
+ "type": "number"
+ }
},
- "shares": {
- "type": "integer"
+ {
+ "description": "Search by strike_price.",
+ "in": "query",
+ "name": "strike_price.lt",
+ "schema": {
+ "type": "number"
+ }
},
- "weightedAverageShares": {
- "type": "integer"
+ {
+ "description": "Search by expiration_date.",
+ "in": "query",
+ "name": "expiration_date.gte",
+ "schema": {
+ "type": "string"
+ }
},
- "weightedAverageSharesDiluted": {
- "type": "integer"
+ {
+ "description": "Search by expiration_date.",
+ "in": "query",
+ "name": "expiration_date.gt",
+ "schema": {
+ "type": "string"
+ }
},
- "salesPerShare": {
- "type": "number",
- "format": "double"
+ {
+ "description": "Search by expiration_date.",
+ "in": "query",
+ "name": "expiration_date.lte",
+ "schema": {
+ "type": "string"
+ }
},
- "tangibleAssetValue": {
- "type": "integer"
+ {
+ "description": "Search by expiration_date.",
+ "in": "query",
+ "name": "expiration_date.lt",
+ "schema": {
+ "type": "string"
+ }
},
- "taxAssets": {
- "type": "integer"
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
},
- "incomeTaxExpense": {
- "type": "integer"
+ {
+ "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"
+ }
},
- "taxLiabilities": {
- "type": "integer"
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "ticker",
+ "enum": [
+ "ticker",
+ "expiration_date",
+ "strike_price"
+ ],
+ "example": "ticker",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "request_id": "6a7e466379af0a71039d60cc78e72282",
+ "results": [
+ {
+ "break_even_price": 151.2,
+ "day": {
+ "change": 4.5,
+ "change_percent": 6.76,
+ "close": 120.73,
+ "high": 120.81,
+ "last_updated": 1605195918507251700,
+ "low": 118.9,
+ "open": 119.32,
+ "previous_close": 119.12,
+ "volume": 868,
+ "vwap": 119.31
+ },
+ "details": {
+ "contract_type": "call",
+ "exercise_style": "american",
+ "expiration_date": "2022-01-21",
+ "shares_per_contract": 100,
+ "strike_price": 150,
+ "ticker": "AAPL211022C000150000"
+ },
+ "greeks": {
+ "delta": 1,
+ "gamma": 0,
+ "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"
+ }
+ }
+ ],
+ "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": {
+ "items": {
+ "properties": {
+ "break_even_price": {
+ "description": "The price the underlying asset for the contract to break even. For a call this value is (strike price + premium paid), where a put this value is (strike price - premium paid)",
+ "format": "double",
+ "type": "number"
+ },
+ "day": {
+ "description": "The most recent daily bar for this contract.",
+ "properties": {
+ "change": {
+ "description": "The value of the price change for the contract from the previous trading day.",
+ "format": "double",
+ "type": "number"
+ },
+ "change_percent": {
+ "description": "The percent of the price change for the contract from the previous trading day.",
+ "format": "double",
+ "type": "number"
+ },
+ "close": {
+ "description": "The closing price for the contract of the day.",
+ "format": "double",
+ "type": "number"
+ },
+ "high": {
+ "description": "The highest price for the contract of the day.",
+ "format": "double",
+ "type": "number"
+ },
+ "last_updated": {
+ "description": "The nanosecond timestamp of when this information was updated.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "low": {
+ "description": "The lowest price for the contract of the day.",
+ "format": "double",
+ "type": "number"
+ },
+ "open": {
+ "description": "The open price for the contract of the day.",
+ "format": "double",
+ "type": "number"
+ },
+ "previous_close": {
+ "description": "The closing price for the contract of previous trading day.",
+ "format": "double",
+ "type": "number"
+ },
+ "volume": {
+ "description": "The trading volume for the contract of the day.",
+ "format": "double",
+ "type": "number"
+ },
+ "vwap": {
+ "description": "The trading volume weighted average price for the contract of the day.",
+ "format": "double",
+ "type": "number",
+ "x-polygon-go-id": "VWAP"
+ }
+ },
+ "type": "object"
+ },
+ "details": {
+ "properties": {
+ "contract_type": {
+ "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".",
+ "enum": [
+ "put",
+ "call",
+ "other"
+ ],
+ "type": "string"
+ },
+ "exercise_style": {
+ "description": "The exercise style of this contract. See \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Option_style\"\u003ethis link\u003c/a\u003e for more details on exercise styles.",
+ "enum": [
+ "american",
+ "european",
+ "bermudan"
+ ],
+ "type": "string"
+ },
+ "expiration_date": {
+ "description": "The contract's expiration date in YYYY-MM-DD format.",
+ "format": "date",
+ "type": "string",
+ "x-polygon-go-type": {
+ "name": "IDaysPolygonDateString",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "shares_per_contract": {
+ "description": "The number of shares per contract for this contract.",
+ "type": "number"
+ },
+ "strike_price": {
+ "description": "The strike price of the option contract.",
+ "format": "double",
+ "type": "number"
+ },
+ "ticker": {
+ "description": "The ticker for the option contract.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "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"
+ },
+ "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"
+ },
+ "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"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "Snapshots for options contracts of the underlying ticker"
+ }
+ },
+ "summary": "Options Chain",
+ "tags": [
+ "options:snapshot"
+ ],
+ "x-polygon-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
},
- "tangibleAssetsBookValuePerShare": {
- "type": "number",
- "format": "double"
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
+ }
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Options data",
+ "name": "options"
+ },
+ "x-polygon-paginate": {
+ "limit": {
+ "default": 10,
+ "max": 1000
},
- "workingCapital": {
- "type": "integer"
+ "sort": {
+ "default": "ticker",
+ "enum": [
+ "ticker",
+ "expiration_date",
+ "strike_price"
+ ]
}
}
},
- "Markets": {
- "type": "object",
- "properties": {
- "results": {
- "type": "array",
- "description": "A list of supported markets.",
- "items": {
- "type": "object",
- "properties": {
- "market": {
- "type": "string",
- "description": "The name of the market."
- },
- "desc": {
- "type": "string",
- "description": "A description of the market."
- }
- }
+ "x-polygon-draft": true
+ },
+ "/v3/snapshot/options/{underlyingAsset}/{optionContract}": {
+ "get": {
+ "description": "Get the snapshot of an option contract for a stock equity.",
+ "operationId": "OptionContract",
+ "parameters": [
+ {
+ "description": "The underlying ticker symbol of the option contract.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "underlyingAsset",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The option contract identifier.",
+ "example": "O:AAPL230616C00150000",
+ "in": "path",
+ "name": "optionContract",
+ "required": true,
+ "schema": {
+ "type": "string"
}
}
- }
- },
- "Locales": {
- "type": "object",
- "properties": {
- "results": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "locale": {
- "type": "string",
- "description": "An abbreviated country name."
+ ],
+ "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"
},
- "name": {
- "type": "string",
- "description": "The name of the country."
+ "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"
+ }
+ },
+ "type": "object"
+ },
+ "details": {
+ "properties": {
+ "contract_type": {
+ "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".",
+ "enum": [
+ "put",
+ "call",
+ "other"
+ ],
+ "type": "string"
+ },
+ "exercise_style": {
+ "description": "The exercise style of this contract. See \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Option_style\"\u003ethis link\u003c/a\u003e for more details on exercise styles.",
+ "enum": [
+ "american",
+ "european",
+ "bermudan"
+ ],
+ "type": "string"
+ },
+ "expiration_date": {
+ "description": "The contract's expiration date in YYYY-MM-DD format.",
+ "format": "date",
+ "type": "string",
+ "x-polygon-go-type": {
+ "name": "IDaysPolygonDateString",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "shares_per_contract": {
+ "description": "The number of shares per contract for this contract.",
+ "type": "number"
+ },
+ "strike_price": {
+ "description": "The strike price of the option contract.",
+ "format": "double",
+ "type": "number"
+ },
+ "ticker": {
+ "description": "The ticker for the option contract.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "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"
+ },
+ "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"
+ },
+ "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"
+ }
+ },
+ "type": "object"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
}
}
- }
+ },
+ "description": "Snapshot of the option contract."
}
- }
- },
- "V2News": {
- "type": "object",
- "required": [
- "id",
- "publisher",
- "title",
- "author",
- "published_utc",
- "article_url",
- "tickers"
+ },
+ "summary": "Option Contract",
+ "tags": [
+ "options:snapshot"
],
- "properties": {
- "id": {
- "type": "string",
- "description": "Unique identifier for the article.\n"
+ "x-polygon-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
},
- "publisher": {
- "type": "object",
- "required": [
- "name",
- "logo_url",
- "homepage_url"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The publisher's name.\n"
- },
- "logo_url": {
- "type": "string",
- "format": "url",
- "description": "The publisher's logo URL.\n"
- },
- "homepage_url": {
- "type": "string",
- "format": "url",
- "description": "The publisher's homepage URL.\n"
- },
- "favicon_url": {
- "type": "string",
- "format": "url",
- "description": "The publisher's homepage favicon URL.\n"
- }
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
+ }
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Options data",
+ "name": "options"
+ }
+ }
+ },
+ "/v3/trades/{cryptoTicker}": {
+ "get": {
+ "description": "Get trades for a crypto ticker symbol in a given time range.",
+ "operationId": "TradesCrypto",
+ "parameters": [
+ {
+ "description": "The ticker symbol to get trades for.",
+ "example": "X:BTC-USD",
+ "in": "path",
+ "name": "cryptoTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
}
},
- "title": {
- "type": "string",
- "description": "The title of the news article.\n"
- },
- "author": {
- "type": "string",
- "description": "The article's author.\n"
- },
- "published_utc": {
- "type": "string",
- "format": "date-time",
- "description": "The date the article was published on.\n"
- },
- "article_url": {
- "type": "string",
- "format": "url",
- "description": "A link to the news article.\n"
- },
- "tickers": {
- "type": "array",
- "description": "The ticker symbols associated with the article.\n",
- "items": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
+ {
+ "description": "Query by trade timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true
}
},
- "amp_url": {
- "type": "string",
- "format": "url",
- "description": "The mobile friendly Accelerated Mobile Page (AMP) URL.\n"
- },
- "image_url": {
- "type": "string",
- "format": "url",
- "description": "The article's image URL.\n"
- },
- "description": {
- "type": "string",
- "description": "A description of the article.\n"
- },
- "keywords": {
- "type": "array",
- "description": "The keywords associated with the article (which will vary depending on\nthe publishing source).\n",
- "items": {
+ {
+ "description": "Search by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
"type": "string"
}
- }
- }
- },
- "StocksOpenClose": {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "description": "The status of this request's response."
- },
- "from": {
- "type": "string",
- "format": "date",
- "description": "The requested date."
- },
- "symbol": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "open": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "high": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "low": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
},
- "close": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "volume": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "otc": {
- "type": "boolean",
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false."
- },
- "preMarket": {
- "type": "integer",
- "description": "The open price of the ticker symbol in pre-market trading."
- },
- "afterHours": {
- "type": "number",
- "format": "double",
- "description": "The close price of the ticker symbol in after hours trading."
- }
- }
- },
- "StocksV2Base": {
- "type": "object",
- "properties": {
- "T": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
+ {
+ "description": "Search by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
},
- "t": {
- "type": "integer",
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it."
+ {
+ "description": "Search by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
},
- "y": {
- "type": "integer",
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange."
+ {
+ "description": "Search by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
},
- "f": {
- "type": "integer",
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message."
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
},
- "q": {
- "type": "integer",
- "format": "int64",
- "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n"
- }
- }
- },
- "StocksV2Trade": {
- "allOf": [
{
- "type": "object",
- "properties": {
- "T": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "t": {
- "type": "integer",
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it."
- },
- "y": {
- "type": "integer",
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange."
- },
- "f": {
- "type": "integer",
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message."
- },
- "q": {
- "type": "integer",
- "format": "int64",
- "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n"
- }
+ "description": "Limit the number of results returned, default is 10 and max is 50000.",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "example": 10,
+ "maximum": 50000,
+ "minimum": 1,
+ "type": "integer"
}
},
{
- "type": "object",
- "properties": {
- "c": {
- "type": "array",
- "description": "A list of condition codes.\n",
- "items": {
- "type": "integer",
- "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"
- }
- },
- "i": {
- "type": "string",
- "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"
- },
- "p": {
- "type": "number",
- "format": "double",
- "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"
- },
- "s": {
- "type": "number",
- "format": "double",
- "description": "The size of a trade (also known as volume).\n"
- },
- "e": {
- "type": "integer",
- "description": "The trade correction indicator.\n"
- },
- "x": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- },
- "r": {
- "type": "integer",
- "description": "The ID for the Trade Reporting Facility where the trade took place.\n"
- },
- "z": {
- "type": "integer",
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n"
- }
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "timestamp",
+ "enum": [
+ "timestamp"
+ ],
+ "example": "timestamp",
+ "type": "string"
}
}
- ]
- },
- "StocksV2Trades": {
- "type": "object",
- "properties": {
- "results": {
- "type": "array",
- "items": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "T": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "t": {
- "type": "integer",
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it."
- },
- "y": {
- "type": "integer",
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange."
- },
- "f": {
- "type": "integer",
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message."
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v3/trades/X:BTC-USD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": [
+ {
+ "conditions": [
+ 1
+ ],
+ "exchange": 1,
+ "id": "191450340",
+ "participant_timestamp": 1625097600103000000,
+ "price": 35060,
+ "size": 1.0434526
},
- "q": {
- "type": "integer",
- "format": "int64",
- "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n"
+ {
+ "conditions": [
+ 2
+ ],
+ "exchange": 1,
+ "id": "191450341",
+ "participant_timestamp": 1625097600368000000,
+ "price": 35059.99,
+ "size": 0.0058883
}
- }
+ ],
+ "status": "OK"
},
- {
- "type": "object",
+ "schema": {
"properties": {
- "c": {
- "type": "array",
- "description": "A list of condition codes.\n",
- "items": {
- "type": "integer",
- "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"
- }
- },
- "i": {
- "type": "string",
- "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"
- },
- "p": {
- "type": "number",
- "format": "double",
- "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"
- },
- "s": {
- "type": "number",
- "format": "double",
- "description": "The size of a trade (also known as volume).\n"
- },
- "e": {
- "type": "integer",
- "description": "The trade correction indicator.\n"
- },
- "x": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
},
- "r": {
- "type": "integer",
- "description": "The ID for the Trade Reporting Facility where the trade took place.\n"
+ "results": {
+ "items": {
+ "properties": {
+ "conditions": {
+ "description": "A list of condition codes.",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "exchange": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "id": {
+ "description": "The Trade ID which uniquely identifies a trade on the exchange that the trade happened on.",
+ "type": "string"
+ },
+ "participant_timestamp": {
+ "description": "The nanosecond Exchange Unix Timestamp. This is the timestamp of when the trade was generated at the exchange.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "price": {
+ "description": "The price of the trade in the base currency of the crypto pair.",
+ "format": "double",
+ "type": "number"
+ },
+ "size": {
+ "description": "The size of a trade (also known as volume).",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
},
- "z": {
- "type": "integer",
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n"
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
}
- }
+ },
+ "type": "object"
}
- ]
- }
+ }
+ },
+ "description": "A list of trades."
+ }
+ },
+ "summary": "Trades",
+ "tags": [
+ "crypto:trades"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Trade data",
+ "name": "trades"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
+ },
+ "x-polygon-paginate": {
+ "limit": {
+ "max": 50000
+ },
+ "order": {
+ "default": "desc"
+ },
+ "sort": {
+ "default": "timestamp",
+ "enum": [
+ "timestamp"
+ ]
+ }
+ },
+ "x-polygon-replaces": {
+ "date": 1654056060000,
+ "replaces": {
+ "name": "Historic Crypto Trades",
+ "path": "get_v1_historic_crypto__from___to___date"
}
}
},
- "StocksV2NBBO": {
- "allOf": [
+ "x-polygon-ignore": true
+ },
+ "/v3/trades/{optionsTicker}": {
+ "get": {
+ "description": "Get trades for an options ticker symbol in a given time range.",
+ "operationId": "TradesOptions",
+ "parameters": [
{
- "type": "object",
- "properties": {
- "T": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "t": {
- "type": "integer",
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it."
- },
- "y": {
- "type": "integer",
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange."
- },
- "f": {
- "type": "integer",
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message."
- },
- "q": {
- "type": "integer",
- "format": "int64",
- "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n"
- }
+ "description": "The options ticker symbol to get trades for.",
+ "example": "O:TSLA210903C00700000",
+ "in": "path",
+ "name": "optionsTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-go-id": "Ticker"
+ },
+ {
+ "description": "Query by trade timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true
}
},
{
- "type": "object",
- "properties": {
- "c": {
- "type": "array",
- "description": "A list of condition codes.\n",
- "items": {
- "type": "integer",
- "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"
- }
- },
- "i": {
- "type": "array",
- "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n",
- "items": {
- "type": "integer",
- "description": "The indicator code.\n"
- }
- },
- "p": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
- },
- "s": {
- "type": "integer",
- "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price."
- },
- "x": {
- "allOf": [
- {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- },
- {
- "description": "Bid Exchange Id"
- }
- ]
- },
- "P": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
- },
- "S": {
- "type": "integer",
- "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price."
- },
- "X": {
- "allOf": [
- {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- },
- {
- "description": "Ask Exchange Id"
- }
- ]
- },
- "z": {
- "type": "integer",
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n"
- }
+ "description": "Search by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 50000.",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "example": 10,
+ "maximum": 50000,
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "timestamp",
+ "enum": [
+ "timestamp"
+ ],
+ "example": "timestamp",
+ "type": "string"
}
}
- ]
- },
- "StocksV2NBBOs": {
- "type": "object",
- "properties": {
- "results": {
- "type": "array",
- "items": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "T": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "t": {
- "type": "integer",
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it."
- },
- "y": {
- "type": "integer",
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange."
- },
- "f": {
- "type": "integer",
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message."
- },
- "q": {
- "type": "integer",
- "format": "int64",
- "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n"
- }
- }
- },
- {
- "type": "object",
- "properties": {
- "c": {
- "type": "array",
- "description": "A list of condition codes.\n",
- "items": {
- "type": "integer",
- "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"
- }
- },
- "i": {
- "type": "array",
- "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n",
- "items": {
- "type": "integer",
- "description": "The indicator code.\n"
- }
- },
- "p": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
- },
- "s": {
- "type": "integer",
- "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price."
- },
- "x": {
- "allOf": [
- {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- },
- {
- "description": "Bid Exchange Id"
- }
- ]
- },
- "P": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v3/trades/O:AZO140621P00530000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": [
+ {
+ "exchange": 46,
+ "participant_timestamp": 1401715883806000000,
+ "price": 6.91,
+ "sip_timestamp": 1401715883806000000,
+ "size": 1
},
- "S": {
- "type": "integer",
- "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price."
+ {
+ "conditions": [
+ 209
+ ],
+ "exchange": 67,
+ "participant_timestamp": 1401716547786000000,
+ "price": 7.2,
+ "sip_timestamp": 1401716547786000000,
+ "size": 1
+ }
+ ],
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
},
- "X": {
- "allOf": [
- {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
+ "results": {
+ "items": {
+ "properties": {
+ "conditions": {
+ "description": "A list of condition codes.",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "correction": {
+ "description": "The trade correction indicator.",
+ "type": "integer"
+ },
+ "exchange": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/options/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "participant_timestamp": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the trade was actually generated at the exchange.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "price": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
+ "format": "double",
+ "type": "number"
+ },
+ "sip_timestamp": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this trade from the exchange which produced it.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "size": {
+ "description": "The size of a trade (also known as volume).",
+ "format": "double",
+ "type": "number"
+ }
},
- {
- "description": "Ask Exchange Id"
- }
- ]
+ "type": "object"
+ },
+ "type": "array"
},
- "z": {
- "type": "integer",
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n"
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
}
- }
+ },
+ "type": "object"
}
- ]
- }
- }
- }
- },
- "ForexConversion": {
- "type": "object",
- "properties": {
- "last": {
- "type": "object",
- "properties": {
- "ask": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
- },
- "bid": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
- },
- "exchange": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- },
- "timestamp": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
}
- }
- },
- "from": {
- "type": "string",
- "description": "The \"from\" currency symbol."
- },
- "to": {
- "type": "string",
- "description": "The \"to\" currency symbol."
+ },
+ "description": "A list of trades."
+ }
+ },
+ "summary": "Trades",
+ "tags": [
+ "options:trades"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Trade data",
+ "name": "trades"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Options data",
+ "name": "options"
+ },
+ "x-polygon-paginate": {
+ "limit": {
+ "max": 50000
},
- "initialAmount": {
- "type": "number",
- "format": "double",
- "description": "The amount to convert."
+ "order": {
+ "default": "desc"
},
- "converted": {
- "type": "number",
- "format": "double",
- "description": "The result of the conversion."
+ "sort": {
+ "default": "timestamp",
+ "enum": [
+ "timestamp"
+ ]
}
}
},
- "ForexHistoricTrades": {
- "type": "object",
- "properties": {
- "day": {
- "type": "string",
- "format": "date",
- "description": "The date that was evaluated from the request."
+ "x-polygon-ignore": true
+ },
+ "/v3/trades/{stockTicker}": {
+ "get": {
+ "description": "Get trades for a ticker symbol in a given time range.",
+ "operationId": "Trades",
+ "parameters": [
+ {
+ "description": "The ticker symbol to get trades for.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "stockTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-go-id": "Ticker"
},
- "map": {
- "type": "object",
- "description": "A map for shortened result keys."
+ {
+ "description": "Query by trade timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true
+ }
},
- "msLatency": {
- "type": "integer",
- "description": "The milliseconds of latency for the query results."
+ {
+ "description": "Search by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
},
- "pair": {
- "type": "string",
- "description": "The currency pair that was evaluated from the request."
+ {
+ "description": "Search by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
},
- "ticks": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "a": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
- },
- "b": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
- },
- "x": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- }
- }
+ {
+ "description": "Search by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
}
- }
- }
- },
- "ForexPairLastQuote": {
- "type": "object",
- "properties": {
- "last": {
- "type": "object",
- "properties": {
- "ask": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
- },
- "bid": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
- },
- "exchange": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- },
- "timestamp": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- }
+ },
+ {
+ "description": "Search by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
}
},
- "symbol": {
- "type": "string",
- "description": "The symbol pair that was evaluated from the request."
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 50000.",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "example": 10,
+ "maximum": 50000,
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "timestamp",
+ "enum": [
+ "timestamp"
+ ],
+ "example": "timestamp",
+ "type": "string"
+ }
}
- }
- },
- "ForexPreviousClose": {
- "type": "object",
- "properties": {
- "results": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "T": {
- "type": "string",
- "description": "The exchange symbol that this item is traded under."
- },
- "v": {
- "type": "number",
- "format": "double",
- "description": "The trading volume of the symbol in the given time period."
- },
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest price for the symbol in the given time period."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest price for the symbol in the given time period."
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.polygon.io/v3/trades/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": [
+ {
+ "conditions": [
+ 12,
+ 41
+ ],
+ "exchange": 11,
+ "id": "1",
+ "participant_timestamp": 1517562000015577000,
+ "price": 171.55,
+ "sequence_number": 1063,
+ "sip_timestamp": 1517562000016036600,
+ "size": 100,
+ "tape": 3
+ },
+ {
+ "conditions": [
+ 12,
+ 41
+ ],
+ "exchange": 11,
+ "id": "2",
+ "participant_timestamp": 1517562000015577600,
+ "price": 171.55,
+ "sequence_number": 1064,
+ "sip_timestamp": 1517562000016038100,
+ "size": 100,
+ "tape": 3
+ }
+ ],
+ "status": "OK"
},
- "n": {
- "type": "integer",
- "description": "The number of transactions in the aggregate window."
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "results": {
+ "items": {
+ "properties": {
+ "conditions": {
+ "description": "A list of condition codes.",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "correction": {
+ "description": "The trade correction indicator.",
+ "type": "integer"
+ },
+ "exchange": {
+ "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "id": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.",
+ "type": "string"
+ },
+ "participant_timestamp": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the trade was actually generated at the exchange.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "price": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
+ "format": "double",
+ "type": "number"
+ },
+ "sequence_number": {
+ "description": "The sequence number represents the sequence in which trade events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11). Values reset after each trading session/day.",
+ "format": "int64",
+ "type": "integer"
+ },
+ "sip_timestamp": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this trade from the exchange which produced it.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ },
+ "size": {
+ "description": "The size of a trade (also known as volume).",
+ "format": "double",
+ "type": "number"
+ },
+ "tape": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ",
+ "format": "int32",
+ "type": "integer"
+ },
+ "trf_id": {
+ "description": "The ID for the Trade Reporting Facility where the trade took place.",
+ "type": "integer"
+ },
+ "trf_timestamp": {
+ "description": "The nanosecond accuracy TRF (Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this trade.",
+ "format": "int64",
+ "type": "integer",
+ "x-polygon-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/polygon-io/ptime"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
}
}
- }
- }
- }
- },
- "CryptoExchange": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- },
- "type": {
- "type": "string",
- "description": "Type of exchange feed"
- },
- "market": {
- "type": "string",
- "description": "Market data type this exchange contains ( crypto only currently )"
- },
- "name": {
- "type": "string",
- "description": "Name of the exchange"
},
- "url": {
- "type": "string",
- "description": "URL of this exchange"
- }
+ "description": "A list of trades."
+ }
+ },
+ "summary": "Trades",
+ "tags": [
+ "stocks:trades"
+ ],
+ "x-polygon-entitlement-data-type": {
+ "description": "Trade data",
+ "name": "trades"
+ },
+ "x-polygon-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
+ },
+ "x-polygon-paginate": {
+ "limit": {
+ "max": 50000
+ },
+ "order": {
+ "default": "desc"
+ },
+ "sort": {
+ "default": "timestamp",
+ "enum": [
+ "timestamp"
+ ]
+ }
+ },
+ "x-polygon-replaces": {
+ "date": 1654056060000,
+ "replaces": {
+ "name": "Trades",
+ "path": "get_v2_ticks_stocks_trades__ticker___date"
}
}
- },
- "CryptoTradeExchange": {
- "type": "integer",
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n"
- },
- "CryptoHistoricTrades": {
- "type": "object",
- "properties": {
- "day": {
- "type": "string",
- "format": "date",
- "description": "The date that was evaluated from the request."
+ }
+ },
+ "/vX/reference/financials": {
+ "get": {
+ "description": "Get historical financial data for a stock ticker.\nThe financials data is extracted from XBRL from company SEC filings using the methodology outlined \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"http://xbrl.squarespace.com/understanding-sec-xbrl-financi/\"\u003ehere\u003c/a\u003e.",
+ "operationId": "ListFinancials",
+ "parameters": [
+ {
+ "description": "Query by company ticker.",
+ "in": "query",
+ "name": "ticker",
+ "schema": {
+ "type": "string"
+ }
},
- "map": {
- "type": "object",
- "description": "A map for shortened result keys."
+ {
+ "description": "Query by central index key (\u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"https://www.sec.gov/edgar/searchedgar/cik.htm\"\u003eCIK\u003c/a\u003e) Number",
+ "in": "query",
+ "name": "cik",
+ "schema": {
+ "type": "string"
+ }
},
- "msLatency": {
- "type": "integer",
- "description": "The milliseconds of latency for the query results."
+ {
+ "description": "Query by company name.",
+ "in": "query",
+ "name": "company_name",
+ "schema": {
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "search": true
+ }
},
- "symbol": {
- "type": "string",
- "description": "The symbol pair that was evaluated from the request."
+ {
+ "description": "Query by standard industrial classification (\u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"https://www.sec.gov/corpfin/division-of-corporation-finance-standard-industrial-classification-sic-code-list\"\u003eSIC\u003c/a\u003e)",
+ "in": "query",
+ "name": "sic",
+ "schema": {
+ "type": "string"
+ }
},
- "ticks": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "p": {
- "type": "number",
- "format": "double",
- "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"
- },
- "s": {
- "type": "number",
- "format": "double",
- "description": "The size of a trade (also known as volume).\n"
- },
- "x": {
- "type": "integer",
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n"
- },
- "c": {
- "type": "array",
- "description": "A list of condition codes.\n",
- "items": {
- "type": "integer",
- "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"
- }
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "i": {
- "type": "string",
- "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"
- }
- }
+ {
+ "description": "Query by the date when the filing with financials data was filed in YYYY-MM-DD format.\n\nBest used when querying over date ranges to find financials based on filings that happen in a time period.\n\nExamples:\n\nTo get financials based on filings that have happened after January 1, 2009 use the query param filing_date.gte=2009-01-01\n\nTo get financials based on filings that happened in the year 2009 use the query params filing_date.gte=2009-01-01\u0026filing_date.lt=2010-01-01",
+ "in": "query",
+ "name": "filing_date",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true
}
- }
- }
- },
- "CryptoLastTrade": {
- "type": "object",
- "properties": {
- "last": {
- "type": "object",
- "properties": {
- "conditions": {
- "type": "array",
- "description": "A list of condition codes.\n",
- "items": {
- "type": "integer",
- "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"
- }
- },
- "exchange": {
- "type": "integer",
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n"
- },
- "price": {
- "type": "number",
- "format": "double",
- "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"
- },
- "size": {
- "type": "number",
- "format": "double",
- "description": "The size of a trade (also known as volume).\n"
- },
- "timestamp": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- }
+ },
+ {
+ "description": "The period of report for the filing with financials data in YYYY-MM-DD format.",
+ "in": "query",
+ "name": "period_of_report_date",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ },
+ "x-polygon-filter-field": {
+ "range": true
}
},
- "symbol": {
- "type": "string",
- "description": "The symbol pair that was evaluated from the request."
- }
- }
- },
- "CryptoOpenClose": {
- "type": "object",
- "properties": {
- "symbol": {
- "type": "string",
- "description": "The symbol pair that was evaluated from the request."
+ {
+ "description": "Query by timeframe. Annual financials originate from 10-K filings, and quarterly financials originate from 10-Q filings. Note: Most companies do not file quarterly reports for Q4 and instead include those financials in their annual report, so some companies my not return quarterly financials for Q4",
+ "in": "query",
+ "name": "timeframe",
+ "schema": {
+ "enum": [
+ "annual",
+ "quarterly"
+ ],
+ "type": "string"
+ }
},
- "isUTC": {
- "type": "boolean",
- "description": "Whether or not the timestamps are in UTC timezone."
+ {
+ "description": "Whether or not to include the `xpath` and `formula` attributes for each financial data point.\nSee the `xpath` and `formula` response attributes for more info. False by default.",
+ "in": "query",
+ "name": "include_sources",
+ "schema": {
+ "default": false,
+ "type": "boolean"
+ }
},
- "day": {
- "type": "string",
- "format": "date",
- "description": "The date requested."
+ {
+ "description": "Search by company_name.",
+ "in": "query",
+ "name": "company_name.search",
+ "schema": {
+ "type": "string"
+ }
},
- "open": {
- "type": "number",
- "format": "double",
- "description": "The open price for the symbol in the given time period."
+ {
+ "description": "Search by filing_date.",
+ "in": "query",
+ "name": "filing_date.gte",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
},
- "close": {
- "type": "number",
- "format": "double",
- "description": "The close price for the symbol in the given time period."
+ {
+ "description": "Search by filing_date.",
+ "in": "query",
+ "name": "filing_date.gt",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
},
- "openTrades": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "p": {
- "type": "number",
- "format": "double",
- "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"
- },
- "s": {
- "type": "number",
- "format": "double",
- "description": "The size of a trade (also known as volume).\n"
- },
- "x": {
- "type": "integer",
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n"
- },
- "c": {
- "type": "array",
- "description": "A list of condition codes.\n",
- "items": {
- "type": "integer",
- "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"
- }
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "i": {
- "type": "string",
- "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"
- }
- }
+ {
+ "description": "Search by filing_date.",
+ "in": "query",
+ "name": "filing_date.lte",
+ "schema": {
+ "format": "date",
+ "type": "string"
}
},
- "closingTrades": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "p": {
- "type": "number",
- "format": "double",
- "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"
- },
- "s": {
- "type": "number",
- "format": "double",
- "description": "The size of a trade (also known as volume).\n"
- },
- "x": {
- "type": "integer",
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n"
- },
- "c": {
- "type": "array",
- "description": "A list of condition codes.\n",
- "items": {
- "type": "integer",
- "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"
- }
- },
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
- },
- "i": {
- "type": "string",
- "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"
- }
- }
+ {
+ "description": "Search by filing_date.",
+ "in": "query",
+ "name": "filing_date.lt",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by period_of_report_date.",
+ "in": "query",
+ "name": "period_of_report_date.gte",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by period_of_report_date.",
+ "in": "query",
+ "name": "period_of_report_date.gt",
+ "schema": {
+ "format": "date",
+ "type": "string"
}
- }
- }
- },
- "CryptoTick": {
- "type": "object",
- "properties": {
- "p": {
- "type": "number",
- "format": "double",
- "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"
},
- "s": {
- "type": "number",
- "format": "double",
- "description": "The size of a trade (also known as volume).\n"
+ {
+ "description": "Search by period_of_report_date.",
+ "in": "query",
+ "name": "period_of_report_date.lte",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
},
- "x": {
- "type": "integer",
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n"
+ {
+ "description": "Search by period_of_report_date.",
+ "in": "query",
+ "name": "period_of_report_date.lt",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
},
- "c": {
- "type": "array",
- "description": "A list of condition codes.\n",
- "items": {
- "type": "integer",
- "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"
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
}
},
- "t": {
- "type": "integer",
- "description": "The Unix Msec timestamp for the start of the aggregate window."
+ {
+ "description": "Limit the number of results returned, default is 1 and max is 100.",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 1,
+ "example": 1,
+ "maximum": 100,
+ "minimum": 1,
+ "type": "integer"
+ }
},
- "i": {
- "type": "string",
- "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"
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "period_of_report_date",
+ "enum": [
+ "filing_date",
+ "period_of_report_date"
+ ],
+ "example": "filing_date",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "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
+ },
+ "revenues": {
+ "label": "Revenues",
+ "order": 100,
+ "unit": "USD",
+ "value": 43076000000,
+ "xpath": "//*[local-name()='RevenueFromContractWithCustomerExcludingAssessedTax' and @id='F_000047']"
+ }
+ }
+ },
+ "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"
+ },
+ "next_url": "https:/api.polygon.io/vX/reference/financials?",
+ "request_id": "28173f20a0751f3479afd9e2cc9246ea",
+ "schema": {
+ "properties": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "items": {
+ "properties": {
+ "cik": {
+ "description": "The CIK number for the company.",
+ "type": "string"
+ },
+ "company_name": {
+ "description": "The company name.",
+ "type": "string"
+ },
+ "end_date": {
+ "description": "The end date of the period that these financials cover in YYYYMMDD format.",
+ "type": "string"
+ },
+ "filing_date": {
+ "description": "The date that the SEC filing which these financials were derived from was made available. Note that this is not necessarily the date when this information became public, as some companies may publish a press release before filing with the SEC."
+ },
+ "financials": {
+ "properties": {
+ "balance_sheet": {
+ "description": "Balance sheet.\nNote that the keys in this object can be any of the balance sheet concepts defined in \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"http://www.xbrlsite.com/2016/fac/v3/Documentation/FundamentalAccountingConceptsList.html\"\u003ethis table of fundamental accounting concepts\u003c/a\u003e but converted to `snake_case`.",
+ "properties": {
+ "*": {
+ "description": "An individual financial data point.",
+ "properties": {
+ "formula": {
+ "description": "The name of the formula used to derive this data point from other financial data points.\nInformation about the formulas can be found \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"http://xbrlsite.azurewebsites.net/2020/reporting-scheme/us-gaap/fac/documentation/ImputeRulesList.html\"\u003ehere\u003c/a\u003e.\nThis value is only returned for data points that are not explicitly expressed within the XBRL source file when the `include_sources` query parameter is `true`."
+ },
+ "label": {
+ "description": "A human readable label for the financial data point.",
+ "type": "string"
+ },
+ "order": {
+ "description": "An indicator of what order within the statement that you would find this data point.",
+ "type": "integer"
+ },
+ "unit": {
+ "description": "The unit of the financial data point.",
+ "type": "string"
+ },
+ "value": {
+ "description": "The value of the financial data point.",
+ "type": "number"
+ },
+ "xpath": {
+ "description": "The \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/XPath\"\u003eXPath 1.0\u003c/a\u003e query that identifies the fact from within the XBRL source file.\nThis value is only returned for data points taken directly from XBRL when the `include_sources` query parameter is `true`."
+ }
+ },
+ "required": [
+ "label",
+ "order",
+ "value",
+ "unit"
+ ],
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "cash_flow_statement": {
+ "description": "Cash flow statement.\nNote that the keys in this object can be any of the cash flow statement concepts defined in \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"http://www.xbrlsite.com/2016/fac/v3/Documentation/FundamentalAccountingConceptsList.html\"\u003ethis table of fundamental accounting concepts\u003c/a\u003e but converted to `snake_case`.\nSee the attributes of the objects within `balance_sheet` for more details.",
+ "type": "object"
+ },
+ "comprehensive_income": {
+ "description": "Comprehensive income.\nNote that the keys in this object can be any of the comprehensive income statement concepts defined in \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"http://www.xbrlsite.com/2016/fac/v3/Documentation/FundamentalAccountingConceptsList.html\"\u003ethis table of fundamental accounting concepts\u003c/a\u003e but converted to `snake_case`.\nSee the attributes of the objects within `balance_sheet` for more details.",
+ "type": "object"
+ },
+ "income_statement": {
+ "description": "Income statement.\nNote that the keys in this object can be any of the income statement concepts defined in \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"http://www.xbrlsite.com/2016/fac/v3/Documentation/FundamentalAccountingConceptsList.html\"\u003ethis table of fundamental accounting concepts\u003c/a\u003e but converted to `snake_case`.\nSee the attributes of the objects within `balance_sheet` for more details.",
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "fiscal_period": {
+ "description": "Fiscal period of the report according to the company (Q1, Q2, Q3, Q4, or FY).",
+ "type": "string"
+ },
+ "fiscal_year": {
+ "description": "Fiscal year of the report according to the company.",
+ "type": "string"
+ },
+ "source_filing_file_url": {
+ "description": "The URL of the specific XBRL instance document within the SEC filing that these financials were derived from."
+ },
+ "source_filing_url": {
+ "description": "The URL of the SEC filing that these financials were derived from.",
+ "type": "string"
+ },
+ "start_date": {
+ "description": "The start date of the period that these financials cover in YYYYMMDD format.",
+ "type": "string"
+ }
+ },
+ "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"
+ },
+ "status": "OK"
+ }
+ },
+ "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": 1,
+ "max": 100
+ },
+ "sort": {
+ "default": "period_of_report_date",
+ "enum": [
+ "filing_date",
+ "period_of_report_date"
+ ]
}
}
- }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKey": []
+ }
+ ],
+ "servers": [
+ {
+ "description": "Polygon Platform API",
+ "url": "https://api.polygon.io"
+ },
+ {
+ "description": "Polygon Platform API (Staging)",
+ "url": "https://api.staging.polygon.io"
+ }
+ ],
+ "tags": [
+ {
+ "description": "Reference API",
+ "name": "reference",
+ "x-polygon-sub-tags": [
+ "tickers:list",
+ "tickers:types",
+ "tickers:get",
+ "options:contracts:list",
+ "news",
+ "tickers",
+ "stocks",
+ "sec:filings",
+ "sec:filing",
+ "sec:filing:files",
+ "sec:filing:file",
+ "stocks:market",
+ "conditions",
+ "stocks:meta:exchanges",
+ "crypto",
+ "exchanges"
+ ]
+ },
+ {
+ "description": "Stocks API",
+ "name": "stocks",
+ "x-polygon-sub-tags": [
+ "trades",
+ "quotes",
+ "last:trade",
+ "last:quote",
+ "open-close",
+ "aggregates",
+ "snapshot"
+ ]
+ },
+ {
+ "description": "Options API",
+ "name": "options",
+ "x-polygon-sub-tags": [
+ "trades",
+ "quotes",
+ "last:trade",
+ "last:quote",
+ "open-close",
+ "aggregates",
+ "snapshot"
+ ]
+ },
+ {
+ "description": "Forex API",
+ "name": "fx",
+ "x-polygon-sub-tags": [
+ "trades",
+ "quotes",
+ "conversion",
+ "last:trade",
+ "last:quote",
+ "aggregates",
+ "snapshot"
+ ]
+ },
+ {
+ "description": "Crypto API",
+ "name": "crypto",
+ "x-polygon-sub-tags": [
+ "trades",
+ "last:trade",
+ "open-close",
+ "aggregates",
+ "snapshot"
+ ]
+ }
+ ],
+ "x-polygon-order": {
+ "crypto": {
+ "market": [
+ {
+ "paths": [
+ "/v2/aggs/ticker/{cryptoTicker}/range/{multiplier}/{timespan}/{from}/{to}"
+ ]
+ },
+ {
+ "paths": [
+ "/v2/aggs/grouped/locale/global/market/crypto/{date}"
+ ]
+ },
+ {
+ "paths": [
+ "/v1/open-close/crypto/{from}/{to}/{date}"
+ ]
+ },
+ {
+ "paths": [
+ "/v2/aggs/ticker/{cryptoTicker}/prev"
+ ]
+ },
+ {
+ "paths": [
+ "/v3/trades/{cryptoTicker}"
+ ]
+ },
+ {
+ "paths": [
+ "/v1/historic/crypto/{from}/{to}/{date}"
+ ]
+ },
+ {
+ "paths": [
+ "/v1/last/crypto/{from}/{to}"
+ ]
+ },
+ {
+ "group": "Snapshots",
+ "paths": [
+ "/v2/snapshot/locale/global/markets/crypto/tickers",
+ "/v2/snapshot/locale/global/markets/crypto/{direction}",
+ "/v2/snapshot/locale/global/markets/crypto/tickers/{ticker}",
+ "/v2/snapshot/locale/global/markets/crypto/tickers/{ticker}/book"
+ ]
+ }
+ ],
+ "reference": [
+ {
+ "paths": [
+ "/v3/reference/tickers"
+ ]
+ },
+ {
+ "paths": [
+ "/v1/marketstatus/upcoming"
+ ]
+ },
+ {
+ "paths": [
+ "/v1/marketstatus/now"
+ ]
+ },
+ {
+ "paths": [
+ "/v3/reference/conditions"
+ ]
+ },
+ {
+ "paths": [
+ "/v3/reference/exchanges"
+ ]
+ }
+ ]
},
- "responses": {
- "NotFound": {
- "description": "The specified resource was not found"
- },
- "Conflict": {
- "description": "Parameter is invalid or incorrect."
- },
- "Unauthorized": {
- "description": "Unauthorized - Check our API Key and account status"
- },
- "DefaultError": {
- "description": "Unexpected error"
- }
+ "fx": {
+ "market": [
+ {
+ "paths": [
+ "/v2/aggs/ticker/{forexTicker}/range/{multiplier}/{timespan}/{from}/{to}"
+ ]
+ },
+ {
+ "paths": [
+ "/v2/aggs/grouped/locale/global/market/fx/{date}"
+ ]
+ },
+ {
+ "paths": [
+ "/v2/aggs/ticker/{forexTicker}/prev"
+ ]
+ },
+ {
+ "paths": [
+ "/v3/quotes/{fxTicker}"
+ ]
+ },
+ {
+ "paths": [
+ "/v1/historic/forex/{from}/{to}/{date}"
+ ]
+ },
+ {
+ "paths": [
+ "/v1/last_quote/currencies/{from}/{to}"
+ ]
+ },
+ {
+ "paths": [
+ "/v1/conversion/{from}/{to}"
+ ]
+ },
+ {
+ "group": "Snapshots",
+ "paths": [
+ "/v2/snapshot/locale/global/markets/forex/tickers",
+ "/v2/snapshot/locale/global/markets/forex/{direction}",
+ "/v2/snapshot/locale/global/markets/forex/tickers/{ticker}"
+ ]
+ }
+ ],
+ "reference": [
+ {
+ "paths": [
+ "/v3/reference/tickers"
+ ]
+ },
+ {
+ "paths": [
+ "/v1/marketstatus/upcoming"
+ ]
+ },
+ {
+ "paths": [
+ "/v1/marketstatus/now"
+ ]
+ },
+ {
+ "paths": [
+ "/v3/reference/conditions"
+ ]
+ },
+ {
+ "paths": [
+ "/v3/reference/exchanges"
+ ]
+ }
+ ]
},
- "parameters": {
- "TickersQueryParam": {
- "name": "tickers",
- "in": "query",
- "description": "A comma separated list of tickers to get snapshots for.",
- "schema": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "options": {
+ "market": [
+ {
+ "paths": [
+ "/v2/aggs/ticker/{optionsTicker}/range/{multiplier}/{timespan}/{from}/{to}"
+ ]
+ },
+ {
+ "paths": [
+ "/v1/open-close/{optionsTicker}/{date}"
+ ]
+ },
+ {
+ "paths": [
+ "/v2/aggs/ticker/{optionsTicker}/prev"
+ ]
+ },
+ {
+ "paths": [
+ "/v3/trades/{optionsTicker}"
+ ]
+ },
+ {
+ "paths": [
+ "/v2/last/trade/{optionsTicker}"
+ ]
+ },
+ {
+ "paths": [
+ "/v3/quotes/{optionsTicker}"
+ ]
+ },
+ {
+ "group": "Snapshots",
+ "paths": [
+ "/v3/snapshot/options/{underlyingAsset}/{optionContract}",
+ "/v3/snapshot/options/{underlyingAsset}"
+ ]
}
- },
- "GeneralTickerPathParam": {
- "name": "ticker",
- "in": "path",
- "description": "The ticker symbol of the asset.",
- "required": true,
- "schema": {
- "type": "string"
+ ],
+ "reference": [
+ {
+ "paths": [
+ "/v3/reference/options/contracts/{options_ticker}"
+ ]
+ },
+ {
+ "paths": [
+ "/v3/reference/options/contracts"
+ ]
+ },
+ {
+ "paths": [
+ "/v3/reference/tickers"
+ ]
+ },
+ {
+ "paths": [
+ "/v1/meta/symbols/{stocksTicker}/company"
+ ]
+ },
+ {
+ "paths": [
+ "/v3/reference/tickers/{ticker}"
+ ]
+ },
+ {
+ "paths": [
+ "/v2/reference/news"
+ ]
+ },
+ {
+ "paths": [
+ "/v3/reference/tickers/types"
+ ]
+ },
+ {
+ "paths": [
+ "/v1/marketstatus/upcoming"
+ ]
+ },
+ {
+ "paths": [
+ "/v1/marketstatus/now"
+ ]
+ },
+ {
+ "paths": [
+ "/v3/reference/conditions"
+ ]
+ },
+ {
+ "paths": [
+ "/v3/reference/exchanges"
+ ]
+ }
+ ]
+ },
+ "stocks": {
+ "market": [
+ {
+ "paths": [
+ "/v2/aggs/ticker/{stocksTicker}/range/{multiplier}/{timespan}/{from}/{to}"
+ ]
+ },
+ {
+ "paths": [
+ "/v2/aggs/grouped/locale/us/market/stocks/{date}"
+ ]
},
- "example": "AAPL"
- },
- "StocksTickerPathParam": {
- "name": "stocksTicker",
- "in": "path",
- "description": "The ticker symbol of the stock/equity.",
- "required": true,
- "schema": {
- "type": "string"
+ {
+ "paths": [
+ "/v1/open-close/{stocksTicker}/{date}"
+ ]
},
- "example": "AAPL"
- },
- "OptionsTickerPathParam": {
- "name": "optionsTicker",
- "in": "path",
- "description": "The ticker symbol of the options contract.",
- "required": true,
- "schema": {
- "type": "string"
+ {
+ "paths": [
+ "/v2/aggs/ticker/{stocksTicker}/prev"
+ ]
},
- "example": "O:TSLA210903C00700000"
- },
- "ForexTickerPathParam": {
- "name": "forexTicker",
- "in": "path",
- "description": "The ticker symbol of the currency pair.",
- "required": true,
- "schema": {
- "type": "string"
+ {
+ "paths": [
+ "/v3/trades/{stockTicker}"
+ ]
},
- "example": "C:EURUSD"
- },
- "CryptoTickerPathParam": {
- "name": "cryptoTicker",
- "in": "path",
- "description": "The ticker symbol of the currency pair.",
- "required": true,
- "schema": {
- "type": "string"
+ {
+ "paths": [
+ "/v2/ticks/stocks/trades/{ticker}/{date}"
+ ]
},
- "example": "X:BTCUSD"
- },
- "AggregateMultiplier": {
- "name": "multiplier",
- "in": "path",
- "description": "The size of the timespan multiplier.",
- "required": true,
- "schema": {
- "type": "integer"
+ {
+ "paths": [
+ "/v2/last/trade/{stocksTicker}"
+ ]
},
- "example": 1
- },
- "AggregateTimespan": {
- "name": "timespan",
- "in": "path",
- "description": "The size of the time window.",
- "required": true,
- "schema": {
- "type": "string",
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
+ {
+ "paths": [
+ "/v3/quotes/{stockTicker}"
]
},
- "example": "day"
- },
- "AggregateTimeFrom": {
- "name": "from",
- "in": "path",
- "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "required": true,
- "schema": {
- "type": "string"
+ {
+ "paths": [
+ "/v2/ticks/stocks/nbbo/{ticker}/{date}"
+ ]
},
- "example": "2021-07-22"
- },
- "AggregateTimeTo": {
- "name": "to",
- "in": "path",
- "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "required": true,
- "schema": {
- "type": "string"
+ {
+ "paths": [
+ "/v2/last/nbbo/{stocksTicker}"
+ ]
},
- "example": "2021-07-22"
- },
- "AggregateAdjusted": {
- "name": "adjusted",
- "in": "query",
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "required": false,
- "schema": {
- "type": "boolean"
+ {
+ "group": "Snapshots",
+ "paths": [
+ "/v2/snapshot/locale/us/markets/stocks/tickers",
+ "/v2/snapshot/locale/us/markets/stocks/{direction}",
+ "/v2/snapshot/locale/us/markets/stocks/tickers/{stocksTicker}"
+ ]
+ }
+ ],
+ "reference": [
+ {
+ "paths": [
+ "/v3/reference/tickers"
+ ]
},
- "example": true
- },
- "AggregateSort": {
- "name": "sort",
- "schema": {
- "enum": [
- "asc",
- "desc"
+ {
+ "paths": [
+ "/v1/meta/symbols/{stocksTicker}/company"
]
},
- "in": "query",
- "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
- "example": "asc"
- },
- "AggregateDate": {
- "name": "date",
- "in": "path",
- "description": "The beginning date for the aggregate window.",
- "required": true,
- "schema": {
- "type": "string"
+ {
+ "paths": [
+ "/v3/reference/tickers/{ticker}"
+ ]
},
- "example": "2020-10-14"
- },
- "ReverseOrder": {
- "name": "reverse",
- "in": "query",
- "description": "Reverse the order of the results.\n",
- "required": false,
- "schema": {
- "type": "boolean"
+ {
+ "paths": [
+ "/v2/reference/news"
+ ]
},
- "example": true
- },
- "SnapshotDirection": {
- "name": "direction",
- "in": "path",
- "description": "The direction of the snapshot results to return.\n",
- "required": true,
- "schema": {
- "type": "string",
- "enum": [
- "gainers",
- "losers"
+ {
+ "paths": [
+ "/v3/reference/tickers/types"
]
},
- "example": "gainers"
- },
- "IncludeOTC": {
- "name": "include_otc",
- "in": "query",
- "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n",
- "required": false,
- "schema": {
- "type": "boolean"
- }
- },
- "LimitMax50000": {
- "name": "limit",
- "in": "query",
- "description": "Limit the size of the response, max 50000 and default 5000.",
- "required": false,
- "schema": {
- "type": "integer"
+ {
+ "paths": [
+ "/v1/marketstatus/upcoming"
+ ]
},
- "example": 10
- },
- "AggregateLimitMax50000": {
- "name": "limit",
- "in": "query",
- "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on \nAggregate Data API Improvements.\n",
- "required": false,
- "schema": {
- "type": "integer"
+ {
+ "paths": [
+ "/v1/marketstatus/now"
+ ]
},
- "example": 120
- },
- "LimitMax10000": {
- "name": "limit",
- "in": "query",
- "description": "Limit the size of the response, max 10000.",
- "required": false,
- "schema": {
- "type": "integer"
+ {
+ "group": "SEC Filings",
+ "paths": [
+ "/v1/reference/sec/filings",
+ "/v1/reference/sec/filings/{filing_id}",
+ "/v1/reference/sec/filings/{filing_id}/files",
+ "/v1/reference/sec/filings/{filing_id}/files/{file_id}"
+ ]
},
- "example": 100
- },
- "LimitNoMax": {
- "name": "limit",
- "in": "query",
- "description": "Limit the number of results.\n",
- "required": false,
- "schema": {
- "type": "integer"
+ {
+ "paths": [
+ "/v3/reference/splits"
+ ]
},
- "example": 5
- }
- },
- "securitySchemes": {
- "apiKey": {
- "type": "apiKey",
- "name": "apiKey",
- "in": "query"
- }
- }
- },
- "security": [
- {
- "apiKey": []
+ {
+ "paths": [
+ "/v3/reference/dividends"
+ ]
+ },
+ {
+ "paths": [
+ "/vX/reference/financials"
+ ]
+ },
+ {
+ "paths": [
+ "/v3/reference/conditions"
+ ]
+ },
+ {
+ "paths": [
+ "/v3/reference/exchanges"
+ ]
+ }
+ ]
}
- ]
-}
+ }
+}
\ No newline at end of file