diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 02c7785c..d7105d15 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @jbonzo @mmoghaddam385 @justinpolygon +* @justinpolygon @penelopus @davidwf-polygonio diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 313c2716..f0767d70 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -7,7 +7,7 @@ on: branches: - master schedule: - - cron: '33 12 * * 3' + - cron: "33 12 * * 3" jobs: analyze: name: analyze @@ -19,15 +19,15 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'python' ] + language: ["python"] steps: - - name: Checkout repository - uses: actions/checkout@v3 - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + - name: Checkout repository + uses: actions/checkout@v3 + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + - name: Autobuild + uses: github/codeql-action/autobuild@v3 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 diff --git a/.polygon/rest.json b/.polygon/rest.json index fe330dce..425d2c2d 100644 --- a/.polygon/rest.json +++ b/.polygon/rest.json @@ -63,7 +63,7 @@ }, "AggregateTimeTo": { "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", - "example": "2023-01-09", + "example": "2023-02-10", "in": "path", "name": "to", "required": true, @@ -101,6 +101,17 @@ "type": "string" } }, + "CryptoTickersQueryParam": { + "description": "A case-sensitive comma separated list of tickers to get snapshots for. For example, X:BTCUSD, X:ETHBTC, and X:BOBAUSD. Empty string defaults to querying all tickers.", + "in": "query", + "name": "tickers", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + }, "ForexTickerPathParam": { "description": "The ticker symbol of the currency pair.", "example": "C:EURUSD", @@ -111,6 +122,17 @@ "type": "string" } }, + "ForexTickersQueryParam": { + "description": "A case-sensitive comma separated list of tickers to get snapshots for. For example, C:EURUSD, C:GBPCAD, and C:AUDINR. Empty string defaults to querying all tickers.", + "in": "query", + "name": "tickers", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + }, "GeneralTickerPathParam": { "description": "The ticker symbol of the asset.", "example": "AAPL", @@ -131,7 +153,7 @@ }, "IndicesAggregateTimeFrom": { "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", - "example": "2023-03-10", + "example": "2023-03-13", "in": "path", "name": "from", "required": true, @@ -141,7 +163,7 @@ }, "IndicesAggregateTimeTo": { "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", - "example": "2023-03-10", + "example": "2023-03-24", "in": "path", "name": "to", "required": true, @@ -6039,7 +6061,7 @@ }, "summary": "Exponential Moving Average (EMA)", "tags": [ - "crpyto:aggregates" + "crypto:aggregates" ], "x-polygon-entitlement-data-type": { "description": "Aggregate data", @@ -9407,7 +9429,7 @@ }, "summary": "Relative Strength Index (RSI)", "tags": [ - "crpyto:aggregates" + "crypto:aggregates" ], "x-polygon-entitlement-data-type": { "description": "Aggregate data", @@ -11003,7 +11025,7 @@ }, "summary": "Simple Moving Average (SMA)", "tags": [ - "crpyto:aggregates" + "crypto:aggregates" ], "x-polygon-entitlement-data-type": { "description": "Aggregate data", @@ -12698,6 +12720,10 @@ "description": "The status of Cboe Streaming Market Indices Cryptocurrency (\"CCCY\") indices trading hours.", "type": "string" }, + "cgi": { + "description": "The status of Cboe Global Indices (\"CGI\") trading hours.", + "type": "string" + }, "dow_jones": { "description": "The status of Dow Jones indices trading hours", "type": "string" @@ -13885,8 +13911,7 @@ "files_count", "source_url", "download_url", - "entities", - "acceptance_datetime" + "entities" ], "type": "object", "x-polygon-go-type": { @@ -13956,121 +13981,125 @@ "example": {}, "schema": { "properties": { - "acceptance_datetime": { - "description": "The datetime when the filing was accepted by EDGAR in EST (format: YYYYMMDDHHMMSS)", - "type": "string" - }, - "accession_number": { - "description": "Filing Accession Number", - "type": "string" - }, - "entities": { - "description": "Entities related to the filing (e.g. the document filers).", - "items": { - "description": "A filing entity (e.g. the document filer).", - "properties": { - "company_data": { + "results": { + "properties": { + "acceptance_datetime": { + "description": "The datetime when the filing was accepted by EDGAR in EST (format: YYYYMMDDHHMMSS)", + "type": "string" + }, + "accession_number": { + "description": "Filing Accession Number", + "type": "string" + }, + "entities": { + "description": "Entities related to the filing (e.g. the document filers).", + "items": { + "description": "A filing entity (e.g. the document filer).", "properties": { - "cik": { - "description": "Central Index Key (CIK) Number", - "type": "string" - }, - "name": { - "example": "Facebook Inc", - "type": "string" - }, - "sic": { - "description": "Standard Industrial Classification (SIC)", - "type": "string" + "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" + } }, - "ticker": { - "description": "Ticker", + "relation": { + "description": "Relationship of this entity to the filing.", + "enum": [ + "filer" + ], "type": "string" } }, "required": [ - "name", - "cik", - "sic" + "relation" ], "type": "object", "x-polygon-go-type": { - "name": "SECCompanyData", + "name": "SECFilingEntity", "path": "github.com/polygon-io/go-lib-models/v2/globals" } }, - "relation": { - "description": "Relationship of this entity to the filing.", - "enum": [ - "filer" - ], - "type": "string" - } + "type": "array" }, - "required": [ - "relation" - ], - "type": "object", - "x-polygon-go-type": { - "name": "SECFilingEntity", - "path": "github.com/polygon-io/go-lib-models/v2/globals" + "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" } }, - "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" + "required": [ + "id", + "accession_number", + "type", + "filing_date", + "period_of_report_date", + "files_count", + "source_url", + "download_url", + "entities" ], - "type": "string" + "type": "object", + "x-polygon-go-type": { + "name": "SECFiling", + "path": "github.com/polygon-io/go-lib-models/v2/globals" + } } }, - "required": [ - "id", - "accession_number", - "type", - "filing_date", - "period_of_report_date", - "files_count", - "source_url", - "download_url", - "entities", - "acceptance_datetime" - ], - "type": "object", - "x-polygon-go-type": { - "name": "SECFiling", - "path": "github.com/polygon-io/go-lib-models/v2/globals" - } + "type": "object" } } }, @@ -14461,6 +14490,114 @@ }, "x-polygon-draft": true }, + "/v1/related-companies/{ticker}": { + "get": { + "description": "Get a list of tickers related to the queried ticker based on News and Returns data.", + "operationId": "GetRelatedCompanies", + "parameters": [ + { + "description": "The ticker symbol to search.", + "example": "AAPL", + "in": "path", + "name": "ticker", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "request_id": "31d59dda-80e5-4721-8496-d0d32a654afe", + "results": [ + { + "ticker": "MSFT" + }, + { + "ticker": "GOOGL" + }, + { + "ticker": "AMZN" + }, + { + "ticker": "FB" + }, + { + "ticker": "TSLA" + }, + { + "ticker": "NVDA" + }, + { + "ticker": "INTC" + }, + { + "ticker": "ADBE" + }, + { + "ticker": "NFLX" + }, + { + "ticker": "PYPL" + } + ], + "status": "OK", + "stock_symbol": "AAPL" + }, + "schema": { + "properties": { + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "results": { + "items": { + "description": "The tickers related to the requested ticker.", + "properties": { + "ticker": { + "description": "A ticker related to the requested ticker.", + "type": "string" + } + }, + "required": [ + "ticker" + ], + "type": "object" + }, + "type": "array" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + }, + "ticker": { + "description": "The ticker being queried.", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Related Companies." + }, + "401": { + "description": "Unauthorized - Check our API Key and account status" + } + }, + "summary": "Related Companies", + "tags": [ + "reference:related:companies" + ], + "x-polygon-entitlement-data-type": { + "description": "Reference data", + "name": "reference" + } + } + }, "/v1/summaries": { "get": { "description": "Get everything needed to visualize the tick-by-tick movement of a list of tickers.", @@ -14507,7 +14644,7 @@ "volume": 37 }, "ticker": "NCLH", - "type": "stock" + "type": "stocks" }, { "last_updated": 1679597116344223500, @@ -14758,6 +14895,16 @@ "format": "double", "type": "number" }, + "regular_trading_change": { + "description": "Today's change in regular trading hours, difference between current price and previous trading day's close, otherwise difference between today's close and previous day's close.", + "format": "double", + "type": "number" + }, + "regular_trading_change_percent": { + "description": "Today's regular trading change as a percentage.", + "format": "double", + "type": "number" + }, "volume": { "description": "The trading volume for the asset for the day.", "format": "double", @@ -14794,15 +14941,7 @@ } }, "required": [ - "ticker", - "name", - "price", - "branding", - "market_status", - "type", - "session", - "options", - "last_updated" + "ticker" ], "type": "object", "x-polygon-go-type": { @@ -15685,7 +15824,7 @@ }, { "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", - "example": "2023-01-09", + "example": "2023-02-10", "in": "path", "name": "to", "required": true, @@ -16138,7 +16277,7 @@ }, { "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", - "example": "2023-01-09", + "example": "2023-02-10", "in": "path", "name": "to", "required": true, @@ -16534,7 +16673,7 @@ }, { "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", - "example": "2023-03-10", + "example": "2023-03-13", "in": "path", "name": "from", "required": true, @@ -16544,7 +16683,7 @@ }, { "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", - "example": "2023-03-10", + "example": "2023-03-24", "in": "path", "name": "to", "required": true, @@ -16957,7 +17096,7 @@ }, { "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", - "example": "2023-01-09", + "example": "2023-02-10", "in": "path", "name": "to", "required": true, @@ -17405,7 +17544,7 @@ }, { "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", - "example": "2023-01-09", + "example": "2023-02-10", "in": "path", "name": "to", "required": true, @@ -18175,7 +18314,7 @@ "operationId": "ListNews", "parameters": [ { - "description": "Return results that contain this ticker.", + "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.", "in": "query", "name": "ticker", "schema": { @@ -18359,52 +18498,35 @@ "request_id": "831afdb0b8078549fed053476984947a", "results": [ { - "amp_url": "https://amp.benzinga.com/amp/content/20784086", - "article_url": "https://www.benzinga.com/markets/cryptocurrency/21/04/20784086/cathie-wood-adds-more-coinbase-skillz-trims-square", - "author": "Rachit Vats", - "description": "

Cathie Wood-led Ark Investment Management on Friday snapped up another 221,167 shares of the cryptocurrency exchange Coinbase Global Inc (NASDAQ COIN) worth about $64.49 million on the stock’s Friday’s dip and also its fourth-straight loss.

\n

The investment firm’s Ark Innovation ETF (NYSE ARKK) bought the shares of the company that closed 0.63% lower at $291.60 on Friday, giving the cryptocurrency exchange a market cap of $58.09 billion. Coinbase’s market cap has dropped from $85.8 billion on its blockbuster listing earlier this month.

\n

The New York-based company also added another 3,873 shares of the mobile gaming company Skillz Inc (NYSE SKLZ), just a day after snapping 1.2 million shares of the stock.

\n

ARKK bought the shares of the company which closed ...

Full story available on Benzinga.com

", - "id": "nJsSJJdwViHZcw5367rZi7_qkXLfMzacXBfpv-vD9UA", - "image_url": "https://cdn2.benzinga.com/files/imagecache/og_image_social_share_1200x630/images/story/2012/andre-francois-mckenzie-auhr4gcqcce-unsplash.jpg?width=720", + "amp_url": "https://m.uk.investing.com/news/stock-market-news/markets-are-underestimating-fed-cuts-ubs-3559968?ampMode=1", + "article_url": "https://uk.investing.com/news/stock-market-news/markets-are-underestimating-fed-cuts-ubs-3559968", + "author": "Sam Boughedda", + "description": "UBS analysts warn that markets are underestimating the extent of future interest rate cuts by the Federal Reserve, as the weakening economy is likely to justify more cuts than currently anticipated.", + "id": "8ec638777ca03b553ae516761c2a22ba2fdd2f37befae3ab6fdab74e9e5193eb", + "image_url": "https://i-invdn-com.investing.com/news/LYNXNPEC4I0AL_L.jpg", + "insights": [ + { + "sentiment": "positive", + "sentiment_reasoning": "UBS analysts are providing a bullish outlook on the extent of future Federal Reserve rate cuts, suggesting that markets are underestimating the number of cuts that will occur.", + "ticker": "UBS" + } + ], "keywords": [ - "Sector ETFs", - "Penny Stocks", - "Cryptocurrency", - "Small Cap", - "Markets", - "Trading Ideas", - "ETFs" + "Federal Reserve", + "interest rates", + "economic data" ], - "published_utc": "2021-04-26T02:33:17Z", + "published_utc": "2024-06-24T18:33:53Z", "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" + "favicon_url": "https://s3.polygon.io/public/assets/news/favicons/investing.ico", + "homepage_url": "https://www.investing.com/", + "logo_url": "https://s3.polygon.io/public/assets/news/logos/investing.png", + "name": "Investing.com" }, "tickers": [ - "DOCU", - "DDD", - "NIU", - "ARKF", - "NVDA", - "SKLZ", - "PCAR", - "MASS", - "PSTI", - "SPFR", - "TREE", - "PHR", - "IRDM", - "BEAM", - "ARKW", - "ARKK", - "ARKG", - "PSTG", - "SQ", - "IONS", - "SYRS" + "UBS" ], - "title": "Cathie Wood Adds More Coinbase, Skillz, Trims Square" + "title": "Markets are underestimating Fed cuts: UBS By Investing.com - Investing.com UK" } ], "status": "OK" @@ -18450,6 +18572,37 @@ "description": "The article's image URL.", "type": "string" }, + "insights": { + "description": "The insights related to the article.", + "items": { + "properties": { + "sentiment": { + "description": "The sentiment of the insight.", + "enum": [ + "positive", + "neutral", + "negative" + ], + "type": "string" + }, + "sentiment_reasoning": { + "description": "The reasoning behind the sentiment.", + "type": "string" + }, + "ticker": { + "description": "The ticker symbol associated with the insight.", + "type": "string" + } + }, + "required": [ + "ticker", + "sentiment", + "sentiment_reasoning" + ], + "type": "object" + }, + "type": "array" + }, "keywords": { "description": "The keywords associated with the article (which will vary depending on\nthe publishing source).", "items": { @@ -18530,7 +18683,7 @@ } }, "text/csv": { - "example": "id,publisher_name,publisher_homepage_url,publisher_logo_url,publisher_favicon_url,title,author,published_utc,article_url,tickers,amp_url,image_url,description,keywords\nnJsSJJdwViHZcw5367rZi7_qkXLfMzacXBfpv-vD9UA,Benzinga,https://www.benzinga.com/,https://s3.polygon.io/public/public/assets/news/logos/benzinga.svg,https://s3.polygon.io/public/public/assets/news/favicons/benzinga.ico,\"Cathie Wood Adds More Coinbase, Skillz, Trims Square\",Rachit Vats,2021-04-26T02:33:17Z,https://www.benzinga.com/markets/cryptocurrency/21/04/20784086/cathie-wood-adds-more-coinbase-skillz-trims-square,\"DOCU,DDD,NIU,ARKF,NVDA,SKLZ,PCAR,MASS,PSTI,SPFR,TREE,PHR,IRDM,BEAM,ARKW,ARKK,ARKG,PSTG,SQ,IONS,SYRS\",https://amp.benzinga.com/amp/content/20784086,https://cdn2.benzinga.com/files/imagecache/og_image_social_share_1200x630/images/story/2012/andre-francois-mckenzie-auhr4gcqcce-unsplash.jpg?width=720,\"

Cathie Wood-led Ark Investment Management on Friday snapped up another 221,167 shares of the cryptocurrency exchange Coinbase Global Inc (NASDAQ COIN) worth about $64.49 million on the stock’s Friday’s dip and also its fourth-straight loss.

The investment firm’s Ark Innovation ETF (NYSE ARKK) bought the shares of the company that closed 0.63% lower at $291.60 on Friday, giving the cryptocurrency exchange a market cap of $58.09 billion. Coinbase’s market cap has dropped from $85.8 billion on its blockbuster listing earlier this month.

The New York-based company also added another 3,873 shares of the mobile gaming company Skillz Inc (NYSE SKLZ), just a day after snapping 1.2 million shares of the stock.

ARKK bought the shares of the company which closed ...

Full story available on Benzinga.com

\",\"Sector ETFs,Penny Stocks,Cryptocurrency,Small Cap,Markets,Trading Ideas,ETFs\"\n", + "example": "id,publisher_name,publisher_homepage_url,publisher_logo_url,publisher_favicon_url,title,author,published_utc,article_url,ticker,amp_url,image_url,description,keywords,sentiment,sentiment_reasoning\n8ec638777ca03b553ae516761c2a22ba2fdd2f37befae3ab6fdab74e9e5193eb,Investing.com,https://www.investing.com/,https://s3.polygon.io/public/assets/news/logos/investing.png,https://s3.polygon.io/public/assets/news/favicons/investing.ico,Markets are underestimating Fed cuts: UBS By Investing.com - Investing.com UK,Sam Boughedda,1719254033000000000,https://uk.investing.com/news/stock-market-news/markets-are-underestimating-fed-cuts-ubs-3559968,UBS,https://m.uk.investing.com/news/stock-market-news/markets-are-underestimating-fed-cuts-ubs-3559968?ampMode=1,https://i-invdn-com.investing.com/news/LYNXNPEC4I0AL_L.jpg,\"UBS analysts warn that markets are underestimating the extent of future interest rate cuts by the Federal Reserve, as the weakening economy is likely to justify more cuts than currently anticipated.\",\"Federal Reserve,interest rates,economic data\",positive,\"UBS analysts are providing a bullish outlook on the extent of future Federal Reserve rate cuts, suggesting that markets are underestimating the number of cuts that will occur.\"\n", "schema": { "type": "string" } @@ -18573,7 +18726,7 @@ "description": "Get the current minute, day, and previous day\u2019s aggregate, as well as the last trade and quote for all traded cryptocurrency symbols.\n
\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", "parameters": [ { - "description": "A case-sensitive comma separated list of tickers to get snapshots for. For example, AAPL,TSLA,GOOG. Empty string defaults to querying all tickers.", + "description": "A case-sensitive comma separated list of tickers to get snapshots for. For example, X:BTCUSD, X:ETHBTC, and X:BOBAUSD. Empty string defaults to querying all tickers.", "in": "query", "name": "tickers", "schema": { @@ -19457,6 +19610,9 @@ "tags": [ "crypto:snapshot" ], + "x-polygon-deprecation": { + "date": 1719838800000 + }, "x-polygon-entitlement-allowed-timeframes": [ { "description": "Real Time Data", @@ -19834,7 +19990,7 @@ "description": "Get the current minute, day, and previous day\u2019s 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", "parameters": [ { - "description": "A case-sensitive comma separated list of tickers to get snapshots for. For example, AAPL,TSLA,GOOG. Empty string defaults to querying all tickers.", + "description": "A case-sensitive comma separated list of tickers to get snapshots for. For example, C:EURUSD, C:GBPCAD, and C:AUDINR. Empty string defaults to querying all tickers.", "in": "query", "name": "tickers", "schema": { @@ -21604,7 +21760,7 @@ }, "/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
\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 3:30am EST and gets populated as data is received from the exchanges.\n", + "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.\nThis output will only include tickers with a trading volume of 10,000 or more.\n
\n
\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", @@ -22724,11 +22880,11 @@ } }, { - "description": "Limit the number of results returned, default is 10 and max is 50000.", + "description": "Limit the number of results returned, default is 1000 and max is 50000.", "in": "query", "name": "limit", "schema": { - "default": 10, + "default": 1000, "example": 10, "maximum": 50000, "minimum": 1, @@ -22853,6 +23009,8 @@ }, "x-polygon-paginate": { "limit": { + "default": 1000, + "example": 10, "max": 50000 }, "order": { @@ -22949,11 +23107,11 @@ } }, { - "description": "Limit the number of results returned, default is 10 and max is 50000.", + "description": "Limit the number of results returned, default is 1000 and max is 50000.", "in": "query", "name": "limit", "schema": { - "default": 10, + "default": 1000, "example": 10, "maximum": 50000, "minimum": 1, @@ -23100,6 +23258,8 @@ }, "x-polygon-paginate": { "limit": { + "default": 1000, + "example": 10, "max": 50000 }, "order": { @@ -23189,11 +23349,11 @@ } }, { - "description": "Limit the number of results returned, default is 10 and max is 50000.", + "description": "Limit the number of results returned, default is 1000 and max is 50000.", "in": "query", "name": "limit", "schema": { - "default": 10, + "default": 1000, "example": 10, "maximum": 50000, "minimum": 1, @@ -23401,6 +23561,8 @@ }, "x-polygon-paginate": { "limit": { + "default": 1000, + "example": 10, "max": 50000 }, "order": { @@ -24173,7 +24335,7 @@ "operationId": "ListDividends", "parameters": [ { - "description": "Return the dividends that contain this ticker.", + "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.", "in": "query", "name": "ticker", "schema": { @@ -24553,6 +24715,7 @@ "dividend_type": "CD", "ex_dividend_date": "2021-11-05", "frequency": 4, + "id": "E8e3c4f794613e9205e2f178a36c53fcc57cdabb55e1988c87b33f9e52e221444", "pay_date": "2021-11-11", "record_date": "2021-11-08", "ticker": "AAPL" @@ -24563,6 +24726,7 @@ "dividend_type": "CD", "ex_dividend_date": "2021-08-06", "frequency": 4, + "id": "E6436c5475706773f03490acf0b63fdb90b2c72bfeed329a6eb4afc080acd80ae", "pay_date": "2021-08-12", "record_date": "2021-08-09", "ticker": "AAPL" @@ -24651,6 +24815,10 @@ ] } }, + "id": { + "description": "The unique identifier of the dividend.", + "type": "string" + }, "pay_date": { "description": "The date that the dividend is paid out.", "type": "string" @@ -24677,7 +24845,8 @@ "ex_dividend_date", "frequency", "cash_amount", - "dividend_type" + "dividend_type", + "id" ], "type": "object", "x-polygon-go-struct-tags": { @@ -25366,7 +25535,7 @@ "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", + "example": "O:SPY251219C00650000", "in": "path", "name": "options_ticker", "required": true, @@ -25686,12 +25855,14 @@ "results": [ { "execution_date": "2020-08-31", + "id": "E36416cce743c3964c5da63e1ef1626c0aece30fb47302eea5a49c0055c04e8d0", "split_from": 1, "split_to": 4, "ticker": "AAPL" }, { "execution_date": "2005-02-28", + "id": "E90a77bdf742661741ed7c8fc086415f0457c2816c45899d73aaa88bdc8ff6025", "split_from": 1, "split_to": 2, "ticker": "AAPL" @@ -25715,6 +25886,10 @@ "description": "The execution date of the stock split. On this date the stock split was applied.", "type": "string" }, + "id": { + "description": "The unique identifier for this stock split.", + "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", @@ -25732,7 +25907,10 @@ }, "required": [ "split_from", - "split_to" + "split_to", + "id", + "ticker", + "execution_date" ], "type": "object" }, @@ -26444,6 +26622,10 @@ "description": "The first line of the company's headquarters address.", "type": "string" }, + "address2": { + "description": "The second line of the company's headquarters address, if applicable.", + "type": "string" + }, "city": { "description": "The city of the company's headquarters address.", "type": "string" @@ -26608,7 +26790,7 @@ } }, "text/csv": { - "example": "ticker,name,market,locale,primary_exchange,type,active,currency_name,cik,composite_figi,share_class_figi,share_class_shares_outstanding,weighted_shares_outstanding,round_lot,market_cap,phone_number,address1,city,state,postal_code,sic_code,sic_description,ticker_root,total_employees,list_date,homepage_url,description,branding/logo_url,branding/icon_url\nAAPL,Apple Inc.,stocks,us,XNAS,CS,true,usd,0000320193,BBG000B9XRY4,BBG001S5N8V8,16406400000,16334371000,100,2771126040150,(408) 996-1010,One Apple Park Way,Cupertino,CA,95014,3571,ELECTRONIC COMPUTERS,AAPL,154000,1980-12-12,https://www.apple.com,\"Apple designs a wide variety of consumer electronic devices, including smartphones (iPhone), tablets (iPad), PCs (Mac), smartwatches (Apple Watch), AirPods, and TV boxes (Apple TV), among others. The iPhone makes up the majority of Apple's total revenue. In addition, Apple offers its customers a variety of services such as Apple Music, iCloud, Apple Care, Apple TV+, Apple Arcade, Apple Card, and Apple Pay, among others. Apple's products run internally developed software and semiconductors, and the firm is well known for its integration of hardware, software and services. Apple's products are distributed online as well as through company-owned stores and third-party retailers. The company generates roughly 40% of its revenue from the Americas, with the remainder earned internationally.\",https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_logo.svg,https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_icon.png\n", + "example": "ticker,name,market,locale,primary_exchange,type,active,currency_name,cik,composite_figi,share_class_figi,share_class_shares_outstanding,weighted_shares_outstanding,round_lot,market_cap,phone_number,address1,address2,city,state,postal_code,sic_code,sic_description,ticker_root,total_employees,list_date,homepage_url,description,branding/logo_url,branding/icon_url\nAAPL,Apple Inc.,stocks,us,XNAS,CS,true,usd,0000320193,BBG000B9XRY4,BBG001S5N8V8,16406400000,16334371000,100,2771126040150,(408) 996-1010,One Apple Park Way,,Cupertino,CA,95014,3571,ELECTRONIC COMPUTERS,AAPL,154000,1980-12-12,https://www.apple.com,\"Apple designs a wide variety of consumer electronic devices, including smartphones (iPhone), tablets (iPad), PCs (Mac), smartwatches (Apple Watch), AirPods, and TV boxes (Apple TV), among others. The iPhone makes up the majority of Apple's total revenue. In addition, Apple offers its customers a variety of services such as Apple Music, iCloud, Apple Care, Apple TV+, Apple Arcade, Apple Card, and Apple Pay, among others. Apple's products run internally developed software and semiconductors, and the firm is well known for its integration of hardware, software and services. Apple's products are distributed online as well as through company-owned stores and third-party retailers. The company generates roughly 40% of its revenue from the Americas, with the remainder earned internationally.\",https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_logo.svg,https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_icon.png\n", "schema": { "type": "string" } @@ -27038,8 +27220,6 @@ } }, "required": [ - "last_updated", - "timeframe", "ask", "bid", "last_updated", @@ -27113,9 +27293,6 @@ } }, "required": [ - "last_updated", - "timeframe", - "participant_timestamp", "price", "size" ], @@ -27203,6 +27380,16 @@ "format": "double", "type": "number" }, + "regular_trading_change": { + "description": "Today's change in regular trading hours, difference between current price and previous trading day's close, otherwise difference between today's close and previous day's close.", + "format": "double", + "type": "number" + }, + "regular_trading_change_percent": { + "description": "Today's regular trading change as a percentage.", + "format": "double", + "type": "number" + }, "volume": { "description": "The trading volume for the asset for the day.", "format": "double", @@ -27279,8 +27466,6 @@ } }, "required": [ - "last_updated", - "timeframe", "ticker", "change_to_break_even" ], @@ -27594,9 +27779,7 @@ } }, "required": [ - "ticker", - "timeframe", - "last_updated" + "ticker" ], "type": "object", "x-polygon-go-type": { @@ -27855,7 +28038,8 @@ "bid": 120.28, "bid_size": 8, "last_updated": 1605195918507251700, - "midpoint": 120.29 + "midpoint": 120.29, + "timeframe": "REAL-TIME" }, "last_trade": { "conditions": [ @@ -27956,7 +28140,6 @@ } }, "required": [ - "last_updated", "open", "high", "low", @@ -28130,8 +28313,6 @@ } }, "required": [ - "last_updated", - "timeframe", "ask", "ask_size", "bid_size", @@ -28184,7 +28365,6 @@ } }, "required": [ - "timeframe", "exchange", "price", "sip_timestamp", @@ -28241,8 +28421,6 @@ } }, "required": [ - "last_updated", - "timeframe", "ticker", "change_to_break_even" ], @@ -28257,7 +28435,6 @@ "last_quote", "underlying_asset", "details", - "cha", "break_even_price", "open_interest" ], @@ -28492,7 +28669,6 @@ } }, "required": [ - "last_updated", "open", "high", "low", @@ -28666,8 +28842,6 @@ } }, "required": [ - "last_updated", - "timeframe", "ask", "ask_size", "bid_size", @@ -28720,7 +28894,6 @@ } }, "required": [ - "timeframe", "exchange", "price", "sip_timestamp", @@ -28777,8 +28950,6 @@ } }, "required": [ - "last_updated", - "timeframe", "ticker", "change_to_break_even" ], @@ -28793,7 +28964,6 @@ "last_quote", "underlying_asset", "details", - "cha", "break_even_price", "open_interest" ], @@ -28921,11 +29091,11 @@ } }, { - "description": "Limit the number of results returned, default is 10 and max is 50000.", + "description": "Limit the number of results returned, default is 1000 and max is 50000.", "in": "query", "name": "limit", "schema": { - "default": 10, + "default": 1000, "example": 10, "maximum": 50000, "minimum": 1, @@ -29071,6 +29241,8 @@ }, "x-polygon-paginate": { "limit": { + "default": 1000, + "example": 10, "max": 50000 }, "order": { @@ -29167,11 +29339,11 @@ } }, { - "description": "Limit the number of results returned, default is 10 and max is 50000.", + "description": "Limit the number of results returned, default is 1000 and max is 50000.", "in": "query", "name": "limit", "schema": { - "default": 10, + "default": 1000, "example": 10, "maximum": 50000, "minimum": 1, @@ -29323,6 +29495,8 @@ }, "x-polygon-paginate": { "limit": { + "default": 1000, + "example": 10, "max": 50000 }, "order": { @@ -29412,11 +29586,11 @@ } }, { - "description": "Limit the number of results returned, default is 10 and max is 50000.", + "description": "Limit the number of results returned, default is 1000 and max is 50000.", "in": "query", "name": "limit", "schema": { - "default": 10, + "default": 1000, "example": 10, "maximum": 50000, "minimum": 1, @@ -29612,6 +29786,8 @@ }, "x-polygon-paginate": { "limit": { + "default": 1000, + "example": 10, "max": 50000 }, "order": { @@ -30321,81 +30497,98 @@ } } }, - "/vX/reference/tickers/taxonomies": { + "/vX/reference/ipos": { "get": { - "description": "Retrieve taxonomy classifications for one or more tickers.", - "operationId": "ListTickerTaxonomyClassifications", + "description": "The IPOs API provides access to detailed information about Initial Public Offerings (IPOs), including both upcoming and historical events. With this API, you can query for a comprehensive list of IPOs, along with key details such as the issuer name, ticker symbol, ISIN, IPO date, number of shares offered, expected price range, and final offering price. You can filter the results by status to focus on new, rumors, pending, historical, and more.", + "operationId": "ListIPOs", "parameters": [ { + "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.", "in": "query", "name": "ticker", "schema": { "type": "string" - }, - "x-polygon-filter-field": { - "anyOf": { - "description": "Comma separated list of tickers, up to a maximum of 250. If no tickers are passed then all results will be returned in a paginated manner.\n\nWarning: The maximum number of characters allowed in a URL are subject to your technology stack.\n", - "enabled": true, - "example": "NCLH,O:SPY250321C00380000,C:EURUSD,X:BTCUSD,I:SPX" - }, - "range": true, + } + }, + { + "description": "Specify a us_code. This is a unique nine-character alphanumeric code that identifies a North American financial security for the purposes of facilitating clearing and settlement of trades.", + "in": "query", + "name": "us_code", + "schema": { "type": "string" } }, { - "description": "Filter by taxonomy category.", + "description": "Specify an International Securities Identification Number (ISIN). This is a unique twelve-digit code that is assigned to every security issuance in the world.", "in": "query", - "name": "category", + "name": "isin", "schema": { "type": "string" } }, { - "description": "Filter by taxonomy tag. Each category has a set of associated tags.", + "description": "Specify a listing date. This is the first trading date for the newly listed entity.", "in": "query", - "name": "tag", + "name": "listing_date", "schema": { + "format": "date", + "type": "string" + }, + "x-polygon-filter-field": { + "range": true, "type": "string" } }, { - "description": "Range by ticker.", + "description": "Specify an IPO status.", "in": "query", - "name": "ticker.gte", + "name": "ipo_status", "schema": { + "enum": [ + "direct_listing_process", + "history", + "new", + "pending", + "postponed", + "rumor", + "withdrawn" + ], "type": "string" } }, { - "description": "Range by ticker.", + "description": "Range by listing_date.", "in": "query", - "name": "ticker.gt", + "name": "listing_date.gte", "schema": { + "format": "date", "type": "string" } }, { - "description": "Range by ticker.", + "description": "Range by listing_date.", "in": "query", - "name": "ticker.lte", + "name": "listing_date.gt", "schema": { + "format": "date", "type": "string" } }, { - "description": "Range by ticker.", + "description": "Range by listing_date.", "in": "query", - "name": "ticker.lt", + "name": "listing_date.lte", "schema": { + "format": "date", "type": "string" } }, { - "description": "Comma separated list of tickers, up to a maximum of 250. If no tickers are passed then all results will be returned in a paginated manner.\n\nWarning: The maximum number of characters allowed in a URL are subject to your technology stack.\n", - "example": "NCLH,O:SPY250321C00380000,C:EURUSD,X:BTCUSD,I:SPX", + "description": "Range by listing_date.", "in": "query", - "name": "ticker.any_of", + "name": "listing_date.lt", "schema": { + "format": "date", "type": "string" } }, @@ -30404,6 +30597,7 @@ "in": "query", "name": "order", "schema": { + "default": "desc", "enum": [ "asc", "desc" @@ -30413,13 +30607,13 @@ } }, { - "description": "Limit the number of results returned, default is 10 and max is 250.", + "description": "Limit the number of results returned, default is 10 and max is 1000.", "in": "query", "name": "limit", "schema": { "default": 10, "example": 10, - "maximum": 250, + "maximum": 1000, "minimum": 1, "type": "integer" } @@ -30429,11 +30623,29 @@ "in": "query", "name": "sort", "schema": { - "default": "ticker", + "default": "listing_date", "enum": [ - "ticker" + "listing_date", + "ticker", + "last_updated", + "security_type", + "issuer_name", + "currency_code", + "isin", + "us_code", + "final_issue_price", + "min_shares_offered", + "max_shares_offered", + "lowest_offer_price", + "highest_offer_price", + "total_offer_size", + "shares_outstanding", + "primary_exchange", + "lot_size", + "security_description", + "ipo_status" ], - "example": "ticker", + "example": "listing_date", "type": "string" } } @@ -30443,29 +30655,353 @@ "content": { "application/json": { "example": { - "request_id": "31d59dda-80e5-4721-8496-d0d32a654afe", + "next_url": "https://api.polygon.io/vX/reference/ipos?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "request_id": "6a7e466379af0a71039d60cc78e72282", "results": [ { - "category": "revenue_streams", - "reason": "Company recognizes revenue from the sales of consumer electronics such as the iPhone and iPad.", - "relevance": 0.99, - "tag": "physical_product_sales_electronics", - "ticker": "AAPL" + "currency_code": "USD", + "final_issue_price": 17, + "highest_offer_price": 17, + "ipo_status": "history", + "isin": "US75383L1026", + "issue_end_date": "2024-06-06", + "issue_start_date": "2024-06-01", + "issuer_name": "Rapport Therapeutics Inc.", + "last_updated": "2024-06-27", + "listing_date": "2024-06-07", + "lot_size": 100, + "lowest_offer_price": 17, + "max_shares_offered": 8000000, + "min_shares_offered": 1000000, + "primary_exchange": "XNAS", + "security_description": "Ordinary Shares", + "security_type": "CS", + "shares_outstanding": 35376457, + "ticker": "RAPP", + "total_offer_size": 136000000, + "us_code": "75383L102" + } + ], + "status": "OK" + }, + "schema": { + "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" + }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" }, + "results": { + "description": "An array of results containing the requested data.", + "items": { + "properties": { + "currency_code": { + "description": "Underlying currency of the security.", + "example": "USD", + "type": "string" + }, + "final_issue_price": { + "description": "The price set by the company and its underwriters before the IPO goes live.", + "example": 14.5, + "format": "float", + "type": "number" + }, + "highest_offer_price": { + "description": "The highest price within the IPO price range that the company might use to price the shares.", + "example": 20, + "format": "float", + "type": "number" + }, + "ipo_status": { + "description": "The status of the IPO event. IPO events start out as status \"rumor\" or \"pending\". On listing day, the status changes to \"new\". After the listing day, the status changes to \"history\".\n\nThe status \"direct_listing_process\" corresponds to a type of offering where, instead of going through all the IPO processes, the company decides to list its shares directly on an exchange, without using an investment bank or other intermediaries. This is called a direct listing, direct placement, or direct public offering (DPO).", + "enum": [ + "direct_listing_process", + "history", + "new", + "pending", + "postponed", + "rumor", + "withdrawn" + ], + "example": "history", + "type": "string" + }, + "isin": { + "description": "International Securities Identification Number. This is a unique twelve-digit code that is assigned to every security issuance in the world.", + "example": "US0378331005", + "type": "string" + }, + "issuer_name": { + "description": "Name of issuer.", + "example": "Apple Inc.", + "type": "string" + }, + "last_updated": { + "description": "The date when the IPO event was last modified.", + "example": "2023-01-02", + "format": "date", + "type": "string" + }, + "listing_date": { + "description": "First trading date for the newly listed entity.", + "example": "2023-02-01", + "format": "date", + "type": "string" + }, + "lot_size": { + "description": "The minimum number of shares that can be bought or sold in a single transaction.", + "example": 100, + "type": "number" + }, + "lowest_offer_price": { + "description": "The lowest price within the IPO price range that the company is willing to offer its shares to investors.", + "example": 10, + "format": "float", + "type": "number" + }, + "max_shares_offered": { + "description": "The upper limit of the shares that the company is offering to investors.", + "example": 1000, + "type": "number" + }, + "min_shares_offered": { + "description": "The lower limit of shares that the company is willing to sell in the IPO.", + "example": 1000, + "type": "number" + }, + "primary_exchange": { + "description": "Market Identifier Code (MIC) of the primary exchange where the security is listed. The Market Identifier Code (MIC) (ISO 10383) is a unique identification code used to identify securities trading exchanges, regulated and non-regulated trading markets.", + "example": "XNAS", + "type": "string" + }, + "security_description": { + "description": "Description of the security.", + "example": "Ordinary Shares - Class A", + "type": "string" + }, + "security_type": { + "description": "The classification of the stock. For example, \"CS\" stands for Common Stock.", + "example": "CS", + "type": "string" + }, + "shares_outstanding": { + "description": "The total number of shares that the company has issued and are held by investors.", + "example": 1000000, + "type": "number" + }, + "ticker": { + "description": "The ticker symbol of the IPO event.", + "example": "AAPL", + "type": "string" + }, + "total_offer_size": { + "description": "The total amount raised by the company for IPO.", + "example": 1000000, + "format": "float", + "type": "number" + }, + "us_code": { + "description": "This is a unique nine-character alphanumeric code that identifies a North American financial security for the purposes of facilitating clearing and settlement of trades.", + "example": 37833100, + "type": "string" + } + }, + "required": [ + "name", + "last_updated", + "primary_exchange", + "security_type", + "security_description", + "ipo_status" + ], + "type": "object", + "x-polygon-go-type": { + "name": "IPOsResult" + } + }, + "type": "array" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "A list of IPO events." + } + }, + "summary": "IPOs", + "tags": [ + "reference:stocks:ipos" + ], + "x-polygon-entitlement-data-type": { + "description": "Reference data", + "name": "reference" + }, + "x-polygon-paginate": { + "limit": { + "default": 10, + "max": 1000 + }, + "order": { + "default": "desc" + }, + "sort": { + "default": "listing_date", + "enum": [ + "listing_date", + "ticker", + "last_updated", + "security_type", + "issuer_name", + "currency_code", + "isin", + "us_code", + "final_issue_price", + "min_shares_offered", + "max_shares_offered", + "lowest_offer_price", + "highest_offer_price", + "total_offer_size", + "shares_outstanding", + "primary_exchange", + "lot_size", + "security_description", + "ipo_status" + ] + } + } + } + }, + "/vX/reference/tickers/taxonomies": { + "get": { + "description": "Many investors place a high value on sector data. It is used to measure economic activity, identify peers and competitors, build ETF products, quantify market share, and compare company performance. However, there are some limitations to industry standard sectors:\n* They have difficulty identifying the primary area of activity for large, complex businesses.\n* Studies confirm significant disagreement between classification schemes when attempting to categorize the same companies.\n* The systems' hierarchical nature is inflexible and struggles to convey business nuances.\n
\n
\nAs a result, we've developed a new taxonomy to supplement existing sector classifications. The taxonomy is created by reviewing related 10K filings to create a set of structured categories and tags.\n
\n
\nThe categories are based on company operating models and are industry agnostic. Our current version only supports one category, Revenue Streams, with future plans to support more.\n
\n
\nThe tags define a specific type within the category. Within the Revenue Streams category, for example, tags for \"product sales\" and \"advertising\" may be found. A company may have many tags in a given category. The complete Revenue Streams taxonomy is shown below.\n
\n
\nOur taxonomy is powered by AI and is currently in early beta testing. You should expect some inaccuracies in the responses.\n
\n
\n## **Revenue Streams**\n *Latest Revision (7/7/2023)*\n
\n
\n- **Physical Product Sales:**\n Revenue generated from the sale of tangible goods or physical products to customers, either in-store or online.\n - Consumer Goods\n - Industrial Goods\n - Electronics\n - Vehicles\n - Healthcare Products\n
\n
\n- **Digital Product Sales:**\n Revenue earned from the sale of digital goods or products, such as software licenses, e-books, music downloads, or digital media content. It also includes revenue obtained by selling aggregated, anonymized, or processed data to third parties for market research, analytics, or other purposes.\n - Software\n - E-books and Digital Media\n - Mobile Applications\n - Games\n - Online Courses\n - Market Research Data\n - Customer Behavior Data\n
\n
\n- **Professional Services:**\n Revenue obtained by providing specialized services, expertise, or consulting to clients in exchange for fees. This includes services offered by professionals such as lawyers, accountants, or consultants.\n - Consulting\n - Legal Services\n - Financial Services\n - Marketing Services\n - Construction Services\n - Education & Tutoring\n
\n
\n- **Consumer Services:**\n Revenue earned from providing services directly to consumers, including services like healthcare, personal grooming, fitness, or hospitality.\n - Dining & Hospitality\n - Personal Care\n - Entertainment & Recreation\n - Fitness & Wellness\n - Travel & Tourism\n - Transportation\n - Home Services\n - Child & Family Care\n - Automotive\n
\n
\n- **Subscription-based Revenue:**\n Revenue obtained from recurring fees charged to customers for accessing a product or service over a defined period. This includes revenue from subscription-based models, membership programs, or software-as-a-service (SaaS) offerings.\n - Software as a Service (SaaS)\n - Streaming Services\n - Physical Media\n - Memberships\n
\n
\n- **Licensing and Royalties:**\n Revenue generated from the licensing of intellectual property rights to third parties, including franchise rights, patent licensing, brand licensing, and the receipt of royalties for authorized use of intellectual property like music royalties, book royalties, or patent royalties.\n - Franchise Fees\n - Patent Licensing\n - Brand Licensing\n - Media Royalties\n
\n
\n- **Advertising:**\n Revenue generated by displaying ads or promotional content to customers, whether through traditional or digital advertising channels, including revenue from display ads, sponsored content, or affiliate marketing.\n - Print Advertising\n - Online Display Advertising\n - Social Media Advertising\n - Influencer Marketing\n
\n
\n- **Commission-Based Revenue:**\n Revenue earned by acting as an intermediary and receiving a percentage or commission on sales made on behalf of another party. This includes revenue from affiliate programs, referral fees, or any other commission-based revenue models.\n - Real Estate Commissions\n - Affiliate Marketing Commissions\n - Online Marketplace Commissions\n
\n
\n- **Rentals or Leasing:**\n Revenue earned by leasing or renting out assets, properties, or equipment to customers, including rental income from real estate properties, equipment leasing, or vehicle rentals.\n - Property Rentals\n - Equipment Leasing\n - Vehicle Rentals", + "operationId": "ListTickerTaxonomyClassifications", + "parameters": [ + { + "in": "query", + "name": "ticker", + "schema": { + "type": "string" + }, + "x-polygon-filter-field": { + "anyOf": { + "description": "Comma separated list of tickers, up to a maximum of 250.\n\nWarning: The maximum number of characters allowed in a URL are subject to your own technology stack.\n", + "enabled": true, + "example": "AAPL,AMD,MSFT" + }, + "range": true, + "type": "string" + } + }, + { + "description": "Filter by taxonomy category. The current version of this API supports the following category: revenue_streams", + "in": "query", + "name": "category", + "schema": { + "type": "string" + } + }, + { + "description": "Filter by taxonomy tag. Each category has a set of associated tags.", + "in": "query", + "name": "tag", + "schema": { + "type": "string" + } + }, + { + "description": "Order results ascending or descending based on the ticker.", + "in": "query", + "name": "order", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + { + "description": "Limit the number of results returned. The default is 10 and the max is 250.", + "in": "query", + "name": "limit", + "schema": { + "default": 10, + "maximum": 250, + "minimum": 1, + "type": "integer" + } + }, + { + "description": "Range by ticker.", + "in": "query", + "name": "ticker.gte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by ticker.", + "in": "query", + "name": "ticker.gt", + "schema": { + "type": "string" + } + }, + { + "description": "Range by ticker.", + "in": "query", + "name": "ticker.lte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by ticker.", + "in": "query", + "name": "ticker.lt", + "schema": { + "type": "string" + } + }, + { + "description": "Comma separated list of tickers, up to a maximum of 250.\n\nWarning: The maximum number of characters allowed in a URL are subject to your own technology stack.\n", + "example": "AAPL,AMD,MSFT", + "in": "query", + "name": "ticker.any_of", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "request_id": "a4f9947955398c28905337f003bfee7c", + "results": [ { "category": "revenue_streams", - "reason": "Company recognizes revenue from the sales of digital products such as digital storage and app store fees.", - "relevance": 0.99, - "tag": "digital_product_sales_software", + "reason": "The text mentions revenue earned from the sale of digital goods or products, such as software licenses, e-books, music downloads, or digital media content.", + "tag": "digital_product_sales", "ticker": "AAPL" }, { - "category": "cost_structure", - "relevance": 0.86, - "tag": "economies_of_scale", + "category": "revenue_streams", + "reason": "The text mentions revenue generated from the licensing of intellectual property rights to third parties, including franchise rights, patent licensing, brand licensing, and the receipt of royalties for authorized use of intellectual property like music royalties, book royalties, or patent royalties.", + "tag": "licensing_and_royalties", "ticker": "AAPL" } - ] + ], + "status": "OK" }, "schema": { "properties": { @@ -30480,27 +31016,23 @@ "items": { "properties": { "category": { - "description": "The classification category.", + "description": "A dimension of a company\u2019s operating model that is agnostic to industry. Category contains a comprehensive list of tags which reflect defined types within that category. The current version of this API supports the following category: revenue_streams", "type": "string" }, "reason": { - "description": "The reason why the classification was given.", + "description": "The reason why the classification was given. The reason is provided by our AI to help you determine whether or not you agree with its applicability for your uses.", "type": "string" }, - "relevance": { - "description": "The relevance score for the tag. This is a measure of confidence in the tag classification.", - "format": "double", - "type": "number" - }, "tag": { - "description": "The classification tag. Each category has a set of associated tags.", + "description": "A specific type within a category. For example \u201cproduct_sales\u201d is a type of revenue stream. A company may have multiple tags within a given category. A taxonomy of tags are determined based on 10k filings.", "type": "string" }, "ticker": { - "description": "The ticker symbol for the asset.", + "description": "The identifying ticker symbol for the asset.", "type": "string" } }, + "type": "object", "x-polygon-go-type": { "name": "TaxonomyClassificationResult" } @@ -30531,20 +31063,7 @@ "description": "Reference data", "name": "reference" }, - "x-polygon-experimental": {}, - "x-polygon-paginate": { - "limit": { - "default": 10, - "max": 250, - "min": 1 - }, - "sort": { - "default": "ticker", - "enum": [ - "ticker" - ] - } - } + "x-polygon-experimental": {} }, "x-polygon-draft": true }, @@ -31290,6 +31809,21 @@ "paths": [ "/v3/reference/exchanges" ] + }, + { + "paths": [ + "/v1/related-companies/{ticker}" + ] + }, + { + "paths": [ + "/vX/reference/ipos" + ] + }, + { + "paths": [ + "/vX/reference/short-interest/{identifier_type}/{identifier}" + ] } ] } diff --git a/.polygon/websocket.json b/.polygon/websocket.json index 85245e63..ff09762a 100644 --- a/.polygon/websocket.json +++ b/.polygon/websocket.json @@ -269,7 +269,7 @@ }, "c": { "type": "array", - "description": "The trade conditions. See Conditions and Indicators\" for Polygon.io's trade conditions glossary.\n", + "description": "The trade conditions. See Conditions and Indicators for Polygon.io's trade conditions glossary.\n", "items": { "type": "integer", "description": "The ID of the condition." @@ -277,7 +277,7 @@ }, "t": { "type": "integer", - "description": "The Timestamp in Unix MS." + "description": "The SIP timestamp in Unix MS." }, "q": { "type": "integer", @@ -407,7 +407,7 @@ }, "t": { "type": "integer", - "description": "The Timestamp in Unix MS." + "description": "The SIP timestamp in Unix MS." }, "q": { "type": "integer", @@ -995,7 +995,7 @@ }, "example": { "ev": "FMV", - "val": 189.22, + "fmv": 189.22, "sym": "AAPL", "t": 1678220098130 } @@ -1761,7 +1761,7 @@ }, "example": { "ev": "FMV", - "val": 7.2, + "fmv": 7.2, "sym": "O:TSLA210903C00700000", "t": 1401715883806000000 } @@ -2331,7 +2331,7 @@ }, "example": { "ev": "FMV", - "val": 1.0631, + "fmv": 1.0631, "sym": "C:EURUSD", "t": 1678220098130 } @@ -2885,7 +2885,10 @@ "name": "realtime", "description": "Real Time Data" } - ] + ], + "x-polygon-deprecation": { + "date": 1719838800000 + } } }, "/crypto/XA": { @@ -3157,7 +3160,7 @@ }, "example": { "ev": "FMV", - "val": 33021.9, + "fmv": 33021.9, "sym": "X:BTC-USD", "t": 1610462007425 } @@ -3961,7 +3964,7 @@ }, "c": { "type": "array", - "description": "The trade conditions. See Conditions and Indicators\" for Polygon.io's trade conditions glossary.\n", + "description": "The trade conditions. See Conditions and Indicators for Polygon.io's trade conditions glossary.\n", "items": { "type": "integer", "description": "The ID of the condition." @@ -3969,7 +3972,7 @@ }, "t": { "type": "integer", - "description": "The Timestamp in Unix MS." + "description": "The SIP timestamp in Unix MS." }, "q": { "type": "integer", @@ -4038,7 +4041,7 @@ }, "t": { "type": "integer", - "description": "The Timestamp in Unix MS." + "description": "The SIP timestamp in Unix MS." }, "q": { "type": "integer", diff --git a/README.md b/README.md index 81494a78..aaf7bb5f 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,7 @@ Welcome to the official Python client library for the [Polygon](https://polygon. ## Prerequisites -Before installing the Polygon Python client, ensure your environment has Python 3.8 or higher. While most Python environments come with setuptools installed, it is a dependency for this library. In the rare case it's not already present, you can install setuptools using pip: - -``` -pip install setuptools -``` +Before installing the Polygon Python client, ensure your environment has Python 3.8 or higher. ## Install @@ -150,54 +146,6 @@ ws.run(handle_msg=handle_msg) ``` Check out more detailed examples [here](https://github.com/polygon-io/client-python/tree/master/examples/websocket). -## Launchpad REST API Client -Users of the Launchpad product will need to pass in certain headers in order to make API requests using the RequestOptionBuilder. -Example can be found [here](./examples/launchpad). - -Import classes -```python -from polygon import RESTClient -from polygon.rest.models.request import RequestOptionBuilder -``` -### Using the client -Create client and set options -```python -# create client -c = RESTClient(api_key="API_KEY") - -# create request options -options = RequestOptionBuilder().edge_headers( - edge_id="YOUR_EDGE_ID", # required - edge_ip_address="IP_ADDRESS", # required -) -``` -Request data using client methods. -```python -# get response -res = c.get_aggs("AAPL", 1, "day", "2022-04-04", "2022-04-04", options=options) - -# do something with response -``` -Checkout Launchpad readme for more details on RequestOptionBuilder [here](./examples/launchpad) - - -## Launchpad WebSocket Client - -```python -from polygon import WebSocketClient -from polygon.websocket.models import WebSocketMessage -from polygon.websocket.models.common import Feed, Market -from typing import List - -ws = WebSocketClient(api_key="API_KEY",feed=Feed.Launchpad,market=Market.Stocks, subscriptions=["AM.AAPL"]) - -def handle_msg(msg: List[WebSocketMessage]): - for m in msg: - print(m) - -ws.run(handle_msg=handle_msg) -``` - ## Contributing If you found a bug or have an idea for a new feature, please first discuss it with us by diff --git a/examples/rest/demo_correlation_matrix.py b/examples/rest/demo_correlation_matrix.py index f056ab6d..df939590 100644 --- a/examples/rest/demo_correlation_matrix.py +++ b/examples/rest/demo_correlation_matrix.py @@ -40,6 +40,7 @@ essential to do your own research or consult a financial advisor for personalized advice when investing. """ + import pandas as pd # type: ignore import numpy as np # type: ignore import seaborn as sns # type: ignore diff --git a/examples/rest/economy-treasury_yields.py b/examples/rest/economy-treasury_yields.py new file mode 100644 index 00000000..011b1866 --- /dev/null +++ b/examples/rest/economy-treasury_yields.py @@ -0,0 +1,13 @@ +from polygon import RESTClient + +# docs +# https://polygon.io/docs/rest/economy/treasury-yields + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # POLYGON_API_KEY environment variable is used + +yields = [] +for date in client.vx.list_treasury_yields(): + yields.append(date) + +print(yields) diff --git a/examples/rest/raw-list.py b/examples/rest/raw-list.py index 5a5a5642..9dd0020e 100644 --- a/examples/rest/raw-list.py +++ b/examples/rest/raw-list.py @@ -6,7 +6,7 @@ trades = cast( HTTPResponse, - client.list_trades("AAA", "2022-04-20", 5, raw=True), + client.list_trades("AAA", "2022-04-20", raw=True), ) print(trades.data) # b'{ diff --git a/examples/rest/stocks-ipos.py b/examples/rest/stocks-ipos.py new file mode 100644 index 00000000..cc09f61b --- /dev/null +++ b/examples/rest/stocks-ipos.py @@ -0,0 +1,13 @@ +from polygon import RESTClient + +# docs +# https://polygon.io/docs/rest/stocks/corporate-actions/ipos + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # POLYGON_API_KEY environment variable is used + +ipos = [] +for ipo in client.vx.list_ipos(ticker="RDDT"): + ipos.append(ipo) + +print(ipos) diff --git a/examples/rest/stocks-related_companies.py b/examples/rest/stocks-related_companies.py new file mode 100644 index 00000000..84b3a405 --- /dev/null +++ b/examples/rest/stocks-related_companies.py @@ -0,0 +1,10 @@ +from polygon import RESTClient + +# docs +# https://polygon.io/docs/stocks/get_v1_related-companies__ticker + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # POLYGON_API_KEY environment variable is used + +related_companies = client.get_related_companies("AAPL") +print(related_companies) diff --git a/examples/rest/stocks-short_interest.py b/examples/rest/stocks-short_interest.py new file mode 100644 index 00000000..3b64cd2a --- /dev/null +++ b/examples/rest/stocks-short_interest.py @@ -0,0 +1,13 @@ +from polygon import RESTClient + +# docs +# https://polygon.io/docs/rest/stocks/fundamentals/short-interest + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # POLYGON_API_KEY environment variable is used + +items = [] +for item in client.vx.list_short_interest(ticker="RDDT"): + items.append(item) + +print(items) diff --git a/examples/rest/stocks-short_volume.py b/examples/rest/stocks-short_volume.py new file mode 100644 index 00000000..711bfd47 --- /dev/null +++ b/examples/rest/stocks-short_volume.py @@ -0,0 +1,13 @@ +from polygon import RESTClient + +# docs +# https://polygon.io/docs/rest/stocks/fundamentals/short-volume + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # POLYGON_API_KEY environment variable is used + +items = [] +for item in client.vx.list_short_volume(ticker="RDDT"): + items.append(item) + +print(items) diff --git a/examples/rest/stocks-stock_financials.py b/examples/rest/stocks-stock_financials.py index dc356494..a75087e7 100644 --- a/examples/rest/stocks-stock_financials.py +++ b/examples/rest/stocks-stock_financials.py @@ -8,6 +8,13 @@ client = RESTClient() # POLYGON_API_KEY environment variable is used financials = [] -for f in client.vx.list_stock_financials("AAPL"): +for f in client.vx.list_stock_financials("AAPL", filing_date="2024-11-01"): financials.append(f) + + # get diluted_earnings_per_share + # print(f.financials.income_statement.diluted_earnings_per_share) + + # get net_income_loss + # print(f.financials.income_statement.net_income_loss) + print(financials) diff --git a/examples/tools/flatfiles-stock-trades/exchange-heatmap.py b/examples/tools/flatfiles-stock-trades/exchange-heatmap.py new file mode 100644 index 00000000..060b6350 --- /dev/null +++ b/examples/tools/flatfiles-stock-trades/exchange-heatmap.py @@ -0,0 +1,68 @@ +# We can use a Python script that aggregates trades by exchange into 30-minute +# chunks, setting the stage for a visual analysis. This approach will highlight +# trade flows, including opening hours and peak activity times, across the +# exchanges. Please see https://polygon.io/blog/insights-from-trade-level-data +# +import pandas as pd # type: ignore +import seaborn as sns # type: ignore +import matplotlib.pyplot as plt # type: ignore +import numpy as np # type: ignore +import pytz # type: ignore + +# Replace '2024-04-05.csv' with the path to your actual file +file_path = "2024-04-05.csv" + +# Load the CSV file into a pandas DataFrame +df = pd.read_csv(file_path) + +# Convert 'participant_timestamp' to datetime (assuming nanoseconds Unix timestamp) +df["participant_timestamp"] = pd.to_datetime( + df["participant_timestamp"], unit="ns", utc=True +) + +# Convert to Eastern Time (ET), accounting for both EST and EDT +df["participant_timestamp"] = df["participant_timestamp"].dt.tz_convert( + "America/New_York" +) + +# Create a new column for 30-minute time intervals, now in ET +df["time_interval"] = df["participant_timestamp"].dt.floor("30T").dt.time + +# Ensure full 24-hour coverage by generating all possible 30-minute intervals +all_intervals = pd.date_range(start="00:00", end="23:59", freq="30T").time +all_exchanges = df["exchange"].unique() +full_index = pd.MultiIndex.from_product( + [all_exchanges, all_intervals], names=["exchange", "time_interval"] +) + +# Group by 'exchange' and 'time_interval', count trades, and reset index +grouped = ( + df.groupby(["exchange", "time_interval"]) + .size() + .reindex(full_index, fill_value=0) + .reset_index(name="trade_count") +) + +# Pivot the DataFrame for the heatmap, ensuring all intervals and exchanges are represented +pivot_table = grouped.pivot("exchange", "time_interval", "trade_count").fillna(0) + +# Apply a log scale transformation to the trade counts + 1 to handle zero trades correctly +log_scale_data = np.log1p(pivot_table.values) + +# Plotting the heatmap using the log scale data +plt.figure(figsize=(20, 10)) +sns.heatmap( + log_scale_data, + annot=False, + cmap="Reds", + linewidths=0.5, + cbar=False, + xticklabels=[t.strftime("%H:%M") for t in all_intervals], + yticklabels=pivot_table.index, +) +plt.title("Trade Count Heatmap by Exchange and Time Interval (Log Scale, ET)") +plt.ylabel("Exchange") +plt.xlabel("Time Interval (ET)") +plt.xticks(rotation=45) +plt.tight_layout() # Adjust layout to not cut off labels +plt.show() diff --git a/examples/tools/flatfiles-stock-trades/exchanges-seen.py b/examples/tools/flatfiles-stock-trades/exchanges-seen.py new file mode 100644 index 00000000..70fb5081 --- /dev/null +++ b/examples/tools/flatfiles-stock-trades/exchanges-seen.py @@ -0,0 +1,23 @@ +# Here's a Python script for analyzing the dataset, that identifies the +# distribution of trades across different exchanges and calculates their +# respective percentages of the total trades. Please see +# https://polygon.io/blog/insights-from-trade-level-data +# +import pandas as pd # type: ignore + +# Replace '2024-04-05.csv' with the path to your actual file +file_path = "2024-04-05.csv" + +# Load the CSV file into a pandas DataFrame +df = pd.read_csv(file_path) + +# Count the number of trades for each exchange +exchange_counts = df["exchange"].value_counts() + +# Calculate the total number of trades +total_trades = exchange_counts.sum() + +# Print out all exchanges and their percentage of total trades +for exchange, count in exchange_counts.items(): + percentage = (count / total_trades) * 100 + print(f"Exchange {exchange}: {count} trades, {percentage:.2f}% of total trades") diff --git a/examples/tools/flatfiles-stock-trades/heatmap.png b/examples/tools/flatfiles-stock-trades/heatmap.png new file mode 100644 index 00000000..9cf4c0ac Binary files /dev/null and b/examples/tools/flatfiles-stock-trades/heatmap.png differ diff --git a/examples/tools/flatfiles-stock-trades/histogram.png b/examples/tools/flatfiles-stock-trades/histogram.png new file mode 100644 index 00000000..1ccb62dd Binary files /dev/null and b/examples/tools/flatfiles-stock-trades/histogram.png differ diff --git a/examples/tools/flatfiles-stock-trades/readme.md b/examples/tools/flatfiles-stock-trades/readme.md new file mode 100644 index 00000000..c794b3ba --- /dev/null +++ b/examples/tools/flatfiles-stock-trades/readme.md @@ -0,0 +1,86 @@ +# Polygon.io Flat Files Stock Trades Analysis Scripts + +This repository contains Python scripts for analyzing stock market trading data using Flat Files from Polygon.io. These scripts demonstrate various ways to dissect and visualize trade data for comprehensive market analysis. + +Please see the tutorial: [Deep Dive into Trade-Level Data with Flat Files](https://polygon.io/blog/insights-from-trade-level-data) + +## Scripts Overview + +### **exchange-heatmap.py** +This script aggregates trades by exchange into 30-minute chunks and creates a heatmap visualization. It highlights the flow of trades and peak activity times across different exchanges, providing insights into how different exchanges operate throughout the day. + +![Treemap Visualization](./heatmap.png) + +### **exchanges-seen.py** +Analyzes the distribution of trades across different exchanges and calculates their respective percentages of total trades. This script helps identify which exchanges handle the most trading volume, offering a perspective on market structure. + +``` +Exchange 4: 25,570,324 trades, 36.32% of total trades +Exchange 12: 15,147,689 trades, 21.52% of total trades +Exchange 11: 6,877,306 trades, 9.77% of total trades +Exchange 19: 5,098,852 trades, 7.24% of total trades +Exchange 10: 4,006,611 trades, 5.69% of total trades +Exchange 8: 3,686,168 trades, 5.24% of total trades +Exchange 15: 2,446,340 trades, 3.47% of total trades +Exchange 21: 2,173,744 trades, 3.09% of total trades +Exchange 7: 1,509,083 trades, 2.14% of total trades +Exchange 20: 1,296,811 trades, 1.84% of total trades +Exchange 18: 674,553 trades, 0.96% of total trades +Exchange 13: 527,767 trades, 0.75% of total trades +Exchange 2: 417,295 trades, 0.59% of total trades +Exchange 3: 393,919 trades, 0.56% of total trades +Exchange 17: 230,210 trades, 0.33% of total trades +Exchange 1: 183,010 trades, 0.26% of total trades +Exchange 9: 159,020 trades, 0.23% of total trades +Exchange 14: 1,211 trades, 0.00% of total trades +``` + +### **top-10-tickers.py** +Identifies the top 10 most traded stocks and calculates their respective percentages of the total trades. This script provides a clear view of the market's most active stocks, highlighting where the most trading activity is concentrated. + +``` +TSLA: 1,549,605 trades, 2.20% of total trades +NVDA: 788,331 trades, 1.12% of total trades +SPY: 669,762 trades, 0.95% of total trades +AMD: 587,140 trades, 0.83% of total trades +MDIA: 561,698 trades, 0.80% of total trades +AAPL: 540,870 trades, 0.77% of total trades +SOXL: 533,511 trades, 0.76% of total trades +QQQ: 508,822 trades, 0.72% of total trades +CADL: 466,604 trades, 0.66% of total trades +AMZN: 465,526 trades, 0.66% of total trades +``` + +### **trades-histogram.py** +Creates a histogram that aggregates trades into 30-minute intervals throughout the day. This visualization helps understand the distribution of trading volume across different times, including pre-market, regular trading hours, and after-hours. + +![Treemap Visualization](./histogram.png) + +## Download the Data + +First, let's download an actual file and explore the data and see what we can learn. We start by downloading the trades for 2024-04-05 via the [File Browser](https://polygon.io/flat-files/stocks-trades/2024/04). The `us_stocks_sip/trades_v1/2024/04/2024-04-05.csv.gz` file is about 1.35GB and is in a compressed gzip format. + +``` +gunzip 2024-04-05.csv.gz +``` + +## Getting Started + +To run these scripts, you will need Python 3 and several dependencies installed, including pandas, matplotlib, seaborn, and pytz. Ensure that you have the trading data file available and modify the `file_path` variable in each script to point to your data file location. + +``` +pip install pandas matplotlib seaborn pytz +``` + +## Usage + +Each script is designed to be run independently: + +```bash +python exchange-heatmap.py +python exchanges-seen.py +python top-10-tickers.py +python trades-histogram.py +``` + +Adjust the script parameters as necessary to fit your specific analysis needs or to accommodate different datasets. \ No newline at end of file diff --git a/examples/tools/flatfiles-stock-trades/top-10-tickers.py b/examples/tools/flatfiles-stock-trades/top-10-tickers.py new file mode 100644 index 00000000..ec046e0b --- /dev/null +++ b/examples/tools/flatfiles-stock-trades/top-10-tickers.py @@ -0,0 +1,25 @@ +# Here's a Python script for analyzing the dataset, that identifies the top 10 +# most traded stocks and calculates their respective percentages of the total +# trades. Please see https://polygon.io/blog/insights-from-trade-level-data +# +import pandas as pd # type: ignore + +# Replace '2024-04-05.csv' with the path to your actual file +file_path = "2024-04-05.csv" + +# Load the CSV file into a pandas DataFrame +df = pd.read_csv(file_path) + +# Count the number of trades for each ticker +trade_counts = df["ticker"].value_counts() + +# Calculate the total number of trades +total_trades = trade_counts.sum() + +# Get the top 10 traded stocks +top_10_traded = trade_counts.head(10) + +# Print out the top 10 traded stocks and their percentage of total trades +for ticker, count in top_10_traded.items(): + percentage = (count / total_trades) * 100 + print(f"{ticker}: {count} trades, {percentage:.2f}% of total trades") diff --git a/examples/tools/flatfiles-stock-trades/trades-histogram.py b/examples/tools/flatfiles-stock-trades/trades-histogram.py new file mode 100644 index 00000000..6651978d --- /dev/null +++ b/examples/tools/flatfiles-stock-trades/trades-histogram.py @@ -0,0 +1,63 @@ +# To visualize these dynamics, we can use a Python script to create a histogram +# aggregating trades into 30-minute intervals, providing a clear view of when +# trading activity concentrates during the day. This analysis aims to highlight +# the distribution of trading volume across the day, from pre-market to after- +# hours. Please see https://polygon.io/blog/insights-from-trade-level-data +# +import pandas as pd # type: ignore +import matplotlib.pyplot as plt # type: ignore + +# Replace '2024-04-05.csv' with the path to your actual file +file_path = "2024-04-05.csv" + +# Load the CSV file into a pandas DataFrame +df = pd.read_csv(file_path) + +# Convert 'participant_timestamp' to datetime (assuming nanoseconds Unix timestamp) +df["participant_timestamp"] = pd.to_datetime( + df["participant_timestamp"], unit="ns", utc=True +) + +# Convert to Eastern Time (ET), accounting for both EST and EDT +df["participant_timestamp"] = df["participant_timestamp"].dt.tz_convert( + "America/New_York" +) + +# Create a new column for 30-minute time intervals, now in ET +df["time_interval"] = df["participant_timestamp"].dt.floor("30T") + +# Aggregate trades into 30-minute intervals for the entire dataset +trade_counts_per_interval = df.groupby("time_interval").size() + +# Prepare the plot +plt.figure(figsize=(15, 7)) + +# Plotting the histogram/bar chart +bars = plt.bar( + trade_counts_per_interval.index, trade_counts_per_interval.values, width=0.02 +) + +# Adding trade count annotations on each bar +for bar in bars: + height = bar.get_height() + plt.annotate( + f"{int(height)}", + xy=(bar.get_x() + bar.get_width() / 2, height), + xytext=(0, 3), # 3 points vertical offset + textcoords="offset points", + ha="center", + va="bottom", + ) + +plt.title("Trade Counts Aggregated by 30-Minute Intervals (ET)") +plt.xlabel("Time Interval (ET)") +plt.ylabel("Number of Trades") +plt.xticks(rotation=45, ha="right") + +# Ensure that every 30-minute interval is represented on the x-axis +plt.gca().set_xticklabels( + [t.strftime("%Y-%m-%d %H:%M") for t in trade_counts_per_interval.index], rotation=90 +) + +plt.tight_layout() +plt.show() diff --git a/examples/tools/hunting-anomalies/README.md b/examples/tools/hunting-anomalies/README.md new file mode 100644 index 00000000..4b36f1b5 --- /dev/null +++ b/examples/tools/hunting-anomalies/README.md @@ -0,0 +1,49 @@ +# Hunting Anomalies in the Stock Market + +This repository contains all the necessary scripts and data directories used in the [Hunting Anomalies in the Stock Market](https://polygon.io/blog/hunting-anomalies-in-stock-market/) tutorial, hosted on Polygon.io's blog. The tutorial demonstrates how to detect statistical anomalies in historical US stock market data through a comprehensive workflow that involves downloading data, building a lookup table, querying for anomalies, and visualizing them through a web interface. + +### Prerequisites + +- Python 3.8+ +- Access to Polygon.io's historical data via Flat Files +- An active Polygon.io API key, obtainable by signing up for a Stocks paid plan + +### Repository Contents + +- `README.md`: This file, outlining setup and execution instructions. +- `aggregates_day`: Directory where downloaded CSV data files are stored. +- `build-lookup-table.py`: Python script to build a lookup table from the historical data. +- `query-lookup-table.py`: Python script to query the lookup table for anomalies. +- `gui-lookup-table.py`: Python script for a browser-based interface to explore anomalies visually. + +### Running the Tutorial + +1. **Ensure Python 3.8+ is installed:** Check your Python version and ensure all required libraries (polygon-api-client, pandas, pickle, and argparse) are installed. + +2. **Set up your API key:** Make sure you have an active paid Polygon.io Stock subscription for accessing Flat Files. Set up your API key in your environment or directly in the scripts where required. + +3. **Download Historical Data:** Use the MinIO client to download historical stock market data. Adjust the commands and paths based on the data you are interested in. + ```bash + mc alias set s3polygon https://files.polygon.io YOUR_ACCESS_KEY YOUR_SECRET_KEY + mc cp --recursive s3polygon/flatfiles/us_stocks_sip/day_aggs_v1/2024/08/ ./aggregates_day/ + mc cp --recursive s3polygon/flatfiles/us_stocks_sip/day_aggs_v1/2024/09/ ./aggregates_day/ + mc cp --recursive s3polygon/flatfiles/us_stocks_sip/day_aggs_v1/2024/10/ ./aggregates_day/ + gunzip ./aggregates_day/*.gz + ``` + +4. **Build the Lookup Table:** This script processes the downloaded data and builds a lookup table, saving it as `lookup_table.pkl`. + ```bash + python build-lookup-table.py + ``` + +5. **Query Anomalies:** Replace `2024-10-18` with the date you want to analyze for anomalies. + ```bash + python query-lookup-table.py 2024-10-18 + ``` + +6. **Run the GUI:** Access the web interface at `http://localhost:8888` to explore the anomalies visually. + ```bash + python gui-lookup-table.py + ``` + +For a complete step-by-step guide on each phase of the anomaly detection process, including additional configurations and troubleshooting, refer to the detailed [tutorial on our blog](https://polygon.io/blog/hunting-anomalies-in-stock-market/). diff --git a/examples/tools/hunting-anomalies/aggregates_day/README.md b/examples/tools/hunting-anomalies/aggregates_day/README.md new file mode 100644 index 00000000..a0ade480 --- /dev/null +++ b/examples/tools/hunting-anomalies/aggregates_day/README.md @@ -0,0 +1 @@ +Download flat files into here. diff --git a/examples/tools/hunting-anomalies/build-lookup-table.py b/examples/tools/hunting-anomalies/build-lookup-table.py new file mode 100644 index 00000000..16abca2d --- /dev/null +++ b/examples/tools/hunting-anomalies/build-lookup-table.py @@ -0,0 +1,91 @@ +import os +import pandas as pd # type: ignore +from collections import defaultdict +import pickle +import json +from typing import DefaultDict, Dict, Any, BinaryIO + +# Directory containing the daily CSV files +data_dir = "./aggregates_day/" + +# Initialize a dictionary to hold trades data +trades_data = defaultdict(list) + +# List all CSV files in the directory +files = sorted([f for f in os.listdir(data_dir) if f.endswith(".csv")]) + +print("Starting to process files...") + +# Process each file (assuming files are named in order) +for file in files: + print(f"Processing {file}") + file_path = os.path.join(data_dir, file) + df = pd.read_csv(file_path) + # For each stock, store the date and relevant data + for _, row in df.iterrows(): + ticker = row["ticker"] + date = pd.to_datetime(row["window_start"], unit="ns").date() + trades = row["transactions"] + close_price = row["close"] # Ensure 'close' column exists in your CSV + trades_data[ticker].append( + {"date": date, "trades": trades, "close_price": close_price} + ) + +print("Finished processing files.") +print("Building lookup table...") + +# Now, build the lookup table with rolling averages and percentage price change +lookup_table: DefaultDict[str, Dict[str, Any]] = defaultdict( + dict +) # Nested dict: ticker -> date -> stats + +for ticker, records in trades_data.items(): + # Convert records to DataFrame + df_ticker = pd.DataFrame(records) + # Sort records by date + df_ticker.sort_values("date", inplace=True) + df_ticker.set_index("date", inplace=True) + + # Calculate the percentage change in close_price + df_ticker["price_diff"] = ( + df_ticker["close_price"].pct_change() * 100 + ) # Multiply by 100 for percentage + + # Shift trades to exclude the current day from rolling calculations + df_ticker["trades_shifted"] = df_ticker["trades"].shift(1) + # Calculate rolling average and standard deviation over the previous 5 days + df_ticker["avg_trades"] = df_ticker["trades_shifted"].rolling(window=5).mean() + df_ticker["std_trades"] = df_ticker["trades_shifted"].rolling(window=5).std() + # Store the data in the lookup table + for date, row in df_ticker.iterrows(): + # Convert date to string for JSON serialization + date_str = date.strftime("%Y-%m-%d") + # Ensure rolling stats are available + if pd.notnull(row["avg_trades"]) and pd.notnull(row["std_trades"]): + lookup_table[ticker][date_str] = { + "trades": row["trades"], + "close_price": row["close_price"], + "price_diff": row["price_diff"], + "avg_trades": row["avg_trades"], + "std_trades": row["std_trades"], + } + else: + # Store data without rolling stats if not enough data points + lookup_table[ticker][date_str] = { + "trades": row["trades"], + "close_price": row["close_price"], + "price_diff": row["price_diff"], + "avg_trades": None, + "std_trades": None, + } + +print("Lookup table built successfully.") + +# Convert defaultdict to regular dict for JSON serialization +lookup_table_dict = {k: v for k, v in lookup_table.items()} + +# Save the lookup table to a file for later use +with open("lookup_table.pkl", "wb") as f: # type: BinaryIO + pickle.dump(lookup_table_dict, f) + +print("Lookup table saved to 'lookup_table.pkl'.") diff --git a/examples/tools/hunting-anomalies/gui-lookup-table.py b/examples/tools/hunting-anomalies/gui-lookup-table.py new file mode 100644 index 00000000..df58746c --- /dev/null +++ b/examples/tools/hunting-anomalies/gui-lookup-table.py @@ -0,0 +1,302 @@ +import os +import pickle +import json +from datetime import datetime +from polygon import RESTClient +from polygon.rest.models import Agg +import http.server +import socketserver +import traceback +from urllib.parse import urlparse, parse_qs + +PORT = 8888 + +# Load the lookup_table +with open("lookup_table.pkl", "rb") as f: + lookup_table = pickle.load(f) + + +class handler(http.server.SimpleHTTPRequestHandler): + def do_GET(self): + # Parse the path and query parameters + parsed_path = urlparse(self.path) + path = parsed_path.path + query_params = parse_qs(parsed_path.query) + + if path == "/": + # Handle the root path + # Get the date parameter if provided + date_param = query_params.get("date", [None])[0] + + # Get all dates from the lookup table + all_dates = set() + for ticker_data in lookup_table.values(): + all_dates.update(ticker_data.keys()) + all_dates = sorted(all_dates) + + # If date is None, get the latest date from the lookup table + if date_param is None: + if all_dates: + latest_date = max(all_dates) + else: + self.send_response(200) + self.send_header("Content-type", "text/html") + self.end_headers() + html_content = ( + "

No data available.

" + ) + self.wfile.write(html_content.encode()) + return + else: + latest_date = date_param + + # Ensure latest_date is in all_dates + if latest_date not in all_dates: + # Handle the case where the provided date is invalid + self.send_response(400) + self.send_header("Content-type", "text/html") + self.end_headers() + error_html = f"

Error: No data available for date {latest_date}

" + self.wfile.write(error_html.encode()) + return + + # Now, get the anomalies for the latest_date + anomalies = [] + for ticker, date_data in lookup_table.items(): + if latest_date in date_data: + data = date_data[latest_date] + trades = data["trades"] + avg_trades = data["avg_trades"] + std_trades = data["std_trades"] + if ( + avg_trades is not None + and std_trades is not None + and std_trades > 0 + ): + z_score = (trades - avg_trades) / std_trades + threshold_multiplier = 3 # Adjust as needed + if z_score > threshold_multiplier: + anomalies.append( + { + "ticker": ticker, + "date": latest_date, + "trades": trades, + "avg_trades": avg_trades, + "std_trades": std_trades, + "z_score": z_score, + "close_price": data["close_price"], + "price_diff": data["price_diff"], + } + ) + # Sort anomalies by trades in descending order + anomalies.sort(key=lambda x: x["trades"], reverse=True) + # Generate the HTML to display the anomalies + self.send_response(200) + self.send_header("Content-type", "text/html") + self.end_headers() + # Build the HTML content + html_content = 'Anomalies for {}'.format( + latest_date + ) + html_content += '

Anomalies for {}

'.format( + latest_date + ) + # Add navigation links (prev and next dates) + current_index = all_dates.index(latest_date) + prev_date = all_dates[current_index - 1] if current_index > 0 else None + next_date = ( + all_dates[current_index + 1] + if current_index < len(all_dates) - 1 + else None + ) + html_content += "

" + if prev_date: + html_content += 'Previous Date '.format( + prev_date + ) + if next_date: + html_content += 'Next Date '.format(next_date) + html_content += "

" + # Display the anomalies in a table + html_content += ( + '' + ) + html_content += "" + html_content += "" + html_content += "" + html_content += "" + html_content += "" + html_content += "" + html_content += "" + html_content += "" + html_content += "" + html_content += "" + for anomaly in anomalies: + html_content += "" + html_content += "".format(anomaly["ticker"]) + html_content += "".format(anomaly["trades"]) + html_content += "".format(anomaly["avg_trades"]) + html_content += "".format(anomaly["std_trades"]) + html_content += "".format(anomaly["z_score"]) + html_content += "".format(anomaly["close_price"]) + html_content += "".format(anomaly["price_diff"]) + # Add a link to the chart + html_content += ( + ''.format( + anomaly["ticker"], latest_date + ) + ) + html_content += "" + html_content += '
TickerTradesAvg TradesStd DevZ-scoreClose PricePrice DiffChart
{}{}{:.2f}{:.2f}{:.2f}{:.2f}{:.2f}View Chart
' + html_content += "
" + self.wfile.write(html_content.encode()) + elif path == "/chart": + # Handle the chart page + # Get 'ticker' and 'date' from query parameters + ticker = query_params.get("ticker", [None])[0] + date = query_params.get("date", [None])[0] + if ticker is None or date is None: + # Return an error page + self.send_response(400) + self.send_header("Content-type", "text/html") + self.end_headers() + error_html = "

Error: Missing ticker or date parameter

" + self.wfile.write(error_html.encode()) + else: + # Fetch minute aggregates for the ticker and date + client = RESTClient( + trace=True + ) # POLYGON_API_KEY environment variable is used + try: + aggs = [] + date_from = date + date_to = date + for a in client.list_aggs( + ticker, + 1, + "minute", + date_from, + date_to, + limit=50000, + ): + aggs.append(a) + # Prepare data for the chart + data = [] + for agg in aggs: + if isinstance(agg, Agg) and isinstance(agg.timestamp, int): + new_record = [ + agg.timestamp, + agg.open, + agg.high, + agg.low, + agg.close, + ] + data.append(new_record) + # Generate the HTML for the chart page + chart_html = """ + + + + + + + + + + + + +
+ +
+ + + """ % ( + json.dumps(data), + ticker, + date, + ticker, + ) + self.send_response(200) + self.send_header("Content-type", "text/html") + self.send_header("Access-Control-Allow-Origin", "*") + self.end_headers() + self.wfile.write(chart_html.encode()) + except Exception as e: + # Handle exceptions + self.send_response(500) + self.send_header("Content-type", "text/html") + self.end_headers() + error_html = "

Error fetching data: {}

".format( + str(e) + ) + self.wfile.write(error_html.encode()) + else: + # Serve files from the current directory + super().do_GET() + + +def run_server(): + with socketserver.TCPServer(("", PORT), handler) as httpd: + print("serving at port", PORT) + try: + httpd.serve_forever() + except KeyboardInterrupt: + print("\nExiting gracefully...") + httpd.shutdown() + httpd.server_close() + + +if __name__ == "__main__": + run_server() diff --git a/examples/tools/hunting-anomalies/query-lookup-table.py b/examples/tools/hunting-anomalies/query-lookup-table.py new file mode 100644 index 00000000..38bb86cf --- /dev/null +++ b/examples/tools/hunting-anomalies/query-lookup-table.py @@ -0,0 +1,63 @@ +import pickle +import argparse + +# Parse command-line arguments +parser = argparse.ArgumentParser(description="Anomaly Detection Script") +parser.add_argument("date", type=str, help="Target date in YYYY-MM-DD format") +args = parser.parse_args() + +# Load the lookup_table +with open("lookup_table.pkl", "rb") as f: + lookup_table = pickle.load(f) + +# Threshold for considering an anomaly (e.g., 3 standard deviations) +threshold_multiplier = 3 + +# Date for which we want to find anomalies +target_date_str = args.date + +# List to store anomalies +anomalies = [] + +# Iterate over all tickers in the lookup table +for ticker, date_data in lookup_table.items(): + if target_date_str in date_data: + data = date_data[target_date_str] + trades = data["trades"] + avg_trades = data["avg_trades"] + std_trades = data["std_trades"] + if avg_trades is not None and std_trades is not None and std_trades > 0: + z_score = (trades - avg_trades) / std_trades + if z_score > threshold_multiplier: + anomalies.append( + { + "ticker": ticker, + "date": target_date_str, + "trades": trades, + "avg_trades": avg_trades, + "std_trades": std_trades, + "z_score": z_score, + "close_price": data["close_price"], + "price_diff": data["price_diff"], + } + ) + +# Sort anomalies by trades in descending order +anomalies.sort(key=lambda x: x["trades"], reverse=True) + +# Print the anomalies with aligned columns +print(f"\nAnomalies Found for {target_date_str}:\n") +print( + f"{'Ticker':<10}{'Trades':>10}{'Avg Trades':>15}{'Std Dev':>10}{'Z-score':>10}{'Close Price':>12}{'Price Diff':>12}" +) +print("-" * 91) +for anomaly in anomalies: + print( + f"{anomaly['ticker']:<10}" + f"{anomaly['trades']:>10.0f}" + f"{anomaly['avg_trades']:>15.2f}" + f"{anomaly['std_trades']:>10.2f}" + f"{anomaly['z_score']:>10.2f}" + f"{anomaly['close_price']:>12.2f}" + f"{anomaly['price_diff']:>12.2f}" + ) diff --git a/examples/tools/related-companies/data.json b/examples/tools/related-companies/data.json new file mode 100644 index 00000000..2b63ea05 --- /dev/null +++ b/examples/tools/related-companies/data.json @@ -0,0 +1 @@ +{"nodes": [{"id": 1, "label": "MSFT"}, {"id": 2, "label": "GOOGL"}, {"id": 3, "label": "NVDA"}, {"id": 4, "label": "AMZN"}, {"id": 5, "label": "GOOG"}, {"id": 6, "label": "META"}, {"id": 7, "label": "TSLA"}, {"id": 8, "label": "AAPL"}, {"id": 9, "label": "CRM"}, {"id": 10, "label": "ORCL"}, {"id": 11, "label": "AMD"}, {"id": 12, "label": "NFLX"}, {"id": 13, "label": "WMT"}, {"id": 14, "label": "DIS"}, {"id": 15, "label": "SNAP"}, {"id": 16, "label": "SHOP"}, {"id": 17, "label": "INTC"}, {"id": 18, "label": "ANET"}, {"id": 19, "label": "RIVN"}, {"id": 20, "label": "GM"}, {"id": 21, "label": "F"}, {"id": 22, "label": "LCID"}, {"id": 23, "label": "WBD"}, {"id": 24, "label": "CMCSA"}, {"id": 25, "label": "PARA"}, {"id": 26, "label": "T"}, {"id": 27, "label": "ROKU"}], "edges": [{"from": 1, "to": 2}, {"from": 1, "to": 3}, {"from": 1, "to": 4}, {"from": 1, "to": 5}, {"from": 1, "to": 6}, {"from": 1, "to": 7}, {"from": 1, "to": 8}, {"from": 1, "to": 9}, {"from": 1, "to": 10}, {"from": 1, "to": 11}, {"from": 4, "to": 1}, {"from": 4, "to": 2}, {"from": 4, "to": 5}, {"from": 4, "to": 8}, {"from": 4, "to": 7}, {"from": 4, "to": 3}, {"from": 4, "to": 6}, {"from": 4, "to": 12}, {"from": 4, "to": 13}, {"from": 4, "to": 14}, {"from": 6, "to": 5}, {"from": 6, "to": 2}, {"from": 6, "to": 1}, {"from": 6, "to": 4}, {"from": 6, "to": 8}, {"from": 6, "to": 7}, {"from": 6, "to": 3}, {"from": 6, "to": 15}, {"from": 6, "to": 12}, {"from": 6, "to": 11}, {"from": 8, "to": 1}, {"from": 8, "to": 2}, {"from": 8, "to": 4}, {"from": 8, "to": 5}, {"from": 8, "to": 7}, {"from": 8, "to": 3}, {"from": 8, "to": 6}, {"from": 8, "to": 12}, {"from": 8, "to": 14}, {"from": 8, "to": 11}, {"from": 5, "to": 2}, {"from": 5, "to": 1}, {"from": 5, "to": 6}, {"from": 5, "to": 4}, {"from": 5, "to": 8}, {"from": 5, "to": 7}, {"from": 5, "to": 3}, {"from": 5, "to": 15}, {"from": 5, "to": 12}, {"from": 5, "to": 16}, {"from": 3, "to": 11}, {"from": 3, "to": 6}, {"from": 3, "to": 2}, {"from": 3, "to": 7}, {"from": 3, "to": 5}, {"from": 3, "to": 1}, {"from": 3, "to": 8}, {"from": 3, "to": 4}, {"from": 3, "to": 17}, {"from": 3, "to": 18}, {"from": 7, "to": 19}, {"from": 7, "to": 2}, {"from": 7, "to": 4}, {"from": 7, "to": 20}, {"from": 7, "to": 21}, {"from": 7, "to": 22}, {"from": 7, "to": 5}, {"from": 7, "to": 6}, {"from": 7, "to": 8}, {"from": 7, "to": 3}, {"from": 14, "to": 12}, {"from": 14, "to": 23}, {"from": 14, "to": 4}, {"from": 14, "to": 24}, {"from": 14, "to": 25}, {"from": 14, "to": 8}, {"from": 14, "to": 2}, {"from": 14, "to": 26}, {"from": 14, "to": 5}, {"from": 14, "to": 27}]} \ No newline at end of file diff --git a/examples/tools/related-companies/index.html b/examples/tools/related-companies/index.html new file mode 100644 index 00000000..1b5ae182 --- /dev/null +++ b/examples/tools/related-companies/index.html @@ -0,0 +1,30 @@ + + + + Vis Network | Related Companies + + + + + +
+ + diff --git a/examples/tools/related-companies/readme.md b/examples/tools/related-companies/readme.md new file mode 100644 index 00000000..9f107550 --- /dev/null +++ b/examples/tools/related-companies/readme.md @@ -0,0 +1,36 @@ +# See Connections with the Related Companies API + +This repository contains the Python script and HTML file used in our tutorial to demonstrate how to identify and visualize relationships between companies using Polygon.io's Related Companies API. The tutorial showcases how to fetch related company data and create a dynamic network graph using Python and vis.js, providing insights into the interconnected corporate landscape. + +![Related Companies](./related-companies.png) + +Please see the [tutorial](https://polygon.io/blog/related-companies-api) for more details. + +### Prerequisites + +- Python 3.8+ +- Have Polygon.io's [python client](https://github.com/polygon-io/client-python) installed +- An active Polygon.io account with an API key + +### Repository Contents + +- `related-companies-demo.py`: Python script to fetch and process data from the Related Companies API. +- `index.html`: HTML file for visualizing the data as a network graph using vis.js. + +### Running the Example + +To run the Python script, ensure you have Python installed and your API key ready. Execute the following command: + +``` +python related-companies-demo.py +``` + +The script will generate a `data.json` file, which contains the nodes and edges for the network graph. + +To visualize the relationships: + +1. Take the `nodes` and `edges` from the `data.json` file and replace them in the `index.html` file +2. Open `index.html` in your web browser. +3. The web page should display the network graph. + +For a complete step-by-step guide on setting up and exploring the capabilities of the Related Companies API, refer to our detailed [tutorial](https://polygon.io/blog/related-companies-api). \ No newline at end of file diff --git a/examples/tools/related-companies/related-companies-demo.py b/examples/tools/related-companies/related-companies-demo.py new file mode 100644 index 00000000..221d5f0f --- /dev/null +++ b/examples/tools/related-companies/related-companies-demo.py @@ -0,0 +1,40 @@ +from polygon import RESTClient +import json + + +def get_related_tickers(): + client = RESTClient(trace=True) + + # Fetch a limited list of tickers to keep the example manageable + main_tickers = ["MSFT", "AMZN", "META", "AAPL", "GOOG", "NVDA", "TSLA", "DIS"] + + # Prepare data structures for nodes and edges + nodes = [] + edges = [] + id_map = {} + current_id = 1 + + # Iterate over each main ticker and find related tickers + for ticker in main_tickers: + if ticker not in id_map: + id_map[ticker] = current_id + nodes.append({"id": current_id, "label": ticker}) + current_id += 1 + + related_companies = client.get_related_companies(ticker) + for company in related_companies: + related_ticker = company.ticker + if related_ticker not in id_map: + id_map[related_ticker] = current_id + nodes.append({"id": current_id, "label": related_ticker}) + current_id += 1 + + edges.append({"from": id_map[ticker], "to": id_map[related_ticker]}) + + # Save the nodes and edges to a JSON file for web visualization + with open("data.json", "w") as f: + json.dump({"nodes": nodes, "edges": edges}, f) + + +if __name__ == "__main__": + get_related_tickers() diff --git a/examples/tools/related-companies/related-companies.png b/examples/tools/related-companies/related-companies.png new file mode 100644 index 00000000..ac9b14c7 Binary files /dev/null and b/examples/tools/related-companies/related-companies.png differ diff --git a/poetry.lock b/poetry.lock index c4d4dd8f..e657d9cb 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.1.1 and should not be changed by hand. [[package]] name = "alabaster" @@ -6,6 +6,7 @@ version = "0.7.12" description = "A configurable sidebar-enabled Sphinx theme" optional = false python-versions = "*" +groups = ["dev"] files = [ {file = "alabaster-0.7.12-py2.py3-none-any.whl", hash = "sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359"}, {file = "alabaster-0.7.12.tar.gz", hash = "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"}, @@ -17,16 +18,17 @@ version = "22.1.0" description = "Classes Without Boilerplate" optional = false python-versions = ">=3.5" +groups = ["dev"] files = [ {file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"}, {file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"}, ] [package.extras] -dev = ["cloudpickle", "coverage[toml] (>=5.0.2)", "furo", "hypothesis", "mypy (>=0.900,!=0.940)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "sphinx", "sphinx-notfound-page", "zope.interface"] +dev = ["cloudpickle ; platform_python_implementation == \"CPython\"", "coverage[toml] (>=5.0.2)", "furo", "hypothesis", "mypy (>=0.900,!=0.940)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "sphinx", "sphinx-notfound-page", "zope.interface"] docs = ["furo", "sphinx", "sphinx-notfound-page", "zope.interface"] -tests = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "zope.interface"] -tests-no-zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins"] +tests = ["cloudpickle ; platform_python_implementation == \"CPython\"", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "zope.interface"] +tests-no-zope = ["cloudpickle ; platform_python_implementation == \"CPython\"", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins"] [[package]] name = "Babel" @@ -34,6 +36,7 @@ version = "2.11.0" description = "Internationalization utilities" optional = false python-versions = ">=3.6" +groups = ["dev"] files = [ {file = "Babel-2.11.0-py3-none-any.whl", hash = "sha256:1ad3eca1c885218f6dce2ab67291178944f810a10a9b5f3cb8382a5a232b64fe"}, {file = "Babel-2.11.0.tar.gz", hash = "sha256:5ef4b3226b0180dedded4229651c8b0e1a3a6a2837d45a073272f313e4cf97f6"}, @@ -44,33 +47,34 @@ pytz = ">=2015.7" [[package]] name = "black" -version = "23.12.1" +version = "24.8.0" description = "The uncompromising code formatter." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ - {file = "black-23.12.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e0aaf6041986767a5e0ce663c7a2f0e9eaf21e6ff87a5f95cbf3675bfd4c41d2"}, - {file = "black-23.12.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c88b3711d12905b74206227109272673edce0cb29f27e1385f33b0163c414bba"}, - {file = "black-23.12.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a920b569dc6b3472513ba6ddea21f440d4b4c699494d2e972a1753cdc25df7b0"}, - {file = "black-23.12.1-cp310-cp310-win_amd64.whl", hash = "sha256:3fa4be75ef2a6b96ea8d92b1587dd8cb3a35c7e3d51f0738ced0781c3aa3a5a3"}, - {file = "black-23.12.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8d4df77958a622f9b5a4c96edb4b8c0034f8434032ab11077ec6c56ae9f384ba"}, - {file = "black-23.12.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:602cfb1196dc692424c70b6507593a2b29aac0547c1be9a1d1365f0d964c353b"}, - {file = "black-23.12.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c4352800f14be5b4864016882cdba10755bd50805c95f728011bcb47a4afd59"}, - {file = "black-23.12.1-cp311-cp311-win_amd64.whl", hash = "sha256:0808494f2b2df923ffc5723ed3c7b096bd76341f6213989759287611e9837d50"}, - {file = "black-23.12.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:25e57fd232a6d6ff3f4478a6fd0580838e47c93c83eaf1ccc92d4faf27112c4e"}, - {file = "black-23.12.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2d9e13db441c509a3763a7a3d9a49ccc1b4e974a47be4e08ade2a228876500ec"}, - {file = "black-23.12.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d1bd9c210f8b109b1762ec9fd36592fdd528485aadb3f5849b2740ef17e674e"}, - {file = "black-23.12.1-cp312-cp312-win_amd64.whl", hash = "sha256:ae76c22bde5cbb6bfd211ec343ded2163bba7883c7bc77f6b756a1049436fbb9"}, - {file = "black-23.12.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1fa88a0f74e50e4487477bc0bb900c6781dbddfdfa32691e780bf854c3b4a47f"}, - {file = "black-23.12.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a4d6a9668e45ad99d2f8ec70d5c8c04ef4f32f648ef39048d010b0689832ec6d"}, - {file = "black-23.12.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b18fb2ae6c4bb63eebe5be6bd869ba2f14fd0259bda7d18a46b764d8fb86298a"}, - {file = "black-23.12.1-cp38-cp38-win_amd64.whl", hash = "sha256:c04b6d9d20e9c13f43eee8ea87d44156b8505ca8a3c878773f68b4e4812a421e"}, - {file = "black-23.12.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3e1b38b3135fd4c025c28c55ddfc236b05af657828a8a6abe5deec419a0b7055"}, - {file = "black-23.12.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4f0031eaa7b921db76decd73636ef3a12c942ed367d8c3841a0739412b260a54"}, - {file = "black-23.12.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:97e56155c6b737854e60a9ab1c598ff2533d57e7506d97af5481141671abf3ea"}, - {file = "black-23.12.1-cp39-cp39-win_amd64.whl", hash = "sha256:dd15245c8b68fe2b6bd0f32c1556509d11bb33aec9b5d0866dd8e2ed3dba09c2"}, - {file = "black-23.12.1-py3-none-any.whl", hash = "sha256:78baad24af0f033958cad29731e27363183e140962595def56423e626f4bee3e"}, - {file = "black-23.12.1.tar.gz", hash = "sha256:4ce3ef14ebe8d9509188014d96af1c456a910d5b5cbf434a09fef7e024b3d0d5"}, + {file = "black-24.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:09cdeb74d494ec023ded657f7092ba518e8cf78fa8386155e4a03fdcc44679e6"}, + {file = "black-24.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:81c6742da39f33b08e791da38410f32e27d632260e599df7245cccee2064afeb"}, + {file = "black-24.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:707a1ca89221bc8a1a64fb5e15ef39cd755633daa672a9db7498d1c19de66a42"}, + {file = "black-24.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:d6417535d99c37cee4091a2f24eb2b6d5ec42b144d50f1f2e436d9fe1916fe1a"}, + {file = "black-24.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:fb6e2c0b86bbd43dee042e48059c9ad7830abd5c94b0bc518c0eeec57c3eddc1"}, + {file = "black-24.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:837fd281f1908d0076844bc2b801ad2d369c78c45cf800cad7b61686051041af"}, + {file = "black-24.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:62e8730977f0b77998029da7971fa896ceefa2c4c4933fcd593fa599ecbf97a4"}, + {file = "black-24.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:72901b4913cbac8972ad911dc4098d5753704d1f3c56e44ae8dce99eecb0e3af"}, + {file = "black-24.8.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:7c046c1d1eeb7aea9335da62472481d3bbf3fd986e093cffd35f4385c94ae368"}, + {file = "black-24.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:649f6d84ccbae73ab767e206772cc2d7a393a001070a4c814a546afd0d423aed"}, + {file = "black-24.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2b59b250fdba5f9a9cd9d0ece6e6d993d91ce877d121d161e4698af3eb9c1018"}, + {file = "black-24.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:6e55d30d44bed36593c3163b9bc63bf58b3b30e4611e4d88a0c3c239930ed5b2"}, + {file = "black-24.8.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:505289f17ceda596658ae81b61ebbe2d9b25aa78067035184ed0a9d855d18afd"}, + {file = "black-24.8.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b19c9ad992c7883ad84c9b22aaa73562a16b819c1d8db7a1a1a49fb7ec13c7d2"}, + {file = "black-24.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1f13f7f386f86f8121d76599114bb8c17b69d962137fc70efe56137727c7047e"}, + {file = "black-24.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:f490dbd59680d809ca31efdae20e634f3fae27fba3ce0ba3208333b713bc3920"}, + {file = "black-24.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:eab4dd44ce80dea27dc69db40dab62d4ca96112f87996bca68cd75639aeb2e4c"}, + {file = "black-24.8.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3c4285573d4897a7610054af5a890bde7c65cb466040c5f0c8b732812d7f0e5e"}, + {file = "black-24.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9e84e33b37be070ba135176c123ae52a51f82306def9f7d063ee302ecab2cf47"}, + {file = "black-24.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:73bbf84ed136e45d451a260c6b73ed674652f90a2b3211d6a35e78054563a9bb"}, + {file = "black-24.8.0-py3-none-any.whl", hash = "sha256:972085c618ee94f402da1af548a4f218c754ea7e5dc70acb168bfaca4c2542ed"}, + {file = "black-24.8.0.tar.gz", hash = "sha256:2500945420b6784c38b9ee885af039f5e7471ef284ab03fa35ecdde4688cd83f"}, ] [package.dependencies] @@ -84,19 +88,20 @@ typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} [package.extras] colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4)", "aiohttp (>=3.7.4,!=3.9.0)"] +d = ["aiohttp (>=3.7.4) ; sys_platform != \"win32\" or implementation_name != \"pypy\"", "aiohttp (>=3.7.4,!=3.9.0) ; sys_platform == \"win32\" and implementation_name == \"pypy\""] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "certifi" -version = "2024.2.2" +version = "2025.4.26" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" +groups = ["main", "dev"] files = [ - {file = "certifi-2024.2.2-py3-none-any.whl", hash = "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"}, - {file = "certifi-2024.2.2.tar.gz", hash = "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f"}, + {file = "certifi-2025.4.26-py3-none-any.whl", hash = "sha256:30350364dfe371162649852c63336a15c70c6510c2ad5015b21c2345311805f3"}, + {file = "certifi-2025.4.26.tar.gz", hash = "sha256:0a816057ea3cdefcef70270d2c515e4506bbc954f417fa5ade2021213bb8f0c6"}, ] [[package]] @@ -105,6 +110,7 @@ version = "2.1.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false python-versions = ">=3.6.0" +groups = ["dev"] files = [ {file = "charset-normalizer-2.1.1.tar.gz", hash = "sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845"}, {file = "charset_normalizer-2.1.1-py3-none-any.whl", hash = "sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f"}, @@ -119,6 +125,7 @@ version = "8.1.3" description = "Composable command line interface toolkit" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, @@ -133,6 +140,8 @@ version = "0.4.6" description = "Cross-platform colored terminal text." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +groups = ["dev"] +markers = "sys_platform == \"win32\" or platform_system == \"Windows\"" files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, @@ -144,6 +153,7 @@ version = "0.18.1" description = "Docutils -- Python Documentation Utilities" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +groups = ["dev"] files = [ {file = "docutils-0.18.1-py2.py3-none-any.whl", hash = "sha256:23010f129180089fbcd3bc08cfefccb3b890b0050e1ca00c867036e9d161b98c"}, {file = "docutils-0.18.1.tar.gz", hash = "sha256:679987caf361a7539d76e584cbeddc311e3aee937877c87346f31debc63e9d06"}, @@ -155,6 +165,7 @@ version = "2.1.3" description = "URL manipulation made simple." optional = false python-versions = "*" +groups = ["dev"] files = [ {file = "furl-2.1.3-py2.py3-none-any.whl", hash = "sha256:9ab425062c4217f9802508e45feb4a83e54324273ac4b202f1850363309666c0"}, {file = "furl-2.1.3.tar.gz", hash = "sha256:5a6188fe2666c484a12159c18be97a1977a71d632ef5bb867ef15f54af39cc4e"}, @@ -166,13 +177,14 @@ six = ">=1.8.0" [[package]] name = "idna" -version = "3.4" +version = "3.7" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.5" +groups = ["dev"] files = [ - {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, - {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, + {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, + {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, ] [[package]] @@ -181,6 +193,7 @@ version = "1.4.1" description = "Getting image size from png/jpeg/jpeg2000/gif file" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +groups = ["dev"] files = [ {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, @@ -192,6 +205,8 @@ version = "5.1.0" description = "Read metadata from Python packages" optional = false python-versions = ">=3.7" +groups = ["dev"] +markers = "python_version < \"3.10\"" files = [ {file = "importlib_metadata-5.1.0-py3-none-any.whl", hash = "sha256:d84d17e21670ec07990e1044a99efe8d615d860fd176fc29ef5c306068fda313"}, {file = "importlib_metadata-5.1.0.tar.gz", hash = "sha256:d5059f9f1e8e41f80e9c56c2ee58811450c31984dfa625329ffd7c0dad88a73b"}, @@ -203,7 +218,7 @@ zipp = ">=0.5" [package.extras] docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"] perf = ["ipython"] -testing = ["flake8 (<5)", "flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)"] +testing = ["flake8 (<5)", "flufl.flake8", "importlib-resources (>=1.3) ; python_version < \"3.9\"", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7) ; platform_python_implementation != \"PyPy\"", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8 ; python_version < \"3.12\"", "pytest-mypy (>=0.9.1) ; platform_python_implementation != \"PyPy\"", "pytest-perf (>=0.9.2)"] [[package]] name = "importlib-resources" @@ -211,6 +226,8 @@ version = "5.10.0" description = "Read resources from Python packages" optional = false python-versions = ">=3.7" +groups = ["dev"] +markers = "python_version < \"3.9\"" files = [ {file = "importlib_resources-5.10.0-py3-none-any.whl", hash = "sha256:ee17ec648f85480d523596ce49eae8ead87d5631ae1551f913c0100b5edd3437"}, {file = "importlib_resources-5.10.0.tar.gz", hash = "sha256:c01b1b94210d9849f286b86bb51bcea7cd56dde0600d8db721d7b81330711668"}, @@ -221,17 +238,18 @@ zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} [package.extras] docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"] -testing = ["flake8 (<5)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] +testing = ["flake8 (<5)", "pytest (>=6)", "pytest-black (>=0.3.7) ; platform_python_implementation != \"PyPy\"", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1) ; platform_python_implementation != \"PyPy\""] [[package]] name = "jinja2" -version = "3.1.3" +version = "3.1.6" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ - {file = "Jinja2-3.1.3-py3-none-any.whl", hash = "sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa"}, - {file = "Jinja2-3.1.3.tar.gz", hash = "sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90"}, + {file = "jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67"}, + {file = "jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d"}, ] [package.dependencies] @@ -246,6 +264,7 @@ version = "4.17.1" description = "An implementation of JSON Schema validation for Python" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "jsonschema-4.17.1-py3-none-any.whl", hash = "sha256:410ef23dcdbca4eaedc08b850079179883c2ed09378bd1f760d4af4aacfa28d7"}, {file = "jsonschema-4.17.1.tar.gz", hash = "sha256:05b2d22c83640cde0b7e0aa329ca7754fbd98ea66ad8ae24aa61328dfe057fa3"}, @@ -267,6 +286,7 @@ version = "2.1.1" description = "Safely add untrusted strings to HTML/XML markup." optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812"}, {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a"}, @@ -312,47 +332,54 @@ files = [ [[package]] name = "mypy" -version = "1.9.0" +version = "1.13.0" description = "Optional static typing for Python" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ - {file = "mypy-1.9.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f8a67616990062232ee4c3952f41c779afac41405806042a8126fe96e098419f"}, - {file = "mypy-1.9.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d357423fa57a489e8c47b7c85dfb96698caba13d66e086b412298a1a0ea3b0ed"}, - {file = "mypy-1.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49c87c15aed320de9b438ae7b00c1ac91cd393c1b854c2ce538e2a72d55df150"}, - {file = "mypy-1.9.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:48533cdd345c3c2e5ef48ba3b0d3880b257b423e7995dada04248725c6f77374"}, - {file = "mypy-1.9.0-cp310-cp310-win_amd64.whl", hash = "sha256:4d3dbd346cfec7cb98e6cbb6e0f3c23618af826316188d587d1c1bc34f0ede03"}, - {file = "mypy-1.9.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:653265f9a2784db65bfca694d1edd23093ce49740b2244cde583aeb134c008f3"}, - {file = "mypy-1.9.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3a3c007ff3ee90f69cf0a15cbcdf0995749569b86b6d2f327af01fd1b8aee9dc"}, - {file = "mypy-1.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2418488264eb41f69cc64a69a745fad4a8f86649af4b1041a4c64ee61fc61129"}, - {file = "mypy-1.9.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:68edad3dc7d70f2f17ae4c6c1b9471a56138ca22722487eebacfd1eb5321d612"}, - {file = "mypy-1.9.0-cp311-cp311-win_amd64.whl", hash = "sha256:85ca5fcc24f0b4aeedc1d02f93707bccc04733f21d41c88334c5482219b1ccb3"}, - {file = "mypy-1.9.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:aceb1db093b04db5cd390821464504111b8ec3e351eb85afd1433490163d60cd"}, - {file = "mypy-1.9.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0235391f1c6f6ce487b23b9dbd1327b4ec33bb93934aa986efe8a9563d9349e6"}, - {file = "mypy-1.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d4d5ddc13421ba3e2e082a6c2d74c2ddb3979c39b582dacd53dd5d9431237185"}, - {file = "mypy-1.9.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:190da1ee69b427d7efa8aa0d5e5ccd67a4fb04038c380237a0d96829cb157913"}, - {file = "mypy-1.9.0-cp312-cp312-win_amd64.whl", hash = "sha256:fe28657de3bfec596bbeef01cb219833ad9d38dd5393fc649f4b366840baefe6"}, - {file = "mypy-1.9.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:e54396d70be04b34f31d2edf3362c1edd023246c82f1730bbf8768c28db5361b"}, - {file = "mypy-1.9.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5e6061f44f2313b94f920e91b204ec600982961e07a17e0f6cd83371cb23f5c2"}, - {file = "mypy-1.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:81a10926e5473c5fc3da8abb04119a1f5811a236dc3a38d92015cb1e6ba4cb9e"}, - {file = "mypy-1.9.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b685154e22e4e9199fc95f298661deea28aaede5ae16ccc8cbb1045e716b3e04"}, - {file = "mypy-1.9.0-cp38-cp38-win_amd64.whl", hash = "sha256:5d741d3fc7c4da608764073089e5f58ef6352bedc223ff58f2f038c2c4698a89"}, - {file = "mypy-1.9.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:587ce887f75dd9700252a3abbc9c97bbe165a4a630597845c61279cf32dfbf02"}, - {file = "mypy-1.9.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f88566144752999351725ac623471661c9d1cd8caa0134ff98cceeea181789f4"}, - {file = "mypy-1.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:61758fabd58ce4b0720ae1e2fea5cfd4431591d6d590b197775329264f86311d"}, - {file = "mypy-1.9.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e49499be624dead83927e70c756970a0bc8240e9f769389cdf5714b0784ca6bf"}, - {file = "mypy-1.9.0-cp39-cp39-win_amd64.whl", hash = "sha256:571741dc4194b4f82d344b15e8837e8c5fcc462d66d076748142327626a1b6e9"}, - {file = "mypy-1.9.0-py3-none-any.whl", hash = "sha256:a260627a570559181a9ea5de61ac6297aa5af202f06fd7ab093ce74e7181e43e"}, - {file = "mypy-1.9.0.tar.gz", hash = "sha256:3cc5da0127e6a478cddd906068496a97a7618a21ce9b54bde5bf7e539c7af974"}, + {file = "mypy-1.13.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6607e0f1dd1fb7f0aca14d936d13fd19eba5e17e1cd2a14f808fa5f8f6d8f60a"}, + {file = "mypy-1.13.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8a21be69bd26fa81b1f80a61ee7ab05b076c674d9b18fb56239d72e21d9f4c80"}, + {file = "mypy-1.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7b2353a44d2179846a096e25691d54d59904559f4232519d420d64da6828a3a7"}, + {file = "mypy-1.13.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0730d1c6a2739d4511dc4253f8274cdd140c55c32dfb0a4cf8b7a43f40abfa6f"}, + {file = "mypy-1.13.0-cp310-cp310-win_amd64.whl", hash = "sha256:c5fc54dbb712ff5e5a0fca797e6e0aa25726c7e72c6a5850cfd2adbc1eb0a372"}, + {file = "mypy-1.13.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:581665e6f3a8a9078f28d5502f4c334c0c8d802ef55ea0e7276a6e409bc0d82d"}, + {file = "mypy-1.13.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3ddb5b9bf82e05cc9a627e84707b528e5c7caaa1c55c69e175abb15a761cec2d"}, + {file = "mypy-1.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:20c7ee0bc0d5a9595c46f38beb04201f2620065a93755704e141fcac9f59db2b"}, + {file = "mypy-1.13.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3790ded76f0b34bc9c8ba4def8f919dd6a46db0f5a6610fb994fe8efdd447f73"}, + {file = "mypy-1.13.0-cp311-cp311-win_amd64.whl", hash = "sha256:51f869f4b6b538229c1d1bcc1dd7d119817206e2bc54e8e374b3dfa202defcca"}, + {file = "mypy-1.13.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:5c7051a3461ae84dfb5dd15eff5094640c61c5f22257c8b766794e6dd85e72d5"}, + {file = "mypy-1.13.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:39bb21c69a5d6342f4ce526e4584bc5c197fd20a60d14a8624d8743fffb9472e"}, + {file = "mypy-1.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:164f28cb9d6367439031f4c81e84d3ccaa1e19232d9d05d37cb0bd880d3f93c2"}, + {file = "mypy-1.13.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a4c1bfcdbce96ff5d96fc9b08e3831acb30dc44ab02671eca5953eadad07d6d0"}, + {file = "mypy-1.13.0-cp312-cp312-win_amd64.whl", hash = "sha256:a0affb3a79a256b4183ba09811e3577c5163ed06685e4d4b46429a271ba174d2"}, + {file = "mypy-1.13.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a7b44178c9760ce1a43f544e595d35ed61ac2c3de306599fa59b38a6048e1aa7"}, + {file = "mypy-1.13.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5d5092efb8516d08440e36626f0153b5006d4088c1d663d88bf79625af3d1d62"}, + {file = "mypy-1.13.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:de2904956dac40ced10931ac967ae63c5089bd498542194b436eb097a9f77bc8"}, + {file = "mypy-1.13.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:7bfd8836970d33c2105562650656b6846149374dc8ed77d98424b40b09340ba7"}, + {file = "mypy-1.13.0-cp313-cp313-win_amd64.whl", hash = "sha256:9f73dba9ec77acb86457a8fc04b5239822df0c14a082564737833d2963677dbc"}, + {file = "mypy-1.13.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:100fac22ce82925f676a734af0db922ecfea991e1d7ec0ceb1e115ebe501301a"}, + {file = "mypy-1.13.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7bcb0bb7f42a978bb323a7c88f1081d1b5dee77ca86f4100735a6f541299d8fb"}, + {file = "mypy-1.13.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bde31fc887c213e223bbfc34328070996061b0833b0a4cfec53745ed61f3519b"}, + {file = "mypy-1.13.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:07de989f89786f62b937851295ed62e51774722e5444a27cecca993fc3f9cd74"}, + {file = "mypy-1.13.0-cp38-cp38-win_amd64.whl", hash = "sha256:4bde84334fbe19bad704b3f5b78c4abd35ff1026f8ba72b29de70dda0916beb6"}, + {file = "mypy-1.13.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:0246bcb1b5de7f08f2826451abd947bf656945209b140d16ed317f65a17dc7dc"}, + {file = "mypy-1.13.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7f5b7deae912cf8b77e990b9280f170381fdfbddf61b4ef80927edd813163732"}, + {file = "mypy-1.13.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7029881ec6ffb8bc233a4fa364736789582c738217b133f1b55967115288a2bc"}, + {file = "mypy-1.13.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:3e38b980e5681f28f033f3be86b099a247b13c491f14bb8b1e1e134d23bb599d"}, + {file = "mypy-1.13.0-cp39-cp39-win_amd64.whl", hash = "sha256:a6789be98a2017c912ae6ccb77ea553bbaf13d27605d2ca20a76dfbced631b24"}, + {file = "mypy-1.13.0-py3-none-any.whl", hash = "sha256:9c250883f9fd81d212e0952c92dbfcc96fc237f4b7c92f56ac81fd48460b3e5a"}, + {file = "mypy-1.13.0.tar.gz", hash = "sha256:0291a61b6fbf3e6673e3405cfcc0e7650bebc7939659fdca2702958038bd835e"}, ] [package.dependencies] mypy-extensions = ">=1.0.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typing-extensions = ">=4.1.0" +typing-extensions = ">=4.6.0" [package.extras] dmypy = ["psutil (>=4.0)"] +faster-cache = ["orjson"] install-types = ["pip"] mypyc = ["setuptools (>=50)"] reports = ["lxml"] @@ -363,6 +390,7 @@ version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." optional = false python-versions = ">=3.5" +groups = ["dev"] files = [ {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, @@ -374,6 +402,7 @@ version = "1.0.1" description = "Ordered Multivalue Dictionary" optional = false python-versions = "*" +groups = ["dev"] files = [ {file = "orderedmultidict-1.0.1-py2.py3-none-any.whl", hash = "sha256:43c839a17ee3cdd62234c47deca1a8508a3f2ca1d0678a3bf791c87cf84adbf3"}, {file = "orderedmultidict-1.0.1.tar.gz", hash = "sha256:04070bbb5e87291cc9bfa51df413677faf2141c73c61d2a5f7b26bea3cd882ad"}, @@ -384,61 +413,91 @@ six = ">=1.8.0" [[package]] name = "orjson" -version = "3.9.15" +version = "3.10.15" description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ - {file = "orjson-3.9.15-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:d61f7ce4727a9fa7680cd6f3986b0e2c732639f46a5e0156e550e35258aa313a"}, - {file = "orjson-3.9.15-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4feeb41882e8aa17634b589533baafdceb387e01e117b1ec65534ec724023d04"}, - {file = "orjson-3.9.15-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fbbeb3c9b2edb5fd044b2a070f127a0ac456ffd079cb82746fc84af01ef021a4"}, - {file = "orjson-3.9.15-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b66bcc5670e8a6b78f0313bcb74774c8291f6f8aeef10fe70e910b8040f3ab75"}, - {file = "orjson-3.9.15-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2973474811db7b35c30248d1129c64fd2bdf40d57d84beed2a9a379a6f57d0ab"}, - {file = "orjson-3.9.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fe41b6f72f52d3da4db524c8653e46243c8c92df826ab5ffaece2dba9cccd58"}, - {file = "orjson-3.9.15-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:4228aace81781cc9d05a3ec3a6d2673a1ad0d8725b4e915f1089803e9efd2b99"}, - {file = "orjson-3.9.15-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:6f7b65bfaf69493c73423ce9db66cfe9138b2f9ef62897486417a8fcb0a92bfe"}, - {file = "orjson-3.9.15-cp310-none-win32.whl", hash = "sha256:2d99e3c4c13a7b0fb3792cc04c2829c9db07838fb6973e578b85c1745e7d0ce7"}, - {file = "orjson-3.9.15-cp310-none-win_amd64.whl", hash = "sha256:b725da33e6e58e4a5d27958568484aa766e825e93aa20c26c91168be58e08cbb"}, - {file = "orjson-3.9.15-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:c8e8fe01e435005d4421f183038fc70ca85d2c1e490f51fb972db92af6e047c2"}, - {file = "orjson-3.9.15-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:87f1097acb569dde17f246faa268759a71a2cb8c96dd392cd25c668b104cad2f"}, - {file = "orjson-3.9.15-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ff0f9913d82e1d1fadbd976424c316fbc4d9c525c81d047bbdd16bd27dd98cfc"}, - {file = "orjson-3.9.15-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8055ec598605b0077e29652ccfe9372247474375e0e3f5775c91d9434e12d6b1"}, - {file = "orjson-3.9.15-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d6768a327ea1ba44c9114dba5fdda4a214bdb70129065cd0807eb5f010bfcbb5"}, - {file = "orjson-3.9.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:12365576039b1a5a47df01aadb353b68223da413e2e7f98c02403061aad34bde"}, - {file = "orjson-3.9.15-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:71c6b009d431b3839d7c14c3af86788b3cfac41e969e3e1c22f8a6ea13139404"}, - {file = "orjson-3.9.15-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:e18668f1bd39e69b7fed19fa7cd1cd110a121ec25439328b5c89934e6d30d357"}, - {file = "orjson-3.9.15-cp311-none-win32.whl", hash = "sha256:62482873e0289cf7313461009bf62ac8b2e54bc6f00c6fabcde785709231a5d7"}, - {file = "orjson-3.9.15-cp311-none-win_amd64.whl", hash = "sha256:b3d336ed75d17c7b1af233a6561cf421dee41d9204aa3cfcc6c9c65cd5bb69a8"}, - {file = "orjson-3.9.15-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:82425dd5c7bd3adfe4e94c78e27e2fa02971750c2b7ffba648b0f5d5cc016a73"}, - {file = "orjson-3.9.15-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2c51378d4a8255b2e7c1e5cc430644f0939539deddfa77f6fac7b56a9784160a"}, - {file = "orjson-3.9.15-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:6ae4e06be04dc00618247c4ae3f7c3e561d5bc19ab6941427f6d3722a0875ef7"}, - {file = "orjson-3.9.15-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bcef128f970bb63ecf9a65f7beafd9b55e3aaf0efc271a4154050fc15cdb386e"}, - {file = "orjson-3.9.15-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b72758f3ffc36ca566ba98a8e7f4f373b6c17c646ff8ad9b21ad10c29186f00d"}, - {file = "orjson-3.9.15-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10c57bc7b946cf2efa67ac55766e41764b66d40cbd9489041e637c1304400494"}, - {file = "orjson-3.9.15-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:946c3a1ef25338e78107fba746f299f926db408d34553b4754e90a7de1d44068"}, - {file = "orjson-3.9.15-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2f256d03957075fcb5923410058982aea85455d035607486ccb847f095442bda"}, - {file = "orjson-3.9.15-cp312-none-win_amd64.whl", hash = "sha256:5bb399e1b49db120653a31463b4a7b27cf2fbfe60469546baf681d1b39f4edf2"}, - {file = "orjson-3.9.15-cp38-cp38-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:b17f0f14a9c0ba55ff6279a922d1932e24b13fc218a3e968ecdbf791b3682b25"}, - {file = "orjson-3.9.15-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f6cbd8e6e446fb7e4ed5bac4661a29e43f38aeecbf60c4b900b825a353276a1"}, - {file = "orjson-3.9.15-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:76bc6356d07c1d9f4b782813094d0caf1703b729d876ab6a676f3aaa9a47e37c"}, - {file = "orjson-3.9.15-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fdfa97090e2d6f73dced247a2f2d8004ac6449df6568f30e7fa1a045767c69a6"}, - {file = "orjson-3.9.15-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7413070a3e927e4207d00bd65f42d1b780fb0d32d7b1d951f6dc6ade318e1b5a"}, - {file = "orjson-3.9.15-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9cf1596680ac1f01839dba32d496136bdd5d8ffb858c280fa82bbfeb173bdd40"}, - {file = "orjson-3.9.15-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:809d653c155e2cc4fd39ad69c08fdff7f4016c355ae4b88905219d3579e31eb7"}, - {file = "orjson-3.9.15-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:920fa5a0c5175ab14b9c78f6f820b75804fb4984423ee4c4f1e6d748f8b22bc1"}, - {file = "orjson-3.9.15-cp38-none-win32.whl", hash = "sha256:2b5c0f532905e60cf22a511120e3719b85d9c25d0e1c2a8abb20c4dede3b05a5"}, - {file = "orjson-3.9.15-cp38-none-win_amd64.whl", hash = "sha256:67384f588f7f8daf040114337d34a5188346e3fae6c38b6a19a2fe8c663a2f9b"}, - {file = "orjson-3.9.15-cp39-cp39-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:6fc2fe4647927070df3d93f561d7e588a38865ea0040027662e3e541d592811e"}, - {file = "orjson-3.9.15-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:34cbcd216e7af5270f2ffa63a963346845eb71e174ea530867b7443892d77180"}, - {file = "orjson-3.9.15-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f541587f5c558abd93cb0de491ce99a9ef8d1ae29dd6ab4dbb5a13281ae04cbd"}, - {file = "orjson-3.9.15-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:92255879280ef9c3c0bcb327c5a1b8ed694c290d61a6a532458264f887f052cb"}, - {file = "orjson-3.9.15-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:05a1f57fb601c426635fcae9ddbe90dfc1ed42245eb4c75e4960440cac667262"}, - {file = "orjson-3.9.15-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ede0bde16cc6e9b96633df1631fbcd66491d1063667f260a4f2386a098393790"}, - {file = "orjson-3.9.15-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:e88b97ef13910e5f87bcbc4dd7979a7de9ba8702b54d3204ac587e83639c0c2b"}, - {file = "orjson-3.9.15-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:57d5d8cf9c27f7ef6bc56a5925c7fbc76b61288ab674eb352c26ac780caa5b10"}, - {file = "orjson-3.9.15-cp39-none-win32.whl", hash = "sha256:001f4eb0ecd8e9ebd295722d0cbedf0748680fb9998d3993abaed2f40587257a"}, - {file = "orjson-3.9.15-cp39-none-win_amd64.whl", hash = "sha256:ea0b183a5fe6b2b45f3b854b0d19c4e932d6f5934ae1f723b07cf9560edd4ec7"}, - {file = "orjson-3.9.15.tar.gz", hash = "sha256:95cae920959d772f30ab36d3b25f83bb0f3be671e986c72ce22f8fa700dae061"}, + {file = "orjson-3.10.15-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:552c883d03ad185f720d0c09583ebde257e41b9521b74ff40e08b7dec4559c04"}, + {file = "orjson-3.10.15-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:616e3e8d438d02e4854f70bfdc03a6bcdb697358dbaa6bcd19cbe24d24ece1f8"}, + {file = "orjson-3.10.15-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7c2c79fa308e6edb0ffab0a31fd75a7841bf2a79a20ef08a3c6e3b26814c8ca8"}, + {file = "orjson-3.10.15-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:73cb85490aa6bf98abd20607ab5c8324c0acb48d6da7863a51be48505646c814"}, + {file = "orjson-3.10.15-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:763dadac05e4e9d2bc14938a45a2d0560549561287d41c465d3c58aec818b164"}, + {file = "orjson-3.10.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a330b9b4734f09a623f74a7490db713695e13b67c959713b78369f26b3dee6bf"}, + {file = "orjson-3.10.15-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a61a4622b7ff861f019974f73d8165be1bd9a0855e1cad18ee167acacabeb061"}, + {file = "orjson-3.10.15-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:acd271247691574416b3228db667b84775c497b245fa275c6ab90dc1ffbbd2b3"}, + {file = "orjson-3.10.15-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:e4759b109c37f635aa5c5cc93a1b26927bfde24b254bcc0e1149a9fada253d2d"}, + {file = "orjson-3.10.15-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:9e992fd5cfb8b9f00bfad2fd7a05a4299db2bbe92e6440d9dd2fab27655b3182"}, + {file = "orjson-3.10.15-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f95fb363d79366af56c3f26b71df40b9a583b07bbaaf5b317407c4d58497852e"}, + {file = "orjson-3.10.15-cp310-cp310-win32.whl", hash = "sha256:f9875f5fea7492da8ec2444839dcc439b0ef298978f311103d0b7dfd775898ab"}, + {file = "orjson-3.10.15-cp310-cp310-win_amd64.whl", hash = "sha256:17085a6aa91e1cd70ca8533989a18b5433e15d29c574582f76f821737c8d5806"}, + {file = "orjson-3.10.15-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:c4cc83960ab79a4031f3119cc4b1a1c627a3dc09df125b27c4201dff2af7eaa6"}, + {file = "orjson-3.10.15-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ddbeef2481d895ab8be5185f2432c334d6dec1f5d1933a9c83014d188e102cef"}, + {file = "orjson-3.10.15-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9e590a0477b23ecd5b0ac865b1b907b01b3c5535f5e8a8f6ab0e503efb896334"}, + {file = "orjson-3.10.15-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a6be38bd103d2fd9bdfa31c2720b23b5d47c6796bcb1d1b598e3924441b4298d"}, + {file = "orjson-3.10.15-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ff4f6edb1578960ed628a3b998fa54d78d9bb3e2eb2cfc5c2a09732431c678d0"}, + {file = "orjson-3.10.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b0482b21d0462eddd67e7fce10b89e0b6ac56570424662b685a0d6fccf581e13"}, + {file = "orjson-3.10.15-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bb5cc3527036ae3d98b65e37b7986a918955f85332c1ee07f9d3f82f3a6899b5"}, + {file = "orjson-3.10.15-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d569c1c462912acdd119ccbf719cf7102ea2c67dd03b99edcb1a3048651ac96b"}, + {file = "orjson-3.10.15-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:1e6d33efab6b71d67f22bf2962895d3dc6f82a6273a965fab762e64fa90dc399"}, + {file = "orjson-3.10.15-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:c33be3795e299f565681d69852ac8c1bc5c84863c0b0030b2b3468843be90388"}, + {file = "orjson-3.10.15-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:eea80037b9fae5339b214f59308ef0589fc06dc870578b7cce6d71eb2096764c"}, + {file = "orjson-3.10.15-cp311-cp311-win32.whl", hash = "sha256:d5ac11b659fd798228a7adba3e37c010e0152b78b1982897020a8e019a94882e"}, + {file = "orjson-3.10.15-cp311-cp311-win_amd64.whl", hash = "sha256:cf45e0214c593660339ef63e875f32ddd5aa3b4adc15e662cdb80dc49e194f8e"}, + {file = "orjson-3.10.15-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:9d11c0714fc85bfcf36ada1179400862da3288fc785c30e8297844c867d7505a"}, + {file = "orjson-3.10.15-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dba5a1e85d554e3897fa9fe6fbcff2ed32d55008973ec9a2b992bd9a65d2352d"}, + {file = "orjson-3.10.15-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7723ad949a0ea502df656948ddd8b392780a5beaa4c3b5f97e525191b102fff0"}, + {file = "orjson-3.10.15-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6fd9bc64421e9fe9bd88039e7ce8e58d4fead67ca88e3a4014b143cec7684fd4"}, + {file = "orjson-3.10.15-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dadba0e7b6594216c214ef7894c4bd5f08d7c0135f4dd0145600be4fbcc16767"}, + {file = "orjson-3.10.15-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b48f59114fe318f33bbaee8ebeda696d8ccc94c9e90bc27dbe72153094e26f41"}, + {file = "orjson-3.10.15-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:035fb83585e0f15e076759b6fedaf0abb460d1765b6a36f48018a52858443514"}, + {file = "orjson-3.10.15-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d13b7fe322d75bf84464b075eafd8e7dd9eae05649aa2a5354cfa32f43c59f17"}, + {file = "orjson-3.10.15-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:7066b74f9f259849629e0d04db6609db4cf5b973248f455ba5d3bd58a4daaa5b"}, + {file = "orjson-3.10.15-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:88dc3f65a026bd3175eb157fea994fca6ac7c4c8579fc5a86fc2114ad05705b7"}, + {file = "orjson-3.10.15-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b342567e5465bd99faa559507fe45e33fc76b9fb868a63f1642c6bc0735ad02a"}, + {file = "orjson-3.10.15-cp312-cp312-win32.whl", hash = "sha256:0a4f27ea5617828e6b58922fdbec67b0aa4bb844e2d363b9244c47fa2180e665"}, + {file = "orjson-3.10.15-cp312-cp312-win_amd64.whl", hash = "sha256:ef5b87e7aa9545ddadd2309efe6824bd3dd64ac101c15dae0f2f597911d46eaa"}, + {file = "orjson-3.10.15-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:bae0e6ec2b7ba6895198cd981b7cca95d1487d0147c8ed751e5632ad16f031a6"}, + {file = "orjson-3.10.15-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f93ce145b2db1252dd86af37d4165b6faa83072b46e3995ecc95d4b2301b725a"}, + {file = "orjson-3.10.15-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7c203f6f969210128af3acae0ef9ea6aab9782939f45f6fe02d05958fe761ef9"}, + {file = "orjson-3.10.15-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8918719572d662e18b8af66aef699d8c21072e54b6c82a3f8f6404c1f5ccd5e0"}, + {file = "orjson-3.10.15-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f71eae9651465dff70aa80db92586ad5b92df46a9373ee55252109bb6b703307"}, + {file = "orjson-3.10.15-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e117eb299a35f2634e25ed120c37c641398826c2f5a3d3cc39f5993b96171b9e"}, + {file = "orjson-3.10.15-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:13242f12d295e83c2955756a574ddd6741c81e5b99f2bef8ed8d53e47a01e4b7"}, + {file = "orjson-3.10.15-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:7946922ada8f3e0b7b958cc3eb22cfcf6c0df83d1fe5521b4a100103e3fa84c8"}, + {file = "orjson-3.10.15-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:b7155eb1623347f0f22c38c9abdd738b287e39b9982e1da227503387b81b34ca"}, + {file = "orjson-3.10.15-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:208beedfa807c922da4e81061dafa9c8489c6328934ca2a562efa707e049e561"}, + {file = "orjson-3.10.15-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:eca81f83b1b8c07449e1d6ff7074e82e3fd6777e588f1a6632127f286a968825"}, + {file = "orjson-3.10.15-cp313-cp313-win32.whl", hash = "sha256:c03cd6eea1bd3b949d0d007c8d57049aa2b39bd49f58b4b2af571a5d3833d890"}, + {file = "orjson-3.10.15-cp313-cp313-win_amd64.whl", hash = "sha256:fd56a26a04f6ba5fb2045b0acc487a63162a958ed837648c5781e1fe3316cfbf"}, + {file = "orjson-3.10.15-cp38-cp38-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:5e8afd6200e12771467a1a44e5ad780614b86abb4b11862ec54861a82d677746"}, + {file = "orjson-3.10.15-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da9a18c500f19273e9e104cca8c1f0b40a6470bcccfc33afcc088045d0bf5ea6"}, + {file = "orjson-3.10.15-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bb00b7bfbdf5d34a13180e4805d76b4567025da19a197645ca746fc2fb536586"}, + {file = "orjson-3.10.15-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:33aedc3d903378e257047fee506f11e0833146ca3e57a1a1fb0ddb789876c1e1"}, + {file = "orjson-3.10.15-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dd0099ae6aed5eb1fc84c9eb72b95505a3df4267e6962eb93cdd5af03be71c98"}, + {file = "orjson-3.10.15-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7c864a80a2d467d7786274fce0e4f93ef2a7ca4ff31f7fc5634225aaa4e9e98c"}, + {file = "orjson-3.10.15-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c25774c9e88a3e0013d7d1a6c8056926b607a61edd423b50eb5c88fd7f2823ae"}, + {file = "orjson-3.10.15-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:e78c211d0074e783d824ce7bb85bf459f93a233eb67a5b5003498232ddfb0e8a"}, + {file = "orjson-3.10.15-cp38-cp38-musllinux_1_2_armv7l.whl", hash = "sha256:43e17289ffdbbac8f39243916c893d2ae41a2ea1a9cbb060a56a4d75286351ae"}, + {file = "orjson-3.10.15-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:781d54657063f361e89714293c095f506c533582ee40a426cb6489c48a637b81"}, + {file = "orjson-3.10.15-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:6875210307d36c94873f553786a808af2788e362bd0cf4c8e66d976791e7b528"}, + {file = "orjson-3.10.15-cp38-cp38-win32.whl", hash = "sha256:305b38b2b8f8083cc3d618927d7f424349afce5975b316d33075ef0f73576b60"}, + {file = "orjson-3.10.15-cp38-cp38-win_amd64.whl", hash = "sha256:5dd9ef1639878cc3efffed349543cbf9372bdbd79f478615a1c633fe4e4180d1"}, + {file = "orjson-3.10.15-cp39-cp39-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:ffe19f3e8d68111e8644d4f4e267a069ca427926855582ff01fc012496d19969"}, + {file = "orjson-3.10.15-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d433bf32a363823863a96561a555227c18a522a8217a6f9400f00ddc70139ae2"}, + {file = "orjson-3.10.15-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:da03392674f59a95d03fa5fb9fe3a160b0511ad84b7a3914699ea5a1b3a38da2"}, + {file = "orjson-3.10.15-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3a63bb41559b05360ded9132032239e47983a39b151af1201f07ec9370715c82"}, + {file = "orjson-3.10.15-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3766ac4702f8f795ff3fa067968e806b4344af257011858cc3d6d8721588b53f"}, + {file = "orjson-3.10.15-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7a1c73dcc8fadbd7c55802d9aa093b36878d34a3b3222c41052ce6b0fc65f8e8"}, + {file = "orjson-3.10.15-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b299383825eafe642cbab34be762ccff9fd3408d72726a6b2a4506d410a71ab3"}, + {file = "orjson-3.10.15-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:abc7abecdbf67a173ef1316036ebbf54ce400ef2300b4e26a7b843bd446c2480"}, + {file = "orjson-3.10.15-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:3614ea508d522a621384c1d6639016a5a2e4f027f3e4a1c93a51867615d28829"}, + {file = "orjson-3.10.15-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:295c70f9dc154307777ba30fe29ff15c1bcc9dfc5c48632f37d20a607e9ba85a"}, + {file = "orjson-3.10.15-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:63309e3ff924c62404923c80b9e2048c1f74ba4b615e7584584389ada50ed428"}, + {file = "orjson-3.10.15-cp39-cp39-win32.whl", hash = "sha256:a2f708c62d026fb5340788ba94a55c23df4e1869fec74be455e0b2f5363b8507"}, + {file = "orjson-3.10.15-cp39-cp39-win_amd64.whl", hash = "sha256:efcf6c735c3d22ef60c4aa27a5238f1a477df85e9b15f2142f9d669beb2d13fd"}, + {file = "orjson-3.10.15.tar.gz", hash = "sha256:05ca7fe452a2e9d8d9d706a2984c95b9c2ebc5db417ce0b7a49b91d50642a23e"}, ] [[package]] @@ -447,6 +506,7 @@ version = "23.1" description = "Core utilities for Python packages" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "packaging-23.1-py3-none-any.whl", hash = "sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61"}, {file = "packaging-23.1.tar.gz", hash = "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"}, @@ -458,6 +518,7 @@ version = "0.10.2" description = "Utility library for gitignore style pattern matching of file paths." optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "pathspec-0.10.2-py3-none-any.whl", hash = "sha256:88c2606f2c1e818b978540f73ecc908e13999c6c3a383daf3705652ae79807a5"}, {file = "pathspec-0.10.2.tar.gz", hash = "sha256:8f6bf73e5758fd365ef5d58ce09ac7c27d2833a8d7da51712eac6e27e35141b0"}, @@ -469,6 +530,8 @@ version = "1.3.10" description = "Resolve a name to an object." optional = false python-versions = ">=3.6" +groups = ["dev"] +markers = "python_version < \"3.9\"" files = [ {file = "pkgutil_resolve_name-1.3.10-py3-none-any.whl", hash = "sha256:ca27cc078d25c5ad71a9de0a7a330146c4e014c2462d9af19c6b828280649c5e"}, {file = "pkgutil_resolve_name-1.3.10.tar.gz", hash = "sha256:357d6c9e6a755653cfd78893817c0853af365dd51ec97f3d358a819373bbd174"}, @@ -480,6 +543,7 @@ version = "2.5.4" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "platformdirs-2.5.4-py3-none-any.whl", hash = "sha256:af0276409f9a02373d540bf8480021a048711d572745aef4b7842dad245eba10"}, {file = "platformdirs-2.5.4.tar.gz", hash = "sha256:1006647646d80f16130f052404c6b901e80ee4ed6bef6792e1f238a8969106f7"}, @@ -491,13 +555,14 @@ test = ["appdirs (==1.4.4)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-mock [[package]] name = "pook" -version = "1.4.3" +version = "2.0.1" description = "HTTP traffic mocking and expectations made easy" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ - {file = "pook-1.4.3-py3-none-any.whl", hash = "sha256:4683a8a9d11fb56901ae15001a5bfb76a1bb960b1a841de1f0ca11c8c2d9eef8"}, - {file = "pook-1.4.3.tar.gz", hash = "sha256:61dbd9f6f9bf4d0bbab4abdf382bf7e8fbaae8561c5de3cd444e7c4be67df651"}, + {file = "pook-2.0.1-py3-none-any.whl", hash = "sha256:30d73c95e0520f45c1e3889f3bf486e990b6f04b4915aa9daf86cf0d8136b2e1"}, + {file = "pook-2.0.1.tar.gz", hash = "sha256:e04c0e698f256438b4dfbf3ab1b27559f0ec25e42176823167f321f4e8b9c9e4"}, ] [package.dependencies] @@ -511,13 +576,14 @@ version = "2.15.0" description = "Pygments is a syntax highlighting package written in Python." optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "Pygments-2.15.0-py3-none-any.whl", hash = "sha256:77a3299119af881904cd5ecd1ac6a66214b6e9bed1f2db16993b54adede64094"}, {file = "Pygments-2.15.0.tar.gz", hash = "sha256:f7e36cffc4c517fbc252861b9a6e4644ca0e5abadf9a113c72d1358ad09b9500"}, ] [package.extras] -plugins = ["importlib-metadata"] +plugins = ["importlib-metadata ; python_version < \"3.8\""] [[package]] name = "pyrsistent" @@ -525,6 +591,7 @@ version = "0.19.2" description = "Persistent/Functional/Immutable data structures" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "pyrsistent-0.19.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d6982b5a0237e1b7d876b60265564648a69b14017f3b5f908c5be2de3f9abb7a"}, {file = "pyrsistent-0.19.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:187d5730b0507d9285a96fca9716310d572e5464cadd19f22b63a6976254d77a"}, @@ -556,6 +623,7 @@ version = "2022.6" description = "World timezone definitions, modern and historical" optional = false python-versions = "*" +groups = ["dev"] files = [ {file = "pytz-2022.6-py2.py3-none-any.whl", hash = "sha256:222439474e9c98fced559f1709d89e6c9cbf8d79c794ff3eb9f8800064291427"}, {file = "pytz-2022.6.tar.gz", hash = "sha256:e89512406b793ca39f5971bc999cc538ce125c0e51c27941bef4568b460095e2"}, @@ -563,13 +631,14 @@ files = [ [[package]] name = "requests" -version = "2.31.0" +version = "2.32.0" description = "Python HTTP for Humans." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" +groups = ["dev"] files = [ - {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, - {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, + {file = "requests-2.32.0-py3-none-any.whl", hash = "sha256:f2c3881dddb70d056c5bd7600a4fae312b2a300e39be6a118d30b90bd27262b5"}, + {file = "requests-2.32.0.tar.gz", hash = "sha256:fa5490319474c82ef1d2c9bc459d3652e3ae4ef4c4ebdd18a21145a47ca4b6b8"}, ] [package.dependencies] @@ -588,6 +657,7 @@ version = "1.16.0" description = "Python 2 and 3 compatibility utilities" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +groups = ["dev"] files = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, @@ -599,6 +669,7 @@ version = "2.2.0" description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." optional = false python-versions = "*" +groups = ["dev"] files = [ {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, @@ -610,6 +681,7 @@ version = "7.1.2" description = "Python documentation generator" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "sphinx-7.1.2-py3-none-any.whl", hash = "sha256:d170a81825b2fcacb6dfd5a0d7f578a053e45d3f2b153fecc948c37344eb4cbe"}, {file = "sphinx-7.1.2.tar.gz", hash = "sha256:780f4d32f1d7d1126576e0e5ecc19dc32ab76cd24e950228dcf7b1f6d3d9e22f"}, @@ -641,41 +713,43 @@ test = ["cython", "filelock", "html5lib", "pytest (>=4.6)"] [[package]] name = "sphinx-autodoc-typehints" -version = "2.0.0" +version = "2.0.1" description = "Type hints (PEP 484) support for the Sphinx autodoc extension" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ - {file = "sphinx_autodoc_typehints-2.0.0-py3-none-any.whl", hash = "sha256:12c0e161f6fe191c2cdfd8fa3caea271f5387d9fbc67ebcd6f4f1f24ce880993"}, - {file = "sphinx_autodoc_typehints-2.0.0.tar.gz", hash = "sha256:7f2cdac2e70fd9787926b6e9e541cd4ded1e838d2b46fda2a1bb0a75ec5b7f3a"}, + {file = "sphinx_autodoc_typehints-2.0.1-py3-none-any.whl", hash = "sha256:f73ae89b43a799e587e39266672c1075b2ef783aeb382d3ebed77c38a3fc0149"}, + {file = "sphinx_autodoc_typehints-2.0.1.tar.gz", hash = "sha256:60ed1e3b2c970acc0aa6e877be42d48029a9faec7378a17838716cacd8c10b12"}, ] [package.dependencies] sphinx = ">=7.1.2" [package.extras] -docs = ["furo (>=2023.9.10)"] +docs = ["furo (>=2024.1.29)"] numpy = ["nptyping (>=2.5)"] -testing = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "diff-cover (>=8.0.1)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "sphobjinv (>=2.3.1)", "typing-extensions (>=4.8)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.4.2)", "diff-cover (>=8.0.3)", "pytest (>=8.0.1)", "pytest-cov (>=4.1)", "sphobjinv (>=2.3.1)", "typing-extensions (>=4.9)"] [[package]] name = "sphinx-rtd-theme" -version = "2.0.0" +version = "3.0.2" description = "Read the Docs theme for Sphinx" optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" +groups = ["dev"] files = [ - {file = "sphinx_rtd_theme-2.0.0-py2.py3-none-any.whl", hash = "sha256:ec93d0856dc280cf3aee9a4c9807c60e027c7f7b461b77aeffed682e68f0e586"}, - {file = "sphinx_rtd_theme-2.0.0.tar.gz", hash = "sha256:bd5d7b80622406762073a04ef8fadc5f9151261563d47027de09910ce03afe6b"}, + {file = "sphinx_rtd_theme-3.0.2-py2.py3-none-any.whl", hash = "sha256:422ccc750c3a3a311de4ae327e82affdaf59eb695ba4936538552f3b00f4ee13"}, + {file = "sphinx_rtd_theme-3.0.2.tar.gz", hash = "sha256:b7457bc25dda723b20b086a670b9953c859eab60a2a03ee8eb2bb23e176e5f85"}, ] [package.dependencies] -docutils = "<0.21" -sphinx = ">=5,<8" +docutils = ">0.18,<0.22" +sphinx = ">=6,<9" sphinxcontrib-jquery = ">=4,<5" [package.extras] -dev = ["bump2version", "sphinxcontrib-httpdomain", "transifex-client", "wheel"] +dev = ["bump2version", "transifex-client", "twine", "wheel"] [[package]] name = "sphinxcontrib-applehelp" @@ -683,6 +757,7 @@ version = "1.0.2" description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books" optional = false python-versions = ">=3.5" +groups = ["dev"] files = [ {file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"}, {file = "sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a"}, @@ -698,6 +773,7 @@ version = "1.0.2" description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." optional = false python-versions = ">=3.5" +groups = ["dev"] files = [ {file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"}, {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, @@ -713,6 +789,7 @@ version = "2.0.0" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" optional = false python-versions = ">=3.6" +groups = ["dev"] files = [ {file = "sphinxcontrib-htmlhelp-2.0.0.tar.gz", hash = "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"}, {file = "sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl", hash = "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07"}, @@ -728,6 +805,7 @@ version = "4.1" description = "Extension to include jQuery on newer Sphinx releases" optional = false python-versions = ">=2.7" +groups = ["dev"] files = [ {file = "sphinxcontrib-jquery-4.1.tar.gz", hash = "sha256:1620739f04e36a2c779f1a131a2dfd49b2fd07351bf1968ced074365933abc7a"}, {file = "sphinxcontrib_jquery-4.1-py2.py3-none-any.whl", hash = "sha256:f936030d7d0147dd026a4f2b5a57343d233f1fc7b363f68b3d4f1cb0993878ae"}, @@ -742,6 +820,7 @@ version = "1.0.1" description = "A sphinx extension which renders display math in HTML via JavaScript" optional = false python-versions = ">=3.5" +groups = ["dev"] files = [ {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, {file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"}, @@ -756,6 +835,7 @@ version = "1.0.3" description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." optional = false python-versions = ">=3.5" +groups = ["dev"] files = [ {file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"}, {file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"}, @@ -771,6 +851,7 @@ version = "1.1.5" description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." optional = false python-versions = ">=3.5" +groups = ["dev"] files = [ {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, @@ -786,6 +867,8 @@ version = "2.0.1" description = "A lil' TOML parser" optional = false python-versions = ">=3.7" +groups = ["dev"] +markers = "python_version < \"3.11\"" files = [ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, @@ -797,6 +880,7 @@ version = "2021.10.8.3" description = "Typing stubs for certifi" optional = false python-versions = "*" +groups = ["dev"] files = [ {file = "types-certifi-2021.10.8.3.tar.gz", hash = "sha256:72cf7798d165bc0b76e1c10dd1ea3097c7063c42c21d664523b928e88b554a4f"}, {file = "types_certifi-2021.10.8.3-py3-none-any.whl", hash = "sha256:b2d1e325e69f71f7c78e5943d410e650b4707bb0ef32e4ddf3da37f54176e88a"}, @@ -804,13 +888,14 @@ files = [ [[package]] name = "types-setuptools" -version = "69.2.0.20240317" +version = "75.8.0.20250110" description = "Typing stubs for setuptools" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ - {file = "types-setuptools-69.2.0.20240317.tar.gz", hash = "sha256:b607c4c48842ef3ee49dc0c7fe9c1bad75700b071e1018bb4d7e3ac492d47048"}, - {file = "types_setuptools-69.2.0.20240317-py3-none-any.whl", hash = "sha256:cf91ff7c87ab7bf0625c3f0d4d90427c9da68561f3b0feab77977aaf0bbf7531"}, + {file = "types_setuptools-75.8.0.20250110-py3-none-any.whl", hash = "sha256:a9f12980bbf9bcdc23ecd80755789085bad6bfce4060c2275bc2b4ca9f2bc480"}, + {file = "types_setuptools-75.8.0.20250110.tar.gz", hash = "sha256:96f7ec8bbd6e0a54ea180d66ad68ad7a1d7954e7281a710ea2de75e355545271"}, ] [[package]] @@ -819,6 +904,7 @@ version = "1.26.25.14" description = "Typing stubs for urllib3" optional = false python-versions = "*" +groups = ["dev"] files = [ {file = "types-urllib3-1.26.25.14.tar.gz", hash = "sha256:229b7f577c951b8c1b92c1bc2b2fdb0b49847bd2af6d1cc2a2e3dd340f3bda8f"}, {file = "types_urllib3-1.26.25.14-py3-none-any.whl", hash = "sha256:9683bbb7fb72e32bfe9d2be6e04875fbe1b3eeec3cbb4ea231435aa7fd6b4f0e"}, @@ -826,110 +912,128 @@ files = [ [[package]] name = "typing-extensions" -version = "4.4.0" -description = "Backported and Experimental Type Hints for Python 3.7+" +version = "4.12.2" +description = "Backported and Experimental Type Hints for Python 3.8+" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" +groups = ["dev"] files = [ - {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"}, - {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"}, + {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, + {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, ] [[package]] name = "urllib3" -version = "1.26.18" +version = "2.2.3" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +python-versions = ">=3.8" +groups = ["main", "dev"] files = [ - {file = "urllib3-1.26.18-py2.py3-none-any.whl", hash = "sha256:34b97092d7e0a3a8cf7cd10e386f401b3737364026c45e622aa02903dffe0f07"}, - {file = "urllib3-1.26.18.tar.gz", hash = "sha256:f8ecc1bba5667413457c529ab955bf8c67b45db799d159066261719e328580a0"}, + {file = "urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac"}, + {file = "urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9"}, ] [package.extras] -brotli = ["brotli (==1.0.9)", "brotli (>=1.0.9)", "brotlicffi (>=0.8.0)", "brotlipy (>=0.6.0)"] -secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)", "urllib3-secure-extra"] -socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] +brotli = ["brotli (>=1.0.9) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; platform_python_implementation != \"CPython\""] +h2 = ["h2 (>=4,<5)"] +socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] +zstd = ["zstandard (>=0.18.0)"] [[package]] name = "websockets" -version = "12.0" +version = "13.1" description = "An implementation of the WebSocket Protocol (RFC 6455 & 7692)" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ - {file = "websockets-12.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d554236b2a2006e0ce16315c16eaa0d628dab009c33b63ea03f41c6107958374"}, - {file = "websockets-12.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2d225bb6886591b1746b17c0573e29804619c8f755b5598d875bb4235ea639be"}, - {file = "websockets-12.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:eb809e816916a3b210bed3c82fb88eaf16e8afcf9c115ebb2bacede1797d2547"}, - {file = "websockets-12.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c588f6abc13f78a67044c6b1273a99e1cf31038ad51815b3b016ce699f0d75c2"}, - {file = "websockets-12.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5aa9348186d79a5f232115ed3fa9020eab66d6c3437d72f9d2c8ac0c6858c558"}, - {file = "websockets-12.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6350b14a40c95ddd53e775dbdbbbc59b124a5c8ecd6fbb09c2e52029f7a9f480"}, - {file = "websockets-12.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:70ec754cc2a769bcd218ed8d7209055667b30860ffecb8633a834dde27d6307c"}, - {file = "websockets-12.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:6e96f5ed1b83a8ddb07909b45bd94833b0710f738115751cdaa9da1fb0cb66e8"}, - {file = "websockets-12.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:4d87be612cbef86f994178d5186add3d94e9f31cc3cb499a0482b866ec477603"}, - {file = "websockets-12.0-cp310-cp310-win32.whl", hash = "sha256:befe90632d66caaf72e8b2ed4d7f02b348913813c8b0a32fae1cc5fe3730902f"}, - {file = "websockets-12.0-cp310-cp310-win_amd64.whl", hash = "sha256:363f57ca8bc8576195d0540c648aa58ac18cf85b76ad5202b9f976918f4219cf"}, - {file = "websockets-12.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:5d873c7de42dea355d73f170be0f23788cf3fa9f7bed718fd2830eefedce01b4"}, - {file = "websockets-12.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3f61726cae9f65b872502ff3c1496abc93ffbe31b278455c418492016e2afc8f"}, - {file = "websockets-12.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ed2fcf7a07334c77fc8a230755c2209223a7cc44fc27597729b8ef5425aa61a3"}, - {file = "websockets-12.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e332c210b14b57904869ca9f9bf4ca32f5427a03eeb625da9b616c85a3a506c"}, - {file = "websockets-12.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5693ef74233122f8ebab026817b1b37fe25c411ecfca084b29bc7d6efc548f45"}, - {file = "websockets-12.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e9e7db18b4539a29cc5ad8c8b252738a30e2b13f033c2d6e9d0549b45841c04"}, - {file = "websockets-12.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:6e2df67b8014767d0f785baa98393725739287684b9f8d8a1001eb2839031447"}, - {file = "websockets-12.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:bea88d71630c5900690fcb03161ab18f8f244805c59e2e0dc4ffadae0a7ee0ca"}, - {file = "websockets-12.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:dff6cdf35e31d1315790149fee351f9e52978130cef6c87c4b6c9b3baf78bc53"}, - {file = "websockets-12.0-cp311-cp311-win32.whl", hash = "sha256:3e3aa8c468af01d70332a382350ee95f6986db479ce7af14d5e81ec52aa2b402"}, - {file = "websockets-12.0-cp311-cp311-win_amd64.whl", hash = "sha256:25eb766c8ad27da0f79420b2af4b85d29914ba0edf69f547cc4f06ca6f1d403b"}, - {file = "websockets-12.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0e6e2711d5a8e6e482cacb927a49a3d432345dfe7dea8ace7b5790df5932e4df"}, - {file = "websockets-12.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:dbcf72a37f0b3316e993e13ecf32f10c0e1259c28ffd0a85cee26e8549595fbc"}, - {file = "websockets-12.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:12743ab88ab2af1d17dd4acb4645677cb7063ef4db93abffbf164218a5d54c6b"}, - {file = "websockets-12.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7b645f491f3c48d3f8a00d1fce07445fab7347fec54a3e65f0725d730d5b99cb"}, - {file = "websockets-12.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9893d1aa45a7f8b3bc4510f6ccf8db8c3b62120917af15e3de247f0780294b92"}, - {file = "websockets-12.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1f38a7b376117ef7aff996e737583172bdf535932c9ca021746573bce40165ed"}, - {file = "websockets-12.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:f764ba54e33daf20e167915edc443b6f88956f37fb606449b4a5b10ba42235a5"}, - {file = "websockets-12.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:1e4b3f8ea6a9cfa8be8484c9221ec0257508e3a1ec43c36acdefb2a9c3b00aa2"}, - {file = "websockets-12.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:9fdf06fd06c32205a07e47328ab49c40fc1407cdec801d698a7c41167ea45113"}, - {file = "websockets-12.0-cp312-cp312-win32.whl", hash = "sha256:baa386875b70cbd81798fa9f71be689c1bf484f65fd6fb08d051a0ee4e79924d"}, - {file = "websockets-12.0-cp312-cp312-win_amd64.whl", hash = "sha256:ae0a5da8f35a5be197f328d4727dbcfafa53d1824fac3d96cdd3a642fe09394f"}, - {file = "websockets-12.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5f6ffe2c6598f7f7207eef9a1228b6f5c818f9f4d53ee920aacd35cec8110438"}, - {file = "websockets-12.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9edf3fc590cc2ec20dc9d7a45108b5bbaf21c0d89f9fd3fd1685e223771dc0b2"}, - {file = "websockets-12.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:8572132c7be52632201a35f5e08348137f658e5ffd21f51f94572ca6c05ea81d"}, - {file = "websockets-12.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:604428d1b87edbf02b233e2c207d7d528460fa978f9e391bd8aaf9c8311de137"}, - {file = "websockets-12.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1a9d160fd080c6285e202327aba140fc9a0d910b09e423afff4ae5cbbf1c7205"}, - {file = "websockets-12.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87b4aafed34653e465eb77b7c93ef058516cb5acf3eb21e42f33928616172def"}, - {file = "websockets-12.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b2ee7288b85959797970114deae81ab41b731f19ebcd3bd499ae9ca0e3f1d2c8"}, - {file = "websockets-12.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:7fa3d25e81bfe6a89718e9791128398a50dec6d57faf23770787ff441d851967"}, - {file = "websockets-12.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:a571f035a47212288e3b3519944f6bf4ac7bc7553243e41eac50dd48552b6df7"}, - {file = "websockets-12.0-cp38-cp38-win32.whl", hash = "sha256:3c6cc1360c10c17463aadd29dd3af332d4a1adaa8796f6b0e9f9df1fdb0bad62"}, - {file = "websockets-12.0-cp38-cp38-win_amd64.whl", hash = "sha256:1bf386089178ea69d720f8db6199a0504a406209a0fc23e603b27b300fdd6892"}, - {file = "websockets-12.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:ab3d732ad50a4fbd04a4490ef08acd0517b6ae6b77eb967251f4c263011a990d"}, - {file = "websockets-12.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a1d9697f3337a89691e3bd8dc56dea45a6f6d975f92e7d5f773bc715c15dde28"}, - {file = "websockets-12.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1df2fbd2c8a98d38a66f5238484405b8d1d16f929bb7a33ed73e4801222a6f53"}, - {file = "websockets-12.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:23509452b3bc38e3a057382c2e941d5ac2e01e251acce7adc74011d7d8de434c"}, - {file = "websockets-12.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2e5fc14ec6ea568200ea4ef46545073da81900a2b67b3e666f04adf53ad452ec"}, - {file = "websockets-12.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:46e71dbbd12850224243f5d2aeec90f0aaa0f2dde5aeeb8fc8df21e04d99eff9"}, - {file = "websockets-12.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b81f90dcc6c85a9b7f29873beb56c94c85d6f0dac2ea8b60d995bd18bf3e2aae"}, - {file = "websockets-12.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:a02413bc474feda2849c59ed2dfb2cddb4cd3d2f03a2fedec51d6e959d9b608b"}, - {file = "websockets-12.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:bbe6013f9f791944ed31ca08b077e26249309639313fff132bfbf3ba105673b9"}, - {file = "websockets-12.0-cp39-cp39-win32.whl", hash = "sha256:cbe83a6bbdf207ff0541de01e11904827540aa069293696dd528a6640bd6a5f6"}, - {file = "websockets-12.0-cp39-cp39-win_amd64.whl", hash = "sha256:fc4e7fa5414512b481a2483775a8e8be7803a35b30ca805afa4998a84f9fd9e8"}, - {file = "websockets-12.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:248d8e2446e13c1d4326e0a6a4e9629cb13a11195051a73acf414812700badbd"}, - {file = "websockets-12.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f44069528d45a933997a6fef143030d8ca8042f0dfaad753e2906398290e2870"}, - {file = "websockets-12.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c4e37d36f0d19f0a4413d3e18c0d03d0c268ada2061868c1e6f5ab1a6d575077"}, - {file = "websockets-12.0-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d829f975fc2e527a3ef2f9c8f25e553eb7bc779c6665e8e1d52aa22800bb38b"}, - {file = "websockets-12.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:2c71bd45a777433dd9113847af751aae36e448bc6b8c361a566cb043eda6ec30"}, - {file = "websockets-12.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0bee75f400895aef54157b36ed6d3b308fcab62e5260703add87f44cee9c82a6"}, - {file = "websockets-12.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:423fc1ed29f7512fceb727e2d2aecb952c46aa34895e9ed96071821309951123"}, - {file = "websockets-12.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:27a5e9964ef509016759f2ef3f2c1e13f403725a5e6a1775555994966a66e931"}, - {file = "websockets-12.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c3181df4583c4d3994d31fb235dc681d2aaad744fbdbf94c4802485ececdecf2"}, - {file = "websockets-12.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:b067cb952ce8bf40115f6c19f478dc71c5e719b7fbaa511359795dfd9d1a6468"}, - {file = "websockets-12.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:00700340c6c7ab788f176d118775202aadea7602c5cc6be6ae127761c16d6b0b"}, - {file = "websockets-12.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e469d01137942849cff40517c97a30a93ae79917752b34029f0ec72df6b46399"}, - {file = "websockets-12.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffefa1374cd508d633646d51a8e9277763a9b78ae71324183693959cf94635a7"}, - {file = "websockets-12.0-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba0cab91b3956dfa9f512147860783a1829a8d905ee218a9837c18f683239611"}, - {file = "websockets-12.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:2cb388a5bfb56df4d9a406783b7f9dbefb888c09b71629351cc6b036e9259370"}, - {file = "websockets-12.0-py3-none-any.whl", hash = "sha256:dc284bbc8d7c78a6c69e0c7325ab46ee5e40bb4d50e494d8131a07ef47500e9e"}, - {file = "websockets-12.0.tar.gz", hash = "sha256:81df9cbcbb6c260de1e007e58c011bfebe2dafc8435107b0537f393dd38c8b1b"}, + {file = "websockets-13.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f48c749857f8fb598fb890a75f540e3221d0976ed0bf879cf3c7eef34151acee"}, + {file = "websockets-13.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c7e72ce6bda6fb9409cc1e8164dd41d7c91466fb599eb047cfda72fe758a34a7"}, + {file = "websockets-13.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f779498eeec470295a2b1a5d97aa1bc9814ecd25e1eb637bd9d1c73a327387f6"}, + {file = "websockets-13.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4676df3fe46956fbb0437d8800cd5f2b6d41143b6e7e842e60554398432cf29b"}, + {file = "websockets-13.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a7affedeb43a70351bb811dadf49493c9cfd1ed94c9c70095fd177e9cc1541fa"}, + {file = "websockets-13.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1971e62d2caa443e57588e1d82d15f663b29ff9dfe7446d9964a4b6f12c1e700"}, + {file = "websockets-13.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:5f2e75431f8dc4a47f31565a6e1355fb4f2ecaa99d6b89737527ea917066e26c"}, + {file = "websockets-13.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:58cf7e75dbf7e566088b07e36ea2e3e2bd5676e22216e4cad108d4df4a7402a0"}, + {file = "websockets-13.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c90d6dec6be2c7d03378a574de87af9b1efea77d0c52a8301dd831ece938452f"}, + {file = "websockets-13.1-cp310-cp310-win32.whl", hash = "sha256:730f42125ccb14602f455155084f978bd9e8e57e89b569b4d7f0f0c17a448ffe"}, + {file = "websockets-13.1-cp310-cp310-win_amd64.whl", hash = "sha256:5993260f483d05a9737073be197371940c01b257cc45ae3f1d5d7adb371b266a"}, + {file = "websockets-13.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:61fc0dfcda609cda0fc9fe7977694c0c59cf9d749fbb17f4e9483929e3c48a19"}, + {file = "websockets-13.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ceec59f59d092c5007e815def4ebb80c2de330e9588e101cf8bd94c143ec78a5"}, + {file = "websockets-13.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c1dca61c6db1166c48b95198c0b7d9c990b30c756fc2923cc66f68d17dc558fd"}, + {file = "websockets-13.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:308e20f22c2c77f3f39caca508e765f8725020b84aa963474e18c59accbf4c02"}, + {file = "websockets-13.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62d516c325e6540e8a57b94abefc3459d7dab8ce52ac75c96cad5549e187e3a7"}, + {file = "websockets-13.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87c6e35319b46b99e168eb98472d6c7d8634ee37750d7693656dc766395df096"}, + {file = "websockets-13.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:5f9fee94ebafbc3117c30be1844ed01a3b177bb6e39088bc6b2fa1dc15572084"}, + {file = "websockets-13.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:7c1e90228c2f5cdde263253fa5db63e6653f1c00e7ec64108065a0b9713fa1b3"}, + {file = "websockets-13.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6548f29b0e401eea2b967b2fdc1c7c7b5ebb3eeb470ed23a54cd45ef078a0db9"}, + {file = "websockets-13.1-cp311-cp311-win32.whl", hash = "sha256:c11d4d16e133f6df8916cc5b7e3e96ee4c44c936717d684a94f48f82edb7c92f"}, + {file = "websockets-13.1-cp311-cp311-win_amd64.whl", hash = "sha256:d04f13a1d75cb2b8382bdc16ae6fa58c97337253826dfe136195b7f89f661557"}, + {file = "websockets-13.1-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:9d75baf00138f80b48f1eac72ad1535aac0b6461265a0bcad391fc5aba875cfc"}, + {file = "websockets-13.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:9b6f347deb3dcfbfde1c20baa21c2ac0751afaa73e64e5b693bb2b848efeaa49"}, + {file = "websockets-13.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:de58647e3f9c42f13f90ac7e5f58900c80a39019848c5547bc691693098ae1bd"}, + {file = "websockets-13.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a1b54689e38d1279a51d11e3467dd2f3a50f5f2e879012ce8f2d6943f00e83f0"}, + {file = "websockets-13.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cf1781ef73c073e6b0f90af841aaf98501f975d306bbf6221683dd594ccc52b6"}, + {file = "websockets-13.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d23b88b9388ed85c6faf0e74d8dec4f4d3baf3ecf20a65a47b836d56260d4b9"}, + {file = "websockets-13.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3c78383585f47ccb0fcf186dcb8a43f5438bd7d8f47d69e0b56f71bf431a0a68"}, + {file = "websockets-13.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:d6d300f8ec35c24025ceb9b9019ae9040c1ab2f01cddc2bcc0b518af31c75c14"}, + {file = "websockets-13.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a9dcaf8b0cc72a392760bb8755922c03e17a5a54e08cca58e8b74f6902b433cf"}, + {file = "websockets-13.1-cp312-cp312-win32.whl", hash = "sha256:2f85cf4f2a1ba8f602298a853cec8526c2ca42a9a4b947ec236eaedb8f2dc80c"}, + {file = "websockets-13.1-cp312-cp312-win_amd64.whl", hash = "sha256:38377f8b0cdeee97c552d20cf1865695fcd56aba155ad1b4ca8779a5b6ef4ac3"}, + {file = "websockets-13.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a9ab1e71d3d2e54a0aa646ab6d4eebfaa5f416fe78dfe4da2839525dc5d765c6"}, + {file = "websockets-13.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:b9d7439d7fab4dce00570bb906875734df13d9faa4b48e261c440a5fec6d9708"}, + {file = "websockets-13.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:327b74e915cf13c5931334c61e1a41040e365d380f812513a255aa804b183418"}, + {file = "websockets-13.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:325b1ccdbf5e5725fdcb1b0e9ad4d2545056479d0eee392c291c1bf76206435a"}, + {file = "websockets-13.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:346bee67a65f189e0e33f520f253d5147ab76ae42493804319b5716e46dddf0f"}, + {file = "websockets-13.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:91a0fa841646320ec0d3accdff5b757b06e2e5c86ba32af2e0815c96c7a603c5"}, + {file = "websockets-13.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:18503d2c5f3943e93819238bf20df71982d193f73dcecd26c94514f417f6b135"}, + {file = "websockets-13.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:a9cd1af7e18e5221d2878378fbc287a14cd527fdd5939ed56a18df8a31136bb2"}, + {file = "websockets-13.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:70c5be9f416aa72aab7a2a76c90ae0a4fe2755c1816c153c1a2bcc3333ce4ce6"}, + {file = "websockets-13.1-cp313-cp313-win32.whl", hash = "sha256:624459daabeb310d3815b276c1adef475b3e6804abaf2d9d2c061c319f7f187d"}, + {file = "websockets-13.1-cp313-cp313-win_amd64.whl", hash = "sha256:c518e84bb59c2baae725accd355c8dc517b4a3ed8db88b4bc93c78dae2974bf2"}, + {file = "websockets-13.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:c7934fd0e920e70468e676fe7f1b7261c1efa0d6c037c6722278ca0228ad9d0d"}, + {file = "websockets-13.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:149e622dc48c10ccc3d2760e5f36753db9cacf3ad7bc7bbbfd7d9c819e286f23"}, + {file = "websockets-13.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a569eb1b05d72f9bce2ebd28a1ce2054311b66677fcd46cf36204ad23acead8c"}, + {file = "websockets-13.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:95df24ca1e1bd93bbca51d94dd049a984609687cb2fb08a7f2c56ac84e9816ea"}, + {file = "websockets-13.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d8dbb1bf0c0a4ae8b40bdc9be7f644e2f3fb4e8a9aca7145bfa510d4a374eeb7"}, + {file = "websockets-13.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:035233b7531fb92a76beefcbf479504db8c72eb3bff41da55aecce3a0f729e54"}, + {file = "websockets-13.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:e4450fc83a3df53dec45922b576e91e94f5578d06436871dce3a6be38e40f5db"}, + {file = "websockets-13.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:463e1c6ec853202dd3657f156123d6b4dad0c546ea2e2e38be2b3f7c5b8e7295"}, + {file = "websockets-13.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:6d6855bbe70119872c05107e38fbc7f96b1d8cb047d95c2c50869a46c65a8e96"}, + {file = "websockets-13.1-cp38-cp38-win32.whl", hash = "sha256:204e5107f43095012b00f1451374693267adbb832d29966a01ecc4ce1db26faf"}, + {file = "websockets-13.1-cp38-cp38-win_amd64.whl", hash = "sha256:485307243237328c022bc908b90e4457d0daa8b5cf4b3723fd3c4a8012fce4c6"}, + {file = "websockets-13.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:9b37c184f8b976f0c0a231a5f3d6efe10807d41ccbe4488df8c74174805eea7d"}, + {file = "websockets-13.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:163e7277e1a0bd9fb3c8842a71661ad19c6aa7bb3d6678dc7f89b17fbcc4aeb7"}, + {file = "websockets-13.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4b889dbd1342820cc210ba44307cf75ae5f2f96226c0038094455a96e64fb07a"}, + {file = "websockets-13.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:586a356928692c1fed0eca68b4d1c2cbbd1ca2acf2ac7e7ebd3b9052582deefa"}, + {file = "websockets-13.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7bd6abf1e070a6b72bfeb71049d6ad286852e285f146682bf30d0296f5fbadfa"}, + {file = "websockets-13.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d2aad13a200e5934f5a6767492fb07151e1de1d6079c003ab31e1823733ae79"}, + {file = "websockets-13.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:df01aea34b6e9e33572c35cd16bae5a47785e7d5c8cb2b54b2acdb9678315a17"}, + {file = "websockets-13.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:e54affdeb21026329fb0744ad187cf812f7d3c2aa702a5edb562b325191fcab6"}, + {file = "websockets-13.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:9ef8aa8bdbac47f4968a5d66462a2a0935d044bf35c0e5a8af152d58516dbeb5"}, + {file = "websockets-13.1-cp39-cp39-win32.whl", hash = "sha256:deeb929efe52bed518f6eb2ddc00cc496366a14c726005726ad62c2dd9017a3c"}, + {file = "websockets-13.1-cp39-cp39-win_amd64.whl", hash = "sha256:7c65ffa900e7cc958cd088b9a9157a8141c991f8c53d11087e6fb7277a03f81d"}, + {file = "websockets-13.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:5dd6da9bec02735931fccec99d97c29f47cc61f644264eb995ad6c0c27667238"}, + {file = "websockets-13.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:2510c09d8e8df777177ee3d40cd35450dc169a81e747455cc4197e63f7e7bfe5"}, + {file = "websockets-13.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f1c3cf67185543730888b20682fb186fc8d0fa6f07ccc3ef4390831ab4b388d9"}, + {file = "websockets-13.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bcc03c8b72267e97b49149e4863d57c2d77f13fae12066622dc78fe322490fe6"}, + {file = "websockets-13.1-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:004280a140f220c812e65f36944a9ca92d766b6cc4560be652a0a3883a79ed8a"}, + {file = "websockets-13.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:e2620453c075abeb0daa949a292e19f56de518988e079c36478bacf9546ced23"}, + {file = "websockets-13.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:9156c45750b37337f7b0b00e6248991a047be4aa44554c9886fe6bdd605aab3b"}, + {file = "websockets-13.1-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:80c421e07973a89fbdd93e6f2003c17d20b69010458d3a8e37fb47874bd67d51"}, + {file = "websockets-13.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:82d0ba76371769d6a4e56f7e83bb8e81846d17a6190971e38b5de108bde9b0d7"}, + {file = "websockets-13.1-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e9875a0143f07d74dc5e1ded1c4581f0d9f7ab86c78994e2ed9e95050073c94d"}, + {file = "websockets-13.1-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a11e38ad8922c7961447f35c7b17bffa15de4d17c70abd07bfbe12d6faa3e027"}, + {file = "websockets-13.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:4059f790b6ae8768471cddb65d3c4fe4792b0ab48e154c9f0a04cefaabcd5978"}, + {file = "websockets-13.1-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:25c35bf84bf7c7369d247f0b8cfa157f989862c49104c5cf85cb5436a641d93e"}, + {file = "websockets-13.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:83f91d8a9bb404b8c2c41a707ac7f7f75b9442a0a876df295de27251a856ad09"}, + {file = "websockets-13.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7a43cfdcddd07f4ca2b1afb459824dd3c6d53a51410636a2c7fc97b9a8cf4842"}, + {file = "websockets-13.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:48a2ef1381632a2f0cb4efeff34efa97901c9fbc118e01951ad7cfc10601a9bb"}, + {file = "websockets-13.1-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:459bf774c754c35dbb487360b12c5727adab887f1622b8aed5755880a21c4a20"}, + {file = "websockets-13.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:95858ca14a9f6fa8413d29e0a585b31b278388aa775b8a81fa24830123874678"}, + {file = "websockets-13.1-py3-none-any.whl", hash = "sha256:a9a396a6ad26130cdae92ae10c36af09d9bfe6cafe69670fd3b6da9b07b4044f"}, + {file = "websockets-13.1.tar.gz", hash = "sha256:a3b3366087c1bc0a2795111edcadddb8b3b59509d5db5d7ea3fdd69f954a8878"}, ] [[package]] @@ -938,6 +1042,7 @@ version = "0.13.0" description = "Makes working with XML feel like you are working with JSON" optional = false python-versions = ">=3.4" +groups = ["dev"] files = [ {file = "xmltodict-0.13.0-py2.py3-none-any.whl", hash = "sha256:aa89e8fd76320154a40d19a0df04a4695fb9dc5ba977cbb68ab3e4eb225e7852"}, {file = "xmltodict-0.13.0.tar.gz", hash = "sha256:341595a488e3e01a85a9d8911d8912fd922ede5fecc4dce437eb4b6c8d037e56"}, @@ -945,20 +1050,22 @@ files = [ [[package]] name = "zipp" -version = "3.11.0" +version = "3.19.1" description = "Backport of pathlib-compatible object wrapper for zip files" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" +groups = ["dev"] +markers = "python_version < \"3.10\"" files = [ - {file = "zipp-3.11.0-py3-none-any.whl", hash = "sha256:83a28fcb75844b5c0cdaf5aa4003c2d728c77e05f5aeabe8e95e56727005fbaa"}, - {file = "zipp-3.11.0.tar.gz", hash = "sha256:a7a22e05929290a67401440b39690ae6563279bced5f314609d9d03798f56766"}, + {file = "zipp-3.19.1-py3-none-any.whl", hash = "sha256:2828e64edb5386ea6a52e7ba7cdb17bb30a73a858f5eb6eb93d8d36f5ea26091"}, + {file = "zipp-3.19.1.tar.gz", hash = "sha256:35427f6d5594f4acf82d25541438348c26736fa9b3afa2754bcd63cdb99d8e8f"}, ] [package.extras] -docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"] -testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +test = ["big-O", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy", "pytest-ruff (>=0.2.1)"] [metadata] -lock-version = "2.0" +lock-version = "2.1" python-versions = "^3.8" -content-hash = "4411fb69fca534e61c7af60386dc101effb9666f13f3b85a0f148414e0c4cf79" +content-hash = "c80bc058f0871dd694ea1761d3266a1d46d0265b19312868ccc7e5cf3dbe3244" diff --git a/polygon/rest/aggs.py b/polygon/rest/aggs.py index 71d05d18..cb874fac 100644 --- a/polygon/rest/aggs.py +++ b/polygon/rest/aggs.py @@ -103,7 +103,7 @@ def get_aggs( # param def get_grouped_daily_aggs( self, - date: str, + date: Union[str, date], adjusted: Optional[bool] = None, params: Optional[Dict[str, Any]] = None, raw: bool = False, @@ -135,7 +135,7 @@ def get_grouped_daily_aggs( def get_daily_open_close_agg( self, ticker: str, - date: str, + date: Union[str, date], adjusted: Optional[bool] = None, params: Optional[Dict[str, Any]] = None, raw: bool = False, diff --git a/polygon/rest/base.py b/polygon/rest/base.py index 3e65c06c..d9d4768a 100644 --- a/polygon/rest/base.py +++ b/polygon/rest/base.py @@ -1,13 +1,12 @@ import certifi import json -import ssl import urllib3 import inspect from urllib3.util.retry import Retry from enum import Enum from typing import Optional, Any, Dict from datetime import datetime -import pkg_resources # part of setuptools +from importlib.metadata import version, PackageNotFoundError from .models.request import RequestOptionBuilder from ..logging import get_logger import logging @@ -15,10 +14,10 @@ from ..exceptions import AuthError, BadResponse logger = get_logger("RESTClient") -version = "unknown" +version_number = "unknown" try: - version = pkg_resources.require("polygon-api-client")[0].version -except: + version_number = version("polygon-api-client") +except PackageNotFoundError: pass @@ -46,7 +45,7 @@ def __init__( self.headers = { "Authorization": "Bearer " + self.API_KEY, "Accept-Encoding": "gzip", - "User-Agent": f"Polygon.io PythonClient/{version}", + "User-Agent": f"Polygon.io PythonClient/{version_number}", } # initialize self.retries with the parameter value before using it @@ -67,16 +66,13 @@ def __init__( backoff_factor=0.1, # [0.0s, 0.2s, 0.4s, 0.8s, 1.6s, ...] ) - # global cache ssl context and use (vs on each init of pool manager) - ssl_context = ssl.create_default_context() - ssl_context.load_verify_locations(certifi.where()) - # https://urllib3.readthedocs.io/en/stable/reference/urllib3.poolmanager.html # https://urllib3.readthedocs.io/en/stable/reference/urllib3.connectionpool.html#urllib3.HTTPConnectionPool self.client = urllib3.PoolManager( num_pools=num_pools, headers=self.headers, # default headers sent with each request. - ssl_context=ssl_context, + ca_certs=certifi.where(), + cert_reqs="CERT_REQUIRED", retries=retry_strategy, # use the customized Retry instance ) diff --git a/polygon/rest/models/conditions.py b/polygon/rest/models/conditions.py index 3fc0d776..98baa261 100644 --- a/polygon/rest/models/conditions.py +++ b/polygon/rest/models/conditions.py @@ -47,12 +47,16 @@ class UpdateRules: @staticmethod def from_dict(d): return UpdateRules( - consolidated=None - if "consolidated" not in d - else Consolidated.from_dict(d["consolidated"]), - market_center=None - if "market_center" not in d - else MarketCenter.from_dict(d["market_center"]), + consolidated=( + None + if "consolidated" not in d + else Consolidated.from_dict(d["consolidated"]) + ), + market_center=( + None + if "market_center" not in d + else MarketCenter.from_dict(d["market_center"]) + ), ) @@ -82,11 +86,15 @@ def from_dict(d): id=d.get("id", None), legacy=d.get("legacy", None), name=d.get("name", None), - sip_mapping=None - if "sip_mapping" not in d - else SipMapping.from_dict(d["sip_mapping"]), + sip_mapping=( + None + if "sip_mapping" not in d + else SipMapping.from_dict(d["sip_mapping"]) + ), type=d.get("type", None), - update_rules=None - if "update_rules" not in d - else UpdateRules.from_dict(d["update_rules"]), + update_rules=( + None + if "update_rules" not in d + else UpdateRules.from_dict(d["update_rules"]) + ), ) diff --git a/polygon/rest/models/contracts.py b/polygon/rest/models/contracts.py index dc69f614..469779b6 100644 --- a/polygon/rest/models/contracts.py +++ b/polygon/rest/models/contracts.py @@ -32,9 +32,11 @@ class OptionsContract: @staticmethod def from_dict(d): return OptionsContract( - additional_underlyings=None - if "additional_underlyings" not in d - else [Underlying.from_dict(u) for u in d["additional_underlyings"]], + additional_underlyings=( + None + if "additional_underlyings" not in d + else [Underlying.from_dict(u) for u in d["additional_underlyings"]] + ), cfi=d.get("cfi", None), contract_type=d.get("contract_type", None), correction=d.get("correction", None), diff --git a/polygon/rest/models/dividends.py b/polygon/rest/models/dividends.py index ef9adff0..68db98a9 100644 --- a/polygon/rest/models/dividends.py +++ b/polygon/rest/models/dividends.py @@ -5,6 +5,7 @@ @modelclass class Dividend: "Dividend contains data for a historical cash dividend, including the ticker symbol, declaration date, ex-dividend date, record date, pay date, frequency, and amount." + id: Optional[int] = None cash_amount: Optional[float] = None currency: Optional[str] = None declaration_date: Optional[str] = None diff --git a/polygon/rest/models/financials.py b/polygon/rest/models/financials.py index 85a63e37..5443e4f6 100644 --- a/polygon/rest/models/financials.py +++ b/polygon/rest/models/financials.py @@ -1,298 +1,503 @@ -from typing import Optional, Dict +from dataclasses import dataclass +from typing import Any, Dict, List, Optional from ...modelclass import modelclass @modelclass +@dataclass class DataPoint: - "An individual financial data point." - formula: Optional[str] = None - label: Optional[str] = None - order: Optional[int] = None - unit: Optional[str] = None - value: Optional[float] = None - xpath: Optional[str] = None + """Represents a single numeric or textual data point in the financials.""" - @staticmethod - def from_dict(d): - return DataPoint(**d) - - -@modelclass -class ExchangeGainsLosses: - "Contains exchange gains losses data for a cash flow statement." - formula: Optional[str] = None label: Optional[str] = None order: Optional[int] = None unit: Optional[str] = None value: Optional[float] = None - xpath: Optional[str] = None - - @staticmethod - def from_dict(d): - return ExchangeGainsLosses(**d) - - -@modelclass -class NetCashFlow: - "Contains net cash flow data for a cash flow statement." + derived_from: Optional[List[str]] = None formula: Optional[str] = None - label: Optional[str] = None - order: Optional[int] = None - unit: Optional[str] = None - value: Optional[float] = None + source: Optional[Dict[str, str]] = None xpath: Optional[str] = None @staticmethod - def from_dict(d): - return NetCashFlow(**d) + def from_dict(d: Optional[Dict[str, Any]]) -> "DataPoint": + if not d: + return DataPoint() + return DataPoint( + label=d.get("label"), + order=d.get("order"), + unit=d.get("unit"), + value=d.get("value"), + derived_from=d.get("derived_from"), + formula=d.get("formula"), + source=d.get("source"), + xpath=d.get("xpath"), + ) +@dataclass @modelclass -class NetCashFlowFromFinancingActivities: - "Contains net cash flow from financing activities data for a cash flow statement." - formula: Optional[str] = None - label: Optional[str] = None - order: Optional[int] = None - unit: Optional[str] = None - value: Optional[float] = None - xpath: Optional[str] = None +class BalanceSheet: + assets: Optional[DataPoint] = None + current_assets: Optional[DataPoint] = None + cash: Optional[DataPoint] = None + accounts_receivable: Optional[DataPoint] = None + inventory: Optional[DataPoint] = None + prepaid_expenses: Optional[DataPoint] = None + other_current_assets: Optional[DataPoint] = None + noncurrent_assets: Optional[DataPoint] = None + long_term_investments: Optional[DataPoint] = None + fixed_assets: Optional[DataPoint] = None + intangible_assets: Optional[DataPoint] = None + noncurrent_prepaid_expense: Optional[DataPoint] = None + other_noncurrent_assets: Optional[DataPoint] = None + liabilities: Optional[DataPoint] = None + current_liabilities: Optional[DataPoint] = None + accounts_payable: Optional[DataPoint] = None + interest_payable: Optional[DataPoint] = None + wages: Optional[DataPoint] = None + other_current_liabilities: Optional[DataPoint] = None + noncurrent_liabilities: Optional[DataPoint] = None + long_term_debt: Optional[DataPoint] = None + other_noncurrent_liabilities: Optional[DataPoint] = None + commitments_and_contingencies: Optional[DataPoint] = None + redeemable_noncontrolling_interest: Optional[DataPoint] = None + redeemable_noncontrolling_interest_common: Optional[DataPoint] = None + redeemable_noncontrolling_interest_other: Optional[DataPoint] = None + redeemable_noncontrolling_interest_preferred: Optional[DataPoint] = None + equity: Optional[DataPoint] = None + equity_attributable_to_noncontrolling_interest: Optional[DataPoint] = None + equity_attributable_to_parent: Optional[DataPoint] = None + temporary_equity: Optional[DataPoint] = None + temporary_equity_attributable_to_parent: Optional[DataPoint] = None + liabilities_and_equity: Optional[DataPoint] = None @staticmethod - def from_dict(d): - return NetCashFlowFromFinancingActivities(**d) + def from_dict(d: Optional[Dict[str, Any]]) -> "BalanceSheet": + if not d: + return BalanceSheet() + return BalanceSheet( + assets=DataPoint.from_dict(d.get("assets")), + current_assets=DataPoint.from_dict(d.get("current_assets")), + cash=DataPoint.from_dict(d.get("cash")), + accounts_receivable=DataPoint.from_dict(d.get("accounts_receivable")), + inventory=DataPoint.from_dict(d.get("inventory")), + prepaid_expenses=DataPoint.from_dict(d.get("prepaid_expenses")), + other_current_assets=DataPoint.from_dict(d.get("other_current_assets")), + noncurrent_assets=DataPoint.from_dict(d.get("noncurrent_assets")), + long_term_investments=DataPoint.from_dict(d.get("long_term_investments")), + fixed_assets=DataPoint.from_dict(d.get("fixed_assets")), + intangible_assets=DataPoint.from_dict(d.get("intangible_assets")), + noncurrent_prepaid_expense=DataPoint.from_dict( + d.get("noncurrent_prepaid_expense") + ), + other_noncurrent_assets=DataPoint.from_dict( + d.get("other_noncurrent_assets") + ), + liabilities=DataPoint.from_dict(d.get("liabilities")), + current_liabilities=DataPoint.from_dict(d.get("current_liabilities")), + accounts_payable=DataPoint.from_dict(d.get("accounts_payable")), + interest_payable=DataPoint.from_dict(d.get("interest_payable")), + wages=DataPoint.from_dict(d.get("wages")), + other_current_liabilities=DataPoint.from_dict( + d.get("other_current_liabilities") + ), + noncurrent_liabilities=DataPoint.from_dict(d.get("noncurrent_liabilities")), + long_term_debt=DataPoint.from_dict(d.get("long_term_debt")), + other_noncurrent_liabilities=DataPoint.from_dict( + d.get("other_noncurrent_liabilities") + ), + commitments_and_contingencies=DataPoint.from_dict( + d.get("commitments_and_contingencies") + ), + redeemable_noncontrolling_interest=DataPoint.from_dict( + d.get("redeemable_noncontrolling_interest") + ), + redeemable_noncontrolling_interest_common=DataPoint.from_dict( + d.get("redeemable_noncontrolling_interest_common") + ), + redeemable_noncontrolling_interest_other=DataPoint.from_dict( + d.get("redeemable_noncontrolling_interest_other") + ), + redeemable_noncontrolling_interest_preferred=DataPoint.from_dict( + d.get("redeemable_noncontrolling_interest_preferred") + ), + equity=DataPoint.from_dict(d.get("equity")), + equity_attributable_to_noncontrolling_interest=DataPoint.from_dict( + d.get("equity_attributable_to_noncontrolling_interest") + ), + equity_attributable_to_parent=DataPoint.from_dict( + d.get("equity_attributable_to_parent") + ), + temporary_equity=DataPoint.from_dict(d.get("temporary_equity")), + temporary_equity_attributable_to_parent=DataPoint.from_dict( + d.get("temporary_equity_attributable_to_parent") + ), + liabilities_and_equity=DataPoint.from_dict(d.get("liabilities_and_equity")), + ) +@dataclass @modelclass class CashFlowStatement: - "Contains cash flow statement data." - exchange_gains_losses: Optional[ExchangeGainsLosses] = None - net_cash_flow: Optional[NetCashFlow] = None - net_cash_flow_from_financing_activities: Optional[ - NetCashFlowFromFinancingActivities - ] = None + net_cash_flow_from_operating_activities: Optional[DataPoint] = None + net_cash_flow_from_operating_activities_continuing: Optional[DataPoint] = None + net_cash_flow_from_operating_activities_discontinued: Optional[DataPoint] = None + net_cash_flow_from_investing_activities: Optional[DataPoint] = None + net_cash_flow_from_investing_activities_continuing: Optional[DataPoint] = None + net_cash_flow_from_investing_activities_discontinued: Optional[DataPoint] = None + net_cash_flow_from_financing_activities: Optional[DataPoint] = None + net_cash_flow_from_financing_activities_continuing: Optional[DataPoint] = None + net_cash_flow_from_financing_activities_discontinued: Optional[DataPoint] = None + exchange_gains_losses: Optional[DataPoint] = None + net_cash_flow: Optional[DataPoint] = None + net_cash_flow_continuing: Optional[DataPoint] = None + net_cash_flow_discontinued: Optional[DataPoint] = None @staticmethod - def from_dict(d): + def from_dict(d: Optional[Dict[str, Any]]) -> "CashFlowStatement": + if not d: + return CashFlowStatement() return CashFlowStatement( - exchange_gains_losses=None - if "exchange_gains_losses" not in d - else ExchangeGainsLosses.from_dict(d["exchange_gains_losses"]), - net_cash_flow=None - if "net_cash_flow" not in d - else NetCashFlow.from_dict(d["net_cash_flow"]), - net_cash_flow_from_financing_activities=None - if "net_cash_flow_from_financing_activities" not in d - else NetCashFlowFromFinancingActivities.from_dict( - d["net_cash_flow_from_financing_activities"] + net_cash_flow_from_operating_activities=DataPoint.from_dict( + d.get("net_cash_flow_from_operating_activities") + ), + net_cash_flow_from_operating_activities_continuing=DataPoint.from_dict( + d.get("net_cash_flow_from_operating_activities_continuing") + ), + net_cash_flow_from_operating_activities_discontinued=DataPoint.from_dict( + d.get("net_cash_flow_from_operating_activities_discontinued") + ), + net_cash_flow_from_investing_activities=DataPoint.from_dict( + d.get("net_cash_flow_from_investing_activities") + ), + net_cash_flow_from_investing_activities_continuing=DataPoint.from_dict( + d.get("net_cash_flow_from_investing_activities_continuing") + ), + net_cash_flow_from_investing_activities_discontinued=DataPoint.from_dict( + d.get("net_cash_flow_from_investing_activities_discontinued") + ), + net_cash_flow_from_financing_activities=DataPoint.from_dict( + d.get("net_cash_flow_from_financing_activities") + ), + net_cash_flow_from_financing_activities_continuing=DataPoint.from_dict( + d.get("net_cash_flow_from_financing_activities_continuing") + ), + net_cash_flow_from_financing_activities_discontinued=DataPoint.from_dict( + d.get("net_cash_flow_from_financing_activities_discontinued") + ), + exchange_gains_losses=DataPoint.from_dict(d.get("exchange_gains_losses")), + net_cash_flow=DataPoint.from_dict(d.get("net_cash_flow")), + net_cash_flow_continuing=DataPoint.from_dict( + d.get("net_cash_flow_continuing") + ), + net_cash_flow_discontinued=DataPoint.from_dict( + d.get("net_cash_flow_discontinued") ), ) -@modelclass -class ComprehensiveIncomeLoss: - "Contains comprehensive income loss data for comprehensive income." - formula: Optional[str] = None - label: Optional[str] = None - order: Optional[int] = None - unit: Optional[str] = None - value: Optional[float] = None - xpath: Optional[str] = None - - @staticmethod - def from_dict(d): - return ComprehensiveIncomeLoss(**d) - - -@modelclass -class ComprehensiveIncomeLossAttributableToParent: - "Contains comprehensive income loss attributable to parent data for comprehensive income." - formula: Optional[str] = None - label: Optional[str] = None - order: Optional[int] = None - unit: Optional[str] = None - value: Optional[float] = None - xpath: Optional[str] = None - - @staticmethod - def from_dict(d): - return ComprehensiveIncomeLossAttributableToParent(**d) - - -@modelclass -class OtherComprehensiveIncomeLoss: - "Contains other comprehensive income loss data for comprehensive income." - formula: Optional[str] = None - label: Optional[str] = None - order: Optional[int] = None - unit: Optional[str] = None - value: Optional[float] = None - xpath: Optional[str] = None - - @staticmethod - def from_dict(d): - return OtherComprehensiveIncomeLoss(**d) - - +@dataclass @modelclass class ComprehensiveIncome: - "Contains comprehensive income data." - comprehensive_income_loss: Optional[ComprehensiveIncomeLoss] = None - comprehensive_income_loss_attributable_to_parent: Optional[ - ComprehensiveIncomeLossAttributableToParent + comprehensive_income_loss: Optional[DataPoint] = None + comprehensive_income_loss_attributable_to_noncontrolling_interest: Optional[ + DataPoint ] = None - other_comprehensive_income_loss: Optional[OtherComprehensiveIncomeLoss] = None + comprehensive_income_loss_attributable_to_parent: Optional[DataPoint] = None + other_comprehensive_income_loss: Optional[DataPoint] = None + other_comprehensive_income_loss_attributable_to_noncontrolling_interest: Optional[ + DataPoint + ] = None + other_comprehensive_income_loss_attributable_to_parent: Optional[DataPoint] = None @staticmethod - def from_dict(d): + def from_dict(d: Optional[Dict[str, Any]]) -> "ComprehensiveIncome": + if not d: + return ComprehensiveIncome() return ComprehensiveIncome( - comprehensive_income_loss=None - if "comprehensive_income_loss" not in d - else ComprehensiveIncomeLoss.from_dict(d["comprehensive_income_loss"]), - comprehensive_income_loss_attributable_to_parent=None - if "comprehensive_income_loss_attributable_to_parent" not in d - else ComprehensiveIncomeLossAttributableToParent.from_dict( - d["comprehensive_income_loss_attributable_to_parent"] - ), - other_comprehensive_income_loss=None - if "other_comprehensive_income_loss" not in d - else OtherComprehensiveIncomeLoss.from_dict( - d["other_comprehensive_income_loss"] + comprehensive_income_loss=DataPoint.from_dict( + d.get("comprehensive_income_loss") + ), + comprehensive_income_loss_attributable_to_noncontrolling_interest=DataPoint.from_dict( + d.get( + "comprehensive_income_loss_attributable_to_noncontrolling_interest" + ) + ), + comprehensive_income_loss_attributable_to_parent=DataPoint.from_dict( + d.get("comprehensive_income_loss_attributable_to_parent") + ), + other_comprehensive_income_loss=DataPoint.from_dict( + d.get("other_comprehensive_income_loss") + ), + other_comprehensive_income_loss_attributable_to_noncontrolling_interest=DataPoint.from_dict( + d.get( + "other_comprehensive_income_loss_attributable_to_noncontrolling_interest" + ) + ), + other_comprehensive_income_loss_attributable_to_parent=DataPoint.from_dict( + d.get("other_comprehensive_income_loss_attributable_to_parent") ), ) -@modelclass -class BasicEarningsPerShare: - "Contains basic earning per share data for an income statement." - formula: Optional[str] = None - label: Optional[str] = None - order: Optional[int] = None - unit: Optional[str] = None - value: Optional[float] = None - xpath: Optional[str] = None - - @staticmethod - def from_dict(d): - return BasicEarningsPerShare(**d) - - -@modelclass -class CostOfRevenue: - "Contains cost of revenue data for an income statement." - formula: Optional[str] = None - label: Optional[str] = None - order: Optional[int] = None - unit: Optional[str] = None - value: Optional[float] = None - xpath: Optional[str] = None - - @staticmethod - def from_dict(d): - return CostOfRevenue(**d) - - -@modelclass -class GrossProfit: - "Contains gross profit data for an income statement." - formula: Optional[str] = None - label: Optional[str] = None - order: Optional[int] = None - unit: Optional[str] = None - value: Optional[float] = None - xpath: Optional[str] = None - - @staticmethod - def from_dict(d): - return GrossProfit(**d) - - -@modelclass -class OperatingExpenses: - "Contains operating expenses data for an income statement." - formula: Optional[str] = None - label: Optional[str] = None - order: Optional[int] = None - unit: Optional[str] = None - value: Optional[float] = None - xpath: Optional[str] = None - - @staticmethod - def from_dict(d): - return OperatingExpenses(**d) - - -@modelclass -class Revenues: - "Contains revenues data for an income statement." - formula: Optional[str] = None - label: Optional[str] = None - order: Optional[int] = None - unit: Optional[str] = None - value: Optional[float] = None - xpath: Optional[str] = None - - @staticmethod - def from_dict(d): - return Revenues(**d) - - +@dataclass @modelclass class IncomeStatement: - "Contains income statement data." - basic_earnings_per_share: Optional[BasicEarningsPerShare] = None - cost_of_revenue: Optional[CostOfRevenue] = None - gross_profit: Optional[GrossProfit] = None - operating_expenses: Optional[OperatingExpenses] = None - revenues: Optional[Revenues] = None + revenues: Optional[DataPoint] = None + benefits_costs_expenses: Optional[DataPoint] = None + cost_of_revenue: Optional[DataPoint] = None + cost_of_revenue_goods: Optional[DataPoint] = None + cost_of_revenue_services: Optional[DataPoint] = None + costs_and_expenses: Optional[DataPoint] = None + gross_profit: Optional[DataPoint] = None + gain_loss_on_sale_properties_net_tax: Optional[DataPoint] = None + nonoperating_income_loss: Optional[DataPoint] = None + operating_expenses: Optional[DataPoint] = None + selling_general_and_administrative_expenses: Optional[DataPoint] = None + depreciation_and_amortization: Optional[DataPoint] = None + research_and_development: Optional[DataPoint] = None + other_operating_expenses: Optional[DataPoint] = None + operating_income_loss: Optional[DataPoint] = None + other_operating_income_expenses: Optional[DataPoint] = None + income_loss_before_equity_method_investments: Optional[DataPoint] = None + income_loss_from_continuing_operations_after_tax: Optional[DataPoint] = None + income_loss_from_continuing_operations_before_tax: Optional[DataPoint] = None + income_loss_from_discontinued_operations_net_of_tax: Optional[DataPoint] = None + income_loss_from_discontinued_operations_net_of_tax_adjustment_to_prior_year_gain_loss_on_disposal: Optional[ + DataPoint + ] = None + income_loss_from_discontinued_operations_net_of_tax_during_phase_out: Optional[ + DataPoint + ] = None + income_loss_from_discontinued_operations_net_of_tax_gain_loss_on_disposal: Optional[ + DataPoint + ] = None + income_loss_from_discontinued_operations_net_of_tax_provision_for_gain_loss_on_disposal: Optional[ + DataPoint + ] = None + income_loss_from_equity_method_investments: Optional[DataPoint] = None + income_tax_expense_benefit: Optional[DataPoint] = None + income_tax_expense_benefit_current: Optional[DataPoint] = None + income_tax_expense_benefit_deferred: Optional[DataPoint] = None + interest_and_debt_expense: Optional[DataPoint] = None + interest_and_dividend_income_operating: Optional[DataPoint] = None + interest_expense_operating: Optional[DataPoint] = None + interest_income_expense_after_provision_for_losses: Optional[DataPoint] = None + interest_income_expense_operating_net: Optional[DataPoint] = None + noninterest_expense: Optional[DataPoint] = None + noninterest_income: Optional[DataPoint] = None + provision_for_loan_lease_and_other_losses: Optional[DataPoint] = None + net_income_loss: Optional[DataPoint] = None + net_income_loss_attributable_to_noncontrolling_interest: Optional[DataPoint] = None + net_income_loss_attributable_to_nonredeemable_noncontrolling_interest: Optional[ + DataPoint + ] = None + net_income_loss_attributable_to_parent: Optional[DataPoint] = None + net_income_loss_attributable_to_redeemable_noncontrolling_interest: Optional[ + DataPoint + ] = None + net_income_loss_available_to_common_stockholders_basic: Optional[DataPoint] = None + participating_securities_distributed_and_undistributed_earnings_loss_basic: ( + Optional[DataPoint] + ) = (None) + undistributed_earnings_loss_allocated_to_participating_securities_basic: Optional[ + DataPoint + ] = None + preferred_stock_dividends_and_other_adjustments: Optional[DataPoint] = None + basic_earnings_per_share: Optional[DataPoint] = None + diluted_earnings_per_share: Optional[DataPoint] = None + basic_average_shares: Optional[DataPoint] = None + diluted_average_shares: Optional[DataPoint] = None + common_stock_dividends: Optional[DataPoint] = None @staticmethod - def from_dict(d): + def from_dict(d: Optional[Dict[str, Any]]) -> "IncomeStatement": + if not d: + return IncomeStatement() return IncomeStatement( - basic_earnings_per_share=None - if "basic_earnings_per_share" not in d - else BasicEarningsPerShare.from_dict(d["basic_earnings_per_share"]), - cost_of_revenue=None - if "cost_of_revenue" not in d - else CostOfRevenue.from_dict(d["cost_of_revenue"]), - gross_profit=None - if "gross_profit" not in d - else GrossProfit.from_dict(d["gross_profit"]), - operating_expenses=None - if "operating_expenses" not in d - else OperatingExpenses.from_dict(d["operating_expenses"]), - revenues=None if "revenues" not in d else Revenues.from_dict(d["revenues"]), + revenues=DataPoint.from_dict(d.get("revenues")), + benefits_costs_expenses=DataPoint.from_dict( + d.get("benefits_costs_expenses") + ), + cost_of_revenue=DataPoint.from_dict(d.get("cost_of_revenue")), + cost_of_revenue_goods=DataPoint.from_dict(d.get("cost_of_revenue_goods")), + cost_of_revenue_services=DataPoint.from_dict( + d.get("cost_of_revenue_services") + ), + costs_and_expenses=DataPoint.from_dict(d.get("costs_and_expenses")), + gross_profit=DataPoint.from_dict(d.get("gross_profit")), + gain_loss_on_sale_properties_net_tax=DataPoint.from_dict( + d.get("gain_loss_on_sale_properties_net_tax") + ), + nonoperating_income_loss=DataPoint.from_dict( + d.get("nonoperating_income_loss") + ), + operating_expenses=DataPoint.from_dict(d.get("operating_expenses")), + selling_general_and_administrative_expenses=DataPoint.from_dict( + d.get("selling_general_and_administrative_expenses") + ), + depreciation_and_amortization=DataPoint.from_dict( + d.get("depreciation_and_amortization") + ), + research_and_development=DataPoint.from_dict( + d.get("research_and_development") + ), + other_operating_expenses=DataPoint.from_dict( + d.get("other_operating_expenses") + ), + operating_income_loss=DataPoint.from_dict(d.get("operating_income_loss")), + other_operating_income_expenses=DataPoint.from_dict( + d.get("other_operating_income_expenses") + ), + income_loss_before_equity_method_investments=DataPoint.from_dict( + d.get("income_loss_before_equity_method_investments") + ), + income_loss_from_continuing_operations_after_tax=DataPoint.from_dict( + d.get("income_loss_from_continuing_operations_after_tax") + ), + income_loss_from_continuing_operations_before_tax=DataPoint.from_dict( + d.get("income_loss_from_continuing_operations_before_tax") + ), + income_loss_from_discontinued_operations_net_of_tax=DataPoint.from_dict( + d.get("income_loss_from_discontinued_operations_net_of_tax") + ), + income_loss_from_discontinued_operations_net_of_tax_adjustment_to_prior_year_gain_loss_on_disposal=DataPoint.from_dict( + d.get( + "income_loss_from_discontinued_operations_net_of_tax_adjustment_to_prior_year_gain_loss_on_disposal" + ) + ), + income_loss_from_discontinued_operations_net_of_tax_during_phase_out=DataPoint.from_dict( + d.get( + "income_loss_from_discontinued_operations_net_of_tax_during_phase_out" + ) + ), + income_loss_from_discontinued_operations_net_of_tax_gain_loss_on_disposal=DataPoint.from_dict( + d.get( + "income_loss_from_discontinued_operations_net_of_tax_gain_loss_on_disposal" + ) + ), + income_loss_from_discontinued_operations_net_of_tax_provision_for_gain_loss_on_disposal=DataPoint.from_dict( + d.get( + "income_loss_from_discontinued_operations_net_of_tax_provision_for_gain_loss_on_disposal" + ) + ), + income_loss_from_equity_method_investments=DataPoint.from_dict( + d.get("income_loss_from_equity_method_investments") + ), + income_tax_expense_benefit=DataPoint.from_dict( + d.get("income_tax_expense_benefit") + ), + income_tax_expense_benefit_current=DataPoint.from_dict( + d.get("income_tax_expense_benefit_current") + ), + income_tax_expense_benefit_deferred=DataPoint.from_dict( + d.get("income_tax_expense_benefit_deferred") + ), + interest_and_debt_expense=DataPoint.from_dict( + d.get("interest_and_debt_expense") + ), + interest_and_dividend_income_operating=DataPoint.from_dict( + d.get("interest_and_dividend_income_operating") + ), + interest_expense_operating=DataPoint.from_dict( + d.get("interest_expense_operating") + ), + interest_income_expense_after_provision_for_losses=DataPoint.from_dict( + d.get("interest_income_expense_after_provision_for_losses") + ), + interest_income_expense_operating_net=DataPoint.from_dict( + d.get("interest_income_expense_operating_net") + ), + noninterest_expense=DataPoint.from_dict(d.get("noninterest_expense")), + noninterest_income=DataPoint.from_dict(d.get("noninterest_income")), + provision_for_loan_lease_and_other_losses=DataPoint.from_dict( + d.get("provision_for_loan_lease_and_other_losses") + ), + net_income_loss=DataPoint.from_dict(d.get("net_income_loss")), + net_income_loss_attributable_to_noncontrolling_interest=DataPoint.from_dict( + d.get("net_income_loss_attributable_to_noncontrolling_interest") + ), + net_income_loss_attributable_to_nonredeemable_noncontrolling_interest=DataPoint.from_dict( + d.get( + "net_income_loss_attributable_to_nonredeemable_noncontrolling_interest" + ) + ), + net_income_loss_attributable_to_parent=DataPoint.from_dict( + d.get("net_income_loss_attributable_to_parent") + ), + net_income_loss_attributable_to_redeemable_noncontrolling_interest=DataPoint.from_dict( + d.get( + "net_income_loss_attributable_to_redeemable_noncontrolling_interest" + ) + ), + net_income_loss_available_to_common_stockholders_basic=DataPoint.from_dict( + d.get("net_income_loss_available_to_common_stockholders_basic") + ), + participating_securities_distributed_and_undistributed_earnings_loss_basic=DataPoint.from_dict( + d.get( + "participating_securities_distributed_and_undistributed_earnings_loss_basic" + ) + ), + undistributed_earnings_loss_allocated_to_participating_securities_basic=DataPoint.from_dict( + d.get( + "undistributed_earnings_loss_allocated_to_participating_securities_basic" + ) + ), + preferred_stock_dividends_and_other_adjustments=DataPoint.from_dict( + d.get("preferred_stock_dividends_and_other_adjustments") + ), + basic_earnings_per_share=DataPoint.from_dict( + d.get("basic_earnings_per_share") + ), + diluted_earnings_per_share=DataPoint.from_dict( + d.get("diluted_earnings_per_share") + ), + basic_average_shares=DataPoint.from_dict(d.get("basic_average_shares")), + diluted_average_shares=DataPoint.from_dict(d.get("diluted_average_shares")), + common_stock_dividends=DataPoint.from_dict(d.get("common_stock_dividends")), ) +@dataclass @modelclass class Financials: - "Contains financial data." - balance_sheet: Optional[Dict[str, DataPoint]] = None + """ + Contains data for: + - balance_sheet (BalanceSheet) + - cash_flow_statement (CashFlowStatement) + - comprehensive_income (ComprehensiveIncome) + - income_statement (IncomeStatement) + """ + + balance_sheet: Optional[BalanceSheet] = None cash_flow_statement: Optional[CashFlowStatement] = None comprehensive_income: Optional[ComprehensiveIncome] = None income_statement: Optional[IncomeStatement] = None @staticmethod - def from_dict(d): + def from_dict(d: Optional[Dict[str, Any]]) -> "Financials": + if not d: + return Financials() return Financials( - balance_sheet=None - if "balance_sheet" not in d - else {k: DataPoint.from_dict(v) for (k, v) in d["balance_sheet"].items()}, - cash_flow_statement=None - if "cash_flow_statement" not in d - else CashFlowStatement.from_dict(d["cash_flow_statement"]), - comprehensive_income=None - if "comprehensive_income" not in d - else ComprehensiveIncome.from_dict(d["comprehensive_income"]), - income_statement=None - if "income_statement" not in d - else IncomeStatement.from_dict(d["income_statement"]), + balance_sheet=BalanceSheet.from_dict(d.get("balance_sheet")), + cash_flow_statement=CashFlowStatement.from_dict( + d.get("cash_flow_statement") + ), + comprehensive_income=ComprehensiveIncome.from_dict( + d.get("comprehensive_income") + ), + income_statement=IncomeStatement.from_dict(d.get("income_statement")), ) +@dataclass @modelclass class StockFinancial: - "StockFinancial contains historical financial data for a stock ticker." + """ + StockFinancial contains historical financial data for a stock ticker. + The 'financials' attribute references an instance of Financials + which has typed sub-statements. + """ + cik: Optional[str] = None company_name: Optional[str] = None end_date: Optional[str] = None @@ -305,18 +510,18 @@ class StockFinancial: start_date: Optional[str] = None @staticmethod - def from_dict(d): + def from_dict(d: Optional[Dict[str, Any]]) -> "StockFinancial": + if not d: + return StockFinancial() return StockFinancial( - cik=d.get("cik", None), - company_name=d.get("company_name", None), - end_date=d.get("end_date", None), - filing_date=d.get("filing_date", None), - financials=None - if "financials" not in d - else Financials.from_dict(d["financials"]), - fiscal_period=d.get("fiscal_period", None), - fiscal_year=d.get("fiscal_year", None), - source_filing_file_url=d.get("source_filing_file_url", None), - source_filing_url=d.get("source_filing_url", None), - start_date=d.get("start_date", None), + cik=d.get("cik"), + company_name=d.get("company_name"), + end_date=d.get("end_date"), + filing_date=d.get("filing_date"), + financials=Financials.from_dict(d.get("financials", {})), + fiscal_period=d.get("fiscal_period"), + fiscal_year=d.get("fiscal_year"), + source_filing_file_url=d.get("source_filing_file_url"), + source_filing_url=d.get("source_filing_url"), + start_date=d.get("start_date"), ) diff --git a/polygon/rest/models/markets.py b/polygon/rest/models/markets.py index 509caa86..4e68abd4 100644 --- a/polygon/rest/models/markets.py +++ b/polygon/rest/models/markets.py @@ -30,6 +30,7 @@ class MarketIndices: "Contains indices market status data." s_and_p: Optional[str] = None societe_generale: Optional[str] = None + cgi: Optional[str] = None msci: Optional[str] = None ftse_russell: Optional[str] = None mstar: Optional[str] = None @@ -73,16 +74,22 @@ class MarketStatus: def from_dict(d): return MarketStatus( after_hours=d.get("afterHours", None), - currencies=None - if "currencies" not in d - else MarketCurrencies.from_dict(d["currencies"]), + currencies=( + None + if "currencies" not in d + else MarketCurrencies.from_dict(d["currencies"]) + ), early_hours=d.get("earlyHours", None), - exchanges=None - if "exchanges" not in d - else MarketExchanges.from_dict(d["exchanges"]), - indicesGroups=None - if "indicesGroups" not in d - else MarketIndices.from_dict(d["indicesGroups"]), + exchanges=( + None + if "exchanges" not in d + else MarketExchanges.from_dict(d["exchanges"]) + ), + indicesGroups=( + None + if "indicesGroups" not in d + else MarketIndices.from_dict(d["indicesGroups"]) + ), market=d.get("market", None), server_time=d.get("serverTime", None), ) diff --git a/polygon/rest/models/snapshot.py b/polygon/rest/models/snapshot.py index d97f17c3..3d38abe2 100644 --- a/polygon/rest/models/snapshot.py +++ b/polygon/rest/models/snapshot.py @@ -70,9 +70,9 @@ def from_dict(d): type=d.get("type", None), ticker=d.get("ticker", None), market_status=d.get("market_status", None), - session=None - if "session" not in d - else IndicesSession.from_dict(d["session"]), + session=( + None if "session" not in d else IndicesSession.from_dict(d["session"]) + ), error=d.get("error", None), message=d.get("message", None), ) @@ -96,12 +96,12 @@ class TickerSnapshot: def from_dict(d): return TickerSnapshot( day=None if "day" not in d else Agg.from_dict(d["day"]), - last_quote=None - if "lastQuote" not in d - else LastQuote.from_dict(d["lastQuote"]), - last_trade=None - if "lastTrade" not in d - else LastTrade.from_dict(d["lastTrade"]), + last_quote=( + None if "lastQuote" not in d else LastQuote.from_dict(d["lastQuote"]) + ), + last_trade=( + None if "lastTrade" not in d else LastTrade.from_dict(d["lastTrade"]) + ), min=None if "min" not in d else MinuteSnapshot.from_dict(d["min"]), prev_day=None if "prevDay" not in d else Agg.from_dict(d["prevDay"]), ticker=d.get("ticker", None), @@ -223,24 +223,32 @@ class OptionContractSnapshot: def from_dict(d): return OptionContractSnapshot( break_even_price=d.get("break_even_price", None), - day=None - if "day" not in d - else DayOptionContractSnapshot.from_dict(d["day"]), - details=None - if "details" not in d - else OptionDetails.from_dict(d["details"]), + day=( + None + if "day" not in d + else DayOptionContractSnapshot.from_dict(d["day"]) + ), + details=( + None if "details" not in d else OptionDetails.from_dict(d["details"]) + ), greeks=None if "greeks" not in d else Greeks.from_dict(d["greeks"]), implied_volatility=d.get("implied_volatility", None), - last_quote=None - if "last_quote" not in d - else LastQuoteOptionContractSnapshot.from_dict(d["last_quote"]), - last_trade=None - if "last_trade" not in d - else LastTradeOptionContractSnapshot.from_dict(d["last_trade"]), + last_quote=( + None + if "last_quote" not in d + else LastQuoteOptionContractSnapshot.from_dict(d["last_quote"]) + ), + last_trade=( + None + if "last_trade" not in d + else LastTradeOptionContractSnapshot.from_dict(d["last_trade"]) + ), open_interest=d.get("open_interest", None), - underlying_asset=None - if "underlying_asset" not in d - else UnderlyingAsset.from_dict(d["underlying_asset"]), + underlying_asset=( + None + if "underlying_asset" not in d + else UnderlyingAsset.from_dict(d["underlying_asset"]) + ), fair_market_value=d.get("fmv", None), ) @@ -274,12 +282,16 @@ class SnapshotTickerFullBook: def from_dict(d): return SnapshotTickerFullBook( ticker=d.get("ticker", None), - bids=None - if "bids" not in d - else [OrderBookQuote.from_dict(o) for o in d["bids"]], - asks=None - if "asks" not in d - else [OrderBookQuote.from_dict(o) for o in d["asks"]], + bids=( + None + if "bids" not in d + else [OrderBookQuote.from_dict(o) for o in d["bids"]] + ), + asks=( + None + if "asks" not in d + else [OrderBookQuote.from_dict(o) for o in d["asks"]] + ), bid_count=d.get("bidCount", None), ask_count=d.get("askCount", None), spread=d.get("spread", None), @@ -296,6 +308,8 @@ class UniversalSnapshotSession: change_percent: Optional[float] = None early_trading_change: Optional[float] = None early_trading_change_percent: Optional[float] = None + regular_trading_change: Optional[float] = None + regular_trading_change_percent: Optional[float] = None late_trading_change: Optional[float] = None late_trading_change_percent: Optional[float] = None open: Optional[float] = None @@ -404,22 +418,32 @@ def from_dict(d): return UniversalSnapshot( ticker=d.get("ticker", None), type=d.get("type", None), - session=None - if "session" not in d - else UniversalSnapshotSession.from_dict(d["session"]), - last_quote=None - if "last_quote" not in d - else UniversalSnapshotLastQuote.from_dict(d["last_quote"]), - last_trade=None - if "last_trade" not in d - else UniversalSnapshotLastTrade.from_dict(d["last_trade"]), + session=( + None + if "session" not in d + else UniversalSnapshotSession.from_dict(d["session"]) + ), + last_quote=( + None + if "last_quote" not in d + else UniversalSnapshotLastQuote.from_dict(d["last_quote"]) + ), + last_trade=( + None + if "last_trade" not in d + else UniversalSnapshotLastTrade.from_dict(d["last_trade"]) + ), greeks=None if "greeks" not in d else Greeks.from_dict(d["greeks"]), - underlying_asset=None - if "underlying_asset" not in d - else UniversalSnapshotUnderlyingAsset.from_dict(d["underlying_asset"]), - details=None - if "details" not in d - else UniversalSnapshotDetails.from_dict(d["details"]), + underlying_asset=( + None + if "underlying_asset" not in d + else UniversalSnapshotUnderlyingAsset.from_dict(d["underlying_asset"]) + ), + details=( + None + if "details" not in d + else UniversalSnapshotDetails.from_dict(d["details"]) + ), break_even_price=d.get("break_even_price", None), implied_volatility=d.get("implied_volatility", None), open_interest=d.get("open_interest", None), diff --git a/polygon/rest/models/splits.py b/polygon/rest/models/splits.py index 93244c50..5fb27129 100644 --- a/polygon/rest/models/splits.py +++ b/polygon/rest/models/splits.py @@ -5,6 +5,7 @@ @modelclass class Split: "Split contains data for a historical stock split, including the ticker symbol, the execution date, and the factors of the split ratio." + id: Optional[int] = None execution_date: Optional[str] = None split_from: Optional[int] = None split_to: Optional[int] = None diff --git a/polygon/rest/models/tickers.py b/polygon/rest/models/tickers.py index 1c2ea947..76cb6f6f 100644 --- a/polygon/rest/models/tickers.py +++ b/polygon/rest/models/tickers.py @@ -1,5 +1,4 @@ from typing import Optional, List - from ...modelclass import modelclass @@ -32,6 +31,18 @@ def from_dict(d): return Branding(**d) +@modelclass +class Insight: + "Contains the insights related to the article." + sentiment: Optional[str] = None + sentiment_reasoning: Optional[str] = None + ticker: Optional[str] = None + + @staticmethod + def from_dict(d): + return Insight(**d) + + @modelclass class Publisher: "Contains publisher data for ticker news." @@ -108,9 +119,9 @@ class TickerDetails: def from_dict(d): return TickerDetails( active=d.get("active", None), - address=None - if "address" not in d - else CompanyAddress.from_dict(d["address"]), + address=( + None if "address" not in d else CompanyAddress.from_dict(d["address"]) + ), branding=None if "branding" not in d else Branding.from_dict(d["branding"]), cik=d.get("cik", None), composite_figi=d.get("composite_figi", None), @@ -152,6 +163,7 @@ class TickerNews: description: Optional[str] = None id: Optional[str] = None image_url: Optional[str] = None + insights: Optional[List[Insight]] = None keywords: Optional[List[str]] = None published_utc: Optional[str] = None publisher: Optional[Publisher] = None @@ -167,11 +179,16 @@ def from_dict(d): description=d.get("description", None), id=d.get("id", None), image_url=d.get("image_url", None), + insights=( + [Insight.from_dict(insight) for insight in d["insights"]] + if "insights" in d + else None + ), keywords=d.get("keywords", None), published_utc=d.get("published_utc", None), - publisher=None - if "publisher" not in d - else Publisher.from_dict(d["publisher"]), + publisher=( + None if "publisher" not in d else Publisher.from_dict(d["publisher"]) + ), tickers=d.get("tickers", None), title=d.get("title", None), ) @@ -190,6 +207,21 @@ def from_dict(d): return TickerTypes(**d) +@modelclass +class RelatedCompany: + """ + Get a list of tickers related to the queried ticker based on News and Returns data. + """ + + ticker: Optional[str] = None + + @staticmethod + def from_dict(d): + return RelatedCompany( + ticker=d.get("ticker", None), + ) + + @modelclass class TickerChange: ticker: str @@ -220,3 +252,163 @@ class TickerChangeResults: @staticmethod def from_dict(d): return TickerChangeResults(**d) + + +@modelclass +class IPOListing: + """ + IPO Listing data as returned by the /vX/reference/ipos endpoint. + """ + + announced_date: Optional[str] = None + currency_code: Optional[str] = None + final_issue_price: Optional[float] = None + highest_offer_price: Optional[float] = None + ipo_status: Optional[str] = None + isin: Optional[str] = None + issuer_name: Optional[str] = None + last_updated: Optional[str] = None + listing_date: Optional[str] = None + lot_size: Optional[int] = None + lowest_offer_price: Optional[float] = None + max_shares_offered: Optional[int] = None + min_shares_offered: Optional[int] = None + primary_exchange: Optional[str] = None + security_description: Optional[str] = None + security_type: Optional[str] = None + shares_outstanding: Optional[int] = None + ticker: Optional[str] = None + total_offer_size: Optional[float] = None + us_code: Optional[str] = None + + @staticmethod + def from_dict(d): + return IPOListing( + announced_date=d.get("announced_date"), + currency_code=d.get("currency_code"), + final_issue_price=d.get("final_issue_price"), + highest_offer_price=d.get("highest_offer_price"), + ipo_status=d.get("ipo_status"), + isin=d.get("isin"), + issuer_name=d.get("issuer_name"), + last_updated=d.get("last_updated"), + listing_date=d.get("listing_date"), + lot_size=d.get("lot_size"), + lowest_offer_price=d.get("lowest_offer_price"), + max_shares_offered=d.get("max_shares_offered"), + min_shares_offered=d.get("min_shares_offered"), + primary_exchange=d.get("primary_exchange"), + security_description=d.get("security_description"), + security_type=d.get("security_type"), + shares_outstanding=d.get("shares_outstanding"), + ticker=d.get("ticker"), + total_offer_size=d.get("total_offer_size"), + us_code=d.get("us_code"), + ) + + +@modelclass +class ShortInterest: + """ + Short Interest data for a specific identifier. + """ + + avg_daily_volume: Optional[int] = None + days_to_cover: Optional[float] = None + settlement_date: Optional[str] = None + short_interest: Optional[int] = None + ticker: Optional[str] = None + + @staticmethod + def from_dict(d): + return ShortInterest( + avg_daily_volume=d.get("avg_daily_volume"), + days_to_cover=d.get("days_to_cover"), + settlement_date=d.get("settlement_date"), + short_interest=d.get("short_interest"), + ticker=d.get("ticker"), + ) + + +@modelclass +class ShortVolume: + """ + Short Volume data for a specific identifier on a given date. + """ + + adf_short_volume: Optional[int] = None + adf_short_volume_exempt: Optional[int] = None + date: Optional[str] = None + exempt_volume: Optional[int] = None + nasdaq_carteret_short_volume: Optional[int] = None + nasdaq_carteret_short_volume_exempt: Optional[int] = None + nasdaq_chicago_short_volume: Optional[int] = None + nasdaq_chicago_short_volume_exempt: Optional[int] = None + non_exempt_volume: Optional[int] = None + nyse_short_volume: Optional[int] = None + nyse_short_volume_exempt: Optional[int] = None + short_volume: Optional[int] = None + short_volume_ratio: Optional[float] = None + ticker: Optional[str] = None + total_volume: Optional[int] = None + + @staticmethod + def from_dict(d): + return ShortVolume( + adf_short_volume=d.get("adf_short_volume"), + adf_short_volume_exempt=d.get("adf_short_volume_exempt"), + date=d.get("date"), + exempt_volume=d.get("exempt_volume"), + nasdaq_carteret_short_volume=d.get("nasdaq_carteret_short_volume"), + nasdaq_carteret_short_volume_exempt=d.get( + "nasdaq_carteret_short_volume_exempt" + ), + nasdaq_chicago_short_volume=d.get("nasdaq_chicago_short_volume"), + nasdaq_chicago_short_volume_exempt=d.get( + "nasdaq_chicago_short_volume_exempt" + ), + non_exempt_volume=d.get("non_exempt_volume"), + nyse_short_volume=d.get("nyse_short_volume"), + nyse_short_volume_exempt=d.get("nyse_short_volume_exempt"), + short_volume=d.get("short_volume"), + short_volume_ratio=d.get("short_volume_ratio"), + ticker=d.get("ticker"), + total_volume=d.get("total_volume"), + ) + + +@modelclass +class TreasuryYield: + """ + Treasury yield data for a specific date. + """ + + date: Optional[str] = None + yield_1_month: Optional[float] = None + yield_3_month: Optional[float] = None + yield_6_month: Optional[float] = None + yield_1_year: Optional[float] = None + yield_2_year: Optional[float] = None + yield_3_year: Optional[float] = None + yield_5_year: Optional[float] = None + yield_7_year: Optional[float] = None + yield_10_year: Optional[float] = None + yield_20_year: Optional[float] = None + yield_30_year: Optional[float] = None + + @staticmethod + def from_dict(d): + return TreasuryYield( + date=d.get("date"), + yield_1_month=d.get("yield_1_month"), + yield_3_month=d.get("yield_3_month"), + yield_6_month=d.get("yield_6_month"), + yield_1_year=d.get("yield_1_year"), + yield_2_year=d.get("yield_2_year"), + yield_3_year=d.get("yield_3_year"), + yield_5_year=d.get("yield_5_year"), + yield_7_year=d.get("yield_7_year"), + yield_10_year=d.get("yield_10_year"), + yield_20_year=d.get("yield_20_year"), + yield_30_year=d.get("yield_30_year"), + ) diff --git a/polygon/rest/reference.py b/polygon/rest/reference.py index 38d15752..7af5b10f 100644 --- a/polygon/rest/reference.py +++ b/polygon/rest/reference.py @@ -7,6 +7,7 @@ TickerChangeResults, TickerDetails, TickerNews, + RelatedCompany, TickerTypes, Sort, Order, @@ -245,6 +246,32 @@ def get_ticker_types( options=options, ) + def get_related_companies( + self, + ticker: Optional[str] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[RelatedCompany, HTTPResponse]: + """ + Get a list of tickers related to the queried ticker based on News and Returns data. + + :param ticker: The ticker symbol to search. + :param params: Any additional query params. + :param raw: Return raw object instead of results object. + :return: Related Companies. + """ + url = f"/v1/related-companies/{ticker}" + + return self._get( + path=url, + params=self._get_params(self.get_related_companies, locals()), + deserializer=RelatedCompany.from_dict, + raw=raw, + result_key="results", + options=options, + ) + class SplitsClient(BaseClient): def list_splits( diff --git a/polygon/rest/vX.py b/polygon/rest/vX.py index a7c13a2f..23f0e94e 100644 --- a/polygon/rest/vX.py +++ b/polygon/rest/vX.py @@ -1,9 +1,17 @@ from .base import BaseClient -from typing import Optional, Any, Dict, Union, Iterator -from .models import StockFinancial, Timeframe, Sort, Order +from typing import Optional, Any, Dict, List, Union, Iterator +from .models import ( + StockFinancial, + IPOListing, + ShortInterest, + ShortVolume, + TreasuryYield, + Timeframe, + Sort, + Order, +) from urllib3 import HTTPResponse from datetime import datetime, date - from .models.request import RequestOptionBuilder @@ -70,3 +78,215 @@ def list_stock_financials( deserializer=StockFinancial.from_dict, options=options, ) + + def list_ipos( + self, + ticker: Optional[str] = None, + us_code: Optional[str] = None, + isin: Optional[str] = None, + listing_date: Optional[str] = None, + listing_date_lt: Optional[str] = None, + listing_date_lte: Optional[str] = None, + listing_date_gt: Optional[str] = None, + listing_date_gte: Optional[str] = None, + ipo_status: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + order: Optional[Union[str, Order]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[List[IPOListing], HTTPResponse]: + """ + Retrieve upcoming or historical IPOs. + + :param ticker: Filter by a case-sensitive ticker symbol. + :param us_code: Filter by a US code (unique identifier for a North American financial security). + :param isin: Filter by an International Securities Identification Number (ISIN). + :param listing_date: Filter by the listing date (YYYY-MM-DD). + :param ipo_status: Filter by IPO status (e.g. "new", "pending", "history", etc.). + :param limit: Limit the number of results per page. Default 10, max 1000. + :param sort: Field to sort by. Default is "listing_date". + :param order: Order results based on the sort field ("asc" or "desc"). Default "desc". + :param params: Additional query params. + :param raw: Return raw HTTPResponse object if True, else return List[IPOListing]. + :param options: RequestOptionBuilder for additional headers or params. + :return: A list of IPOListing objects or HTTPResponse if raw=True. + """ + url = "/vX/reference/ipos" + + return self._paginate( + path=url, + params=self._get_params(self.list_ipos, locals()), + deserializer=IPOListing.from_dict, + raw=raw, + result_key="results", + options=options, + ) + + def list_short_interest( + self, + ticker: Optional[str] = None, + days_to_cover: Optional[str] = None, + days_to_cover_lt: Optional[str] = None, + days_to_cover_lte: Optional[str] = None, + days_to_cover_gt: Optional[str] = None, + days_to_cover_gte: Optional[str] = None, + settlement_date: Optional[str] = None, + settlement_date_lt: Optional[str] = None, + settlement_date_lte: Optional[str] = None, + settlement_date_gt: Optional[str] = None, + settlement_date_gte: Optional[str] = None, + avg_daily_volume: Optional[str] = None, + avg_daily_volume_lt: Optional[str] = None, + avg_daily_volume_lte: Optional[str] = None, + avg_daily_volume_gt: Optional[str] = None, + avg_daily_volume_gte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + order: Optional[Union[str, Order]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[List[ShortInterest], HTTPResponse]: + """ + Retrieve short interest data for stocks. + + :param ticker: Filter by the primary ticker symbol. + :param days_to_cover: Filter by the days to cover value. + :param days_to_cover_lt: Filter for days to cover dates less than the provided date. + :param days_to_cover_lte: Filter for days to cover dates less than or equal to the provided date. + :param days_to_cover_gt: Filter for days to cover dates greater than the provided date. + :param days_to_cover_gte: Filter for days to cover dates greater than or equal to the provided date. + :param settlement_date: Filter by settlement date (YYYY-MM-DD). + :param settlement_date_lt: Filter for settlement dates less than the provided date. + :param settlement_date_lte: Filter for settlement dates less than or equal to the provided date. + :param settlement_date_gt: Filter for settlement dates greater than the provided date. + :param settlement_date_gte: Filter for settlement dates greater than or equal to the provided date. + :param avg_daily_volume: Filter by average daily volume. + :param avg_daily_volume_lt: Filter for average daily volume dates less than the provided date. + :param avg_daily_volume_lte: Filter for average daily volume dates less than or equal to the provided date. + :param avg_daily_volume_gt: Filter for average daily volume dates greater than the provided date. + :param avg_daily_volume_gte: Filter for average daily volume dates greater than or equal to the provided date. + :param limit: Limit the number of results returned. Default 10, max 50000. + :param sort: Field to sort by (e.g., "ticker"). + :param order: Order results based on the sort field ("asc" or "desc"). Default "desc". + :param params: Additional query parameters. + :param raw: Return raw HTTPResponse object if True, else return List[ShortInterest]. + :param options: RequestOptionBuilder for additional headers or params. + :return: A list of ShortInterest objects or HTTPResponse if raw=True. + """ + url = "/stocks/vX/short-interest" + + return self._paginate( + path=url, + params=self._get_params(self.list_short_interest, locals()), + deserializer=ShortInterest.from_dict, + raw=raw, + result_key="results", + options=options, + ) + + def list_short_volume( + self, + ticker: Optional[str] = None, + date: Optional[str] = None, + date_lt: Optional[str] = None, + date_lte: Optional[str] = None, + date_gt: Optional[str] = None, + date_gte: Optional[str] = None, + short_volume_ratio: Optional[str] = None, + short_volume_ratio_lt: Optional[str] = None, + short_volume_ratio_lte: Optional[str] = None, + short_volume_ratio_gt: Optional[str] = None, + short_volume_ratio_gte: Optional[str] = None, + total_volume: Optional[str] = None, + total_volume_lt: Optional[str] = None, + total_volume_lte: Optional[str] = None, + total_volume_gt: Optional[str] = None, + total_volume_gte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + order: Optional[Union[str, Order]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[List[ShortVolume], HTTPResponse]: + """ + Retrieve short volume data for stocks. + + :param ticker: Filter by the primary ticker symbol. + :param date: Filter by the date of trade activity (YYYY-MM-DD). + :param date_lt: Filter for dates less than the provided date. + :param date_lte: Filter for dates less than or equal to the provided date. + :param date_gt: Filter for dates greater than the provided date. + :param date_gte: Filter for dates greater than or equal to the provided date. + :param short_volume_ratio: Filter by short volume ratio. + :param short_volume_ratio_lt: Filter for short volume ratio less than the provided date. + :param short_volume_ratio_lte: Filter for short volume ratio less than or equal to the provided date. + :param short_volume_ratio_gt: Filter for short volume ratio greater than the provided date. + :param short_volume_ratio_gte: Filter for short volume ratio greater than or equal to the provided date. + :param total_volume: Filter by total volume. + :param total_volume_lt: Filter for total volume less than the provided date. + :param total_volume_lte: Filter for total volume less than or equal to the provided date. + :param total_volume_gt: Filter for total volume greater than the provided date. + :param total_volume_gte: Filter for total volume greater than or equal to the provided date. + :param limit: Limit the number of results returned. Default 10, max 50000. + :param sort: Field to sort by (e.g., "ticker"). + :param order: Order results based on the sort field ("asc" or "desc"). Default "desc". + :param params: Additional query parameters. + :param raw: Return raw HTTPResponse object if True, else return List[ShortVolume]. + :param options: RequestOptionBuilder for additional headers or params. + :return: A list of ShortVolume objects or HTTPResponse if raw=True. + """ + url = "/stocks/vX/short-volume" + + return self._paginate( + path=url, + params=self._get_params(self.list_short_volume, locals()), + deserializer=ShortVolume.from_dict, + raw=raw, + result_key="results", + options=options, + ) + + def list_treasury_yields( + self, + date: Optional[str] = None, + date_gt: Optional[str] = None, + date_gte: Optional[str] = None, + date_lt: Optional[str] = None, + date_lte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + order: Optional[Union[str, Order]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[List[TreasuryYield], HTTPResponse]: + """ + Retrieve treasury yield data. + + :param date: Calendar date of the yield observation (YYYY-MM-DD). + :param date_gt: Filter for dates greater than the provided date. + :param date_gte: Filter for dates greater than or equal to the provided date. + :param date_lt: Filter for dates less than the provided date. + :param date_lte: Filter for dates less than or equal to the provided date. + :param limit: Limit the number of results returned. Default 100, max 50000. + :param sort: Field to sort by (e.g., "date"). Default "date". + :param order: Order results based on the sort field ("asc" or "desc"). Default "desc". + :param params: Additional query parameters. + :param raw: Return raw HTTPResponse object if True, else return List[TreasuryYield]. + :param options: RequestOptionBuilder for additional headers or params. + :return: A list of TreasuryYield objects or HTTPResponse if raw=True. + """ + url = "/fed/vX/treasury-yields" + + return self._paginate( + path=url, + params=self._get_params(self.list_treasury_yields, locals()), + deserializer=TreasuryYield.from_dict, + raw=raw, + result_key="results", + options=options, + ) diff --git a/polygon/websocket/__init__.py b/polygon/websocket/__init__.py index b9f45a2e..77865d3f 100644 --- a/polygon/websocket/__init__.py +++ b/polygon/websocket/__init__.py @@ -127,9 +127,9 @@ async def connect( self.schedule_resub = False try: - cmsg: Union[ - List[WebSocketMessage], Union[str, bytes] - ] = await asyncio.wait_for(s.recv(), timeout=1) + cmsg: Union[List[WebSocketMessage], Union[str, bytes]] = ( + await asyncio.wait_for(s.recv(), timeout=1) + ) except asyncio.TimeoutError: continue diff --git a/polygon/websocket/models/common.py b/polygon/websocket/models/common.py index b39f9f87..38aea4c4 100644 --- a/polygon/websocket/models/common.py +++ b/polygon/websocket/models/common.py @@ -11,6 +11,7 @@ class Feed(Enum): Launchpad = "launchpad.polygon.io" Business = "business.polygon.io" EdgxBusiness = "edgx-business.polygon.io" + IEXBusiness = "iex-business.polygon.io" DelayedBusiness = "delayed-business.polygon.io" DelayedEdgxBusiness = "delayed-edgx-business.polygon.io" DelayedNasdaqLastSaleBusiness = "delayed-nasdaq-last-sale-business.polygon.io" diff --git a/pyproject.toml b/pyproject.toml index b69d67ba..6dc126b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,22 +25,22 @@ packages = [ [tool.poetry.dependencies] python = "^3.8" -urllib3 = "^1.26.9,<2.0" -websockets = ">=10.3,<13.0" -certifi = ">=2022.5.18,<2025.0.0" +urllib3 = ">=1.26.9,<3.0.0" +websockets = ">=10.3,<15.0" +certifi = ">=2022.5.18,<2026.0.0" [tool.poetry.dev-dependencies] -black = "^23.12.1" -mypy = "^1.9" +black = "^24.8.0" +mypy = "^1.13" types-urllib3 = "^1.26.25" Sphinx = "^7.1.2" -sphinx-rtd-theme = "^2.0.0" +sphinx-rtd-theme = "^3.0.2" # keep this in sync with docs/requirements.txt for readthedocs.org -sphinx-autodoc-typehints = "^2.0.0" +sphinx-autodoc-typehints = "^2.0.1" types-certifi = "^2021.10.8" -types-setuptools = "^69.2.0" -pook = "^1.4.3" -orjson = "^3.9.15" +types-setuptools = "^75.8.0" +pook = "^2.0.1" +orjson = "^3.10.15" [build-system] requires = ["poetry-core>=1.0.0"] diff --git a/test_rest/mocks/vX/reference/financials.json b/test_rest/mocks/vX/reference/financials.json index c5e18621..ae84513b 100644 --- a/test_rest/mocks/vX/reference/financials.json +++ b/test_rest/mocks/vX/reference/financials.json @@ -45,12 +45,6 @@ "unit": "USD", "order": 400 }, - "other_than_fixed_noncurrent_assets": { - "label": "Other Than Fixed Noncurrent Assets", - "value": 1.6046e+10, - "unit": "USD", - "order": 500 - }, "noncurrent_liabilities": { "label": "Noncurrent Liabilities", "value": 1.1716e+10, diff --git a/test_rest/test_financials.py b/test_rest/test_financials.py deleted file mode 100644 index f5196212..00000000 --- a/test_rest/test_financials.py +++ /dev/null @@ -1,234 +0,0 @@ -from polygon.rest.models import ( - StockFinancial, - Financials, - DataPoint, - CashFlowStatement, - ExchangeGainsLosses, - NetCashFlow, - NetCashFlowFromFinancingActivities, - ComprehensiveIncome, - ComprehensiveIncomeLoss, - ComprehensiveIncomeLossAttributableToParent, - OtherComprehensiveIncomeLoss, - IncomeStatement, - BasicEarningsPerShare, - CostOfRevenue, - GrossProfit, - OperatingExpenses, - Revenues, -) -from base import BaseTest - - -class FinancialsTest(BaseTest): - def test_list_stock_financials(self): - financials = [f for f in self.c.vx.list_stock_financials()] - expected = [ - StockFinancial( - cik="0001413447", - company_name="NXP Semiconductors N.V.", - end_date="2022-04-03", - filing_date="2022-05-03", - financials=Financials( - balance_sheet={ - "equity_attributable_to_noncontrolling_interest": DataPoint( - formula=None, - label="Equity Attributable To Noncontrolling Interest", - order=1500, - unit="USD", - value=251000000.0, - xpath=None, - ), - "liabilities": DataPoint( - formula=None, - label="Liabilities", - order=600, - unit="USD", - value=14561000000.0, - xpath=None, - ), - "equity_attributable_to_parent": DataPoint( - formula=None, - label="Equity Attributable To Parent", - order=1600, - unit="USD", - value=6509000000.0, - xpath=None, - ), - "noncurrent_assets": DataPoint( - formula=None, - label="Noncurrent Assets", - order=300, - unit="USD", - value=16046000000.0, - xpath=None, - ), - "liabilities_and_equity": DataPoint( - formula=None, - label="Liabilities And Equity", - order=1900, - unit="USD", - value=21321000000.0, - xpath=None, - ), - "assets": DataPoint( - formula=None, - label="Assets", - order=100, - unit="USD", - value=21321000000.0, - xpath=None, - ), - "fixed_assets": DataPoint( - formula=None, - label="Fixed Assets", - order=400, - unit="USD", - value=2814000000.0, - xpath=None, - ), - "other_than_fixed_noncurrent_assets": DataPoint( - formula=None, - label="Other Than Fixed Noncurrent Assets", - order=500, - unit="USD", - value=16046000000.0, - xpath=None, - ), - "noncurrent_liabilities": DataPoint( - formula=None, - label="Noncurrent Liabilities", - order=800, - unit="USD", - value=11716000000.0, - xpath=None, - ), - "current_assets": DataPoint( - formula=None, - label="Current Assets", - order=200, - unit="USD", - value=5275000000.0, - xpath=None, - ), - "equity": DataPoint( - formula=None, - label="Equity", - order=1400, - unit="USD", - value=6760000000.0, - xpath=None, - ), - "current_liabilities": DataPoint( - formula=None, - label="Current Liabilities", - order=700, - unit="USD", - value=2845000000.0, - xpath=None, - ), - }, - cash_flow_statement=CashFlowStatement( - exchange_gains_losses=ExchangeGainsLosses( - formula=None, - label="Exchange Gains/Losses", - order=1000, - unit="USD", - value=0, - xpath=None, - ), - net_cash_flow=NetCashFlow( - formula=None, - label="Net Cash Flow", - order=1100, - unit="USD", - value=-147000000.0, - xpath=None, - ), - net_cash_flow_from_financing_activities=NetCashFlowFromFinancingActivities( - formula=None, - label="Net Cash Flow From Financing Activities", - order=700, - unit="USD", - value=-674000000.0, - xpath=None, - ), - ), - comprehensive_income=ComprehensiveIncome( - comprehensive_income_loss=ComprehensiveIncomeLoss( - formula=None, - label="Comprehensive Income/Loss", - order=100, - unit="USD", - value=644000000.0, - xpath=None, - ), - comprehensive_income_loss_attributable_to_parent=ComprehensiveIncomeLossAttributableToParent( - formula=None, - label="Comprehensive Income/Loss Attributable To Parent", - order=300, - unit="USD", - value=635000000.0, - xpath=None, - ), - other_comprehensive_income_loss=OtherComprehensiveIncomeLoss( - formula=None, - label="Other Comprehensive Income/Loss", - order=400, - unit="USD", - value=-22000000.0, - xpath=None, - ), - ), - income_statement=IncomeStatement( - basic_earnings_per_share=BasicEarningsPerShare( - formula=None, - label="Basic Earnings Per Share", - order=4200, - unit="USD / shares", - value=2.5, - xpath=None, - ), - cost_of_revenue=CostOfRevenue( - formula=None, - label="Cost Of Revenue", - order=300, - unit="USD", - value=1359000000.0, - xpath=None, - ), - gross_profit=GrossProfit( - formula=None, - label="Gross Profit", - order=800, - unit="USD", - value=1777000000.0, - xpath=None, - ), - operating_expenses=OperatingExpenses( - formula=None, - label="Operating Expenses", - order=1000, - unit="USD", - value=904000000.0, - xpath=None, - ), - revenues=Revenues( - formula=None, - label="Revenues", - order=100, - unit="USD", - value=3136000000.0, - xpath=None, - ), - ), - ), - fiscal_period="Q1", - fiscal_year="2022", - source_filing_file_url="https://api.polygon.io/v1/reference/sec/filings/0001413447-22-000014/files/nxpi-20220403_htm.xml", - source_filing_url="https://api.polygon.io/v1/reference/sec/filings/0001413447-22-000014", - start_date="2022-01-01", - ) - ] - - self.assertEqual(financials, expected)