diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b89ada2f..d7105d15 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @clickingbuttons @Darcy-Linde +* @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/.github/workflows/lint.yml b/.github/workflows/lint.yml index 76bc9a45..f524111b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,7 +23,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Setup Poetry - uses: abatilo/actions-poetry@v2.0.0 + uses: abatilo/actions-poetry@v2 - name: Install pypi deps run: poetry install - name: Style lint diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 83f8b848..2c573262 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,22 +6,53 @@ on: permissions: contents: read jobs: - test: + release: runs-on: ubuntu-latest name: Release to PyPi steps: - uses: actions/checkout@v3 + - name: Fetch all branches + run: git fetch --prune --unshallow + - name: Check if commit is on allowed branch + run: | + if git branch -r --contains ${{ github.sha }} | grep -Eq 'origin/master|origin/polygon-lts'; then + echo "Allowed branch" + else + echo "Commit not on master or polygon-lts; skipping" + exit 1 + fi - name: Setup Python uses: actions/setup-python@v3 with: python-version: "3.10" - name: Setup Poetry - uses: abatilo/actions-poetry@v2.0.0 - with: - poetry-version: "1.1.13" + uses: abatilo/actions-poetry@v2 + - name: Get package name + id: package + run: | + echo "name=$(python - <<'PY' + import sys + with open('pyproject.toml', 'r', encoding='utf-8') as f: + for line in f: + s = line.strip() + if s.startswith('name'): + # supports: name="foo" or name = "foo" and ignores inline comments + val = s.split('=', 1)[1].split('#', 1)[0].strip().strip('"').strip("'") + print(val) + break + PY + )" >> "$GITHUB_OUTPUT" - name: Configure Poetry - run: poetry config pypi-token.pypi ${{ secrets.POETRY_HTTP_BASIC_PYPI_PASSWORD }} - - name: Install pypi deps + run: | + if [ "${{ steps.package.outputs.name }}" = "polygon-api-client" ]; then + poetry config pypi-token.pypi ${{ secrets.POETRY_HTTP_BASIC_PYPI_PASSWORD }} + elif [ "${{ steps.package.outputs.name }}" = "massive" ]; then + poetry config pypi-token.pypi ${{ secrets.POETRY_HTTP_BASIC_PYPI_PASSWORD_MASSIVE }} + else + echo "Unknown package name: ${{ steps.package.outputs.name }}; skipping publish" + exit 1 + fi + - name: Install deps run: poetry install - name: Get tag id: tag diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index baecc7a2..602340ce 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest] - python-version: ['3.8', '3.9', '3.10'] + python-version: ['3.9', '3.10', '3.11'] runs-on: ${{ matrix.os }} name: ${{ matrix.os }} Unit test ${{ matrix.python-version }} steps: @@ -27,7 +27,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Setup Poetry - uses: abatilo/actions-poetry@v2.0.0 + uses: abatilo/actions-poetry@v2 - name: Install pypi deps run: poetry install - name: Unit tests diff --git a/.polygon/rest.json b/.massive/rest.json similarity index 54% rename from .polygon/rest.json rename to .massive/rest.json index 952f2e95..3d088556 100644 --- a/.polygon/rest.json +++ b/.massive/rest.json @@ -12,7 +12,7 @@ }, "AggregateDate": { "description": "The beginning date for the aggregate window.", - "example": "2020-10-14", + "example": "2023-01-09", "in": "path", "name": "date", "required": true, @@ -21,7 +21,7 @@ } }, "AggregateLimitMax50000": { - "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on \n\u003ca href=\"https://polygon.io/blog/aggs-api-updates/\" target=\"_blank\" alt=\"Aggregate Data API Improvements\"\u003eAggregate Data API Improvements\u003c/a\u003e.\n", + "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on\nAggregate Data API Improvements.\n", "example": 120, "in": "query", "name": "limit", @@ -53,7 +53,7 @@ }, "AggregateTimeFrom": { "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", - "example": "2021-07-22", + "example": "2023-01-09", "in": "path", "name": "from", "required": true, @@ -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": "2021-07-22", + "example": "2023-02-10", "in": "path", "name": "to", "required": true, @@ -79,6 +79,7 @@ "required": true, "schema": { "enum": [ + "second", "minute", "hour", "day", @@ -100,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", @@ -110,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", @@ -128,6 +151,36 @@ "type": "boolean" } }, + "IndicesAggregateTimeFrom": { + "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "example": "2023-03-13", + "in": "path", + "name": "from", + "required": true, + "schema": { + "type": "string" + } + }, + "IndicesAggregateTimeTo": { + "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "example": "2023-03-24", + "in": "path", + "name": "to", + "required": true, + "schema": { + "type": "string" + } + }, + "IndicesTickerPathParam": { + "description": "The ticker symbol of Index.", + "example": "I:NDX", + "in": "path", + "name": "indicesTicker", + "required": true, + "schema": { + "type": "string" + } + }, "LimitMax10000": { "description": "Limit the size of the response, max 10000.", "example": 100, @@ -157,7 +210,7 @@ }, "OptionsTickerPathParam": { "description": "The ticker symbol of the options contract.", - "example": "O:TSLA210903C00700000", + "example": "O:SPY251219C00650000", "in": "path", "name": "optionsTicker", "required": true, @@ -189,7 +242,7 @@ } }, "StocksTickerPathParam": { - "description": "The ticker symbol of the stock/equity.", + "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.", "example": "AAPL", "in": "path", "name": "stocksTicker", @@ -199,7 +252,7 @@ } }, "TickersQueryParam": { - "description": "A comma separated list of tickers to get snapshots for.", + "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.", "in": "query", "name": "tickers", "schema": { @@ -232,7 +285,7 @@ "AskExchangeId": { "allOf": [ { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", "type": "integer" }, { @@ -252,7 +305,7 @@ "BidExchangeId": { "allOf": [ { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", "type": "integer" }, { @@ -274,6 +327,11 @@ "format": "double", "type": "number" }, + "CloseIndices": { + "description": "The close value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, "Company": { "properties": { "active": { @@ -313,7 +371,7 @@ "type": "string" }, "figi": { - "description": "The OpenFigi project guid for the symbol. (\u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://openfigi.com/\"\u003ehttps://openfigi.com/\u003c/a\u003e)", + "description": "The OpenFigi project guid for the symbol. (https://openfigi.com/)", "type": "string" }, "hq_address": { @@ -333,7 +391,7 @@ "type": "string" }, "lei": { - "description": "The Legal Entity Identifier (LEI) guid for the symbol. (\u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Legal_Entity_Identifier\"\u003ehttps://en.wikipedia.org/wiki/Legal_Entity_Identifier\u003c/a\u003e)", + "description": "The Legal Entity Identifier (LEI) guid for the symbol. (https://en.wikipedia.org/wiki/Legal_Entity_Identifier)", "type": "string" }, "listdate": { @@ -362,7 +420,7 @@ "type": "string" }, "sic": { - "description": "Standard Industrial Classification (SIC) id for the symbol. (\u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Standard_Industrial_Classification\"\u003ehttps://en.wikipedia.org/wiki/Legal_Entity_Identifier\u003c/a\u003e)", + "description": "Standard Industrial Classification (SIC) id for the symbol. (https://en.wikipedia.org/wiki/Legal_Entity_Identifier)", "type": "integer" }, "similar": { @@ -385,7 +443,7 @@ "type": "array" }, "type": { - "description": "The type or class of the security. (\u003ca alt=\"Full List of Ticker Types\" href=\"https://polygon.io/docs/stocks/get_v3_reference_tickers_types\"\u003eFull List of Ticker Types\u003c/a\u003e)", + "description": "The type or class of the security. (Full List of Ticker Types)", "type": "string" }, "updated": { @@ -403,7 +461,7 @@ "ConditionTypeMap": { "properties": { "condition": { - "description": "Polygon.io's mapping for condition codes. For more information, see our \u003ca href=\"https://polygon.io/glossary/us/stocks/trade-conditions\" alt=\"Trade Conditions Glossary\" target=\"_blank\"\u003eTrade Conditions Glossary\u003c/a\u003e.\n", + "description": "Massive.com's mapping for condition codes. For more information, see our Trade Conditions Glossary.\n", "type": "string" } }, @@ -412,7 +470,7 @@ "Conditions": { "description": "A list of condition codes.\n", "items": { - "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", "type": "integer" }, "type": "array" @@ -425,7 +483,7 @@ "items": { "properties": { "id": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", "type": "integer" }, "market": { @@ -445,6 +503,13 @@ "type": "string" } }, + "required": [ + "id", + "type", + "market", + "name", + "url" + ], "type": "object" }, "type": "array" @@ -497,6 +562,15 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t", + "T" + ], "type": "object" }, "type": "array" @@ -529,7 +603,7 @@ "c": { "description": "A list of condition codes.\n", "items": { - "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", "type": "integer" }, "type": "array" @@ -553,15 +627,30 @@ "type": "integer" }, "x": { - "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n", + "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n", "type": "integer" } }, + "required": [ + "p", + "s", + "x", + "c", + "t", + "i" + ], "type": "object" }, "type": "array" } }, + "required": [ + "day", + "map", + "msLatency", + "symbol", + "ticks" + ], "type": "object" }, "CryptoLastTrade": { @@ -571,13 +660,13 @@ "conditions": { "description": "A list of condition codes.\n", "items": { - "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", "type": "integer" }, "type": "array" }, "exchange": { - "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n", + "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n", "type": "integer" }, "price": { @@ -595,6 +684,13 @@ "type": "integer" } }, + "required": [ + "conditions", + "exchange", + "price", + "size", + "timestamp" + ], "type": "object" }, "symbol": { @@ -602,6 +698,9 @@ "type": "string" } }, + "required": [ + "symbol" + ], "type": "object" }, "CryptoOpenClose": { @@ -617,7 +716,7 @@ "c": { "description": "A list of condition codes.\n", "items": { - "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", "type": "integer" }, "type": "array" @@ -641,10 +740,18 @@ "type": "integer" }, "x": { - "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n", + "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n", "type": "integer" } }, + "required": [ + "p", + "s", + "x", + "c", + "t", + "i" + ], "type": "object" }, "type": "array" @@ -669,7 +776,7 @@ "c": { "description": "A list of condition codes.\n", "items": { - "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", "type": "integer" }, "type": "array" @@ -693,10 +800,18 @@ "type": "integer" }, "x": { - "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n", + "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n", "type": "integer" } }, + "required": [ + "p", + "s", + "x", + "c", + "t", + "i" + ], "type": "object" }, "type": "array" @@ -706,6 +821,15 @@ "type": "string" } }, + "required": [ + "symbol", + "isUTC", + "day", + "open", + "close", + "openTrades", + "closingTrades" + ], "type": "object" }, "CryptoSnapshotMinute": { @@ -725,11 +849,19 @@ "format": "double", "type": "number" }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, "o": { "description": "The open price for the symbol in the given time period.", "format": "double", "type": "number" }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, "v": { "description": "The trading volume of the symbol in the given time period.", "format": "double", @@ -741,6 +873,16 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw", + "t", + "n" + ], "type": "object" }, "CryptoSnapshotTicker": { @@ -781,8 +923,21 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, + "fmv": { + "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.", + "format": "double", + "type": "number" + }, "lastTrade": { "allOf": [ { @@ -793,7 +948,7 @@ "c": { "description": "The trade conditions.", "items": { - "type": "string" + "type": "integer" }, "type": "array" }, @@ -808,26 +963,26 @@ }, "s": { "description": "The size (volume) of the trade.", - "type": "integer" + "type": "number" }, "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", + "description": "The millisecond accuracy timestamp. This is the timestamp of when the trade was generated at the exchange.", "type": "integer" }, "x": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", + "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n", "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "t", + "x" + ], "type": "object" - }, - { - "properties": { - "x": { - "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n", - "type": "integer" - } - } } ] }, @@ -849,11 +1004,19 @@ "format": "double", "type": "number" }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, "o": { "description": "The open price for the symbol in the given time period.", "format": "double", "type": "number" }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, "v": { "description": "The trading volume of the symbol in the given time period.", "format": "double", @@ -865,6 +1028,16 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw", + "t", + "n" + ], "type": "object" }, "prevDay": { @@ -901,6 +1074,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "ticker": { @@ -908,7 +1089,7 @@ "type": "string" }, "todaysChange": { - "description": "The value of the change the from previous day.", + "description": "The value of the change from the previous day.", "format": "double", "type": "number" }, @@ -922,6 +1103,16 @@ "type": "integer" } }, + "required": [ + "day", + "lastTrade", + "min", + "prevDay", + "ticker", + "todaysChange", + "todaysChangePerc", + "updated" + ], "type": "object" } }, @@ -945,10 +1136,14 @@ "type": "number" }, "x": { - "description": "A map of the exchange ID to number of shares at this price level.\n\u003cbr /\u003e\n\u003cbr /\u003e\n**Example:**\n\u003cbr /\u003e\n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n\u003cbr /\u003e\n\u003cbr /\u003e\nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n", + "description": "A map of the exchange ID to number of shares at this price level.\n
\n
\n**Example:**\n
\n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n
\n
\nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n", "type": "object" } }, + "required": [ + "p", + "x" + ], "type": "object" }, "type": "array" @@ -967,16 +1162,20 @@ "type": "number" }, "x": { - "description": "A map of the exchange ID to number of shares at this price level.\n\u003cbr /\u003e\n\u003cbr /\u003e\n**Example:**\n\u003cbr /\u003e\n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n\u003cbr /\u003e\n\u003cbr /\u003e\nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n", + "description": "A map of the exchange ID to number of shares at this price level.\n
\n
\n**Example:**\n
\n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n
\n
\nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n", "type": "object" } }, + "required": [ + "p", + "x" + ], "type": "object" }, "type": "array" }, "spread": { - "description": "The difference between the best bid and the best ask price accross exchanges.", + "description": "The difference between the best bid and the best ask price across exchanges.", "format": "double", "type": "number" }, @@ -989,6 +1188,15 @@ "type": "integer" } }, + "required": [ + "ticker", + "bids", + "asks", + "bidCount", + "askCount", + "spread", + "updated" + ], "type": "object" } }, @@ -1033,8 +1241,21 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, + "fmv": { + "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.", + "format": "double", + "type": "number" + }, "lastTrade": { "allOf": [ { @@ -1045,7 +1266,7 @@ "c": { "description": "The trade conditions.", "items": { - "type": "string" + "type": "integer" }, "type": "array" }, @@ -1060,26 +1281,26 @@ }, "s": { "description": "The size (volume) of the trade.", - "type": "integer" + "type": "number" }, "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", + "description": "The millisecond accuracy timestamp. This is the timestamp of when the trade was generated at the exchange.", "type": "integer" }, "x": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", + "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n", "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "t", + "x" + ], "type": "object" - }, - { - "properties": { - "x": { - "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n", - "type": "integer" - } - } } ] }, @@ -1101,11 +1322,19 @@ "format": "double", "type": "number" }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, "o": { "description": "The open price for the symbol in the given time period.", "format": "double", "type": "number" }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, "v": { "description": "The trading volume of the symbol in the given time period.", "format": "double", @@ -1117,6 +1346,16 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw", + "t", + "n" + ], "type": "object" }, "prevDay": { @@ -1153,6 +1392,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "ticker": { @@ -1160,7 +1407,7 @@ "type": "string" }, "todaysChange": { - "description": "The value of the change the from previous day.", + "description": "The value of the change from the previous day.", "format": "double", "type": "number" }, @@ -1174,6 +1421,16 @@ "type": "integer" } }, + "required": [ + "day", + "lastTrade", + "min", + "prevDay", + "ticker", + "todaysChange", + "todaysChangePerc", + "updated" + ], "type": "object" }, "type": "array" @@ -1186,7 +1443,7 @@ "c": { "description": "A list of condition codes.\n", "items": { - "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", "type": "integer" }, "type": "array" @@ -1210,14 +1467,22 @@ "type": "integer" }, "x": { - "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n", + "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n", "type": "integer" } }, + "required": [ + "p", + "s", + "x", + "c", + "t", + "i" + ], "type": "object" }, "CryptoTradeExchange": { - "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n", + "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n", "type": "integer" }, "Date": { @@ -1236,7 +1501,7 @@ "items": { "properties": { "code": { - "description": "A unique identifier for the exchange internal to Polygon.io. This is not an industry code or ISO standard.", + "description": "A unique identifier for the exchange internal to Massive.com. This is not an industry code or ISO standard.", "type": "string" }, "id": { @@ -1248,7 +1513,7 @@ "type": "string" }, "mic": { - "description": "The Market Identification Code or MIC as defined in ISO 10383 (\u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Market_Identifier_Code\"\u003ehttps://en.wikipedia.org/wiki/Market_Identifier_Code\u003c/a\u003e).", + "description": "The Market Identification Code or MIC as defined in ISO 10383 (https://en.wikipedia.org/wiki/Market_Identifier_Code).", "type": "string" }, "name": { @@ -1269,7 +1534,7 @@ "type": "array" }, "ExchangeId": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", "type": "integer" }, "Financial": { @@ -1754,6 +2019,11 @@ ], "type": "object" }, + "Fmv": { + "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.", + "format": "double", + "type": "number" + }, "ForexConversion": { "properties": { "converted": { @@ -1783,7 +2053,7 @@ "type": "number" }, "exchange": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/forex/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", "type": "integer" }, "timestamp": { @@ -1791,6 +2061,12 @@ "type": "integer" } }, + "required": [ + "ask", + "bid", + "exchange", + "timestamp" + ], "type": "object" }, "to": { @@ -1798,10 +2074,16 @@ "type": "string" } }, + "required": [ + "from", + "to", + "initialAmount", + "converted" + ], "type": "object" }, "ForexExchangeId": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/forex/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", "type": "integer" }, "ForexGroupedResults": { @@ -1852,6 +2134,15 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t", + "T" + ], "type": "object" }, "type": "array" @@ -1896,15 +2187,28 @@ "type": "integer" }, "x": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/forex/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", "type": "integer" } }, + "required": [ + "a", + "b", + "x", + "t" + ], "type": "object" }, "type": "array" } }, + "required": [ + "day", + "map", + "msLatency", + "pair", + "ticks" + ], "type": "object" }, "ForexPairLastQuote": { @@ -1922,7 +2226,7 @@ "type": "number" }, "exchange": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/forex/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", "type": "integer" }, "timestamp": { @@ -1930,6 +2234,12 @@ "type": "integer" } }, + "required": [ + "ask", + "bid", + "exchange", + "timestamp" + ], "type": "object" }, "symbol": { @@ -1937,6 +2247,9 @@ "type": "string" } }, + "required": [ + "symbol" + ], "type": "object" }, "ForexPreviousClose": { @@ -1987,6 +2300,15 @@ "type": "number" } }, + "required": [ + "T", + "v", + "o", + "c", + "h", + "l", + "t" + ], "type": "object" }, "type": "array" @@ -2007,7 +2329,7 @@ "type": "number" }, "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", + "description": "The millisecond accuracy timestamp of the quote.", "type": "integer" }, "x": { @@ -2015,6 +2337,12 @@ "type": "integer" } }, + "required": [ + "a", + "b", + "t", + "x" + ], "type": "object" }, "ForexSnapshotPrevDay": { @@ -2050,6 +2378,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "ForexSnapshotTicker": { @@ -2085,8 +2421,20 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v" + ], "type": "object" }, + "fmv": { + "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.", + "format": "double", + "type": "number" + }, "lastQuote": { "description": "The most recent quote for this ticker.", "properties": { @@ -2101,7 +2449,7 @@ "type": "number" }, "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", + "description": "The millisecond accuracy timestamp of the quote.", "type": "integer" }, "x": { @@ -2109,6 +2457,12 @@ "type": "integer" } }, + "required": [ + "a", + "b", + "t", + "x" + ], "type": "object" }, "min": { @@ -2129,11 +2483,19 @@ "format": "double", "type": "number" }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, "o": { "description": "The open price for the symbol in the given time period.", "format": "double", "type": "number" }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, "v": { "description": "The trading volume of the symbol in the given time period.", "format": "double", @@ -2176,6 +2538,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "ticker": { @@ -2183,7 +2553,7 @@ "type": "string" }, "todaysChange": { - "description": "The value of the change the from previous day.", + "description": "The value of the change from the previous day.", "format": "double", "type": "number" }, @@ -2197,6 +2567,16 @@ "type": "integer" } }, + "required": [ + "day", + "lastQuote", + "min", + "prevDay", + "ticker", + "todaysChange", + "todaysChangePerc", + "updated" + ], "type": "object" } }, @@ -2236,8 +2616,20 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v" + ], "type": "object" }, + "fmv": { + "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.", + "format": "double", + "type": "number" + }, "lastQuote": { "description": "The most recent quote for this ticker.", "properties": { @@ -2252,7 +2644,7 @@ "type": "number" }, "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", + "description": "The millisecond accuracy timestamp of the quote.", "type": "integer" }, "x": { @@ -2260,6 +2652,12 @@ "type": "integer" } }, + "required": [ + "a", + "b", + "t", + "x" + ], "type": "object" }, "min": { @@ -2280,11 +2678,19 @@ "format": "double", "type": "number" }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, "o": { "description": "The open price for the symbol in the given time period.", "format": "double", "type": "number" }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, "v": { "description": "The trading volume of the symbol in the given time period.", "format": "double", @@ -2327,6 +2733,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "ticker": { @@ -2334,7 +2748,7 @@ "type": "string" }, "todaysChange": { - "description": "The value of the change the from previous day.", + "description": "The value of the change from the previous day.", "format": "double", "type": "number" }, @@ -2348,6 +2762,16 @@ "type": "integer" } }, + "required": [ + "day", + "lastQuote", + "min", + "prevDay", + "ticker", + "todaysChange", + "todaysChangePerc", + "updated" + ], "type": "object" }, "type": "array" @@ -2399,6 +2823,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t" + ], "type": "object" }, "type": "array" @@ -2411,38 +2843,223 @@ "format": "double", "type": "number" }, + "HighIndices": { + "description": "The highest value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "IndexAggsBase": { + "properties": { + "queryCount": { + "description": "The number of aggregates (minute or day) used to generate the response.", + "type": "integer" + }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "resultsCount": { + "description": "The total number of results for this request.", + "type": "integer" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status", + "queryCount", + "resultsCount", + "request_id" + ], + "type": "object" + }, "Indicators": { - "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n", + "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://massive.com/glossary/us/stocks/conditions-indicators).\n", "items": { "description": "The indicator code.\n", "type": "integer" }, "type": "array" }, - "Locales": { + "IndicesGroupedResults": { "properties": { "results": { "items": { "properties": { - "locale": { - "description": "An abbreviated country name.", - "type": "string" + "c": { + "description": "The close value for the symbol in the given time period.", + "format": "double", + "type": "number" }, - "name": { - "description": "The name of the country.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "Low": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", + "h": { + "description": "The highest value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "o": { + "description": "The open value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "t" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "IndicesOpenClose": { + "properties": { + "afterHours": { + "description": "The close value of the ticker symbol in after hours trading.", + "format": "double", + "type": "number" + }, + "close": { + "description": "The close value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "from": { + "description": "The requested date.", + "format": "date", + "type": "string" + }, + "high": { + "description": "The highest value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "low": { + "description": "The lowest value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "open": { + "description": "The open value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "preMarket": { + "description": "The open value of the ticker symbol in pre-market trading.", + "type": "integer" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + }, + "symbol": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + } + }, + "required": [ + "status", + "from", + "symbol", + "open", + "high", + "low", + "close" + ], + "type": "object" + }, + "IndicesTickerResults": { + "properties": { + "results": { + "items": { + "properties": { + "c": { + "description": "The close value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "t" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "Locales": { + "properties": { + "results": { + "items": { + "properties": { + "locale": { + "description": "An abbreviated country name.", + "type": "string" + }, + "name": { + "description": "The name of the country.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "Low": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "LowIndices": { + "description": "The lowest value for the symbol in the given time period.", + "format": "double", "type": "number" }, "Map": { @@ -2646,6 +3263,11 @@ "format": "double", "type": "number" }, + "OpenIndices": { + "description": "The open value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, "PaginationHooksBase": { "properties": { "next_url": { @@ -2716,6 +3338,9 @@ "type": "string" } }, + "required": [ + "request_id" + ], "type": "object" }, "SequenceNumber": { @@ -2728,35 +3353,40 @@ "format": "double", "type": "number" }, - "SnapshotLastTrade": { + "SnapshotMinOHLCV": { "properties": { "c": { - "description": "The trade conditions.", - "items": { - "type": "string" - }, - "type": "array" + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" }, - "i": { - "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n", - "type": "string" + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" }, - "p": { - "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n", + "l": { + "description": "The lowest price for the symbol in the given time period.", "format": "double", "type": "number" }, - "s": { - "description": "The size (volume) of the trade.", + "n": { + "description": "The number of transactions in the aggregate window.", "type": "integer" }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, "t": { "description": "The Unix Msec timestamp for the start of the aggregate window.", "type": "integer" }, - "x": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", - "type": "integer" + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" } }, "type": "object" @@ -2789,6 +3419,13 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v" + ], "type": "object" }, "SnapshotOHLCVVW": { @@ -2824,6 +3461,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "SnapshotOHLCVVWOtc": { @@ -2863,6 +3508,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "StandardBase": { @@ -2874,6 +3527,9 @@ "type": "string" } }, + "required": [ + "request_id" + ], "type": "object" }, { @@ -2887,6 +3543,9 @@ "type": "string" } }, + "required": [ + "status" + ], "type": "object" } ] @@ -2902,6 +3561,9 @@ "type": "string" } }, + "required": [ + "status" + ], "type": "object" }, "StatusCountBase": { @@ -2915,6 +3577,9 @@ "type": "string" } }, + "required": [ + "status" + ], "type": "object" }, "StockSymbol": { @@ -2959,7 +3624,7 @@ "type": "boolean" }, "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", + "description": "The Unix Msec timestamp for the end of the aggregate window.", "type": "integer" }, "v": { @@ -2973,6 +3638,15 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "t", + "v", + "T" + ], "type": "object" }, "type": "array" @@ -3034,6 +3708,16 @@ "type": "number" } }, + "required": [ + "status", + "from", + "symbol", + "open", + "high", + "low", + "close", + "volume" + ], "type": "object" }, "StocksSnapshotLastQuote": { @@ -3057,10 +3741,17 @@ "type": "integer" }, "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", + "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.", "type": "integer" } }, + "required": [ + "p", + "s", + "P", + "S", + "t" + ], "type": "object" }, "StocksSnapshotMinute": { @@ -3084,11 +3775,19 @@ "format": "double", "type": "number" }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, "o": { "description": "The open price for the symbol in the given time period.", "format": "double", "type": "number" }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, "v": { "description": "The trading volume of the symbol in the given time period.", "format": "double", @@ -3100,6 +3799,17 @@ "type": "number" } }, + "required": [ + "av", + "o", + "h", + "l", + "c", + "v", + "vw", + "t", + "n" + ], "type": "object" }, "StocksSnapshotMinuteOTC": { @@ -3123,6 +3833,10 @@ "format": "double", "type": "number" }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, "o": { "description": "The open price for the symbol in the given time period.", "format": "double", @@ -3132,6 +3846,10 @@ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", "type": "boolean" }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, "v": { "description": "The trading volume of the symbol in the given time period.", "format": "double", @@ -3143,6 +3861,17 @@ "type": "number" } }, + "required": [ + "av", + "o", + "h", + "l", + "c", + "v", + "vw", + "t", + "n" + ], "type": "object" }, "StocksSnapshotTicker": { @@ -3187,8 +3916,21 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, + "fmv": { + "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.", + "format": "double", + "type": "number" + }, "lastQuote": { "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.", "properties": { @@ -3211,10 +3953,17 @@ "type": "integer" }, "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", + "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.", "type": "integer" } }, + "required": [ + "p", + "s", + "P", + "S", + "t" + ], "type": "object" }, "lastTrade": { @@ -3223,7 +3972,7 @@ "c": { "description": "The trade conditions.", "items": { - "type": "string" + "type": "integer" }, "type": "array" }, @@ -3241,14 +3990,22 @@ "type": "integer" }, "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", + "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.", "type": "integer" }, "x": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "t", + "x" + ], "type": "object" }, "min": { @@ -3273,6 +4030,10 @@ "format": "double", "type": "number" }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, "o": { "description": "The open price for the symbol in the given time period.", "format": "double", @@ -3282,6 +4043,10 @@ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", "type": "boolean" }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, "v": { "description": "The trading volume of the symbol in the given time period.", "format": "double", @@ -3293,6 +4058,17 @@ "type": "number" } }, + "required": [ + "av", + "o", + "h", + "l", + "c", + "v", + "vw", + "t", + "n" + ], "type": "object" }, "prevDay": { @@ -3333,6 +4109,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, "ticker": { @@ -3340,7 +4124,7 @@ "type": "string" }, "todaysChange": { - "description": "The value of the change the from previous day.", + "description": "The value of the change from the previous day.", "format": "double", "type": "number" }, @@ -3402,8 +4186,21 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], "type": "object" }, + "fmv": { + "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.", + "format": "double", + "type": "number" + }, "lastQuote": { "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.", "properties": { @@ -3426,10 +4223,17 @@ "type": "integer" }, "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", + "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.", "type": "integer" } }, + "required": [ + "p", + "s", + "P", + "S", + "t" + ], "type": "object" }, "lastTrade": { @@ -3438,7 +4242,7 @@ "c": { "description": "The trade conditions.", "items": { - "type": "string" + "type": "integer" }, "type": "array" }, @@ -3456,14 +4260,22 @@ "type": "integer" }, "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", + "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.", "type": "integer" }, "x": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "t", + "x" + ], "type": "object" }, "min": { @@ -3488,6 +4300,10 @@ "format": "double", "type": "number" }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, "o": { "description": "The open price for the symbol in the given time period.", "format": "double", @@ -3497,6 +4313,10 @@ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", "type": "boolean" }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, "v": { "description": "The trading volume of the symbol in the given time period.", "format": "double", @@ -3508,6 +4328,17 @@ "type": "number" } }, + "required": [ + "av", + "o", + "h", + "l", + "c", + "v", + "vw", + "t", + "n" + ], "type": "object" }, "prevDay": { @@ -3548,14 +4379,22 @@ "type": "number" } }, - "type": "object" + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], + "type": "object" }, "ticker": { "description": "The exchange symbol that this item is traded under.", "type": "string" }, "todaysChange": { - "description": "The value of the change the from previous day.", + "description": "The value of the change from the previous day.", "format": "double", "type": "number" }, @@ -3624,6 +4463,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t" + ], "type": "object" }, "type": "array" @@ -3655,6 +4502,13 @@ "type": "integer" } }, + "required": [ + "T", + "t", + "y", + "f", + "q" + ], "type": "object" }, "StocksV2NBBO": { @@ -3683,6 +4537,13 @@ "type": "integer" } }, + "required": [ + "T", + "t", + "y", + "f", + "q" + ], "type": "object" }, { @@ -3699,7 +4560,7 @@ "X": { "allOf": [ { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", "type": "integer" }, { @@ -3710,13 +4571,13 @@ "c": { "description": "A list of condition codes.\n", "items": { - "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", "type": "integer" }, "type": "array" }, "i": { - "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n", + "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://massive.com/glossary/us/stocks/conditions-indicators).\n", "items": { "description": "The indicator code.\n", "type": "integer" @@ -3735,7 +4596,7 @@ "x": { "allOf": [ { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", "type": "integer" }, { @@ -3748,6 +4609,17 @@ "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "x", + "P", + "S", + "X", + "z" + ], "type": "object" } ] @@ -3781,6 +4653,13 @@ "type": "integer" } }, + "required": [ + "T", + "t", + "y", + "f", + "q" + ], "type": "object" }, { @@ -3797,7 +4676,7 @@ "X": { "allOf": [ { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", "type": "integer" }, { @@ -3808,13 +4687,13 @@ "c": { "description": "A list of condition codes.\n", "items": { - "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", "type": "integer" }, "type": "array" }, "i": { - "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n", + "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://massive.com/glossary/us/stocks/conditions-indicators).\n", "items": { "description": "The indicator code.\n", "type": "integer" @@ -3833,7 +4712,7 @@ "x": { "allOf": [ { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", "type": "integer" }, { @@ -3846,6 +4725,17 @@ "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "x", + "P", + "S", + "X", + "z" + ], "type": "object" } ] @@ -3881,6 +4771,13 @@ "type": "integer" } }, + "required": [ + "T", + "t", + "y", + "f", + "q" + ], "type": "object" }, { @@ -3888,7 +4785,7 @@ "c": { "description": "A list of condition codes.\n", "items": { - "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", "type": "integer" }, "type": "array" @@ -3916,7 +4813,7 @@ "type": "number" }, "x": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", "type": "integer" }, "z": { @@ -3924,6 +4821,16 @@ "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "e", + "x", + "r", + "z" + ], "type": "object" } ] @@ -3957,6 +4864,13 @@ "type": "integer" } }, + "required": [ + "T", + "t", + "y", + "f", + "q" + ], "type": "object" }, { @@ -3964,7 +4878,7 @@ "c": { "description": "A list of condition codes.\n", "items": { - "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", "type": "integer" }, "type": "array" @@ -3992,7 +4906,7 @@ "type": "number" }, "x": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", "type": "integer" }, "z": { @@ -4000,6 +4914,16 @@ "type": "integer" } }, + "required": [ + "c", + "i", + "p", + "s", + "e", + "x", + "r", + "z" + ], "type": "object" } ] @@ -4024,6 +4948,9 @@ "type": "string" } }, + "required": [ + "ticker" + ], "type": "object" }, "TickerResults": { @@ -4070,6 +4997,14 @@ "type": "number" } }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t" + ], "type": "object" }, "type": "array" @@ -4098,7 +5033,7 @@ "type": "integer" }, "TodaysChange": { - "description": "The value of the change the from previous day.", + "description": "The value of the change from the previous day.", "format": "double", "type": "number" }, @@ -4147,6 +5082,11 @@ "type": "string" } }, + "required": [ + "symbol", + "status", + "request_id" + ], "type": "object" }, "V2AggsBase": { @@ -4172,6 +5112,13 @@ "type": "string" } }, + "required": [ + "status", + "adjusted", + "queryCount", + "resultsCount", + "request_id" + ], "type": "object" }, "V2LastBase": { @@ -4185,99 +5132,9 @@ "type": "string" } }, - "type": "object" - }, - "V2News": { - "properties": { - "amp_url": { - "description": "The mobile friendly Accelerated Mobile Page (AMP) URL.\n", - "format": "url", - "type": "string" - }, - "article_url": { - "description": "A link to the news article.\n", - "format": "url", - "type": "string" - }, - "author": { - "description": "The article's author.\n", - "type": "string" - }, - "description": { - "description": "A description of the article.\n", - "type": "string" - }, - "id": { - "description": "Unique identifier for the article.\n", - "type": "string" - }, - "image_url": { - "description": "The article's image URL.\n", - "format": "url", - "type": "string" - }, - "keywords": { - "description": "The keywords associated with the article (which will vary depending on\nthe publishing source).\n", - "items": { - "type": "string" - }, - "type": "array" - }, - "published_utc": { - "description": "The date the article was published on.\n", - "format": "date-time", - "type": "string" - }, - "publisher": { - "properties": { - "favicon_url": { - "description": "The publisher's homepage favicon URL.\n", - "format": "url", - "type": "string" - }, - "homepage_url": { - "description": "The publisher's homepage URL.\n", - "format": "url", - "type": "string" - }, - "logo_url": { - "description": "The publisher's logo URL.\n", - "format": "url", - "type": "string" - }, - "name": { - "description": "The publisher's name.\n", - "type": "string" - } - }, - "required": [ - "name", - "logo_url", - "homepage_url" - ], - "type": "object" - }, - "tickers": { - "description": "The ticker symbols associated with the article.\n", - "items": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - }, - "type": "array" - }, - "title": { - "description": "The title of the news article.\n", - "type": "string" - } - }, "required": [ - "id", - "publisher", - "title", - "author", - "published_utc", - "article_url", - "tickers" + "status", + "request_id" ], "type": "object" }, @@ -4311,253 +5168,6 @@ "description": "The volume weighted average price.", "format": "double", "type": "number" - }, - "v3TickerDetails": { - "properties": { - "results": { - "description": "Ticker with details.\n", - "properties": { - "active": { - "description": "Whether or not the asset is actively traded. False means the asset has been delisted.", - "type": "boolean" - }, - "address": { - "properties": { - "address1": { - "description": "The first line of the company's headquarters address.", - "type": "string" - }, - "city": { - "description": "The city of the company's headquarters address.", - "type": "string" - }, - "postal_code": { - "description": "The postal code of the company's headquarters address.", - "type": "string" - }, - "state": { - "description": "The state of the company's headquarters address.", - "type": "string" - } - }, - "type": "object" - }, - "branding": { - "properties": { - "icon_url": { - "description": "A link to this ticker's company's icon. Icon's are generally smaller, square images that represent the company at a glance.\nNote that you must provide an API key when accessing this URL. See the \"Authentication\" section at the top of this page for more details.\n", - "type": "string" - }, - "logo_url": { - "description": "A link to this ticker's company's logo.\nNote that you must provide an API key when accessing this URL. See the \"Authentication\" section at the top of this page for more details.\n", - "type": "string" - } - }, - "type": "object" - }, - "cik": { - "description": "The CIK number for this ticker. Find more information [here](https://en.wikipedia.org/wiki/Central_Index_Key).", - "type": "string" - }, - "composite_figi": { - "description": "The composite OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)", - "type": "string" - }, - "currency_name": { - "description": "The name of the currency that this asset is traded with.", - "type": "string" - }, - "delisted_utc": { - "description": "The last date that the asset was traded.", - "format": "date-time", - "type": "string" - }, - "description": { - "description": "A description of the company and what they do/offer.", - "type": "string" - }, - "homepage_url": { - "description": "The URL of the company's website homepage.", - "type": "string" - }, - "list_date": { - "description": "The date that the symbol was first publicly listed in the format YYYY-MM-DD.", - "type": "string" - }, - "locale": { - "description": "The locale of the asset.", - "enum": [ - "us", - "global" - ], - "type": "string" - }, - "market": { - "description": "The market type of the asset.", - "enum": [ - "stocks", - "crypto", - "fx", - "otc" - ], - "type": "string" - }, - "market_cap": { - "description": "The most recent close price of the ticker multiplied by weighted outstanding shares.", - "format": "double", - "type": "number" - }, - "name": { - "description": "The name of the asset. For stocks/equities this will be the companies registered name. For crypto/fx this will be the name of the currency or coin pair.\n", - "type": "string" - }, - "phone_number": { - "description": "The phone number for the company behind this ticker.", - "type": "string" - }, - "primary_exchange": { - "description": "The ISO code of the primary listing exchange for this asset.", - "type": "string" - }, - "share_class_figi": { - "description": "The share Class OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)", - "type": "string" - }, - "share_class_shares_outstanding": { - "description": "The recorded number of outstanding shares for this particular share class.", - "format": "double", - "type": "number" - }, - "sic_code": { - "description": "The standard industrial classification code for this ticker. For a list of SIC Codes, see the SEC's \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://www.sec.gov/info/edgar/siccodes.htm\"\u003eSIC Code List\u003c/a\u003e.\n", - "type": "string" - }, - "sic_description": { - "description": "A description of this ticker's SIC code.", - "type": "string" - }, - "ticker": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - }, - "ticker_root": { - "description": "The root of a specified ticker. For example, the root of BRK.A is BRK.", - "type": "string" - }, - "ticker_suffix": { - "description": "The suffix of a specified ticker. For example, the suffix of BRK.A is A.", - "type": "string" - }, - "total_employees": { - "description": "The approximate number of employees for the company.", - "type": "number" - }, - "type": { - "description": "The type of the asset. Find the types that we support via our [Ticker Types API](https://polygon.io/docs/stocks/get_v3_reference_tickers_types).", - "type": "string" - }, - "weighted_shares_outstanding": { - "description": "The shares outstanding calculated assuming all shares of other share classes are converted to this share class.\n", - "format": "double", - "type": "number" - } - }, - "required": [ - "ticker", - "name", - "market", - "locale", - "active", - "currency_name" - ], - "type": "object" - } - }, - "type": "object" - }, - "v3Tickers": { - "properties": { - "results": { - "description": "An array of tickers that match your query.\n\nNote: Although you can query by CUSIP, due to legal reasons we do not return the CUSIP in the response.\n", - "items": { - "properties": { - "active": { - "description": "Whether or not the asset is actively traded. False means the asset has been delisted.", - "type": "boolean" - }, - "cik": { - "description": "The CIK number for this ticker. Find more information [here](https://en.wikipedia.org/wiki/Central_Index_Key).", - "type": "string" - }, - "composite_figi": { - "description": "The composite OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)", - "type": "string" - }, - "currency_name": { - "description": "The name of the currency that this asset is traded with.", - "type": "string" - }, - "delisted_utc": { - "description": "The last date that the asset was traded.", - "format": "date-time", - "type": "string" - }, - "last_updated_utc": { - "description": "The information is accurate up to this time.", - "format": "date-time", - "type": "string" - }, - "locale": { - "description": "The locale of the asset.", - "enum": [ - "us", - "global" - ], - "type": "string" - }, - "market": { - "description": "The market type of the asset.", - "enum": [ - "stocks", - "crypto", - "fx", - "otc" - ], - "type": "string" - }, - "name": { - "description": "The name of the asset. For stocks/equities this will be the companies registered name. For crypto/fx this will be the name of the currency or coin pair.\n", - "type": "string" - }, - "primary_exchange": { - "description": "The ISO code of the primary listing exchange for this asset.", - "type": "string" - }, - "share_class_figi": { - "description": "The share Class OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)", - "type": "string" - }, - "ticker": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - }, - "type": { - "description": "The type of the asset. Find the types that we support via our [Ticker Types API](https://polygon.io/docs/stocks/get_v3_reference_tickers_types).", - "type": "string" - } - }, - "required": [ - "ticker", - "name", - "market", - "locale" - ], - "type": "object" - }, - "type": "array" - } - }, - "type": "object" } }, "securitySchemes": { @@ -4570,7 +5180,7 @@ }, "info": { "description": "The future of fintech.", - "title": "Polygon API", + "title": "Massive API", "version": "1.0.0" }, "openapi": "3.0.3", @@ -4605,9 +5215,8 @@ "example": 100, "in": "query", "name": "amount", - "required": true, "schema": { - "default": 100, + "default": 1, "type": "number" } }, @@ -4643,7 +5252,9 @@ "exchange": 48, "timestamp": 1605555313000 }, + "request_id": "a73a29dbcab4613eeaf48583d3baacf0", "status": "success", + "symbol": "AUD/USD", "to": "USD" }, "schema": { @@ -4661,7 +5272,7 @@ "description": "The amount to convert.", "format": "double", "type": "number", - "x-polygon-go-type": { + "x-massive-go-type": { "name": "*float64" } }, @@ -4678,19 +5289,28 @@ "type": "number" }, "exchange": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/forex/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", "type": "integer" }, "timestamp": { "description": "The Unix millisecond timestamp.", "type": "integer", - "x-polygon-go-type": { + "x-massive-go-type": { "name": "IMilliseconds", - "path": "github.com/polygon-io/ptime" + "path": "github.com/massive-com/ptime" } } }, - "type": "object" + "required": [ + "exchange", + "timestamp", + "ask", + "bid" + ], + "type": "object", + "x-massive-go-type": { + "name": "LastQuoteCurrencies" + } }, "request_id": { "description": "A request id assigned by the server.", @@ -4709,8 +5329,23 @@ "type": "string" } }, + "required": [ + "status", + "request_id", + "from", + "to", + "symbol", + "initialAmount", + "converted" + ], "type": "object" } + }, + "text/csv": { + "example": "ask,bid,exchange,timestamp\n1.3673344,1.3672596,48,1605555313000\n", + "schema": { + "type": "string" + } } }, "description": "The last tick for this currency pair, plus the converted amount for the requested amount." @@ -4723,11 +5358,11 @@ "tags": [ "fx:conversion" ], - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "description": "NBBO data", "name": "nbbo" }, - "x-polygon-entitlement-market-type": { + "x-massive-entitlement-market-type": { "description": "Forex data", "name": "fx" } @@ -4855,7 +5490,7 @@ "c": { "description": "A list of condition codes.\n", "items": { - "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", "type": "integer" }, "type": "array" @@ -4879,15 +5514,30 @@ "type": "integer" }, "x": { - "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n", + "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n", "type": "integer" } }, + "required": [ + "p", + "s", + "x", + "c", + "t", + "i" + ], "type": "object" }, "type": "array" } }, + "required": [ + "day", + "map", + "msLatency", + "symbol", + "ticks" + ], "type": "object" } ] @@ -4904,18 +5554,18 @@ "tags": [ "crypto:trades" ], - "x-polygon-deprecation": { + "x-massive-deprecation": { "date": 1654056060000, "replaces": { "name": "Trades v3", "path": "get_v3_trades__cryptoticker" } }, - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "description": "Trade data", "name": "trades" }, - "x-polygon-entitlement-market-type": { + "x-massive-entitlement-market-type": { "description": "Crypto data", "name": "crypto" } @@ -5019,6 +5669,9 @@ "type": "string" } }, + "required": [ + "status" + ], "type": "object" }, { @@ -5058,15 +5711,28 @@ "type": "integer" }, "x": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/forex/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", "type": "integer" } }, + "required": [ + "a", + "b", + "x", + "t" + ], "type": "object" }, "type": "array" } }, + "required": [ + "day", + "map", + "msLatency", + "pair", + "ticks" + ], "type": "object" } ] @@ -5083,44 +5749,156 @@ "tags": [ "fx:trades" ], - "x-polygon-deprecation": { + "x-massive-deprecation": { "date": 1654056060000, "replaces": { "name": "Quotes (BBO) v3", "path": "get_v3_quotes__fxticker" } }, - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "description": "NBBO data", "name": "nbbo" }, - "x-polygon-entitlement-market-type": { + "x-massive-entitlement-market-type": { "description": "Forex data", "name": "fx" } } }, - "/v1/last/crypto/{from}/{to}": { + "/v1/indicators/ema/{cryptoTicker}": { "get": { - "description": "Get the last trade tick for a cryptocurrency pair.", - "operationId": "LastTradeCrypto", + "description": "Get the exponential moving average (EMA) for a ticker symbol over a given time range.", + "operationId": "CryptoEMA", "parameters": [ { - "description": "The \"from\" symbol of the pair.", - "example": "BTC", + "description": "The ticker symbol for which to get exponential moving average (EMA) data.", + "example": "X:BTCUSD", "in": "path", - "name": "from", + "name": "cryptoTicker", "required": true, "schema": { "type": "string" + }, + "x-massive-go-id": "Ticker" + }, + { + "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "in": "query", + "name": "timestamp", + "schema": { + "type": "string" + }, + "x-massive-filter-field": { + "range": true } }, { - "description": "The \"to\" symbol of the pair.", - "example": "USD", - "in": "path", - "name": "to", - "required": true, + "description": "The size of the aggregate time window.", + "example": "day", + "in": "query", + "name": "timespan", + "schema": { + "default": "day", + "enum": [ + "minute", + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "type": "string" + } + }, + { + "description": "The window size used to calculate the exponential moving average (EMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.", + "example": 50, + "in": "query", + "name": "window", + "schema": { + "default": 50, + "type": "integer" + } + }, + { + "description": "The price in the aggregate which will be used to calculate the exponential moving average. i.e. 'close' will result in using close prices to \ncalculate the exponential moving average (EMA).", + "example": "close", + "in": "query", + "name": "series_type", + "schema": { + "default": "close", + "enum": [ + "open", + "high", + "low", + "close" + ], + "type": "string" + } + }, + { + "description": "Whether or not to include the aggregates used to calculate this indicator in the response.", + "in": "query", + "name": "expand_underlying", + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "description": "The order in which to return the results, ordered by timestamp.", + "example": "desc", + "in": "query", + "name": "order", + "schema": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + { + "description": "Limit the number of results returned, default is 10 and max is 5000", + "in": "query", + "name": "limit", + "schema": { + "default": 10, + "maximum": 5000, + "type": "integer" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gt", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lt", "schema": { "type": "string" } @@ -5131,117 +5909,314 @@ "content": { "application/json": { "example": { - "last": { - "conditions": [ - 1 - ], - "exchange": 4, - "price": 16835.42, - "size": 0.006909, - "timestamp": 1605560885027 + "next_url": "https://api.massive.com/v1/indicators/ema/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", + "results": { + "underlying": { + "url": "https://api.massive.com/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25" + }, + "values": [ + { + "timestamp": 1517562000016, + "value": 140.139 + } + ] }, - "request_id": "d2d779df015fe2b7fbb8e58366610ef7", - "status": "success", - "symbol": "BTC-USD" + "status": "OK" }, "schema": { "properties": { - "last": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" + }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "results": { "properties": { - "conditions": { - "description": "A list of condition codes.", - "items": { - "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.", - "type": "integer" + "underlying": { + "properties": { + "aggregates": { + "items": { + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "format": "float", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "float", + "type": "number" + } + }, + "required": [ + "v", + "vw", + "o", + "c", + "h", + "l", + "t", + "n" + ], + "type": "object", + "x-massive-go-type": { + "name": "Aggregate", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + }, + "type": "array" + }, + "url": { + "description": "The URL which can be used to request the underlying aggregates used in this request.", + "type": "string" + } }, - "type": "array", - "x-polygon-go-type": { - "name": "[]*int32" - } - }, - "exchange": { - "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.", - "type": "integer" - }, - "price": { - "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.", - "format": "double", - "type": "number" - }, - "size": { - "description": "The size of a trade (also known as volume).", - "format": "double", - "type": "number" + "type": "object" }, - "timestamp": { - "description": "The Unix millisecond timestamp.", - "type": "integer", - "x-polygon-go-type": { - "name": "IMilliseconds", - "path": "github.com/polygon-io/ptime" - } + "values": { + "items": { + "properties": { + "timestamp": { + "description": "The Unix Msec timestamp from the last aggregate used in this calculation.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "IMicroseconds", + "path": "github.com/massive-com/ptime" + } + }, + "value": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } + } + }, + "type": "object" + }, + "type": "array" } }, - "type": "object" - }, - "request_id": { - "description": "A request id assigned by the server.", - "type": "string" + "type": "object", + "x-massive-go-type": { + "name": "EMAResults" + } }, "status": { "description": "The status of this request's response.", "type": "string" - }, - "symbol": { - "description": "The symbol pair that was evaluated from the request.", - "type": "string" } }, "type": "object" } + }, + "text/csv": { + "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664164800000,297389,,0,,0,0,0,0,0,false,1664164800000,19846.01135387188\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664078400000,78936,,0,,0,0,0,0,0,false,1664078400000,19902.65703099573\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664064000000,78936,,0,,0,0,0,0,0,false,1664064000000,19948.29976695474\nX:BTCUSD,15457.24362826,19317.486,0,19529.04,19475.84,19651.2772302,18846.67,1664409600000,191936,,0,,0,0,0,0,0,false,1664409600000,19751.714760699124\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664337600000,225076,,0,,0,0,0,0,0,false,1664337600000,19762.974955013375\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664251200000,183075,,0,,0,0,0,0,0,false,1664251200000,19791.86053850303\nX:BTCUSD,2868.09828007,19069.8521,0,19210.31,18925.87,19400,18805.1,1663992000000,58721,,0,,0,0,0,0,0,false,1663992000000,19995.805471728403\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664323200000,225076,,0,,0,0,0,0,0,false,1664323200000,19777.128890923308\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664236800000,183075,,0,,0,0,0,0,0,false,1664236800000,19818.394438033767\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664150400000,297389,,0,,0,0,0,0,0,false,1664150400000,19873.767735662568\n", + "schema": { + "type": "string" + } } }, - "description": "The last tick for this currency pair." - }, - "default": { - "description": "Unexpected error" + "description": "Exponential Moving Average (EMA) data for each period." } }, - "summary": "Last Trade for a Crypto Pair", + "summary": "Exponential Moving Average (EMA)", "tags": [ - "crypto:last:trade" + "crypto:aggregates" ], - "x-polygon-entitlement-data-type": { - "description": "Trade data", - "name": "trades" + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" }, - "x-polygon-entitlement-market-type": { + "x-massive-entitlement-market-type": { "description": "Crypto data", "name": "crypto" } - } + }, + "x-massive-ignore": true }, - "/v1/last_quote/currencies/{from}/{to}": { + "/v1/indicators/ema/{fxTicker}": { "get": { - "description": "Get the last quote tick for a forex currency pair.", - "operationId": "LastQuoteCurrencies", + "description": "Get the exponential moving average (EMA) for a ticker symbol over a given time range.", + "operationId": "ForexEMA", "parameters": [ { - "description": "The \"from\" symbol of the pair.", - "example": "AUD", + "description": "The ticker symbol for which to get exponential moving average (EMA) data.", + "example": "C:EURUSD", "in": "path", - "name": "from", + "name": "fxTicker", "required": true, "schema": { "type": "string" - } + }, + "x-massive-go-id": "Ticker" }, { - "description": "The \"to\" symbol of the pair.", - "example": "USD", - "in": "path", - "name": "to", - "required": true, + "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "in": "query", + "name": "timestamp", + "schema": { + "type": "string" + }, + "x-massive-filter-field": { + "range": true + } + }, + { + "description": "The size of the aggregate time window.", + "example": "day", + "in": "query", + "name": "timespan", + "schema": { + "default": "day", + "enum": [ + "minute", + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "type": "string" + } + }, + { + "description": "Whether or not the aggregates used to calculate the exponential moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.", + "example": true, + "in": "query", + "name": "adjusted", + "schema": { + "default": true, + "type": "boolean" + } + }, + { + "description": "The window size used to calculate the exponential moving average (EMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.", + "example": 50, + "in": "query", + "name": "window", + "schema": { + "default": 50, + "type": "integer" + } + }, + { + "description": "The price in the aggregate which will be used to calculate the exponential moving average. i.e. 'close' will result in using close prices to \ncalculate the exponential moving average (EMA).", + "example": "close", + "in": "query", + "name": "series_type", + "schema": { + "default": "close", + "enum": [ + "open", + "high", + "low", + "close" + ], + "type": "string" + } + }, + { + "description": "Whether or not to include the aggregates used to calculate this indicator in the response.", + "in": "query", + "name": "expand_underlying", + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "description": "The order in which to return the results, ordered by timestamp.", + "example": "desc", + "in": "query", + "name": "order", + "schema": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + { + "description": "Limit the number of results returned, default is 10 and max is 5000", + "in": "query", + "name": "limit", + "schema": { + "default": 10, + "maximum": 5000, + "type": "integer" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gt", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lt", "schema": { "type": "string" } @@ -5252,324 +6227,316 @@ "content": { "application/json": { "example": { - "last": { - "ask": 0.73124, - "bid": 0.73122, - "exchange": 48, - "timestamp": 1605557756000 + "next_url": "https://api.massive.com/v1/indicators/ema/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", + "results": { + "underlying": { + "url": "https://api.massive.com/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25" + }, + "values": [ + { + "timestamp": 1517562000016, + "value": 140.139 + } + ] }, - "request_id": "a73a29dbcab4613eeaf48583d3baacf0", - "status": "success", - "symbol": "AUD/USD" + "status": "OK" }, "schema": { "properties": { - "last": { - "properties": { - "ask": { - "description": "The ask price.", - "format": "double", - "type": "number" - }, - "bid": { - "description": "The bid price.", - "format": "double", - "type": "number" - }, - "exchange": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/forex/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", - "type": "integer" - }, - "timestamp": { - "description": "The Unix millisecond timestamp.", - "type": "integer", - "x-polygon-go-type": { - "name": "IMilliseconds", - "path": "github.com/polygon-io/ptime" - } - } - }, - "type": "object" + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" }, "request_id": { "description": "A request id assigned by the server.", "type": "string" }, + "results": { + "properties": { + "underlying": { + "properties": { + "aggregates": { + "items": { + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "format": "float", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "float", + "type": "number" + } + }, + "required": [ + "v", + "vw", + "o", + "c", + "h", + "l", + "t", + "n" + ], + "type": "object", + "x-massive-go-type": { + "name": "Aggregate", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + }, + "type": "array" + }, + "url": { + "description": "The URL which can be used to request the underlying aggregates used in this request.", + "type": "string" + } + }, + "type": "object" + }, + "values": { + "items": { + "properties": { + "timestamp": { + "description": "The Unix Msec timestamp from the last aggregate used in this calculation.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "IMicroseconds", + "path": "github.com/massive-com/ptime" + } + }, + "value": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object", + "x-massive-go-type": { + "name": "EMAResults" + } + }, "status": { "description": "The status of this request's response.", "type": "string" - }, - "symbol": { - "description": "The symbol pair that was evaluated from the request.", - "type": "string" } }, "type": "object" } + }, + "text/csv": { + "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664323200000,685,,0,,0,0,0,0,0,false,1664323200000,1.4915199239999994\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664164800000,550,,0,,0,0,0,0,0,false,1664164800000,1.4863299679999997\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664078400000,10,,0,,0,0,0,0,0,false,1664078400000,1.4826388699999997\nC:USDAUD,686,1.5442,0,1.53763,1.5404,1.5526022,1.537279,1664409600000,686,,0,,0,0,0,0,0,false,1664409600000,1.4942168479999998\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664251200000,536,,0,,0,0,0,0,0,false,1664251200000,1.4900704799999993\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664236800000,536,,0,,0,0,0,0,0,false,1664236800000,1.4882634499999994\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664150400000,550,,0,,0,0,0,0,0,false,1664150400000,1.4845906159999998\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664064000000,10,,0,,0,0,0,0,0,false,1664064000000,1.4809719239999999\nC:USDAUD,1,1.5314,0,1.5313936,1.5313936,1.5313936,1.5313936,1663977600000,1,,0,,0,0,0,0,0,false,1663977600000,1.4794745239999998\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664337600000,685,,0,,0,0,0,0,0,false,1664337600000,1.4928357579999996\n", + "schema": { + "type": "string" + } } }, - "description": "The last quote tick for this currency pair." - }, - "default": { - "description": "Unexpected error" + "description": "Exponential Moving Average (EMA) data for each period." } }, - "summary": "Last Quote for a Currency Pair", + "summary": "Exponential Moving Average (EMA)", "tags": [ - "fx:last:quote" + "fx:aggregates" ], - "x-polygon-entitlement-data-type": { - "description": "NBBO data", - "name": "nbbo" + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" }, - "x-polygon-entitlement-market-type": { + "x-massive-entitlement-market-type": { "description": "Forex data", "name": "fx" } - } + }, + "x-massive-ignore": true }, - "/v1/marketstatus/now": { + "/v1/indicators/ema/{indicesTicker}": { "get": { - "description": "Get the current trading status of the exchanges and overall financial markets.\n", - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "afterHours": true, - "currencies": { - "crypto": "open", - "fx": "open" - }, - "earlyHours": false, - "exchanges": { - "nasdaq": "extended-hours", - "nyse": "extended-hours", - "otc": "closed" - }, - "market": "extended-hours", - "serverTime": "2020-11-10T22:37:37.000Z" - }, - "schema": { - "properties": { - "afterHours": { - "description": "Whether or not the market is in post-market hours.", - "type": "boolean" - }, - "currencies": { - "properties": { - "crypto": { - "description": "The status of the crypto market.", - "type": "string" - }, - "fx": { - "description": "The status of the forex market.", - "type": "string" - } - }, - "type": "object" - }, - "earlyHours": { - "description": "Whether or not the market is in pre-market hours.", - "type": "boolean" - }, - "exchanges": { - "properties": { - "nasdaq": { - "description": "The status of the Nasdaq market.", - "type": "string" - }, - "nyse": { - "description": "The status of the NYSE market.", - "type": "string" - }, - "otc": { - "description": "The status of the OTC market.", - "type": "string" - } - }, - "type": "object" - }, - "market": { - "description": "The status of the market as a whole.", - "type": "string" - }, - "serverTime": { - "description": "The current time of the server.", - "format": "date-time", - "type": "string" - } - }, - "type": "object" - } - } + "description": "Get the exponential moving average (EMA) for a ticker symbol over a given time range.", + "operationId": "IndicesEMA", + "parameters": [ + { + "description": "The ticker symbol for which to get exponential moving average (EMA) data.", + "example": "I:NDX", + "in": "path", + "name": "indicesTicker", + "required": true, + "schema": { + "type": "string" }, - "description": "Status of the market and each exchange" + "x-massive-go-id": "Ticker" }, - "401": { - "description": "Unauthorized - Check our API Key and account status" + { + "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "in": "query", + "name": "timestamp", + "schema": { + "type": "string" + }, + "x-massive-filter-field": { + "range": true + } }, - "404": { - "description": "The specified resource was not found" + { + "description": "The size of the aggregate time window.", + "example": "day", + "in": "query", + "name": "timespan", + "schema": { + "default": "day", + "enum": [ + "minute", + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "type": "string" + } }, - "409": { - "description": "Parameter is invalid or incorrect." - } - }, - "summary": "Market Status", - "tags": [ - "reference:stocks:market" - ], - "x-polygon-entitlement-data-type": { - "description": "Reference data", - "name": "reference" - } - } - }, - "/v1/marketstatus/upcoming": { - "get": { - "description": "Get upcoming market holidays and their open/close times.\n", - "responses": { - "200": { - "content": { - "application/json": { - "example": [ - { - "date": "2020-11-26T00:00:00.000Z", - "exchange": "NYSE", - "name": "Thanksgiving", - "status": "closed" - }, - { - "date": "2020-11-26T00:00:00.000Z", - "exchange": "NASDAQ", - "name": "Thanksgiving", - "status": "closed" - }, - { - "date": "2020-11-26T00:00:00.000Z", - "exchange": "OTC", - "name": "Thanksgiving", - "status": "closed" - }, - { - "close": "2020-11-27T18:00:00.000Z", - "date": "2020-11-27T00:00:00.000Z", - "exchange": "NASDAQ", - "name": "Thanksgiving", - "open": "2020-11-27T14:30:00.000Z", - "status": "early-close" - }, - { - "close": "2020-11-27T18:00:00.000Z", - "date": "2020-11-27T00:00:00.000Z", - "exchange": "NYSE", - "name": "Thanksgiving", - "open": "2020-11-27T14:30:00.000Z", - "status": "early-close" - } - ], - "schema": { - "items": { - "properties": { - "close": { - "description": "The market close time on the holiday (if it's not closed).", - "format": "date-time", - "type": "string" - }, - "date": { - "description": "The date of the holiday.", - "format": "date", - "type": "string" - }, - "exchange": { - "description": "Which market the record is for.", - "type": "string" - }, - "name": { - "description": "The name of the holiday.", - "type": "string" - }, - "open": { - "description": "The market open time on the holiday (if it's not closed).", - "format": "date-time", - "type": "string" - }, - "status": { - "description": "The status of the market on the holiday.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - } - }, - "description": "Holidays for each market in the near future." + { + "description": "Whether or not the aggregates used to calculate the exponential moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.", + "example": true, + "in": "query", + "name": "adjusted", + "schema": { + "default": true, + "type": "boolean" + } }, - "401": { - "description": "Unauthorized - Check our API Key and account status" + { + "description": "The window size used to calculate the exponential moving average (EMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.", + "example": 50, + "in": "query", + "name": "window", + "schema": { + "default": 50, + "type": "integer" + } }, - "404": { - "description": "The specified resource was not found" + { + "description": "The value in the aggregate which will be used to calculate the exponential moving average. i.e. 'close' will result in using close values to \ncalculate the exponential moving average (EMA).", + "example": "close", + "in": "query", + "name": "series_type", + "schema": { + "default": "close", + "enum": [ + "open", + "high", + "low", + "close" + ], + "type": "string" + } }, - "409": { - "description": "Parameter is invalid or incorrect." - } - }, - "summary": "Market Holidays", - "tags": [ - "reference:stocks:market" - ], - "x-polygon-entitlement-data-type": { - "description": "Reference data", - "name": "reference" - } - } - }, - "/v1/open-close/crypto/{from}/{to}/{date}": { - "get": { - "description": "Get the open, close prices of a cryptocurrency symbol on a certain day.\n", - "parameters": [ { - "description": "The \"from\" symbol of the pair.", - "example": "BTC", - "in": "path", - "name": "from", - "required": true, + "description": "Whether or not to include the aggregates used to calculate this indicator in the response.", + "in": "query", + "name": "expand_underlying", + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "description": "The order in which to return the results, ordered by timestamp.", + "example": "desc", + "in": "query", + "name": "order", "schema": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], "type": "string" } }, { - "description": "The \"to\" symbol of the pair.", - "example": "USD", - "in": "path", - "name": "to", - "required": true, + "description": "Limit the number of results returned, default is 10 and max is 5000", + "in": "query", + "name": "limit", + "schema": { + "default": 10, + "maximum": 5000, + "type": "integer" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gte", "schema": { "type": "string" } }, { - "description": "The date of the requested open/close in the format YYYY-MM-DD.", - "example": "2020-10-14", - "in": "path", - "name": "date", - "required": true, + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gt", "schema": { - "format": "date", "type": "string" } }, { - "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", - "example": true, + "description": "Range by timestamp.", "in": "query", - "name": "adjusted", + "name": "timestamp.lte", "schema": { - "type": "boolean" + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lt", + "schema": { + "type": "string" } } ], @@ -5578,155 +6545,140 @@ "content": { "application/json": { "example": { - "close": 11050.64, - "closingTrades": [ - { - "c": [ - 2 - ], - "i": "973323250", - "p": 11050.64, - "s": 0.006128, - "t": 1602287999795, - "x": 4 - }, - { - "c": [ - 1 - ], - "i": "105717893", - "p": 11049.4, - "s": 0.014, - "t": 1602287999659, - "x": 17 - } - ], - "day": "2020-10-09T00:00:00.000Z", - "isUTC": true, - "open": 10932.44, - "openTrades": [ - { - "c": [ - 2 - ], - "i": "511235746", - "p": 10932.44, - "s": 0.002, - "t": 1602201600056, - "x": 1 + "next_url": "https://api.massive.com/v1/indicators/ema/I:NDX?cursor=YWRqdXN0ZWQ9dHJ1ZSZhcD0lN0IlMjJ2JTIyJTNBMCUyQyUyMm8lMjIlM0EwJTJDJTIyYyUyMiUzQTE1MDg0Ljk5OTM4OTgyMDAzJTJDJTIyaCUyMiUzQTAlMkMlMjJsJTIyJTNBMCUyQyUyMnQlMjIlM0ExNjg3MjE5MjAwMDAwJTdEJmFzPSZleHBhbmRfdW5kZXJseWluZz1mYWxzZSZsaW1pdD0xJm9yZGVyPWRlc2Mmc2VyaWVzX3R5cGU9Y2xvc2UmdGltZXNwYW49ZGF5JnRpbWVzdGFtcC5sdD0xNjg3MjM3MjAwMDAwJndpbmRvdz01MA", + "request_id": "b9201816341441eed663a90443c0623a", + "results": { + "underlying": { + "url": "https://api.massive.com/v2/aggs/ticker/I:NDX/range/1/day/1678338000000/1687366449650?limit=226&sort=desc" }, - { - "c": [ - 2 - ], - "i": "511235751", - "p": 10923.76, - "s": 0.02, - "t": 1602201600141, - "x": 4 - } - ], - "symbol": "BTC-USD" + "values": [ + { + "timestamp": 1687237200000, + "value": 14452.002555459003 + } + ] + }, + "status": "OK" }, "schema": { "properties": { - "close": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "closingTrades": { - "items": { - "properties": { - "c": { - "description": "A list of condition codes.\n", - "items": { - "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", - "type": "integer" - }, - "type": "array" - }, - "i": { - "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n", - "type": "string" - }, - "p": { - "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n", - "format": "double", - "type": "number" - }, - "s": { - "description": "The size of a trade (also known as volume).\n", - "format": "double", - "type": "number" - }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" - }, - "x": { - "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n", - "type": "integer" - } - }, - "type": "object" - }, - "type": "array" - }, - "day": { - "description": "The date requested.", - "format": "date", + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", "type": "string" }, - "isUTC": { - "description": "Whether or not the timestamps are in UTC timezone.", - "type": "boolean" - }, - "open": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" }, - "openTrades": { - "items": { - "properties": { - "c": { - "description": "A list of condition codes.\n", - "items": { - "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", - "type": "integer" + "results": { + "properties": { + "underlying": { + "properties": { + "aggregates": { + "items": { + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "format": "float", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "float", + "type": "number" + } + }, + "required": [ + "v", + "vw", + "o", + "c", + "h", + "l", + "t", + "n" + ], + "type": "object", + "x-massive-go-type": { + "name": "Aggregate", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + }, + "type": "array" }, - "type": "array" - }, - "i": { - "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n", - "type": "string" - }, - "p": { - "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n", - "format": "double", - "type": "number" - }, - "s": { - "description": "The size of a trade (also known as volume).\n", - "format": "double", - "type": "number" - }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" + "url": { + "description": "The URL which can be used to request the underlying aggregates used in this request.", + "type": "string" + } }, - "x": { - "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n", - "type": "integer" - } + "type": "object" }, - "type": "object" + "values": { + "items": { + "properties": { + "timestamp": { + "description": "The Unix Msec timestamp from the last aggregate used in this calculation.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "IMicroseconds", + "path": "github.com/massive-com/ptime" + } + }, + "value": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } + } + }, + "type": "object" + }, + "type": "array" + } }, - "type": "array" + "type": "object", + "x-massive-go-type": { + "name": "EMAResults" + } }, - "symbol": { - "description": "The symbol pair that was evaluated from the request.", + "status": { + "description": "The status of this request's response.", "type": "string" } }, @@ -5734,511 +6686,487 @@ } } }, - "description": "The open/close of this symbol." - }, - "default": { - "description": "Unexpected error" + "description": "Exponential Moving Average (EMA) data for each period." } }, - "summary": "Daily Open/Close", + "summary": "Exponential Moving Average (EMA)", "tags": [ - "crypto:open-close" + "indices:aggregates" ], - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-allowed-limited-tickers": true, + "x-massive-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, - "x-polygon-entitlement-market-type": { - "description": "Crypto data", - "name": "crypto" + "x-massive-entitlement-market-type": { + "description": "Indices data", + "name": "indices" } - } + }, + "x-massive-ignore": true }, - "/v1/open-close/{optionsTicker}/{date}": { + "/v1/indicators/ema/{optionsTicker}": { "get": { - "description": "Get the open, close and afterhours prices of an options contract on a certain date.\n", + "description": "Get the exponential moving average (EMA) for a ticker symbol over a given time range.", + "operationId": "OptionsEMA", "parameters": [ { - "description": "The ticker symbol of the options contract.", - "example": "O:TSLA210903C00700000", + "description": "The ticker symbol for which to get exponential moving average (EMA) data.", + "example": "O:SPY241220P00720000", "in": "path", "name": "optionsTicker", "required": true, "schema": { "type": "string" + }, + "x-massive-go-id": "Ticker" + }, + { + "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "in": "query", + "name": "timestamp", + "schema": { + "type": "string" + }, + "x-massive-filter-field": { + "range": true } }, { - "description": "The date of the requested open/close in the format YYYY-MM-DD.", - "example": "2021-07-22", - "in": "path", - "name": "date", - "required": true, + "description": "The size of the aggregate time window.", + "example": "day", + "in": "query", + "name": "timespan", "schema": { - "format": "date", + "default": "day", + "enum": [ + "minute", + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], "type": "string" } }, { - "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", + "description": "Whether or not the aggregates used to calculate the exponential moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.", "example": true, "in": "query", "name": "adjusted", "schema": { + "default": true, "type": "boolean" } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "afterHours": 26.35, - "close": 26.35, - "from": "2021-07-22", - "high": 26.35, - "low": 25, - "open": 25, - "preMarket": 25, - "status": "OK", - "symbol": "O:TSLA210903C00700000", - "volume": 2 - }, - "schema": { - "properties": { - "afterHours": { - "description": "The close price of the ticker symbol in after hours trading.", - "format": "double", - "type": "number" - }, - "close": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "from": { - "description": "The requested date.", - "format": "date", - "type": "string" - }, - "high": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "low": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "open": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "otc": { - "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", - "type": "boolean" - }, - "preMarket": { - "description": "The open price of the ticker symbol in pre-market trading.", - "type": "integer" - }, - "status": { - "description": "The status of this request's response.", - "type": "string" - }, - "symbol": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - }, - "volume": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - } - }, - "type": "object" - } - } - }, - "description": "The open/close of this stock symbol." }, - "default": { - "description": "Unexpected error" - } - }, - "summary": "Daily Open/Close", - "tags": [ - "options:open-close" - ], - "x-polygon-entitlement-data-type": { - "description": "Aggregate data", - "name": "aggregates" - }, - "x-polygon-entitlement-market-type": { - "description": "Options data", - "name": "options" - } - } - }, - "/v1/open-close/{stocksTicker}/{date}": { - "get": { - "description": "Get the open, close and afterhours prices of a stock symbol on a certain date.\n", - "parameters": [ { - "description": "The ticker symbol of the stock/equity.", - "example": "AAPL", - "in": "path", - "name": "stocksTicker", - "required": true, + "description": "The window size used to calculate the exponential moving average (EMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.", + "example": 50, + "in": "query", + "name": "window", "schema": { - "type": "string" + "default": 50, + "type": "integer" } }, { - "description": "The date of the requested open/close in the format YYYY-MM-DD.", - "example": "2020-10-14", - "in": "path", - "name": "date", - "required": true, + "description": "The price in the aggregate which will be used to calculate the exponential moving average. i.e. 'close' will result in using close prices to \ncalculate the exponential moving average (EMA).", + "example": "close", + "in": "query", + "name": "series_type", "schema": { - "format": "date", + "default": "close", + "enum": [ + "open", + "high", + "low", + "close" + ], "type": "string" } }, { - "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", - "example": true, + "description": "Whether or not to include the aggregates used to calculate this indicator in the response.", "in": "query", - "name": "adjusted", + "name": "expand_underlying", "schema": { + "default": false, "type": "boolean" } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "afterHours": 322.1, - "close": 325.12, - "from": "2020-10-14T00:00:00.000Z", - "high": 326.2, - "low": 322.3, - "open": 324.66, - "preMarket": 324.5, - "status": "OK", - "symbol": "AAPL", - "volume": 26122646 - }, - "schema": { - "properties": { - "afterHours": { - "description": "The close price of the ticker symbol in after hours trading.", - "format": "double", - "type": "number" - }, - "close": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "from": { - "description": "The requested date.", - "format": "date", - "type": "string" - }, - "high": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "low": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "open": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "otc": { - "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", - "type": "boolean" - }, - "preMarket": { - "description": "The open price of the ticker symbol in pre-market trading.", - "type": "integer" - }, - "status": { - "description": "The status of this request's response.", - "type": "string" - }, - "symbol": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - }, - "volume": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - } - }, - "type": "object" - } - } - }, - "description": "The open/close of this stock symbol." }, - "default": { - "description": "Unexpected error" - } - }, - "summary": "Daily Open/Close", - "tags": [ - "stocks:open-close" - ], - "x-polygon-entitlement-data-type": { - "description": "Aggregate data", - "name": "aggregates" - }, - "x-polygon-entitlement-market-type": { - "description": "Stocks data", - "name": "stocks" - } - } - }, - "/v1/reference/sec/filings": { - "get": { - "description": "List filings", - "operationId": "ListFilings", - "parameters": [ { - "description": "Query by filing type.", + "description": "The order in which to return the results, ordered by timestamp.", + "example": "desc", "in": "query", - "name": "type", + "name": "order", "schema": { - "description": "Filing Type", + "default": "desc", "enum": [ - "10-K", - "10-Q" + "asc", + "desc" ], "type": "string" } }, { - "description": "Query by filing date.", + "description": "Limit the number of results returned, default is 10 and max is 5000", "in": "query", - "name": "filing_date", + "name": "limit", "schema": { - "description": "The date when the filing was filed in YYYYMMDD format.", - "example": "20210101", - "pattern": "^[0-9]{8}$", - "type": "string" - }, - "x-polygon-filter-field": { - "range": true + "default": 10, + "maximum": 5000, + "type": "integer" } }, { - "description": "Query by period of report.", + "description": "Range by timestamp.", "in": "query", - "name": "period_of_report_date", + "name": "timestamp.gte", "schema": { - "description": "The period of report for the filing in YYYYMMDD format.", - "example": "20210101", - "pattern": "^[0-9]{8}$", "type": "string" - }, - "x-polygon-filter-field": { - "range": true } }, { - "description": "If true, query only for filings with an XBRL instance file.\nIf false, query for filings without an XBRL instance file.\nIf this parameter is not provided, query for filings with or without XBRL instance files.", - "in": "query", - "name": "has_xbrl", - "schema": { - "nullable": true, - "type": "boolean" - }, - "x-polygon-go-id": "HasXBRL" - }, - { - "description": "Query by entity company name.", + "description": "Range by timestamp.", "in": "query", - "name": "entities.company_data.name", + "name": "timestamp.gt", "schema": { - "example": "Facebook Inc", "type": "string" - }, - "x-polygon-filter-field": { - "search": true } }, { - "description": "Query by entity company CIK.", + "description": "Range by timestamp.", "in": "query", - "name": "entities.company_data.cik", + "name": "timestamp.lte", "schema": { - "description": "Central Index Key (CIK) Number", "type": "string" } }, { - "description": "Query by entity company ticker.", + "description": "Range by timestamp.", "in": "query", - "name": "entities.company_data.ticker", + "name": "timestamp.lt", "schema": { - "description": "Ticker", "type": "string" } - }, + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "next_url": "https://api.massive.com/v1/indicators/ema/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", + "results": { + "underlying": { + "url": "https://api.massive.com/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25" + }, + "values": [ + { + "timestamp": 1517562000016, + "value": 140.139 + } + ] + }, + "status": "OK" + }, + "schema": { + "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" + }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "results": { + "properties": { + "underlying": { + "properties": { + "aggregates": { + "items": { + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "format": "float", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "float", + "type": "number" + } + }, + "required": [ + "v", + "vw", + "o", + "c", + "h", + "l", + "t", + "n" + ], + "type": "object", + "x-massive-go-type": { + "name": "Aggregate", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + }, + "type": "array" + }, + "url": { + "description": "The URL which can be used to request the underlying aggregates used in this request.", + "type": "string" + } + }, + "type": "object" + }, + "values": { + "items": { + "properties": { + "timestamp": { + "description": "The Unix Msec timestamp from the last aggregate used in this calculation.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "IMicroseconds", + "path": "github.com/massive-com/ptime" + } + }, + "value": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object", + "x-massive-go-type": { + "name": "EMAResults" + } + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "type": "object" + } + }, + "text/csv": { + "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649217600000,1,,0,,0,0,0,0,0,false,1649217600000,286.1730473491824 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649131200000,1,,0,,0,0,0,0,0,false,1649131200000,285.60990642465924 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649044800000,1,,0,,0,0,0,0,0,false,1649044800000,285.023780156278 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648785600000,1,,0,,0,0,0,0,0,false,1648785600000,284.4137303667383 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648526400000,1,,0,,0,0,0,0,0,false,1648526400000,282.43007426223943 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649304000000,1,,0,,0,0,0,0,0,false,1649304000000,286.7141043158811 O:SPY241220P00720000,2,270.49,0,270.49,270.49,270.49,270.49,1649390400000,1,,0,,0,0,0,0,0,false,1649390400000,286.0778649309446 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648699200000,1,,0,,0,0,0,0,0,false,1648699200000,283.77878058578887 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648612800000,1,,0,,0,0,0,0,0,false,1648612800000,283.11791448724966 O:SPY241220P00720000,3,277.8267,0,277.82,277.83,277.83,277.82,1649649600000,2,,0,,0,0,0,0,0,false,1649649600000,285.7544192473781", + "schema": { + "type": "string" + } + } + }, + "description": "Exponential Moving Average (EMA) data for each period." + } + }, + "summary": "Exponential Moving Average (EMA)", + "tags": [ + "options:aggregates" + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Options data", + "name": "options" + } + }, + "x-massive-ignore": true + }, + "/v1/indicators/ema/{stockTicker}": { + "get": { + "description": "Get the exponential moving average (EMA) for a ticker symbol over a given time range.", + "operationId": "EMA", + "parameters": [ { - "description": "Query by entity company SIC.", - "in": "query", - "name": "entities.company_data.sic", + "description": "Specify a case-sensitive ticker symbol for which to get exponential moving average (EMA) data. For example, AAPL represents Apple Inc.", + "example": "AAPL", + "in": "path", + "name": "stockTicker", + "required": true, "schema": { - "description": "Standard Industrial Classification (SIC)", "type": "string" - } + }, + "x-massive-go-id": "Ticker" }, { - "description": "Search by filing_date.", + "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", "in": "query", - "name": "filing_date.gte", + "name": "timestamp", "schema": { - "description": "The date when the filing was filed in YYYYMMDD format.", - "example": "20210101", - "pattern": "^[0-9]{8}$", "type": "string" + }, + "x-massive-filter-field": { + "range": true } }, { - "description": "Search by filing_date.", + "description": "The size of the aggregate time window.", + "example": "day", "in": "query", - "name": "filing_date.gt", + "name": "timespan", "schema": { - "description": "The date when the filing was filed in YYYYMMDD format.", - "example": "20210101", - "pattern": "^[0-9]{8}$", + "default": "day", + "enum": [ + "minute", + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], "type": "string" } }, { - "description": "Search by filing_date.", + "description": "Whether or not the aggregates used to calculate the exponential moving average are adjusted for splits. By default, aggregates are adjusted. Set this to false to get results that are NOT adjusted for splits.", + "example": true, "in": "query", - "name": "filing_date.lte", + "name": "adjusted", "schema": { - "description": "The date when the filing was filed in YYYYMMDD format.", - "example": "20210101", - "pattern": "^[0-9]{8}$", - "type": "string" + "default": true, + "type": "boolean" } }, { - "description": "Search by filing_date.", + "description": "The window size used to calculate the exponential moving average (EMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.", + "example": 50, "in": "query", - "name": "filing_date.lt", + "name": "window", "schema": { - "description": "The date when the filing was filed in YYYYMMDD format.", - "example": "20210101", - "pattern": "^[0-9]{8}$", - "type": "string" + "default": 50, + "type": "integer" } }, { - "description": "Search by period_of_report_date.", + "description": "The price in the aggregate which will be used to calculate the exponential moving average. i.e. 'close' will result in using close prices to \ncalculate the exponential moving average (EMA).", + "example": "close", "in": "query", - "name": "period_of_report_date.gte", + "name": "series_type", "schema": { - "description": "The period of report for the filing in YYYYMMDD format.", - "example": "20210101", - "pattern": "^[0-9]{8}$", + "default": "close", + "enum": [ + "open", + "high", + "low", + "close" + ], "type": "string" } }, { - "description": "Search by period_of_report_date.", + "description": "Whether or not to include the aggregates used to calculate this indicator in the response.", "in": "query", - "name": "period_of_report_date.gt", + "name": "expand_underlying", "schema": { - "description": "The period of report for the filing in YYYYMMDD format.", - "example": "20210101", - "pattern": "^[0-9]{8}$", - "type": "string" + "default": false, + "type": "boolean" } }, { - "description": "Search by period_of_report_date.", + "description": "The order in which to return the results, ordered by timestamp.", + "example": "desc", "in": "query", - "name": "period_of_report_date.lte", + "name": "order", "schema": { - "description": "The period of report for the filing in YYYYMMDD format.", - "example": "20210101", - "pattern": "^[0-9]{8}$", + "default": "desc", + "enum": [ + "asc", + "desc" + ], "type": "string" } }, { - "description": "Search by period_of_report_date.", + "description": "Limit the number of results returned, default is 10 and max is 5000", "in": "query", - "name": "period_of_report_date.lt", + "name": "limit", "schema": { - "description": "The period of report for the filing in YYYYMMDD format.", - "example": "20210101", - "pattern": "^[0-9]{8}$", - "type": "string" + "default": 10, + "maximum": 5000, + "type": "integer" } }, { - "description": "Search by entities.company_data.name.", + "description": "Range by timestamp.", "in": "query", - "name": "entities.company_data.name.search", + "name": "timestamp.gte", "schema": { "type": "string" } }, { - "description": "Order results based on the `sort` field.", + "description": "Range by timestamp.", "in": "query", - "name": "order", + "name": "timestamp.gt", "schema": { - "enum": [ - "asc", - "desc" - ], - "example": "asc", "type": "string" } }, { - "description": "Limit the number of results returned, default is 10 and max is 1000.", + "description": "Range by timestamp.", "in": "query", - "name": "limit", + "name": "timestamp.lte", "schema": { - "default": 10, - "example": 10, - "maximum": 1000, - "minimum": 1, - "type": "integer" + "type": "string" } }, { - "description": "Sort field used for ordering.", + "description": "Range by timestamp.", "in": "query", - "name": "sort", + "name": "timestamp.lt", "schema": { - "default": "filing_date", - "enum": [ - "filing_date", - "period_of_report_date" - ], - "example": "filing_date", "type": "string" } } @@ -6247,483 +7175,325 @@ "200": { "content": { "application/json": { - "description": "FIXME", - "example": {}, + "example": { + "next_url": "https://api.massive.com/v1/indicators/ema/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", + "results": { + "underlying": { + "url": "https://api.massive.com/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25" + }, + "values": [ + { + "timestamp": 1517562000016, + "value": 140.139 + } + ] + }, + "status": "OK" + }, "schema": { "properties": { - "count": { - "type": "integer" - }, "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", "type": "string" }, "request_id": { + "description": "A request id assigned by the server.", "type": "string" }, "results": { - "items": { - "properties": { - "accession_number": { - "description": "Filing Accession Number", - "type": "string" - }, - "entities": { - "description": "Entities related to the filing (e.g. the document filers).", - "items": { - "description": "A filing entity (e.g. the document filer).", - "properties": { - "company_data": { - "properties": { - "cik": { - "description": "Central Index Key (CIK) Number", - "type": "string" - }, - "name": { - "example": "Facebook Inc", - "type": "string" - }, - "sic": { - "description": "Standard Industrial Classification (SIC)", - "type": "string" - }, - "ticker": { - "description": "Ticker", - "type": "string" - } + "properties": { + "underlying": { + "properties": { + "aggregates": { + "items": { + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "float", + "type": "number" }, - "required": [ - "name", - "cik", - "sic" - ], - "type": "object", - "x-polygon-go-type": { - "name": "SECCompanyData", - "path": "github.com/polygon-io/go-lib-models/v2/globals" + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "format": "float", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "float", + "type": "number" } }, - "relation": { - "description": "Relationship of this entity to the filing.", - "enum": [ - "filer" - ], - "type": "string" + "required": [ + "v", + "vw", + "o", + "c", + "h", + "l", + "t", + "n" + ], + "type": "object", + "x-massive-go-type": { + "name": "Aggregate", + "path": "github.com/massive-com/go-lib-models/v2/globals" } }, - "required": [ - "relation" - ], - "type": "object", - "x-polygon-go-type": { - "name": "SECFilingEntity", - "path": "github.com/polygon-io/go-lib-models/v2/globals" - } + "type": "array" }, - "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" + "url": { + "description": "The URL which can be used to request the underlying aggregates used in this request.", + "type": "string" + } }, - "type": { - "description": "Filing Type", - "enum": [ - "10-K", - "10-Q" - ], - "type": "string" - } + "type": "object" }, - "required": [ - "id", - "accession_number", - "type", - "filing_date", - "period_of_report_date", - "files_count", - "source_url", - "download_url", - "entities" - ], - "type": "object", - "x-polygon-go-type": { - "name": "SECFiling", - "path": "github.com/polygon-io/go-lib-models/v2/globals" + "values": { + "items": { + "properties": { + "timestamp": { + "description": "The Unix Msec timestamp from the last aggregate used in this calculation.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "IMicroseconds", + "path": "github.com/massive-com/ptime" + } + }, + "value": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } + } + }, + "type": "object" + }, + "type": "array" } }, - "type": "array" + "type": "object", + "x-massive-go-type": { + "name": "EMAResults" + } }, "status": { + "description": "The status of this request's response.", "type": "string" } }, - "required": [ - "status", - "request_id", - "count", - "results" - ], "type": "object" } + }, + "text/csv": { + "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nAAPL,8.1599225E+07,152.5505,0,149.31,154.48,154.56,149.1,1663560000000,671961,,0,,0,0,0,0,0,false,1663560000000,163.17972071441582\nAAPL,8.4461761E+07,152.1354,0,152.74,151.76,154.72,149.945,1664251200000,683781,,0,,0,0,0,0,0,false,1664251200000,160.92194334973746\nAAPL,9.3308449E+07,156.1877,0,157.34,153.72,158.61,153.6,1663732800000,712645,,0,,0,0,0,0,0,false,1663732800000,162.5721451116157\nAAPL,1.07691097E+08,156.1317,0,153.4,156.9,158.08,153.08,1663646400000,792177,,0,,0,0,0,0,0,false,1663646400000,162.93345715698777\nAAPL,9.6031641E+07,150.0222,0,151.19,150.43,151.47,148.56,1663905600000,766888,,0,,0,0,0,0,0,false,1663905600000,161.72552880161066\nAAPL,8.6651514E+07,152.5709,0,152.38,152.74,154.47,150.91,1663819200000,686866,,0,,0,0,0,0,0,false,1663819200000,162.18657079351314\nAAPL,1.64879031E+08,150.2387,0,151.21,150.7,151.35,148.37,1663300800000,850358,,0,,0,0,0,0,0,false,1663300800000,163.53481135582055\nAAPL,1.27842348E+08,142.9013,0,146.1,142.48,146.72,140.68,1664424000000,1061605,,0,,0,0,0,0,0,false,1664424000000,159.78118646009983\nAAPL,1.46755122E+08,147.599,0,147.64,149.84,150.6414,144.84,1664337600000,1140818,,0,,0,0,0,0,0,false,1664337600000,160.48735733602226\nAAPL,9.3339409E+07,151.5222,0,149.66,150.77,153.7701,149.64,1664164800000,747666,,0,,0,0,0,0,0,false,1664164800000,161.29590022115534\n", + "schema": { + "type": "string" + } } }, - "description": "FIXME" + "description": "Exponential Moving Average (EMA) data for each period." } }, - "summary": "SEC Filings", + "summary": "Exponential Moving Average (EMA)", "tags": [ - "reference:sec:filings" + "stocks:aggregates" ], - "x-polygon-entitlement-data-type": { - "description": "Reference data", - "name": "reference" + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" }, - "x-polygon-paginate": { - "sort": { - "default": "filing_date", - "enum": [ - "filing_date", - "period_of_report_date" - ] - } + "x-massive-entitlement-market-type": { + "description": "Stocks data", + "name": "stocks" } - }, - "x-polygon-draft": true + } }, - "/v1/reference/sec/filings/{filing_id}": { + "/v1/indicators/macd/{cryptoTicker}": { "get": { - "description": "Get filing", - "operationId": "GetFiling", + "description": "Get moving average convergence/divergence (MACD) data for a ticker symbol over a given time range.", + "operationId": "CryptoMACD", "parameters": [ { - "description": "Select by filing id.", + "description": "The ticker symbol for which to get MACD data.", + "example": "X:BTCUSD", "in": "path", - "name": "filing_id", + "name": "cryptoTicker", + "required": true, + "schema": { + "type": "string" + }, + "x-massive-go-id": "Ticker" + }, + { + "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "in": "query", + "name": "timestamp", "schema": { - "description": "Unique identifier for the filing.", "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "description": "FIXME", - "example": {}, - "schema": { - "properties": { - "accession_number": { - "description": "Filing Accession Number", - "type": "string" - }, - "entities": { - "description": "Entities related to the filing (e.g. the document filers).", - "items": { - "description": "A filing entity (e.g. the document filer).", - "properties": { - "company_data": { - "properties": { - "cik": { - "description": "Central Index Key (CIK) Number", - "type": "string" - }, - "name": { - "example": "Facebook Inc", - "type": "string" - }, - "sic": { - "description": "Standard Industrial Classification (SIC)", - "type": "string" - }, - "ticker": { - "description": "Ticker", - "type": "string" - } - }, - "required": [ - "name", - "cik", - "sic" - ], - "type": "object", - "x-polygon-go-type": { - "name": "SECCompanyData", - "path": "github.com/polygon-io/go-lib-models/v2/globals" - } - }, - "relation": { - "description": "Relationship of this entity to the filing.", - "enum": [ - "filer" - ], - "type": "string" - } - }, - "required": [ - "relation" - ], - "type": "object", - "x-polygon-go-type": { - "name": "SECFilingEntity", - "path": "github.com/polygon-io/go-lib-models/v2/globals" - } - }, - "type": "array" - }, - "files_count": { - "description": "The number of files associated with the filing.", - "format": "int64", - "type": "integer" - }, - "filing_date": { - "description": "The date when the filing was filed in YYYYMMDD format.", - "example": "20210101", - "pattern": "^[0-9]{8}$", - "type": "string" - }, - "id": { - "description": "Unique identifier for the filing.", - "type": "string" - }, - "period_of_report_date": { - "description": "The period of report for the filing in YYYYMMDD format.", - "example": "20210101", - "pattern": "^[0-9]{8}$", - "type": "string" - }, - "source_url": { - "description": "The source URL is a link back to the upstream source for this filing\ndocument.", - "example": "https://www.sec.gov/Archives/edgar/data/0001326801/000132680119000037/0001326801-19-000037-index.html", - "format": "uri", - "type": "string" - }, - "type": { - "description": "Filing Type", - "enum": [ - "10-K", - "10-Q" - ], - "type": "string" - } - }, - "required": [ - "id", - "accession_number", - "type", - "filing_date", - "period_of_report_date", - "files_count", - "source_url", - "download_url", - "entities" - ], - "type": "object", - "x-polygon-go-type": { - "name": "SECFiling", - "path": "github.com/polygon-io/go-lib-models/v2/globals" - } - } - } - }, - "description": "FIXME" - } - }, - "summary": "SEC Filing", - "tags": [ - "reference:sec:filing" - ], - "x-polygon-entitlement-data-type": { - "description": "Reference data", - "name": "reference" - } - }, - "x-polygon-draft": true - }, - "/v1/reference/sec/filings/{filing_id}/files": { - "get": { - "description": "List filing files", - "operationId": "ListFilingFiles", - "parameters": [ - { - "description": "Select by filing id.", - "in": "path", - "name": "filing_id", - "schema": { - "description": "Unique identifier for the filing.", - "type": "string" - } - }, - { - "description": "Query by file sequence number.", - "in": "query", - "name": "sequence", - "schema": { - "description": "File Sequence Number", - "format": "int64", - "max": 999, - "min": 1, - "type": "integer" - }, - "x-polygon-filter-field": { - "range": true + }, + "x-massive-filter-field": { + "range": true } }, { - "description": "Query by file name.", + "description": "The size of the aggregate time window.", + "example": "day", "in": "query", - "name": "filename", + "name": "timespan", "schema": { - "description": "The name for the file.", + "default": "day", + "enum": [ + "minute", + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], "type": "string" - }, - "x-polygon-filter-field": { - "range": true } }, { - "description": "Search by sequence.", + "description": "The short window size used to calculate MACD data.", + "example": 12, "in": "query", - "name": "sequence.gte", + "name": "short_window", "schema": { - "description": "File Sequence Number", - "format": "int64", - "max": 999, - "min": 1, + "default": 12, "type": "integer" } }, { - "description": "Search by sequence.", + "description": "The long window size used to calculate MACD data.", + "example": 26, "in": "query", - "name": "sequence.gt", + "name": "long_window", "schema": { - "description": "File Sequence Number", - "format": "int64", - "max": 999, - "min": 1, + "default": 26, "type": "integer" } }, { - "description": "Search by sequence.", + "description": "The window size used to calculate the MACD signal line.", + "example": 9, "in": "query", - "name": "sequence.lte", + "name": "signal_window", "schema": { - "description": "File Sequence Number", - "format": "int64", - "max": 999, - "min": 1, + "default": 9, "type": "integer" } }, { - "description": "Search by sequence.", + "description": "The price in the aggregate which will be used to calculate MACD data. i.e. 'close' will result in using close prices to \ncalculate the MACD.", + "example": "close", "in": "query", - "name": "sequence.lt", + "name": "series_type", "schema": { - "description": "File Sequence Number", - "format": "int64", - "max": 999, - "min": 1, - "type": "integer" + "default": "close", + "enum": [ + "open", + "high", + "low", + "close" + ], + "type": "string" } }, { - "description": "Search by filename.", + "description": "Whether or not to include the aggregates used to calculate this indicator in the response.", "in": "query", - "name": "filename.gte", + "name": "expand_underlying", "schema": { - "description": "The name for the file.", - "type": "string" + "default": false, + "type": "boolean" } }, { - "description": "Search by filename.", + "description": "The order in which to return the results, ordered by timestamp.", + "example": "desc", "in": "query", - "name": "filename.gt", + "name": "order", "schema": { - "description": "The name for the file.", + "default": "desc", + "enum": [ + "asc", + "desc" + ], "type": "string" } }, { - "description": "Search by filename.", + "description": "Limit the number of results returned, default is 10 and max is 5000", "in": "query", - "name": "filename.lte", + "name": "limit", "schema": { - "description": "The name for the file.", - "type": "string" + "default": 10, + "maximum": 5000, + "type": "integer" } }, { - "description": "Search by filename.", + "description": "Range by timestamp.", "in": "query", - "name": "filename.lt", + "name": "timestamp.gte", "schema": { - "description": "The name for the file.", "type": "string" } }, { - "description": "Order results based on the `sort` field.", + "description": "Range by timestamp.", "in": "query", - "name": "order", + "name": "timestamp.gt", "schema": { - "enum": [ - "asc", - "desc" - ], - "example": "asc", "type": "string" } }, { - "description": "Limit the number of results returned, default is 10 and max is 1000.", + "description": "Range by timestamp.", "in": "query", - "name": "limit", + "name": "timestamp.lte", "schema": { - "default": 10, - "example": 10, - "maximum": 1000, - "minimum": 1, - "type": "integer" + "type": "string" } }, { - "description": "Sort field used for ordering.", + "description": "Range by timestamp.", "in": "query", - "name": "sort", + "name": "timestamp.lt", "schema": { - "default": "sequence", - "enum": [ - "sequence", - "filename" - ], - "example": "sequence", "type": "string" } } @@ -6732,229 +7502,362 @@ "200": { "content": { "application/json": { - "description": "FIXME", - "example": {}, + "example": { + "next_url": "https://api.massive.com/v1/indicators/macd/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", + "results": { + "underlying": { + "url": "https://api.massive.com/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25" + }, + "values": [ + { + "histogram": 38.3801666667, + "signal": 106.9811666667, + "timestamp": 1517562000016, + "value": 145.3613333333 + }, + { + "histogram": 41.098859136, + "signal": 102.7386283473, + "timestamp": 1517562001016, + "value": 143.8374874833 + } + ] + }, + "status": "OK" + }, "schema": { "properties": { - "count": { - "type": "integer" - }, "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", "type": "string" }, "request_id": { + "description": "A request id assigned by the server.", "type": "string" }, "results": { - "items": { - "description": "File associated with the filing.\n\nThis provides information to uniquly identify the additional data and a URL\nwhere the file may be downloaded.", - "properties": { - "description": { - "description": "A description for the contents of the file.", - "type": "string" - }, - "filename": { - "description": "The name for the file.", - "type": "string" - }, - "id": { - "description": "An identifier unique to the filing for this data entry.", - "example": "1", - "type": "string" - }, - "sequence": { - "description": "File Sequence Number", - "format": "int64", - "max": 999, - "min": 1, - "type": "integer" - }, - "size_bytes": { - "description": "The size of the file in bytes.", - "format": "int64", - "type": "integer" - }, - "source_url": { - "description": "The source URL is a link back to the upstream source for this file.", - "format": "uri", - "type": "string" + "properties": { + "underlying": { + "properties": { + "aggregates": { + "items": { + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "format": "float", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "float", + "type": "number" + } + }, + "required": [ + "v", + "vw", + "o", + "c", + "h", + "l", + "t", + "n" + ], + "type": "object", + "x-massive-go-type": { + "name": "Aggregate", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + }, + "type": "array" + }, + "url": { + "description": "The URL which can be used to request the underlying aggregates used in this request.", + "type": "string" + } }, - "type": { - "description": "The type of document contained in the file.", - "type": "string" - } + "type": "object" }, - "required": [ - "id", - "file", - "description", - "type", - "size_bytes", - "sequence", - "source_url" - ], - "type": "object", - "x-polygon-go-type": { - "name": "SECFilingFile", - "path": "github.com/polygon-io/go-lib-models/v2/globals" + "values": { + "items": { + "properties": { + "histogram": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } + }, + "signal": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } + }, + "timestamp": { + "description": "The Unix Msec timestamp from the last aggregate used in this calculation.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "IMicroseconds", + "path": "github.com/massive-com/ptime" + } + }, + "value": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } + } + }, + "type": "object" + }, + "type": "array" } }, - "type": "array" + "type": "object", + "x-massive-go-type": { + "name": "MACDResults" + } }, "status": { + "description": "The status of this request's response.", "type": "string" } }, - "required": [ - "status", - "request_id", - "count", - "results" - ], "type": "object" } + }, + "text/csv": { + "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value,signal,histogram\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664323200000,225076,,0,,0,0,0,0,0,false,1664323200000,-200.79662915774315,-281.5009533935604,80.70432423581724\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664236800000,183075,,0,,0,0,0,0,0,false,1664236800000,-264.55324270273195,-316.4388906203941,51.88564791766214\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664150400000,297389,,0,,0,0,0,0,0,false,1664150400000,-317.75700272815084,-339.5909474061525,21.83394467800167\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664078400000,78936,,0,,0,0,0,0,0,false,1664078400000,-350.23805379084297,-345.0494335756529,-5.188620215190042\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664064000000,78936,,0,,0,0,0,0,0,false,1664064000000,-347.75055091027025,-343.7522785218554,-3.9982723884148754\nX:BTCUSD,2868.09828007,19069.8521,0,19210.31,18925.87,19400,18805.1,1663992000000,58721,,0,,0,0,0,0,0,false,1663992000000,-339.51740285673077,-342.7527104247516,3.2353075680208576\nX:BTCUSD,11337.77105153,19346.509,0,19527.23,19487.24,19640,18846.95,1664409600000,142239,,0,,0,0,0,0,0,false,1664409600000,-130.70646519456568,-232.81921860513586,102.11275341057018\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664337600000,225076,,0,,0,0,0,0,0,false,1664337600000,-165.73322121465026,-258.3474069577784,92.61418574312813\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664251200000,183075,,0,,0,0,0,0,0,false,1664251200000,-242.62960978099727,-301.6770344525147,59.04742467151743\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664164800000,297389,,0,,0,0,0,0,0,false,1664164800000,-288.68772337443806,-329.4103025998096,40.72257922537153\n", + "schema": { + "type": "string" + } } }, - "description": "FIXME" + "description": "Moving Average Convergence/Divergence (MACD) data for each period." } }, - "summary": "SEC Filing Files", + "summary": "Moving Average Convergence/Divergence (MACD)", "tags": [ - "reference:sec:filing:files" + "crypto:aggregates" ], - "x-polygon-entitlement-data-type": { - "description": "Reference data", - "name": "reference" + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" }, - "x-polygon-paginate": { - "sort": { - "default": "sequence", - "enum": [ - "sequence", - "filename" - ] - } + "x-massive-entitlement-market-type": { + "description": "Crypto data", + "name": "crypto" } }, - "x-polygon-draft": true + "x-massive-ignore": true }, - "/v1/reference/sec/filings/{filing_id}/files/{file_id}": { + "/v1/indicators/macd/{fxTicker}": { "get": { - "description": "Get filing file", - "operationId": "GetFilingFile", + "description": "Get moving average convergence/divergence (MACD) data for a ticker symbol over a given time range.", + "operationId": "ForexMACD", "parameters": [ { - "description": "Select by filing id.", + "description": "The ticker symbol for which to get MACD data.", + "example": "C:EURUSD", "in": "path", - "name": "filing_id", + "name": "fxTicker", + "required": true, "schema": { - "description": "Unique identifier for the filing.", "type": "string" - } + }, + "x-massive-go-id": "Ticker" }, { - "description": "Select by file id.", - "in": "path", - "name": "file_id", + "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "in": "query", + "name": "timestamp", "schema": { - "description": "An identifier unique to the filing for this data entry.", - "example": "1", "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "description": "JavaScript Object Notation (JSON)", - "example": {} - }, - "application/octet-stream": { - "description": "Binary format", - "example": {} - }, - "application/pdf": { - "description": "Adobe Portable Document Format (PDF)", - "example": {} - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { - "description": "Microsoft Excel (OpenXML)", - "example": {} - }, - "application/xml": { - "description": "Extensible Markup Language (XML)", - "example": {} - }, - "application/zip": { - "description": "ZIP archive", - "example": {} - }, - "image/gif": { - "description": "Graphics Interchange Format (GIF)", - "example": {} - }, - "image/jpeg": { - "description": "Joint Photographic Experts Group (JPEG) image", - "example": {} - }, - "image/png": { - "description": "Portable Network Graphics (PNG)", - "example": {} - }, - "text/css": { - "description": "Cascading Style Sheets (CSS)", - "example": {} - }, - "text/html": { - "description": "HyperText Markup Language (HTML)", - "example": {} - }, - "text/javascript": { - "description": "JavaScript", - "example": {} - }, - "text/plain": { - "description": "Text", - "example": {} - } }, - "description": "The file data." - } - }, - "summary": "SEC Filing File", - "tags": [ - "reference:sec:filing:file" - ], - "x-polygon-entitlement-data-type": { - "description": "Reference data", - "name": "reference" - } - }, - "x-polygon-draft": true - }, - "/v2/aggs/grouped/locale/global/market/crypto/{date}": { - "get": { - "description": "Get the daily open, high, low, and close (OHLC) for the entire cryptocurrency markets.\n", - "parameters": [ + "x-massive-filter-field": { + "range": true + } + }, { - "description": "The beginning date for the aggregate window.", - "example": "2020-10-14", - "in": "path", - "name": "date", - "required": true, + "description": "The size of the aggregate time window.", + "example": "day", + "in": "query", + "name": "timespan", "schema": { + "default": "day", + "enum": [ + "minute", + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], "type": "string" } }, { - "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", + "description": "Whether or not the aggregates used to calculate the MACD are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.", "example": true, "in": "query", "name": "adjusted", "schema": { + "default": true, + "type": "boolean" + } + }, + { + "description": "The short window size used to calculate MACD data.", + "example": 12, + "in": "query", + "name": "short_window", + "schema": { + "default": 12, + "type": "integer" + } + }, + { + "description": "The long window size used to calculate MACD data.", + "example": 26, + "in": "query", + "name": "long_window", + "schema": { + "default": 26, + "type": "integer" + } + }, + { + "description": "The window size used to calculate the MACD signal line.", + "example": 9, + "in": "query", + "name": "signal_window", + "schema": { + "default": 9, + "type": "integer" + } + }, + { + "description": "The price in the aggregate which will be used to calculate the MACD. i.e. 'close' will result in using close prices to \ncalculate the MACD.", + "example": "close", + "in": "query", + "name": "series_type", + "schema": { + "default": "close", + "enum": [ + "open", + "high", + "low", + "close" + ], + "type": "string" + } + }, + { + "description": "Whether or not to include the aggregates used to calculate this indicator in the response.", + "in": "query", + "name": "expand_underlying", + "schema": { + "default": false, "type": "boolean" } + }, + { + "description": "The order in which to return the results, ordered by timestamp.", + "example": "desc", + "in": "query", + "name": "order", + "schema": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + { + "description": "Limit the number of results returned, default is 10 and max is 5000", + "in": "query", + "name": "limit", + "schema": { + "default": 10, + "maximum": 5000, + "type": "integer" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gt", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lt", + "schema": { + "type": "string" + } } ], "responses": { @@ -6962,119 +7865,150 @@ "content": { "application/json": { "example": { - "adjusted": true, - "queryCount": 3, - "results": [ - { - "T": "X:ARDRUSD", - "c": 0.0550762, - "h": 0.0550762, - "l": 0.0550762, - "n": 18388, - "o": 0.0550762, - "t": 1580676480000, - "v": 2, - "vw": 0.0551 + "next_url": "https://api.massive.com/v1/indicators/macd/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", + "results": { + "underlying": { + "url": "https://api.massive.com/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25" }, - { - "T": "X:NGCUSD", - "c": 0.0272983, - "h": 0.0273733, - "l": 0.0272983, - "n": 18, - "o": 0.0273733, - "t": 1580674080000, - "v": 4734, - "vw": 0.0273 + "values": [ + { + "histogram": 38.3801666667, + "signal": 106.9811666667, + "timestamp": 1517562000016, + "value": 145.3613333333 + }, + { + "histogram": 41.098859136, + "signal": 102.7386283473, + "timestamp": 1517562001016, + "value": 143.8374874833 + } + ] + }, + "status": "OK" + }, + "schema": { + "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" }, - { - "T": "X:ZSCUSD", - "c": 0.00028531, - "h": 0.00028531, - "l": 0.00028531, - "n": 151, - "o": 0.00028531, - "t": 1580671080000, - "v": 390, - "vw": 0.0003 - } - ], - "resultsCount": 3, - "status": "OK" - }, - "schema": { - "allOf": [ - { - "properties": { - "adjusted": { - "description": "Whether or not this response was adjusted for splits.", - "type": "boolean" - }, - "queryCount": { - "description": "The number of aggregates (minute or day) used to generate the response.", - "type": "integer" - }, - "request_id": { - "description": "A request id assigned by the server.", - "type": "string" - }, - "resultsCount": { - "description": "The total number of results for this request.", - "type": "integer" - }, - "status": { - "description": "The status of this request's response.", - "type": "string" - } - }, - "type": "object" + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" }, - { + "results": { "properties": { - "results": { + "underlying": { + "properties": { + "aggregates": { + "items": { + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "format": "float", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "float", + "type": "number" + } + }, + "required": [ + "v", + "vw", + "o", + "c", + "h", + "l", + "t", + "n" + ], + "type": "object", + "x-massive-go-type": { + "name": "Aggregate", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + }, + "type": "array" + }, + "url": { + "description": "The URL which can be used to request the underlying aggregates used in this request.", + "type": "string" + } + }, + "type": "object" + }, + "values": { "items": { "properties": { - "T": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - }, - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "n": { - "description": "The number of transactions in the aggregate window.", - "type": "integer" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" + "histogram": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" + "signal": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" + "timestamp": { + "description": "The Unix Msec timestamp from the last aggregate used in this calculation.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "IMicroseconds", + "path": "github.com/massive-com/ptime" + } }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" + "value": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } } }, "type": "object" @@ -7082,174 +8016,361 @@ "type": "array" } }, - "type": "object" + "type": "object", + "x-massive-go-type": { + "name": "MACDResults" + } + }, + "status": { + "description": "The status of this request's response.", + "type": "string" } - ] + }, + "type": "object" + } + }, + "text/csv": { + "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value,signal,histogram\nC:USDAUD,687,1.5442,0,1.53763,1.5386983,1.5526022,1.537279,1664409600000,687,,0,,0,0,0,0,0,false,1664409600000,0.0160095063995076,0.016240853664654657,-0.0002313472651470569\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664251200000,536,,0,,0,0,0,0,0,false,1664251200000,0.019060448457087098,0.015690709670065223,0.0033697387870218753\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664164800000,550,,0,,0,0,0,0,0,false,1664164800000,0.017190795754692623,0.013971241529748895,0.003219554224943728\nC:USDAUD,1,1.5314,0,1.5313936,1.5313936,1.5313936,1.5313936,1663977600000,1,,0,,0,0,0,0,0,false,1663977600000,0.014349509127189686,0.010792069356789809,0.0035574397703998766\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664337600000,685,,0,,0,0,0,0,0,false,1664337600000,0.0169083298713677,0.016298690480941423,0.0006096393904262767\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664323200000,685,,0,,0,0,0,0,0,false,1664323200000,0.017968564486413374,0.016146280633334852,0.001822283853078522\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664236800000,536,,0,,0,0,0,0,0,false,1664236800000,0.018356408747553177,0.014848274973309752,0.0035081337742434247\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664150400000,550,,0,,0,0,0,0,0,false,1664150400000,0.016441299960100686,0.01316635297351296,0.0032749469865877255\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664078400000,10,,0,,0,0,0,0,0,false,1664078400000,0.015245524601038118,0.012347616226866026,0.002897908374172092\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664064000000,10,,0,,0,0,0,0,0,false,1664064000000,0.014947418239455779,0.011623139133323003,0.0033242791061327756\n", + "schema": { + "type": "string" } } }, - "description": "The previous day OHLC for the ticker." - }, - "default": { - "description": "Unexpected error" + "description": "Moving Average Convergence/Divergence (MACD) data for each period." } }, - "summary": "Grouped Daily (Bars)", + "summary": "Moving Average Convergence/Divergence (MACD)", "tags": [ - "crypto:aggregates" + "fx:aggregates" ], - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, - "x-polygon-entitlement-market-type": { - "description": "Crypto data", - "name": "crypto" + "x-massive-entitlement-market-type": { + "description": "Forex data", + "name": "fx" } - } + }, + "x-massive-ignore": true }, - "/v2/aggs/grouped/locale/global/market/fx/{date}": { + "/v1/indicators/macd/{indicesTicker}": { "get": { - "description": "Get the daily open, high, low, and close (OHLC) for the entire forex markets.\n", + "description": "Get moving average convergence/divergence (MACD) for a ticker symbol over a given time range.", + "operationId": "IndicesMACD", "parameters": [ { - "description": "The beginning date for the aggregate window.", - "example": "2020-10-14", + "description": "The ticker symbol for which to get MACD data.", + "example": "I:NDX", "in": "path", - "name": "date", + "name": "indicesTicker", "required": true, "schema": { "type": "string" + }, + "x-massive-go-id": "Ticker" + }, + { + "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "in": "query", + "name": "timestamp", + "schema": { + "type": "string" + }, + "x-massive-filter-field": { + "range": true } }, { - "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", + "description": "The size of the aggregate time window.", + "example": "day", + "in": "query", + "name": "timespan", + "schema": { + "default": "day", + "enum": [ + "minute", + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "type": "string" + } + }, + { + "description": "Whether or not the aggregates used to calculate the MACD are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.", "example": true, "in": "query", "name": "adjusted", "schema": { + "default": true, "type": "boolean" } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "adjusted": true, - "queryCount": 3, - "results": [ - { - "T": "C:ILSCHF", - "c": 0.2704, - "h": 0.2706, - "l": 0.2693, - "n": 689, - "o": 0.2698, - "t": 1602719999999, - "v": 689, - "vw": 0.2702 - }, - { - "T": "C:GBPCAD", - "c": 1.71103, - "h": 1.71642, - "l": 1.69064, - "n": 407324, - "o": 1.69955, - "t": 1602719999999, - "v": 407324, - "vw": 1.7062 - }, - { - "T": "C:DKKAUD", - "c": 0.2214, - "h": 0.2214, - "l": 0.2195, - "n": 10639, - "o": 0.22, - "t": 1602719999999, - "v": 10639, - "vw": 0.2202 - } - ], - "resultsCount": 3, - "status": "OK" - }, - "schema": { - "allOf": [ - { - "properties": { - "adjusted": { - "description": "Whether or not this response was adjusted for splits.", - "type": "boolean" - }, - "queryCount": { - "description": "The number of aggregates (minute or day) used to generate the response.", - "type": "integer" - }, - "request_id": { - "description": "A request id assigned by the server.", - "type": "string" - }, - "resultsCount": { - "description": "The total number of results for this request.", - "type": "integer" - }, - "status": { - "description": "The status of this request's response.", - "type": "string" - } + }, + { + "description": "The short window size used to calculate MACD data.", + "example": 12, + "in": "query", + "name": "short_window", + "schema": { + "default": 12, + "type": "integer" + } + }, + { + "description": "The long window size used to calculate MACD data.", + "example": 26, + "in": "query", + "name": "long_window", + "schema": { + "default": 26, + "type": "integer" + } + }, + { + "description": "The window size used to calculate the MACD signal line.", + "example": 9, + "in": "query", + "name": "signal_window", + "schema": { + "default": 9, + "type": "integer" + } + }, + { + "description": "The value in the aggregate which will be used to calculate the MACD. i.e. 'close' will result in using close values to \ncalculate the MACD.", + "example": "close", + "in": "query", + "name": "series_type", + "schema": { + "default": "close", + "enum": [ + "open", + "high", + "low", + "close" + ], + "type": "string" + } + }, + { + "description": "Whether or not to include the aggregates used to calculate this indicator in the response.", + "in": "query", + "name": "expand_underlying", + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "description": "The order in which to return the results, ordered by timestamp.", + "example": "desc", + "in": "query", + "name": "order", + "schema": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + { + "description": "Limit the number of results returned, default is 10 and max is 5000", + "in": "query", + "name": "limit", + "schema": { + "default": 10, + "maximum": 5000, + "type": "integer" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gt", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lt", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "next_url": "https://api.massive.com/v1/indicators/macd/I:NDX?cursor=YWRqdXN0ZWQ9dHJ1ZSZhcD0lN0IlMjJ2JTIyJTNBMCUyQyUyMm8lMjIlM0EwJTJDJTIyYyUyMiUzQTE1MDg0Ljk5OTM4OTgyMDAzJTJDJTIyaCUyMiUzQTAlMkMlMjJsJTIyJTNBMCUyQyUyMnQlMjIlM0ExNjg3MTUwODAwMDAwJTdEJmFzPSZleHBhbmRfdW5kZXJseWluZz1mYWxzZSZsaW1pdD0yJmxvbmdfd2luZG93PTI2Jm9yZGVyPWRlc2Mmc2VyaWVzX3R5cGU9Y2xvc2Umc2hvcnRfd2luZG93PTEyJnNpZ25hbF93aW5kb3c9OSZ0aW1lc3Bhbj1kYXkmdGltZXN0YW1wLmx0PTE2ODcyMTkyMDAwMDA", + "request_id": "2eeda0be57e83cbc64cc8d1a74e84dbd", + "results": { + "underlying": { + "url": "https://api.massive.com/v2/aggs/ticker/I:NDX/range/1/day/1678338000000/1687366537196?limit=121&sort=desc" + }, + "values": [ + { + "histogram": -4.7646219788108795, + "signal": 220.7596784587801, + "timestamp": 1687237200000, + "value": 215.9950564799692 }, - "type": "object" + { + "histogram": 3.4518937661882205, + "signal": 221.9508339534828, + "timestamp": 1687219200000, + "value": 225.40272771967102 + } + ] + }, + "status": "OK" + }, + "schema": { + "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" }, - { + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "results": { "properties": { - "results": { + "underlying": { + "properties": { + "aggregates": { + "items": { + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "format": "float", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "float", + "type": "number" + } + }, + "required": [ + "v", + "vw", + "o", + "c", + "h", + "l", + "t", + "n" + ], + "type": "object", + "x-massive-go-type": { + "name": "Aggregate", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + }, + "type": "array" + }, + "url": { + "description": "The URL which can be used to request the underlying aggregates used in this request.", + "type": "string" + } + }, + "type": "object" + }, + "values": { "items": { "properties": { - "T": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - }, - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "n": { - "description": "The number of transactions in the aggregate window.", - "type": "integer" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" + "histogram": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" + "signal": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" + "timestamp": { + "description": "The Unix Msec timestamp from the last aggregate used in this calculation.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "IMicroseconds", + "path": "github.com/massive-com/ptime" + } }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" + "value": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } } }, "type": "object" @@ -7257,241 +8378,205 @@ "type": "array" } }, - "type": "object" + "type": "object", + "x-massive-go-type": { + "name": "MACDResults" + } + }, + "status": { + "description": "The status of this request's response.", + "type": "string" } - ] + }, + "type": "object" } } }, - "description": "Previous day OHLC for ticker" - }, - "default": { - "description": "Unexpected error" + "description": "Moving Average Convergence/Divergence (MACD) data for each period." } }, - "summary": "Grouped Daily (Bars)", + "summary": "Moving Average Convergence/Divergence (MACD)", "tags": [ - "fx:aggregates" + "indices:aggregates" ], - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-allowed-limited-tickers": true, + "x-massive-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, - "x-polygon-entitlement-market-type": { - "description": "Forex data", - "name": "fx" + "x-massive-entitlement-market-type": { + "description": "Indices data", + "name": "indices" } - } + }, + "x-massive-ignore": true }, - "/v2/aggs/grouped/locale/us/market/stocks/{date}": { + "/v1/indicators/macd/{optionsTicker}": { "get": { - "description": "Get the daily open, high, low, and close (OHLC) for the entire stocks/equities markets.\n", + "description": "Get moving average convergence/divergence (MACD) for a ticker symbol over a given time range.", + "operationId": "OptionsMACD", "parameters": [ { - "description": "The beginning date for the aggregate window.", - "example": "2020-10-14", + "description": "The ticker symbol for which to get MACD data.", + "example": "O:SPY241220P00720000", "in": "path", - "name": "date", + "name": "optionsTicker", "required": true, "schema": { "type": "string" - } + }, + "x-massive-go-id": "Ticker" }, { - "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", - "example": true, + "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", "in": "query", - "name": "adjusted", + "name": "timestamp", "schema": { - "type": "boolean" + "type": "string" + }, + "x-massive-filter-field": { + "range": true } }, { - "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n", + "description": "The size of the aggregate time window.", + "example": "day", "in": "query", - "name": "include_otc", + "name": "timespan", + "schema": { + "default": "day", + "enum": [ + "minute", + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "type": "string" + } + }, + { + "description": "Whether or not the aggregates used to calculate the MACD are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.", + "example": true, + "in": "query", + "name": "adjusted", "schema": { + "default": true, "type": "boolean" } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "adjusted": true, - "queryCount": 3, - "results": [ - { - "T": "KIMpL", - "c": 25.9102, - "h": 26.25, - "l": 25.91, - "n": 74, - "o": 26.07, - "t": 1602705600000, - "v": 4369, - "vw": 26.0407 - }, - { - "T": "TANH", - "c": 23.4, - "h": 24.763, - "l": 22.65, - "n": 1096, - "o": 24.5, - "t": 1602705600000, - "v": 25933.6, - "vw": 23.493 - }, - { - "T": "VSAT", - "c": 34.24, - "h": 35.47, - "l": 34.21, - "n": 4966, - "o": 34.9, - "t": 1602705600000, - "v": 312583, - "vw": 34.4736 - } - ], - "resultsCount": 3, - "status": "OK" - }, - "schema": { - "allOf": [ - { - "properties": { - "adjusted": { - "description": "Whether or not this response was adjusted for splits.", - "type": "boolean" - }, - "queryCount": { - "description": "The number of aggregates (minute or day) used to generate the response.", - "type": "integer" - }, - "request_id": { - "description": "A request id assigned by the server.", - "type": "string" - }, - "resultsCount": { - "description": "The total number of results for this request.", - "type": "integer" - }, - "status": { - "description": "The status of this request's response.", - "type": "string" - } - }, - "type": "object" - }, - { - "properties": { - "results": { - "items": { - "properties": { - "T": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - }, - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "n": { - "description": "The number of transactions in the aggregate window.", - "type": "integer" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "otc": { - "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", - "type": "boolean" - }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - } - ] - } - } - }, - "description": "Previous day OHLC for ticker" }, - "default": { - "description": "Unexpected error" - } - }, - "summary": "Grouped Daily (Bars)", - "tags": [ - "stocks:aggregates" - ], - "x-polygon-entitlement-data-type": { - "description": "Aggregate data", - "name": "aggregates" - }, - "x-polygon-entitlement-market-type": { - "description": "Stocks data", - "name": "stocks" - } - } - }, - "/v2/aggs/ticker/{cryptoTicker}/prev": { - "get": { - "description": "Get the previous day's open, high, low, and close (OHLC) for the specified cryptocurrency pair.\n", - "parameters": [ { - "description": "The ticker symbol of the currency pair.", - "example": "X:BTCUSD", - "in": "path", - "name": "cryptoTicker", - "required": true, + "description": "The short window size used to calculate MACD data.", + "example": 12, + "in": "query", + "name": "short_window", + "schema": { + "default": 12, + "type": "integer" + } + }, + { + "description": "The long window size used to calculate MACD data.", + "example": 26, + "in": "query", + "name": "long_window", + "schema": { + "default": 26, + "type": "integer" + } + }, + { + "description": "The window size used to calculate the MACD signal line.", + "example": 9, + "in": "query", + "name": "signal_window", + "schema": { + "default": 9, + "type": "integer" + } + }, + { + "description": "The price in the aggregate which will be used to calculate the MACD. i.e. 'close' will result in using close prices to \ncalculate the MACD.", + "example": "close", + "in": "query", + "name": "series_type", "schema": { + "default": "close", + "enum": [ + "open", + "high", + "low", + "close" + ], "type": "string" } }, { - "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", - "example": true, + "description": "Whether or not to include the aggregates used to calculate this indicator in the response.", "in": "query", - "name": "adjusted", + "name": "expand_underlying", "schema": { + "default": false, "type": "boolean" } + }, + { + "description": "The order in which to return the results, ordered by timestamp.", + "example": "desc", + "in": "query", + "name": "order", + "schema": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + { + "description": "Limit the number of results returned, default is 10 and max is 5000", + "in": "query", + "name": "limit", + "schema": { + "default": 10, + "maximum": 5000, + "type": "integer" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gt", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lt", + "schema": { + "type": "string" + } } ], "responses": { @@ -7499,107 +8584,150 @@ "content": { "application/json": { "example": { - "adjusted": true, - "queryCount": 1, - "request_id": "b2170df985474b6d21a6eeccfb6bee67", - "results": [ - { - "T": "X:BTCUSD", - "c": 16035.9, - "h": 16180, - "l": 15639.2, - "o": 15937.1, - "t": 1605416400000, - "v": 95045.16897951, - "vw": 15954.2111 - } - ], - "resultsCount": 1, - "status": "OK", - "ticker": "X:BTCUSD" + "next_url": "https://api.massive.com/v1/indicators/macd/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", + "results": { + "underlying": { + "url": "https://api.massive.com/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25" + }, + "values": [ + { + "histogram": 38.3801666667, + "signal": 106.9811666667, + "timestamp": 1517562000016, + "value": 145.3613333333 + }, + { + "histogram": 41.098859136, + "signal": 102.7386283473, + "timestamp": 1517562001016, + "value": 143.8374874833 + } + ] + }, + "status": "OK" }, "schema": { - "allOf": [ - { - "properties": { - "ticker": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - } - }, - "type": "object" + "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" }, - { - "properties": { - "adjusted": { - "description": "Whether or not this response was adjusted for splits.", - "type": "boolean" - }, - "queryCount": { - "description": "The number of aggregates (minute or day) used to generate the response.", - "type": "integer" - }, - "request_id": { - "description": "A request id assigned by the server.", - "type": "string" - }, - "resultsCount": { - "description": "The total number of results for this request.", - "type": "integer" - }, - "status": { - "description": "The status of this request's response.", - "type": "string" - } - }, - "type": "object" + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" }, - { + "results": { "properties": { - "results": { + "underlying": { + "properties": { + "aggregates": { + "items": { + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "format": "float", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "float", + "type": "number" + } + }, + "required": [ + "v", + "vw", + "o", + "c", + "h", + "l", + "t", + "n" + ], + "type": "object", + "x-massive-go-type": { + "name": "Aggregate", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + }, + "type": "array" + }, + "url": { + "description": "The URL which can be used to request the underlying aggregates used in this request.", + "type": "string" + } + }, + "type": "object" + }, + "values": { "items": { "properties": { - "T": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - }, - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "n": { - "description": "The number of transactions in the aggregate window.", - "type": "integer" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" + "histogram": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" + "signal": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" + "timestamp": { + "description": "The Unix Msec timestamp from the last aggregate used in this calculation.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "IMicroseconds", + "path": "github.com/massive-com/ptime" + } }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" + "value": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } } }, "type": "object" @@ -7607,63 +8735,78 @@ "type": "array" } }, - "type": "object" + "type": "object", + "x-massive-go-type": { + "name": "MACDResults" + } + }, + "status": { + "description": "The status of this request's response.", + "type": "string" } - ] + }, + "type": "object" + } + }, + "text/csv": { + "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value,signal,histogram\nO:SPY241220P00720000,3,277.8267,0,277.82,277.83,277.83,277.82,1649649600000,2,,0,,0,0,0,0,0,false,1649649600000,-0.05105556065990413,3.5771695836806834,-3.6282251443405875\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649304000000,1,,0,,0,0,0,0,0,false,1649304000000,4.047960862047148,5.247666286053219,-1.199705424006071\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648785600000,1,,0,,0,0,0,0,0,false,1648785600000,5.255380647906861,6.466477305754766,-1.2110966578479045\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648699200000,1,,0,,0,0,0,0,0,false,1648699200000,5.591072756938104,6.769251470216741,-1.178178713278637\nO:SPY241220P00720000,2,270.49,0,270.49,270.49,270.49,270.49,1649390400000,1,,0,,0,0,0,0,0,false,1649390400000,1.4304642046162712,4.48422586976583,-3.053761665149559\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649217600000,1,,0,,0,0,0,0,0,false,1649217600000,4.32835898317461,5.547592642054737,-1.2192336588801274\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649131200000,1,,0,,0,0,0,0,0,false,1649131200000,4.623290999840208,5.852401056774768,-1.2291100569345605\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649044800000,1,,0,,0,0,0,0,0,false,1649044800000,4.932483632022979,6.159678571008409,-1.2271949389854298\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648612800000,1,,0,,0,0,0,0,0,false,1648612800000,5.93821326327344,7.063796148536399,-1.1255828852629595\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648526400000,1,,0,,0,0,0,0,0,false,1648526400000,6.294916771166584,7.345191869852139,-1.050275098685555\n", + "schema": { + "type": "string" } } }, - "description": "The previous day OHLC for a ticker." - }, - "default": { - "description": "Unexpected error" + "description": "Moving Average Convergence/Divergence (MACD) data for each period." } }, - "summary": "Previous Close", + "summary": "Moving Average Convergence/Divergence (MACD)", "tags": [ - "crypto:aggregates" + "options:aggregates" ], - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, - "x-polygon-entitlement-market-type": { - "description": "Crypto data", - "name": "crypto" + "x-massive-entitlement-market-type": { + "description": "Options data", + "name": "options" } - } + }, + "x-massive-ignore": true }, - "/v2/aggs/ticker/{cryptoTicker}/range/{multiplier}/{timespan}/{from}/{to}": { + "/v1/indicators/macd/{stockTicker}": { "get": { - "description": "Get aggregate bars for a cryptocurrency pair over a given date range in custom time window sizes.\n\u003cbr /\u003e\n\u003cbr /\u003e\nFor example, if timespan = ‘minute’ and multiplier = ‘5’ then 5-minute bars will be returned.\n", + "description": "Get moving average convergence/divergence (MACD) data for a ticker symbol over a given time range.", + "operationId": "MACD", "parameters": [ { - "description": "The ticker symbol of the currency pair.", - "example": "X:BTCUSD", + "description": "Specify a case-sensitive ticker symbol for which to get moving average convergence/divergence (MACD) data. For example, AAPL represents Apple Inc.", + "example": "AAPL", "in": "path", - "name": "cryptoTicker", + "name": "stockTicker", "required": true, "schema": { "type": "string" - } + }, + "x-massive-go-id": "Ticker" }, { - "description": "The size of the timespan multiplier.", - "example": 1, - "in": "path", - "name": "multiplier", - "required": true, + "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "in": "query", + "name": "timestamp", "schema": { - "type": "integer" + "type": "string" + }, + "x-massive-filter-field": { + "range": true } }, { - "description": "The size of the time window.", + "description": "The size of the aggregate time window.", "example": "day", - "in": "path", + "in": "query", "name": "timespan", - "required": true, "schema": { + "default": "day", "enum": [ "minute", "hour", @@ -7677,168 +8820,276 @@ } }, { - "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", - "example": "2021-07-22", - "in": "path", - "name": "from", - "required": true, + "description": "Whether or not the aggregates used to calculate the MACD are adjusted for splits. By default, aggregates are adjusted. Set this to false to get results that are NOT adjusted for splits.", + "example": true, + "in": "query", + "name": "adjusted", "schema": { - "type": "string" + "default": true, + "type": "boolean" } }, { - "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", - "example": "2021-07-22", - "in": "path", - "name": "to", - "required": true, + "description": "The short window size used to calculate MACD data.", + "example": 12, + "in": "query", + "name": "short_window", "schema": { - "type": "string" + "default": 12, + "type": "integer" } }, { - "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", - "example": true, + "description": "The long window size used to calculate MACD data.", + "example": 26, "in": "query", - "name": "adjusted", + "name": "long_window", "schema": { - "type": "boolean" + "default": 26, + "type": "integer" } }, { - "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n", - "example": "asc", + "description": "The window size used to calculate the MACD signal line.", + "example": 9, "in": "query", - "name": "sort", + "name": "signal_window", + "schema": { + "default": 9, + "type": "integer" + } + }, + { + "description": "The price in the aggregate which will be used to calculate the MACD. i.e. 'close' will result in using close prices to \ncalculate the MACD.", + "example": "close", + "in": "query", + "name": "series_type", "schema": { + "default": "close", "enum": [ - "asc", - "desc" - ] + "open", + "high", + "low", + "close" + ], + "type": "string" } }, { - "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on \n\u003ca href=\"https://polygon.io/blog/aggs-api-updates/\" target=\"_blank\" alt=\"Aggregate Data API Improvements\"\u003eAggregate Data API Improvements\u003c/a\u003e.\n", - "example": 120, + "description": "Whether or not to include the aggregates used to calculate this indicator in the response.", "in": "query", - "name": "limit", + "name": "expand_underlying", "schema": { - "type": "integer" + "default": false, + "type": "boolean" } - } + }, + { + "description": "The order in which to return the results, ordered by timestamp.", + "example": "desc", + "in": "query", + "name": "order", + "schema": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + { + "description": "Limit the number of results returned, default is 10 and max is 5000", + "in": "query", + "name": "limit", + "schema": { + "default": 10, + "maximum": 5000, + "type": "integer" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gt", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lt", + "schema": { + "type": "string" + } + } ], "responses": { "200": { "content": { "application/json": { "example": { - "adjusted": true, - "queryCount": 2, - "request_id": "0cf72b6da685bcd386548ffe2895904a", - "results": [ - { - "c": 10094.75, - "h": 10429.26, - "l": 9490, - "n": 1, - "o": 9557.9, - "t": 1590984000000, - "v": 303067.6562332156, - "vw": 9874.5529 + "next_url": "https://api.massive.com/v1/indicators/macd/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", + "results": { + "underlying": { + "url": "https://api.massive.com/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25" }, - { - "c": 9492.62, - "h": 10222.72, - "l": 9135.68, - "n": 1, - "o": 10096.87, - "t": 1591070400000, - "v": 323339.6922892879, - "vw": 9729.5701 - } - ], - "resultsCount": 2, - "status": "OK", - "ticker": "X:BTCUSD" + "values": [ + { + "histogram": 38.3801666667, + "signal": 106.9811666667, + "timestamp": 1517562000016, + "value": 145.3613333333 + }, + { + "histogram": 41.098859136, + "signal": 102.7386283473, + "timestamp": 1517562001016, + "value": 143.8374874833 + } + ] + }, + "status": "OK" }, "schema": { - "allOf": [ - { - "properties": { - "ticker": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - } - }, - "type": "object" + "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" }, - { - "properties": { - "adjusted": { - "description": "Whether or not this response was adjusted for splits.", - "type": "boolean" - }, - "queryCount": { - "description": "The number of aggregates (minute or day) used to generate the response.", - "type": "integer" - }, - "request_id": { - "description": "A request id assigned by the server.", - "type": "string" - }, - "resultsCount": { - "description": "The total number of results for this request.", - "type": "integer" - }, - "status": { - "description": "The status of this request's response.", - "type": "string" - } - }, - "type": "object" + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" }, - { + "results": { "properties": { - "results": { + "underlying": { + "properties": { + "aggregates": { + "items": { + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "format": "float", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "float", + "type": "number" + } + }, + "required": [ + "v", + "vw", + "o", + "c", + "h", + "l", + "t", + "n" + ], + "type": "object", + "x-massive-go-type": { + "name": "Aggregate", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + }, + "type": "array" + }, + "url": { + "description": "The URL which can be used to request the underlying aggregates used in this request.", + "type": "string" + } + }, + "type": "object" + }, + "values": { "items": { "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "n": { - "description": "The number of transactions in the aggregate window.", - "type": "integer" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" + "histogram": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" + "signal": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" + "timestamp": { + "description": "The Unix Msec timestamp from the last aggregate used in this calculation.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "IMicroseconds", + "path": "github.com/massive-com/ptime" + } }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" + "value": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } } }, "type": "object" @@ -7846,227 +9097,77 @@ "type": "array" } }, - "type": "object" + "type": "object", + "x-massive-go-type": { + "name": "MACDResults" + } + }, + "status": { + "description": "The status of this request's response.", + "type": "string" } - ] + }, + "type": "object" + } + }, + "text/csv": { + "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value,signal,histogram\nAAPL,1.27842348E+08,142.9013,0,146.1,142.48,146.72,140.68,1664424000000,1061605,,0,,0,0,0,0,0,false,1664424000000,-5.413804946923619,-3.8291158739479005,-1.5846890729757188\nAAPL,8.4461761E+07,152.1354,0,152.74,151.76,154.72,149.945,1664251200000,683781,,0,,0,0,0,0,0,false,1664251200000,-4.63165683097526,-3.098305244715017,-1.5333515862602427\nAAPL,9.3339409E+07,151.5222,0,149.66,150.77,153.7701,149.64,1664164800000,747666,,0,,0,0,0,0,0,false,1664164800000,-4.581291216131007,-2.7149673481499565,-1.86632386798105\nAAPL,9.3308449E+07,156.1877,0,157.34,153.72,158.61,153.6,1663732800000,712645,,0,,0,0,0,0,0,false,1663732800000,-3.6311474313744156,-1.1648824074663984,-2.4662650239080173\nAAPL,1.64879031E+08,150.2387,0,151.21,150.7,151.35,148.37,1663300800000,850358,,0,,0,0,0,0,0,false,1663300800000,-2.533545758578896,0.9308104167079131,-3.464356175286809\nAAPL,1.46755122E+08,147.599,0,147.64,149.84,150.6414,144.84,1664337600000,1140818,,0,,0,0,0,0,0,false,1664337600000,-4.771497049659786,-3.432943605703971,-1.3385534439558149\nAAPL,9.6031641E+07,150.0222,0,151.19,150.43,151.47,148.56,1663905600000,766888,,0,,0,0,0,0,0,false,1663905600000,-4.349569413677017,-2.2483863811546936,-2.1011830325223233\nAAPL,8.6651514E+07,152.5709,0,152.38,152.74,154.47,150.91,1663819200000,686866,,0,,0,0,0,0,0,false,1663819200000,-3.9559234852549707,-1.7230906230241128,-2.232832862230858\nAAPL,1.07691097E+08,156.1317,0,153.4,156.9,158.08,153.08,1663646400000,792177,,0,,0,0,0,0,0,false,1663646400000,-3.2635802145105117,-0.548316151489394,-2.7152640630211176\nAAPL,8.1599225E+07,152.5505,0,149.31,154.48,154.56,149.1,1663560000000,671961,,0,,0,0,0,0,0,false,1663560000000,-3.070742345502225,0.13049986426588545,-3.2012422097681106\n", + "schema": { + "type": "string" } } }, - "description": "Cryptocurrency Aggregates." - }, - "default": { - "description": "Unexpected error" + "description": "Moving Average Convergence/Divergence (MACD) data for each period." } }, - "summary": "Aggregates (Bars)", + "summary": "Moving Average Convergence/Divergence (MACD)", "tags": [ - "crypto:aggregates" + "stocks:aggregates" ], - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, - "x-polygon-entitlement-market-type": { - "description": "Crypto data", - "name": "crypto" + "x-massive-entitlement-market-type": { + "description": "Stocks data", + "name": "stocks" } } }, - "/v2/aggs/ticker/{forexTicker}/prev": { + "/v1/indicators/rsi/{cryptoTicker}": { "get": { - "description": "Get the previous day's open, high, low, and close (OHLC) for the specified forex pair.\n", + "description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.", + "operationId": "CryptoRSI", "parameters": [ { - "description": "The ticker symbol of the currency pair.", - "example": "C:EURUSD", + "description": "The ticker symbol for which to get relative strength index (RSI) data.", + "example": "X:BTCUSD", "in": "path", - "name": "forexTicker", + "name": "cryptoTicker", "required": true, "schema": { "type": "string" - } + }, + "x-massive-go-id": "Ticker" }, { - "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", - "example": true, + "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", "in": "query", - "name": "adjusted", - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "adjusted": true, - "queryCount": 1, - "request_id": "08ec061fb85115678d68452c0a609cb7", - "results": [ - { - "T": "C:EURUSD", - "c": 1.06206, - "h": 1.0631, - "l": 1.0505, - "n": 180300, - "o": 1.05252, - "t": 1651708799999, - "v": 180300, - "vw": 1.055 - } - ], - "resultsCount": 1, - "status": "OK", - "ticker": "C:EURUSD" - }, - "schema": { - "allOf": [ - { - "properties": { - "ticker": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - } - }, - "type": "object" - }, - { - "properties": { - "adjusted": { - "description": "Whether or not this response was adjusted for splits.", - "type": "boolean" - }, - "queryCount": { - "description": "The number of aggregates (minute or day) used to generate the response.", - "type": "integer" - }, - "request_id": { - "description": "A request id assigned by the server.", - "type": "string" - }, - "resultsCount": { - "description": "The total number of results for this request.", - "type": "integer" - }, - "status": { - "description": "The status of this request's response.", - "type": "string" - } - }, - "type": "object" - }, - { - "properties": { - "results": { - "items": { - "properties": { - "T": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - }, - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "n": { - "description": "The number of transactions in the aggregate window.", - "type": "integer" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - } - ] - } - } - }, - "description": "The previous day OHLC for the ticker." - }, - "default": { - "description": "Unexpected error" - } - }, - "summary": "Previous Close", - "tags": [ - "fx:aggregates" - ], - "x-polygon-entitlement-data-type": { - "description": "Aggregate data", - "name": "aggregates" - }, - "x-polygon-entitlement-market-type": { - "description": "Forex data", - "name": "fx" - } - } - }, - "/v2/aggs/ticker/{forexTicker}/range/{multiplier}/{timespan}/{from}/{to}": { - "get": { - "description": "Get aggregate bars for a forex pair over a given date range in custom time window sizes.\n\u003cbr /\u003e\n\u003cbr /\u003e\nFor example, if timespan = ‘minute’ and multiplier = ‘5’ then 5-minute bars will be returned.\n", - "parameters": [ - { - "description": "The ticker symbol of the currency pair.", - "example": "C:EURUSD", - "in": "path", - "name": "forexTicker", - "required": true, + "name": "timestamp", "schema": { "type": "string" + }, + "x-massive-filter-field": { + "range": true } }, { - "description": "The size of the timespan multiplier.", - "example": 1, - "in": "path", - "name": "multiplier", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "description": "The size of the time window.", + "description": "The size of the aggregate time window.", "example": "day", - "in": "path", + "in": "query", "name": "timespan", - "required": true, "schema": { + "default": "day", "enum": [ "minute", "hour", @@ -8080,54 +9181,95 @@ } }, { - "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", - "example": "2021-07-22", - "in": "path", - "name": "from", - "required": true, + "description": "The window size used to calculate the relative strength index (RSI). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.", + "example": 14, + "in": "query", + "name": "window", "schema": { - "type": "string" + "default": 14, + "type": "integer" } }, { - "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", - "example": "2021-07-22", - "in": "path", - "name": "to", - "required": true, + "description": "The price in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close prices to \ncalculate the relative strength index (RSI).", + "example": "close", + "in": "query", + "name": "series_type", "schema": { + "default": "close", + "enum": [ + "open", + "high", + "low", + "close" + ], "type": "string" } }, { - "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", - "example": true, + "description": "Whether or not to include the aggregates used to calculate this indicator in the response.", "in": "query", - "name": "adjusted", + "name": "expand_underlying", "schema": { + "default": false, "type": "boolean" } }, { - "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n", - "example": "asc", + "description": "The order in which to return the results, ordered by timestamp.", + "example": "desc", "in": "query", - "name": "sort", + "name": "order", "schema": { + "default": "desc", "enum": [ "asc", "desc" - ] + ], + "type": "string" } }, { - "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on \n\u003ca href=\"https://polygon.io/blog/aggs-api-updates/\" target=\"_blank\" alt=\"Aggregate Data API Improvements\"\u003eAggregate Data API Improvements\u003c/a\u003e.\n", - "example": 120, + "description": "Limit the number of results returned, default is 10 and max is 5000", "in": "query", "name": "limit", "schema": { + "default": 10, + "maximum": 5000, "type": "integer" } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gt", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lt", + "schema": { + "type": "string" + } } ], "responses": { @@ -8135,103 +9277,126 @@ "content": { "application/json": { "example": { - "adjusted": true, - "queryCount": 1, - "request_id": "79c061995d8b627b736170bc9653f15d", - "results": [ - { - "c": 1.17721, - "h": 1.18305, - "l": 1.1756, - "n": 125329, - "o": 1.17921, - "t": 1626912000000, - "v": 125329, - "vw": 1.1789 - } - ], - "resultsCount": 1, - "status": "OK", - "ticker": "C:EURUSD" + "next_url": "https://api.massive.com/v1/indicators/rsi/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", + "results": { + "underlying": { + "url": "https://api.massive.com/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25" + }, + "values": [ + { + "timestamp": 1517562000016, + "value": 82.19 + } + ] + }, + "status": "OK" }, "schema": { - "allOf": [ - { - "properties": { - "ticker": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - } - }, - "type": "object" + "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" }, - { - "properties": { - "adjusted": { - "description": "Whether or not this response was adjusted for splits.", - "type": "boolean" - }, - "queryCount": { - "description": "The number of aggregates (minute or day) used to generate the response.", - "type": "integer" - }, - "request_id": { - "description": "A request id assigned by the server.", - "type": "string" - }, - "resultsCount": { - "description": "The total number of results for this request.", - "type": "integer" - }, - "status": { - "description": "The status of this request's response.", - "type": "string" - } - }, - "type": "object" + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" }, - { + "results": { "properties": { - "results": { + "underlying": { + "properties": { + "aggregates": { + "items": { + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "format": "float", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "float", + "type": "number" + } + }, + "required": [ + "v", + "vw", + "o", + "c", + "h", + "l", + "t", + "n" + ], + "type": "object", + "x-massive-go-type": { + "name": "Aggregate", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + }, + "type": "array" + }, + "url": { + "description": "The URL which can be used to request the underlying aggregates used in this request.", + "type": "string" + } + }, + "type": "object" + }, + "values": { "items": { "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "n": { - "description": "The number of transactions in the aggregate window.", - "type": "integer" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" + "timestamp": { + "description": "The Unix Msec timestamp from the last aggregate used in this calculation.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "IMicroseconds", + "path": "github.com/massive-com/ptime" + } }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" + "value": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } } }, "type": "object" @@ -8239,159 +9404,317 @@ "type": "array" } }, - "type": "object" + "type": "object", + "x-massive-go-type": { + "name": "RSIResults" + } + }, + "status": { + "description": "The status of this request's response.", + "type": "string" } - ] + }, + "type": "object" + } + }, + "text/csv": { + "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nX:BTCUSD,15457.24362826,19317.486,0,19529.04,19475.84,19651.2772302,18846.67,1664409600000,191936,,0,,0,0,0,0,0,false,1664409600000,52.040915721136884\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664251200000,183075,,0,,0,0,0,0,0,false,1664251200000,44.813590401722564\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664236800000,183075,,0,,0,0,0,0,0,false,1664236800000,44.813590401722564\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664164800000,297389,,0,,0,0,0,0,0,false,1664164800000,45.22751170711286\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664150400000,297389,,0,,0,0,0,0,0,false,1664150400000,45.22751170711286\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664078400000,78936,,0,,0,0,0,0,0,false,1664078400000,37.361825384231004\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664064000000,78936,,0,,0,0,0,0,0,false,1664064000000,37.361825384231004\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664337600000,225076,,0,,0,0,0,0,0,false,1664337600000,50.74235333598462\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664323200000,225076,,0,,0,0,0,0,0,false,1664323200000,50.74235333598462\nX:BTCUSD,2868.09828007,19069.8521,0,19210.31,18925.87,19400,18805.1,1663992000000,58721,,0,,0,0,0,0,0,false,1663992000000,39.159457782344376\n", + "schema": { + "type": "string" } } }, - "description": "Forex Aggregates." - }, - "default": { - "description": "Unexpected error" + "description": "Relative strength index data for each period." } }, - "summary": "Aggregates (Bars)", + "summary": "Relative Strength Index (RSI)", "tags": [ - "fx:aggregates" + "crypto:aggregates" ], - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, - "x-polygon-entitlement-market-type": { - "description": "Forex data", - "name": "fx" + "x-massive-entitlement-market-type": { + "description": "Crypto data", + "name": "crypto" } - } + }, + "x-massive-ignore": true }, - "/v2/aggs/ticker/{optionsTicker}/prev": { + "/v1/indicators/rsi/{fxTicker}": { "get": { - "description": "Get the previous day's open, high, low, and close (OHLC) for the specified option contract.\n", + "description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.", + "operationId": "ForexRSI", "parameters": [ { - "description": "The ticker symbol of the options contract.", - "example": "O:TSLA210903C00700000", + "description": "The ticker symbol for which to get relative strength index (RSI) data.", + "example": "C:EURUSD", "in": "path", - "name": "optionsTicker", + "name": "fxTicker", "required": true, "schema": { "type": "string" + }, + "x-massive-go-id": "Ticker" + }, + { + "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "in": "query", + "name": "timestamp", + "schema": { + "type": "string" + }, + "x-massive-filter-field": { + "range": true } }, { - "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", + "description": "The size of the aggregate time window.", + "example": "day", + "in": "query", + "name": "timespan", + "schema": { + "default": "day", + "enum": [ + "minute", + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "type": "string" + } + }, + { + "description": "Whether or not the aggregates used to calculate the relative strength index are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.", "example": true, "in": "query", "name": "adjusted", "schema": { + "default": true, "type": "boolean" } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "adjusted": true, - "queryCount": 1, - "request_id": "6a7e466379af0a71039d60cc78e72282", - "results": [ - { - "T": "O:TSLA210903C00700000", - "c": 115.97, - "h": 117.59, - "l": 114.13, - "n": 2, - "o": 115.55, - "t": 1605042000000, - "v": 131704427, - "vw": 116.3058 - } - ], - "resultsCount": 1, - "status": "OK", - "ticker": "O:TSLA210903C00700000" - }, - "schema": { - "allOf": [ - { - "properties": { - "ticker": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - } - }, - "type": "object" - }, - { - "properties": { - "adjusted": { - "description": "Whether or not this response was adjusted for splits.", - "type": "boolean" - }, - "queryCount": { - "description": "The number of aggregates (minute or day) used to generate the response.", - "type": "integer" - }, - "request_id": { - "description": "A request id assigned by the server.", - "type": "string" - }, - "resultsCount": { - "description": "The total number of results for this request.", - "type": "integer" - }, - "status": { - "description": "The status of this request's response.", - "type": "string" - } - }, - "type": "object" - }, - { - "properties": { - "results": { - "items": { - "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "n": { - "description": "The number of transactions in the aggregate window.", - "type": "integer" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" + }, + { + "description": "The window size used to calculate the relative strength index (RSI).", + "example": 14, + "in": "query", + "name": "window", + "schema": { + "default": 14, + "type": "integer" + } + }, + { + "description": "The price in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close prices to \ncalculate the relative strength index (RSI).", + "example": "close", + "in": "query", + "name": "series_type", + "schema": { + "default": "close", + "enum": [ + "open", + "high", + "low", + "close" + ], + "type": "string" + } + }, + { + "description": "Whether or not to include the aggregates used to calculate this indicator in the response.", + "in": "query", + "name": "expand_underlying", + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "description": "The order in which to return the results, ordered by timestamp.", + "example": "desc", + "in": "query", + "name": "order", + "schema": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + { + "description": "Limit the number of results returned, default is 10 and max is 5000", + "in": "query", + "name": "limit", + "schema": { + "default": 10, + "maximum": 5000, + "type": "integer" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gt", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lt", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "next_url": "https://api.massive.com/v1/indicators/rsi/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", + "results": { + "underlying": { + "url": "https://api.massive.com/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25" + }, + "values": [ + { + "timestamp": 1517562000016, + "value": 82.19 + } + ] + }, + "status": "OK" + }, + "schema": { + "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" + }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "results": { + "properties": { + "underlying": { + "properties": { + "aggregates": { + "items": { + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "format": "float", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "float", + "type": "number" + } + }, + "required": [ + "v", + "vw", + "o", + "c", + "h", + "l", + "t", + "n" + ], + "type": "object", + "x-massive-go-type": { + "name": "Aggregate", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" + "type": "array" + }, + "url": { + "description": "The URL which can be used to request the underlying aggregates used in this request.", + "type": "string" + } + }, + "type": "object" + }, + "values": { + "items": { + "properties": { + "timestamp": { + "description": "The Unix Msec timestamp from the last aggregate used in this calculation.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "IMicroseconds", + "path": "github.com/massive-com/ptime" + } }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" + "value": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } } }, "type": "object" @@ -8399,63 +9722,78 @@ "type": "array" } }, - "type": "object" + "type": "object", + "x-massive-go-type": { + "name": "RSIResults" + } + }, + "status": { + "description": "The status of this request's response.", + "type": "string" } - ] + }, + "type": "object" + } + }, + "text/csv": { + "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nC:USDAUD,686,1.5442,0,1.53763,1.5404,1.5526022,1.537279,1664409600000,686,,0,,0,0,0,0,0,false,1664409600000,65.97230488287764\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664164800000,550,,0,,0,0,0,0,0,false,1664164800000,79.3273623194404\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664150400000,550,,0,,0,0,0,0,0,false,1664150400000,79.32736231944038\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664064000000,10,,0,,0,0,0,0,0,false,1664064000000,74.64770184023104\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664337600000,685,,0,,0,0,0,0,0,false,1664337600000,64.43214811875563\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664323200000,685,,0,,0,0,0,0,0,false,1664323200000,64.43214811875563\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664251200000,536,,0,,0,0,0,0,0,false,1664251200000,81.95981214984681\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664236800000,536,,0,,0,0,0,0,0,false,1664236800000,81.95981214984683\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664078400000,10,,0,,0,0,0,0,0,false,1664078400000,74.64770184023104\nC:USDAUD,1,1.5314,0,1.5313936,1.5313936,1.5313936,1.5313936,1663977600000,1,,0,,0,0,0,0,0,false,1663977600000,74.98028072374902\n", + "schema": { + "type": "string" } } }, - "description": "The previous day OHLC for the options contract." - }, - "default": { - "description": "Unexpected error" + "description": "Relative strength index data for each period." } }, - "summary": "Previous Close", + "summary": "Relative Strength Index (RSI)", "tags": [ - "options:aggregates" + "fx:aggregates" ], - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, - "x-polygon-entitlement-market-type": { - "description": "Options data", - "name": "options" + "x-massive-entitlement-market-type": { + "description": "Forex data", + "name": "fx" } - } + }, + "x-massive-ignore": true }, - "/v2/aggs/ticker/{optionsTicker}/range/{multiplier}/{timespan}/{from}/{to}": { + "/v1/indicators/rsi/{indicesTicker}": { "get": { - "description": "Get aggregate bars for an option contract over a given date range in custom time window sizes.\n\u003cbr /\u003e\n\u003cbr /\u003e\nFor example, if timespan = ‘minute’ and multiplier = ‘5’ then 5-minute bars will be returned.\n", + "description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.", + "operationId": "IndicesRSI", "parameters": [ { - "description": "The ticker symbol of the options contract.", - "example": "O:TSLA210903C00700000", + "description": "The ticker symbol for which to get relative strength index (RSI) data.", + "example": "I:NDX", "in": "path", - "name": "optionsTicker", + "name": "indicesTicker", "required": true, "schema": { "type": "string" - } + }, + "x-massive-go-id": "Ticker" }, { - "description": "The size of the timespan multiplier.", - "example": 1, - "in": "path", - "name": "multiplier", - "required": true, + "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "in": "query", + "name": "timestamp", "schema": { - "type": "integer" + "type": "string" + }, + "x-massive-filter-field": { + "range": true } }, { - "description": "The size of the time window.", + "description": "The size of the aggregate time window.", "example": "day", - "in": "path", + "in": "query", "name": "timespan", - "required": true, "schema": { + "default": "day", "enum": [ "minute", "hour", @@ -8469,54 +9807,105 @@ } }, { - "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", - "example": "2021-07-22", - "in": "path", - "name": "from", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", - "example": "2021-07-22", - "in": "path", - "name": "to", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", + "description": "Whether or not the aggregates used to calculate the relative strength index are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.", "example": true, "in": "query", "name": "adjusted", "schema": { + "default": true, "type": "boolean" } }, { - "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n", - "example": "asc", + "description": "The window size used to calculate the relative strength index (RSI).", + "example": 14, "in": "query", - "name": "sort", + "name": "window", "schema": { + "default": 14, + "type": "integer" + } + }, + { + "description": "The value in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close values to \ncalculate the relative strength index (RSI).", + "example": "close", + "in": "query", + "name": "series_type", + "schema": { + "default": "close", + "enum": [ + "open", + "high", + "low", + "close" + ], + "type": "string" + } + }, + { + "description": "Whether or not to include the aggregates used to calculate this indicator in the response.", + "in": "query", + "name": "expand_underlying", + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "description": "The order in which to return the results, ordered by timestamp.", + "example": "desc", + "in": "query", + "name": "order", + "schema": { + "default": "desc", "enum": [ "asc", "desc" - ] + ], + "type": "string" } }, { - "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on \n\u003ca href=\"https://polygon.io/blog/aggs-api-updates/\" target=\"_blank\" alt=\"Aggregate Data API Improvements\"\u003eAggregate Data API Improvements\u003c/a\u003e.\n", - "example": 120, + "description": "Limit the number of results returned, default is 10 and max is 5000", "in": "query", "name": "limit", "schema": { + "default": 10, + "maximum": 5000, "type": "integer" } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gt", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lt", + "schema": { + "type": "string" + } } ], "responses": { @@ -8524,114 +9913,126 @@ "content": { "application/json": { "example": { - "adjusted": true, - "count": 2, - "queryCount": 2, - "request_id": "5585acde-5085-42d6-95b2-2e388a28370a", - "results": [ - { - "c": 26.2, - "h": 26.2, - "l": 26.2, - "n": 1, - "o": 26.2, - "t": 1632369600000, - "v": 2, - "vw": 26.2 + "next_url": "https://api.massive.com/v1/indicators/rsi/I:NDX?cursor=YWRqdXN0ZWQ9dHJ1ZSZhcD0lN0IlMjJ2JTIyJTNBMCUyQyUyMm8lMjIlM0EwJTJDJTIyYyUyMiUzQTE1MDg0Ljk5OTM4OTgyMDAzJTJDJTIyaCUyMiUzQTAlMkMlMjJsJTIyJTNBMCUyQyUyMnQlMjIlM0ExNjg3MjE5MjAwMDAwJTdEJmFzPSZleHBhbmRfdW5kZXJseWluZz1mYWxzZSZsaW1pdD0xJm9yZGVyPWRlc2Mmc2VyaWVzX3R5cGU9Y2xvc2UmdGltZXNwYW49ZGF5JnRpbWVzdGFtcC5sdD0xNjg3MjM3MjAwMDAwJndpbmRvdz0xNA", + "request_id": "28a8417f521f98e1d08f6ed7d1fbcad3", + "results": { + "underlying": { + "url": "https://api.massive.com/v2/aggs/ticker/I:NDX/range/1/day/1678338000000/1687366658253?limit=66&sort=desc" }, - { - "c": 28.3, - "h": 28.3, - "l": 28.3, - "n": 1, - "o": 28.3, - "t": 1632456000000, - "v": 2, - "vw": 28.3 - } - ], - "resultsCount": 2, - "status": "OK", - "ticker": "O:RDFN211119C00025000" + "values": [ + { + "timestamp": 1687237200000, + "value": 73.98019439047955 + } + ] + }, + "status": "OK" }, "schema": { - "allOf": [ - { - "properties": { - "ticker": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - } - }, - "type": "object" + "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" }, - { - "properties": { - "adjusted": { - "description": "Whether or not this response was adjusted for splits.", - "type": "boolean" - }, - "queryCount": { - "description": "The number of aggregates (minute or day) used to generate the response.", - "type": "integer" - }, - "request_id": { - "description": "A request id assigned by the server.", - "type": "string" - }, - "resultsCount": { - "description": "The total number of results for this request.", - "type": "integer" - }, - "status": { - "description": "The status of this request's response.", - "type": "string" - } - }, - "type": "object" + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" }, - { + "results": { "properties": { - "results": { + "underlying": { + "properties": { + "aggregates": { + "items": { + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "format": "float", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "float", + "type": "number" + } + }, + "required": [ + "v", + "vw", + "o", + "c", + "h", + "l", + "t", + "n" + ], + "type": "object", + "x-massive-go-type": { + "name": "Aggregate", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + }, + "type": "array" + }, + "url": { + "description": "The URL which can be used to request the underlying aggregates used in this request.", + "type": "string" + } + }, + "type": "object" + }, + "values": { "items": { "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "n": { - "description": "The number of transactions in the aggregate window.", - "type": "integer" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" + "timestamp": { + "description": "The Unix Msec timestamp from the last aggregate used in this calculation.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "IMicroseconds", + "path": "github.com/massive-com/ptime" + } }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" + "value": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } } }, "type": "object" @@ -8639,222 +10040,73 @@ "type": "array" } }, - "type": "object" + "type": "object", + "x-massive-go-type": { + "name": "RSIResults" + } + }, + "status": { + "description": "The status of this request's response.", + "type": "string" } - ] + }, + "type": "object" } } }, - "description": "Options Aggregates." - }, - "default": { - "description": "Unexpected error" + "description": "Relative Strength Index (RSI) data for each period." } }, - "summary": "Aggregates (Bars)", + "summary": "Relative Strength Index (RSI)", "tags": [ - "options:aggregates" + "indices:aggregates" ], - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-allowed-limited-tickers": true, + "x-massive-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, - "x-polygon-entitlement-market-type": { - "description": "Options data", - "name": "options" + "x-massive-entitlement-market-type": { + "description": "Indices data", + "name": "indices" } - } + }, + "x-massive-ignore": true }, - "/v2/aggs/ticker/{stocksTicker}/prev": { + "/v1/indicators/rsi/{optionsTicker}": { "get": { - "description": "Get the previous day's open, high, low, and close (OHLC) for the specified stock ticker.\n", + "description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.", + "operationId": "OptionsRSI", "parameters": [ { - "description": "The ticker symbol of the stock/equity.", - "example": "AAPL", + "description": "The ticker symbol for which to get relative strength index (RSI) data.", + "example": "O:SPY241220P00720000", "in": "path", - "name": "stocksTicker", + "name": "optionsTicker", "required": true, "schema": { "type": "string" - } + }, + "x-massive-go-id": "Ticker" }, { - "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", - "example": true, + "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", "in": "query", - "name": "adjusted", - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "adjusted": true, - "queryCount": 1, - "request_id": "6a7e466379af0a71039d60cc78e72282", - "results": [ - { - "T": "AAPL", - "c": 115.97, - "h": 117.59, - "l": 114.13, - "o": 115.55, - "t": 1605042000000, - "v": 131704427, - "vw": 116.3058 - } - ], - "resultsCount": 1, - "status": "OK", - "ticker": "AAPL" - }, - "schema": { - "allOf": [ - { - "properties": { - "ticker": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - } - }, - "type": "object" - }, - { - "properties": { - "adjusted": { - "description": "Whether or not this response was adjusted for splits.", - "type": "boolean" - }, - "queryCount": { - "description": "The number of aggregates (minute or day) used to generate the response.", - "type": "integer" - }, - "request_id": { - "description": "A request id assigned by the server.", - "type": "string" - }, - "resultsCount": { - "description": "The total number of results for this request.", - "type": "integer" - }, - "status": { - "description": "The status of this request's response.", - "type": "string" - } - }, - "type": "object" - }, - { - "properties": { - "results": { - "items": { - "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "n": { - "description": "The number of transactions in the aggregate window.", - "type": "integer" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - } - ] - } - } - }, - "description": "The previous day OHLC for the ticker." - }, - "default": { - "description": "Unexpected error" - } - }, - "summary": "Previous Close", - "tags": [ - "stocks:aggregates" - ], - "x-polygon-entitlement-data-type": { - "description": "Aggregate data", - "name": "aggregates" - }, - "x-polygon-entitlement-market-type": { - "description": "Stocks data", - "name": "stocks" - } - } - }, - "/v2/aggs/ticker/{stocksTicker}/range/{multiplier}/{timespan}/{from}/{to}": { - "get": { - "description": "Get aggregate bars for a stock over a given date range in custom time window sizes.\n\u003cbr /\u003e\n\u003cbr /\u003e\nFor example, if timespan = ‘minute’ and multiplier = ‘5’ then 5-minute bars will be returned.\n", - "parameters": [ - { - "description": "The ticker symbol of the stock/equity.", - "example": "AAPL", - "in": "path", - "name": "stocksTicker", - "required": true, + "name": "timestamp", "schema": { "type": "string" + }, + "x-massive-filter-field": { + "range": true } }, { - "description": "The size of the timespan multiplier.", - "example": 1, - "in": "path", - "name": "multiplier", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "description": "The size of the time window.", + "description": "The size of the aggregate time window.", "example": "day", - "in": "path", + "in": "query", "name": "timespan", - "required": true, "schema": { + "default": "day", "enum": [ "minute", "hour", @@ -8868,54 +10120,105 @@ } }, { - "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", - "example": "2021-07-22", - "in": "path", - "name": "from", - "required": true, + "description": "Whether or not the aggregates used to calculate the relative strength index are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.", + "example": true, + "in": "query", + "name": "adjusted", "schema": { - "type": "string" + "default": true, + "type": "boolean" } }, { - "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", - "example": "2021-07-22", - "in": "path", - "name": "to", - "required": true, + "description": "The window size used to calculate the relative strength index (RSI).", + "example": 14, + "in": "query", + "name": "window", "schema": { + "default": 14, + "type": "integer" + } + }, + { + "description": "The price in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close prices to \ncalculate the relative strength index (RSI).", + "example": "close", + "in": "query", + "name": "series_type", + "schema": { + "default": "close", + "enum": [ + "open", + "high", + "low", + "close" + ], "type": "string" } }, { - "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", - "example": true, + "description": "Whether or not to include the aggregates used to calculate this indicator in the response.", "in": "query", - "name": "adjusted", + "name": "expand_underlying", "schema": { + "default": false, "type": "boolean" } }, { - "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n", - "example": "asc", + "description": "The order in which to return the results, ordered by timestamp.", + "example": "desc", "in": "query", - "name": "sort", + "name": "order", "schema": { + "default": "desc", "enum": [ "asc", "desc" - ] + ], + "type": "string" } }, { - "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on \n\u003ca href=\"https://polygon.io/blog/aggs-api-updates/\" target=\"_blank\" alt=\"Aggregate Data API Improvements\"\u003eAggregate Data API Improvements\u003c/a\u003e.\n", - "example": 120, + "description": "Limit the number of results returned, default is 10 and max is 5000", "in": "query", "name": "limit", "schema": { + "default": 10, + "maximum": 5000, "type": "integer" } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gt", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lt", + "schema": { + "type": "string" + } } ], "responses": { @@ -8923,117 +10226,126 @@ "content": { "application/json": { "example": { - "adjusted": true, - "queryCount": 2, - "request_id": "6a7e466379af0a71039d60cc78e72282", - "results": [ - { - "c": 75.0875, - "h": 75.15, - "l": 73.7975, - "n": 1, - "o": 74.06, - "t": 1577941200000, - "v": 135647456, - "vw": 74.6099 + "next_url": "https://api.massive.com/v1/indicators/rsi/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", + "results": { + "underlying": { + "url": "https://api.massive.com/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25" }, - { - "c": 74.3575, - "h": 75.145, - "l": 74.125, - "n": 1, - "o": 74.2875, - "t": 1578027600000, - "v": 146535512, - "vw": 74.7026 - } - ], - "resultsCount": 2, - "status": "OK", - "ticker": "AAPL" - }, + "values": [ + { + "timestamp": 1517562000016, + "value": 82.19 + } + ] + }, + "status": "OK" + }, "schema": { - "allOf": [ - { - "properties": { - "ticker": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - } - }, - "type": "object" + "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" }, - { - "properties": { - "adjusted": { - "description": "Whether or not this response was adjusted for splits.", - "type": "boolean" - }, - "queryCount": { - "description": "The number of aggregates (minute or day) used to generate the response.", - "type": "integer" - }, - "request_id": { - "description": "A request id assigned by the server.", - "type": "string" - }, - "resultsCount": { - "description": "The total number of results for this request.", - "type": "integer" - }, - "status": { - "description": "The status of this request's response.", - "type": "string" - } - }, - "type": "object" + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" }, - { + "results": { "properties": { - "results": { + "underlying": { + "properties": { + "aggregates": { + "items": { + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "format": "float", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "float", + "type": "number" + } + }, + "required": [ + "v", + "vw", + "o", + "c", + "h", + "l", + "t", + "n" + ], + "type": "object", + "x-massive-go-type": { + "name": "Aggregate", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + }, + "type": "array" + }, + "url": { + "description": "The URL which can be used to request the underlying aggregates used in this request.", + "type": "string" + } + }, + "type": "object" + }, + "values": { "items": { "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "n": { - "description": "The number of transactions in the aggregate window.", - "type": "integer" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "otc": { - "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", - "type": "boolean" - }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" + "timestamp": { + "description": "The Unix Msec timestamp from the last aggregate used in this calculation.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "IMicroseconds", + "path": "github.com/massive-com/ptime" + } }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" + "value": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } } }, "type": "object" @@ -9041,152 +10353,327 @@ "type": "array" } }, - "type": "object" + "type": "object", + "x-massive-go-type": { + "name": "RSIResults" + } + }, + "status": { + "description": "The status of this request's response.", + "type": "string" } - ] + }, + "type": "object" + } + }, + "text/csv": { + "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nO:SPY241220P00720000,3,277.8267,0,277.82,277.83,277.83,277.82,1649649600000,2,,0,,0,0,0,0,0,false,1649649600000,30.837887188419387\nO:SPY241220P00720000,2,270.49,0,270.49,270.49,270.49,270.49,1649390400000,1,,0,,0,0,0,0,0,false,1649390400000,15.546598157051605\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648785600000,1,,0,,0,0,0,0,0,false,1648785600000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648699200000,1,,0,,0,0,0,0,0,false,1648699200000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648612800000,1,,0,,0,0,0,0,0,false,1648612800000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648526400000,1,,0,,0,0,0,0,0,false,1648526400000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649304000000,1,,0,,0,0,0,0,0,false,1649304000000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649217600000,1,,0,,0,0,0,0,0,false,1649217600000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649131200000,1,,0,,0,0,0,0,0,false,1649131200000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649044800000,1,,0,,0,0,0,0,0,false,1649044800000,88.61520575036505\n", + "schema": { + "type": "string" } } }, - "description": "Stock Aggregates." - }, - "default": { - "description": "Unexpected error" + "description": "Relative Strength Index (RSI) data for each period." } }, - "summary": "Aggregates (Bars)", + "summary": "Relative Strength Index (RSI)", "tags": [ - "stocks:aggregates" + "options:aggregates" ], - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, - "x-polygon-entitlement-market-type": { - "description": "Stocks data", - "name": "stocks" + "x-massive-entitlement-market-type": { + "description": "Options data", + "name": "options" } - } + }, + "x-massive-ignore": true }, - "/v2/last/nbbo/{stocksTicker}": { + "/v1/indicators/rsi/{stockTicker}": { "get": { - "description": "Get the most recent NBBO (Quote) tick for a given stock.", - "operationId": "LastQuote", + "description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.", + "operationId": "RSI", "parameters": [ { - "description": "The ticker symbol of the stock/equity.", + "description": "Specify a case-sensitive ticker symbol for which to get relative strength index (RSI) data. For example, AAPL represents Apple Inc.", "example": "AAPL", "in": "path", - "name": "stocksTicker", + "name": "stockTicker", "required": true, "schema": { "type": "string" }, - "x-polygon-go-id": "Ticker" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "request_id": "b84e24636301f19f88e0dfbf9a45ed5c", - "results": { - "P": 127.98, - "S": 7, - "T": "AAPL", - "X": 19, - "p": 127.96, - "q": 83480742, - "s": 1, - "t": 1617827221349730300, - "x": 11, - "y": 1617827221349366000, - "z": 3 - }, - "status": "OK" - }, - "schema": { - "properties": { - "request_id": { - "description": "A request id assigned by the server.", - "type": "string" - }, - "results": { - "properties": { - "P": { - "description": "The ask price.", - "format": "double", - "type": "number" - }, - "S": { - "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.", - "type": "integer" - }, - "T": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - }, - "X": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", - "type": "integer" - }, - "c": { - "description": "A list of condition codes.", - "items": { - "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.", - "type": "integer" - }, - "type": "array", - "x-polygon-go-type": { - "name": "[]*int32" - } - }, - "f": { - "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.", - "type": "integer" - }, - "i": { - "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).", - "items": { - "description": "The indicator code.", - "type": "integer" - }, - "type": "array" - }, - "p": { - "description": "The bid price.", - "format": "double", - "type": "number" - }, - "q": { - "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).", - "format": "int64", - "type": "integer" - }, - "s": { - "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.", - "type": "integer" - }, - "t": { - "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.", - "type": "integer" - }, - "x": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", - "type": "integer" - }, - "y": { - "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.", - "type": "integer" + "x-massive-go-id": "Ticker" + }, + { + "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "in": "query", + "name": "timestamp", + "schema": { + "type": "string" + }, + "x-massive-filter-field": { + "range": true + } + }, + { + "description": "The size of the aggregate time window.", + "example": "day", + "in": "query", + "name": "timespan", + "schema": { + "default": "day", + "enum": [ + "minute", + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "type": "string" + } + }, + { + "description": "Whether or not the aggregates used to calculate the relative strength index are adjusted for splits. By default, aggregates are adjusted. Set this to false to get results that are NOT adjusted for splits.", + "example": true, + "in": "query", + "name": "adjusted", + "schema": { + "default": true, + "type": "boolean" + } + }, + { + "description": "The window size used to calculate the relative strength index (RSI).", + "example": 14, + "in": "query", + "name": "window", + "schema": { + "default": 14, + "type": "integer" + } + }, + { + "description": "The price in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close prices to \ncalculate the relative strength index (RSI).", + "example": "close", + "in": "query", + "name": "series_type", + "schema": { + "default": "close", + "enum": [ + "open", + "high", + "low", + "close" + ], + "type": "string" + } + }, + { + "description": "Whether or not to include the aggregates used to calculate this indicator in the response.", + "in": "query", + "name": "expand_underlying", + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "description": "The order in which to return the results, ordered by timestamp.", + "example": "desc", + "in": "query", + "name": "order", + "schema": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + { + "description": "Limit the number of results returned, default is 10 and max is 5000", + "in": "query", + "name": "limit", + "schema": { + "default": 10, + "maximum": 5000, + "type": "integer" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gt", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lt", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "next_url": "https://api.massive.com/v1/indicators/rsi/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", + "results": { + "underlying": { + "url": "https://api.massive.com/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25" + }, + "values": [ + { + "timestamp": 1517562000016, + "value": 82.19 + } + ] + }, + "status": "OK" + }, + "schema": { + "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" + }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "results": { + "properties": { + "underlying": { + "properties": { + "aggregates": { + "items": { + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "format": "float", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "float", + "type": "number" + } + }, + "required": [ + "v", + "vw", + "o", + "c", + "h", + "l", + "t", + "n" + ], + "type": "object", + "x-massive-go-type": { + "name": "Aggregate", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + }, + "type": "array" + }, + "url": { + "description": "The URL which can be used to request the underlying aggregates used in this request.", + "type": "string" + } + }, + "type": "object" }, - "z": { - "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ", - "type": "integer" + "values": { + "items": { + "properties": { + "timestamp": { + "description": "The Unix Msec timestamp from the last aggregate used in this calculation.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "IMicroseconds", + "path": "github.com/massive-com/ptime" + } + }, + "value": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } + } + }, + "type": "object" + }, + "type": "array" } }, "type": "object", - "x-polygon-go-type": { - "name": "LastQuoteResult" + "x-massive-go-type": { + "name": "RSIResults" } }, "status": { @@ -9196,153 +10683,326 @@ }, "type": "object" } + }, + "text/csv": { + "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nAAPL,1.27849501E+08,142.9012,0,146.1,142.48,146.72,140.68,1664424000000,1061692,,0,,0,0,0,0,0,false,1664424000000,23.065352237561996\nAAPL,1.46755122E+08,147.599,0,147.64,149.84,150.6414,144.84,1664337600000,1140818,,0,,0,0,0,0,0,false,1664337600000,29.877761913419718\nAAPL,9.3339409E+07,151.5222,0,149.66,150.77,153.7701,149.64,1664164800000,747666,,0,,0,0,0,0,0,false,1664164800000,29.58201330468151\nAAPL,8.1599225E+07,152.5505,0,149.31,154.48,154.56,149.1,1663560000000,671961,,0,,0,0,0,0,0,false,1663560000000,30.233508748331047\nAAPL,1.64879031E+08,150.2387,0,151.21,150.7,151.35,148.37,1663300800000,850358,,0,,0,0,0,0,0,false,1663300800000,19.857312489527956\nAAPL,8.4461761E+07,152.1354,0,152.74,151.76,154.72,149.945,1664251200000,683781,,0,,0,0,0,0,0,false,1664251200000,32.18008680069761\nAAPL,9.6031641E+07,150.0222,0,151.19,150.43,151.47,148.56,1663905600000,766888,,0,,0,0,0,0,0,false,1663905600000,28.71109953239781\nAAPL,8.6651514E+07,152.5709,0,152.38,152.74,154.47,150.91,1663819200000,686866,,0,,0,0,0,0,0,false,1663819200000,31.140902927103383\nAAPL,9.3308449E+07,156.1877,0,157.34,153.72,158.61,153.6,1663732800000,712645,,0,,0,0,0,0,0,false,1663732800000,32.21491128713248\nAAPL,1.07691097E+08,156.1317,0,153.4,156.9,158.08,153.08,1663646400000,792177,,0,,0,0,0,0,0,false,1663646400000,35.950871523070575\n", + "schema": { + "type": "string" + } } }, - "description": "The last NBBO tick for this stock." - }, - "401": { - "description": "Unauthorized - Check our API Key and account status" - }, - "404": { - "description": "The specified resource was not found" + "description": "Relative strength Index data for each period." } }, - "summary": "Last Quote", + "summary": "Relative Strength Index (RSI)", "tags": [ - "stocks:last:quote" - ], - "x-polygon-entitlement-allowed-timeframes": [ - { - "description": "Real Time Data", - "name": "realtime" - }, - { - "description": "15 minute delayed data", - "name": "delayed" - } + "stocks:aggregates" ], - "x-polygon-entitlement-data-type": { - "description": "NBBO data", - "name": "nbbo" + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" }, - "x-polygon-entitlement-market-type": { + "x-massive-entitlement-market-type": { "description": "Stocks data", "name": "stocks" } } }, - "/v2/last/trade/{optionsTicker}": { + "/v1/indicators/sma/{cryptoTicker}": { "get": { - "description": "Get the most recent trade for a given options contract.", - "operationId": "LastTradeOptions", + "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.", + "operationId": "CryptoSMA", "parameters": [ { - "description": "The ticker symbol of the options contract.", - "example": "O:TSLA210903C00700000", + "description": "The ticker symbol for which to get simple moving average (SMA) data.", + "example": "X:BTCUSD", "in": "path", - "name": "optionsTicker", + "name": "cryptoTicker", "required": true, "schema": { "type": "string" + }, + "x-massive-go-id": "Ticker" + }, + { + "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "in": "query", + "name": "timestamp", + "schema": { + "type": "string" + }, + "x-massive-filter-field": { + "range": true } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "request_id": "f05562305bd26ced64b98ed68b3c5d96", - "results": { - "T": "O:TSLA210903C00700000", - "c": [ - 227 - ], - "f": 1617901342969796400, - "i": "", - "p": 115.55, - "q": 1325541950, - "r": 202, - "s": 25, - "t": 1617901342969834000, - "x": 312 + }, + { + "description": "The size of the aggregate time window.", + "example": "day", + "in": "query", + "name": "timespan", + "schema": { + "default": "day", + "enum": [ + "minute", + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "type": "string" + } + }, + { + "description": "The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.", + "example": 50, + "in": "query", + "name": "window", + "schema": { + "default": 50, + "type": "integer" + } + }, + { + "description": "The price in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close prices to \ncalculate the simple moving average (SMA).", + "example": "close", + "in": "query", + "name": "series_type", + "schema": { + "default": "close", + "enum": [ + "open", + "high", + "low", + "close" + ], + "type": "string" + } + }, + { + "description": "Whether or not to include the aggregates used to calculate this indicator in the response.", + "in": "query", + "name": "expand_underlying", + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "description": "The order in which to return the results, ordered by timestamp.", + "example": "desc", + "in": "query", + "name": "order", + "schema": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + { + "description": "Limit the number of results returned, default is 10 and max is 5000", + "in": "query", + "name": "limit", + "schema": { + "default": 10, + "maximum": 5000, + "type": "integer" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gt", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lt", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "next_url": "https://api.massive.com/v1/indicators/sma/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", + "results": { + "underlying": { + "aggregates": [ + { + "c": 75.0875, + "h": 75.15, + "l": 73.7975, + "n": 1, + "o": 74.06, + "t": 1577941200000, + "v": 135647456, + "vw": 74.6099 + }, + { + "c": 74.3575, + "h": 75.145, + "l": 74.125, + "n": 1, + "o": 74.2875, + "t": 1578027600000, + "v": 146535512, + "vw": 74.7026 + } + ], + "url": "https://api.massive.com/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25" + }, + "values": [ + { + "timestamp": 1517562000016, + "value": 140.139 + } + ] }, "status": "OK" }, "schema": { "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" + }, "request_id": { "description": "A request id assigned by the server.", "type": "string" }, "results": { "properties": { - "T": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" + "underlying": { + "properties": { + "aggregates": { + "items": { + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "format": "float", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "float", + "type": "number" + } + }, + "required": [ + "v", + "vw", + "o", + "c", + "h", + "l", + "t", + "n" + ], + "type": "object", + "x-massive-go-type": { + "name": "Aggregate", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + }, + "type": "array" + }, + "url": { + "description": "The URL which can be used to request the underlying aggregates used in this request.", + "type": "string" + } + }, + "type": "object" }, - "c": { - "description": "A list of condition codes.", + "values": { "items": { - "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.", - "type": "integer" + "properties": { + "timestamp": { + "description": "The Unix Msec timestamp from the last aggregate used in this calculation.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "IMicroseconds", + "path": "github.com/massive-com/ptime" + } + }, + "value": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } + } + }, + "type": "object" }, - "type": "array", - "x-polygon-go-type": { - "name": "[]*int32" - } - }, - "e": { - "description": "The trade correction indicator.", - "type": "integer" - }, - "f": { - "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.", - "type": "integer" - }, - "i": { - "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.", - "type": "string" - }, - "p": { - "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.", - "format": "double", - "type": "number" - }, - "q": { - "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).", - "format": "int64", - "type": "integer" - }, - "r": { - "description": "The ID for the Trade Reporting Facility where the trade took place.", - "type": "integer" - }, - "s": { - "description": "The size of a trade (also known as volume).", - "format": "double", - "type": "number" - }, - "t": { - "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.", - "type": "integer" - }, - "x": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", - "type": "integer" - }, - "y": { - "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.", - "type": "integer" - }, - "z": { - "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ", - "type": "integer" + "type": "array" } }, "type": "object", - "x-polygon-go-type": { - "name": "LastTradeResult" + "x-massive-go-type": { + "name": "SMAResults" } }, "status": { @@ -9352,377 +11012,176 @@ }, "type": "object" } + }, + "text/csv": { + "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664164800000,297389,,0,,0,0,0,0,0,false,1664164800000,19846.01135387188\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664078400000,78936,,0,,0,0,0,0,0,false,1664078400000,19902.65703099573\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664064000000,78936,,0,,0,0,0,0,0,false,1664064000000,19948.29976695474\nX:BTCUSD,15457.24362826,19317.486,0,19529.04,19475.84,19651.2772302,18846.67,1664409600000,191936,,0,,0,0,0,0,0,false,1664409600000,19751.714760699124\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664337600000,225076,,0,,0,0,0,0,0,false,1664337600000,19762.974955013375\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664251200000,183075,,0,,0,0,0,0,0,false,1664251200000,19791.86053850303\nX:BTCUSD,2868.09828007,19069.8521,0,19210.31,18925.87,19400,18805.1,1663992000000,58721,,0,,0,0,0,0,0,false,1663992000000,19995.805471728403\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664323200000,225076,,0,,0,0,0,0,0,false,1664323200000,19777.128890923308\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664236800000,183075,,0,,0,0,0,0,0,false,1664236800000,19818.394438033767\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664150400000,297389,,0,,0,0,0,0,0,false,1664150400000,19873.767735662568\n", + "schema": { + "type": "string" + } } }, - "description": "The last trade for this options contract." - }, - "401": { - "description": "Unauthorized - Check our API Key and account status" - }, - "404": { - "description": "The specified resource was not found" + "description": "Simple Moving Average (SMA) data for each period." } }, - "summary": "Last Trade", + "summary": "Simple Moving Average (SMA)", "tags": [ - "options:last:trade" + "crypto:aggregates" ], - "x-polygon-entitlement-allowed-timeframes": [ + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Crypto data", + "name": "crypto" + } + }, + "x-massive-ignore": true + }, + "/v1/indicators/sma/{fxTicker}": { + "get": { + "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.", + "operationId": "ForexSMA", + "parameters": [ { - "description": "Real Time Data", - "name": "realtime" - }, - { - "description": "15 minute delayed data", - "name": "delayed" - } - ], - "x-polygon-entitlement-data-type": { - "description": "Trade data", - "name": "trades" - }, - "x-polygon-entitlement-market-type": { - "description": "Options data", - "name": "options" - } - }, - "x-polygon-ignore": true - }, - "/v2/last/trade/{stocksTicker}": { - "get": { - "description": "Get the most recent trade for a given stock.", - "operationId": "LastTrade", - "parameters": [ - { - "description": "The ticker symbol of the stock/equity.", - "example": "AAPL", + "description": "The ticker symbol for which to get simple moving average (SMA) data.", + "example": "C:EURUSD", "in": "path", - "name": "stocksTicker", + "name": "fxTicker", "required": true, "schema": { "type": "string" }, - "x-polygon-go-id": "Ticker" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "request_id": "f05562305bd26ced64b98ed68b3c5d96", - "results": { - "T": "AAPL", - "c": [ - 37 - ], - "f": 1617901342969796400, - "i": "118749", - "p": 129.8473, - "q": 3135876, - "r": 202, - "s": 25, - "t": 1617901342969834000, - "x": 4, - "y": 1617901342968000000, - "z": 3 - }, - "status": "OK" - }, - "schema": { - "properties": { - "request_id": { - "description": "A request id assigned by the server.", - "type": "string" - }, - "results": { - "properties": { - "T": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - }, - "c": { - "description": "A list of condition codes.", - "items": { - "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.", - "type": "integer" - }, - "type": "array", - "x-polygon-go-type": { - "name": "[]*int32" - } - }, - "e": { - "description": "The trade correction indicator.", - "type": "integer" - }, - "f": { - "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.", - "type": "integer" - }, - "i": { - "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.", - "type": "string" - }, - "p": { - "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.", - "format": "double", - "type": "number" - }, - "q": { - "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).", - "format": "int64", - "type": "integer" - }, - "r": { - "description": "The ID for the Trade Reporting Facility where the trade took place.", - "type": "integer" - }, - "s": { - "description": "The size of a trade (also known as volume).", - "format": "double", - "type": "number" - }, - "t": { - "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.", - "type": "integer" - }, - "x": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", - "type": "integer" - }, - "y": { - "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.", - "type": "integer" - }, - "z": { - "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ", - "type": "integer" - } - }, - "type": "object", - "x-polygon-go-type": { - "name": "LastTradeResult" - } - }, - "status": { - "description": "The status of this request's response.", - "type": "string" - } - }, - "type": "object" - } - } - }, - "description": "The last trade for this stock." - }, - "401": { - "description": "Unauthorized - Check our API Key and account status" - }, - "404": { - "description": "The specified resource was not found" - } - }, - "summary": "Last Trade", - "tags": [ - "stocks:last:trade" - ], - "x-polygon-entitlement-allowed-timeframes": [ - { - "description": "Real Time Data", - "name": "realtime" + "x-massive-go-id": "Ticker" }, { - "description": "15 minute delayed data", - "name": "delayed" - } - ], - "x-polygon-entitlement-data-type": { - "description": "Trade data", - "name": "trades" - }, - "x-polygon-entitlement-market-type": { - "description": "Stocks data", - "name": "stocks" - } - } - }, - "/v2/reference/news": { - "get": { - "description": "Get the most recent news articles relating to a stock ticker symbol, including a summary of the article and a link to the original source.", - "operationId": "ListNews", - "parameters": [ - { - "description": "Return results that contain this ticker.", + "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", "in": "query", - "name": "ticker", + "name": "timestamp", "schema": { - "description": "The exchange symbol that this item is traded under.", "type": "string" }, - "x-polygon-filter-field": { + "x-massive-filter-field": { "range": true } }, { - "description": "Return results published on, before, or after this date.", + "description": "The size of the aggregate time window.", + "example": "day", "in": "query", - "name": "published_utc", + "name": "timespan", "schema": { - "oneOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "format": "date", - "type": "string" - } - ] - }, - "x-polygon-filter-field": { - "range": true + "default": "day", + "enum": [ + "minute", + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "type": "string" } }, { - "description": "Search by ticker.", + "description": "Whether or not the aggregates used to calculate the simple moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.", + "example": true, "in": "query", - "name": "ticker.gte", + "name": "adjusted", "schema": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" + "default": true, + "type": "boolean" } }, { - "description": "Search by ticker.", + "description": "The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.", + "example": 50, "in": "query", - "name": "ticker.gt", + "name": "window", "schema": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" + "default": 50, + "type": "integer" } }, { - "description": "Search by ticker.", + "description": "The price in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close prices to \ncalculate the simple moving average (SMA).", + "example": "close", "in": "query", - "name": "ticker.lte", + "name": "series_type", "schema": { - "description": "The exchange symbol that this item is traded under.", + "default": "close", + "enum": [ + "open", + "high", + "low", + "close" + ], "type": "string" } }, { - "description": "Search by ticker.", + "description": "Whether or not to include the aggregates used to calculate this indicator in the response.", "in": "query", - "name": "ticker.lt", + "name": "expand_underlying", "schema": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" + "default": false, + "type": "boolean" } }, { - "description": "Search by published_utc.", + "description": "The order in which to return the results, ordered by timestamp.", + "example": "desc", "in": "query", - "name": "published_utc.gte", + "name": "order", "schema": { - "oneOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "format": "date", - "type": "string" - } - ] + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "type": "string" } }, { - "description": "Search by published_utc.", + "description": "Limit the number of results returned, default is 10 and max is 5000", "in": "query", - "name": "published_utc.gt", + "name": "limit", "schema": { - "oneOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "format": "date", - "type": "string" - } - ] + "default": 10, + "maximum": 5000, + "type": "integer" } }, { - "description": "Search by published_utc.", + "description": "Range by timestamp.", "in": "query", - "name": "published_utc.lte", + "name": "timestamp.gte", "schema": { - "oneOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "format": "date", - "type": "string" - } - ] - } - }, - { - "description": "Search by published_utc.", - "in": "query", - "name": "published_utc.lt", - "schema": { - "oneOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "format": "date", - "type": "string" - } - ] + "type": "string" } }, { - "description": "Order results based on the `sort` field.", + "description": "Range by timestamp.", "in": "query", - "name": "order", + "name": "timestamp.gt", "schema": { - "enum": [ - "asc", - "desc" - ], - "example": "asc", "type": "string" } }, { - "description": "Limit the number of results returned, default is 10 and max is 1000.", + "description": "Range by timestamp.", "in": "query", - "name": "limit", + "name": "timestamp.lte", "schema": { - "default": 10, - "example": 10, - "maximum": 1000, - "minimum": 1, - "type": "integer" + "type": "string" } }, { - "description": "Sort field used for ordering.", + "description": "Range by timestamp.", "in": "query", - "name": "sort", + "name": "timestamp.lt", "schema": { - "default": "published_utc", - "enum": [ - "published_utc" - ], - "example": "published_utc", "type": "string" } } @@ -9732,67 +11191,45 @@ "content": { "application/json": { "example": { - "count": 1, - "next_url": "https://api.polygon.io:443/v2/reference/news?cursor=eyJsaW1pdCI6MSwic29ydCI6InB1Ymxpc2hlZF91dGMiLCJvcmRlciI6ImFzY2VuZGluZyIsInRpY2tlciI6e30sInB1Ymxpc2hlZF91dGMiOnsiZ3RlIjoiMjAyMS0wNC0yNiJ9LCJzZWFyY2hfYWZ0ZXIiOlsxNjE5NDA0Mzk3MDAwLG51bGxdfQ", - "request_id": "831afdb0b8078549fed053476984947a", - "results": [ - { - "amp_url": "https://amp.benzinga.com/amp/content/20784086", - "article_url": "https://www.benzinga.com/markets/cryptocurrency/21/04/20784086/cathie-wood-adds-more-coinbase-skillz-trims-square", - "author": "Rachit Vats", - "description": "\u003cp\u003eCathie Wood-led Ark Investment Management on Friday snapped up another 221,167 shares of the cryptocurrency exchange \u003cstrong\u003eCoinbase Global Inc \u003c/strong\u003e(NASDAQ: \u003ca class=\"ticker\" href=\"https://www.benzinga.com/stock/coin#NASDAQ\"\u003eCOIN\u003c/a\u003e) worth about $64.49 million on the stock\u0026rsquo;s Friday\u0026rsquo;s dip and also its fourth-straight loss.\u003c/p\u003e\n\u003cp\u003eThe investment firm\u0026rsquo;s \u003cstrong\u003eArk Innovation ETF\u003c/strong\u003e (NYSE: \u003ca class=\"ticker\" href=\"https://www.benzinga.com/stock/arkk#NYSE\"\u003eARKK\u003c/a\u003e) bought the shares of the company that closed 0.63% lower at $291.60 on Friday, giving the cryptocurrency exchange a market cap of $58.09 billion. Coinbase\u0026rsquo;s market cap has dropped from $85.8 billion on its blockbuster listing earlier this month.\u003c/p\u003e\n\u003cp\u003eThe New York-based company also added another 3,873 shares of the mobile gaming company \u003cstrong\u003eSkillz Inc\u003c/strong\u003e (NYSE: \u003ca class=\"ticker\" href=\"https://www.benzinga.com/stock/sklz#NYSE\"\u003eSKLZ\u003c/a\u003e), \u003ca href=\"http://www.benzinga.com/markets/cryptocurrency/21/04/20762794/cathie-woods-ark-loads-up-another-1-2-million-shares-in-skillz-also-adds-coinbase-draftkin\"\u003ejust a day after\u003c/a\u003e snapping 1.2 million shares of the stock.\u003c/p\u003e\n\u003cp\u003eARKK bought the shares of the company which closed ...\u003c/p\u003e\u003cp\u003e\u003ca href=https://www.benzinga.com/markets/cryptocurrency/21/04/20784086/cathie-wood-adds-more-coinbase-skillz-trims-square alt=Cathie Wood Adds More Coinbase, Skillz, Trims Square\u003eFull story available on Benzinga.com\u003c/a\u003e\u003c/p\u003e", - "id": "nJsSJJdwViHZcw5367rZi7_qkXLfMzacXBfpv-vD9UA", - "image_url": "https://cdn2.benzinga.com/files/imagecache/og_image_social_share_1200x630/images/story/2012/andre-francois-mckenzie-auhr4gcqcce-unsplash.jpg?width=720", - "keywords": [ - "Sector ETFs", - "Penny Stocks", - "Cryptocurrency", - "Small Cap", - "Markets", - "Trading Ideas", - "ETFs" - ], - "published_utc": "2021-04-26T02:33:17Z", - "publisher": { - "favicon_url": "https://s3.polygon.io/public/public/assets/news/favicons/benzinga.ico", - "homepage_url": "https://www.benzinga.com/", - "logo_url": "https://s3.polygon.io/public/public/assets/news/logos/benzinga.svg", - "name": "Benzinga" - }, - "tickers": [ - "DOCU", - "DDD", - "NIU", - "ARKF", - "NVDA", - "SKLZ", - "PCAR", - "MASS", - "PSTI", - "SPFR", - "TREE", - "PHR", - "IRDM", - "BEAM", - "ARKW", - "ARKK", - "ARKG", - "PSTG", - "SQ", - "IONS", - "SYRS" + "next_url": "https://api.massive.com/v1/indicators/sma/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", + "results": { + "underlying": { + "aggregates": [ + { + "c": 75.0875, + "h": 75.15, + "l": 73.7975, + "n": 1, + "o": 74.06, + "t": 1577941200000, + "v": 135647456, + "vw": 74.6099 + }, + { + "c": 74.3575, + "h": 75.145, + "l": 74.125, + "n": 1, + "o": 74.2875, + "t": 1578027600000, + "v": 146535512, + "vw": 74.7026 + } ], - "title": "Cathie Wood Adds More Coinbase, Skillz, Trims Square" - } - ], + "url": "https://api.massive.com/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25" + }, + "values": [ + { + "timestamp": 1517562000016, + "value": 140.139 + } + ] + }, "status": "OK" }, "schema": { "properties": { - "count": { - "description": "The total number of results for this request.", - "type": "integer" - }, "next_url": { "description": "If present, this value can be used to fetch the next page of data.", "type": "string" @@ -9802,99 +11239,111 @@ "type": "string" }, "results": { - "items": { - "properties": { - "amp_url": { - "description": "The mobile friendly Accelerated Mobile Page (AMP) URL.", - "type": "string" - }, - "article_url": { - "description": "A link to the news article.", - "type": "string" - }, - "author": { - "description": "The article's author.", - "type": "string" - }, - "description": { - "description": "A description of the article.", - "type": "string" - }, - "id": { - "description": "Unique identifier for the article.", - "type": "string" - }, - "image_url": { - "description": "The article's image URL.", - "type": "string" - }, - "keywords": { - "description": "The keywords associated with the article (which will vary depending on\nthe publishing source).", - "items": { - "type": "string" + "properties": { + "underlying": { + "properties": { + "aggregates": { + "items": { + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "format": "float", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "float", + "type": "number" + } + }, + "required": [ + "v", + "vw", + "o", + "c", + "h", + "l", + "t", + "n" + ], + "type": "object", + "x-massive-go-type": { + "name": "Aggregate", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + }, + "type": "array" }, - "type": "array" - }, - "published_utc": { - "description": "The date the article was published on.", - "format": "date-time", - "type": "string" + "url": { + "description": "The URL which can be used to request the underlying aggregates used in this request.", + "type": "string" + } }, - "publisher": { + "type": "object" + }, + "values": { + "items": { "properties": { - "favicon_url": { - "description": "The publisher's homepage favicon URL.", - "type": "string" - }, - "homepage_url": { - "description": "The publisher's homepage URL.", - "type": "string" - }, - "logo_url": { - "description": "The publisher's logo URL.", - "type": "string" + "timestamp": { + "description": "The Unix Msec timestamp from the last aggregate used in this calculation.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "IMicroseconds", + "path": "github.com/massive-com/ptime" + } }, - "name": { - "description": "The publisher's name.", - "type": "string" + "value": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } } }, - "required": [ - "name", - "logo_url", - "homepage_url" - ], "type": "object" }, - "tickers": { - "description": "The ticker symbols associated with the article.", - "items": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - }, - "type": "array" - }, - "title": { - "description": "The title of the news article.", - "type": "string" - } - }, - "required": [ - "id", - "publisher", - "title", - "author", - "published_utc", - "article_url", - "tickers" - ], - "type": "object", - "x-polygon-go-type": { - "name": "NewsArticleMetadata", - "path": "github.com/polygon-io/go-lib-models/v2/globals" + "type": "array" } }, - "type": "array" + "type": "object", + "x-massive-go-type": { + "name": "SMAResults" + } }, "status": { "description": "The status of this request's response.", @@ -9903,53 +11352,177 @@ }, "type": "object" } + }, + "text/csv": { + "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664323200000,685,,0,,0,0,0,0,0,false,1664323200000,1.4915199239999994\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664164800000,550,,0,,0,0,0,0,0,false,1664164800000,1.4863299679999997\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664078400000,10,,0,,0,0,0,0,0,false,1664078400000,1.4826388699999997\nC:USDAUD,686,1.5442,0,1.53763,1.5404,1.5526022,1.537279,1664409600000,686,,0,,0,0,0,0,0,false,1664409600000,1.4942168479999998\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664251200000,536,,0,,0,0,0,0,0,false,1664251200000,1.4900704799999993\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664236800000,536,,0,,0,0,0,0,0,false,1664236800000,1.4882634499999994\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664150400000,550,,0,,0,0,0,0,0,false,1664150400000,1.4845906159999998\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664064000000,10,,0,,0,0,0,0,0,false,1664064000000,1.4809719239999999\nC:USDAUD,1,1.5314,0,1.5313936,1.5313936,1.5313936,1.5313936,1663977600000,1,,0,,0,0,0,0,0,false,1663977600000,1.4794745239999998\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664337600000,685,,0,,0,0,0,0,0,false,1664337600000,1.4928357579999996\n", + "schema": { + "type": "string" + } } }, - "description": "An array of news articles." - }, - "401": { - "description": "Unauthorized - Check our API Key and account status" - }, - "404": { - "description": "The specified resource was not found" + "description": "Simple Moving Average (SMA) data for each period." } }, - "summary": "Ticker News", + "summary": "Simple Moving Average (SMA)", "tags": [ - "reference:news" + "fx:aggregates" ], - "x-polygon-entitlement-data-type": { - "description": "Reference data", - "name": "reference" + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" }, - "x-polygon-paginate": { - "sort": { - "default": "published_utc", - "enum": [ - "published_utc" - ], - "limit": { - "default": 10, - "maximum": 1000, - "minimum": 1 - } - } + "x-massive-entitlement-market-type": { + "description": "Forex data", + "name": "fx" } - } + }, + "x-massive-ignore": true }, - "/v2/snapshot/locale/global/markets/crypto/tickers": { + "/v1/indicators/sma/{indicesTicker}": { "get": { - "description": "Get the current minute, day, and previous day’s aggregate, as well as the last trade and quote for all traded cryptocurrency symbols.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n", + "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.", + "operationId": "IndicesSMA", "parameters": [ { - "description": "A comma separated list of tickers to get snapshots for.", - "in": "query", - "name": "tickers", + "description": "The ticker symbol for which to get simple moving average (SMA) data.", + "example": "I:NDX", + "in": "path", + "name": "indicesTicker", + "required": true, "schema": { - "items": { - "type": "string" - }, - "type": "array" + "type": "string" + }, + "x-massive-go-id": "Ticker" + }, + { + "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "in": "query", + "name": "timestamp", + "schema": { + "type": "string" + }, + "x-massive-filter-field": { + "range": true + } + }, + { + "description": "The size of the aggregate time window.", + "example": "day", + "in": "query", + "name": "timespan", + "schema": { + "default": "day", + "enum": [ + "minute", + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "type": "string" + } + }, + { + "description": "Whether or not the aggregates used to calculate the simple moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.", + "example": true, + "in": "query", + "name": "adjusted", + "schema": { + "default": true, + "type": "boolean" + } + }, + { + "description": "The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.", + "example": 50, + "in": "query", + "name": "window", + "schema": { + "default": 50, + "type": "integer" + } + }, + { + "description": "The value in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close values to \ncalculate the simple moving average (SMA).", + "example": "close", + "in": "query", + "name": "series_type", + "schema": { + "default": "close", + "enum": [ + "open", + "high", + "low", + "close" + ], + "type": "string" + } + }, + { + "description": "Whether or not to include the aggregates used to calculate this indicator in the response.", + "in": "query", + "name": "expand_underlying", + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "description": "The order in which to return the results, ordered by timestamp.", + "example": "desc", + "in": "query", + "name": "order", + "schema": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + { + "description": "Limit the number of results returned, default is 10 and max is 5000", + "in": "query", + "name": "limit", + "schema": { + "default": 10, + "maximum": 5000, + "type": "integer" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gt", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lt", + "schema": { + "type": "string" } } ], @@ -9958,239 +11531,126 @@ "content": { "application/json": { "example": { - "status": "OK", - "tickers": [ - { - "day": { - "c": 0.296, - "h": 0.59714, - "l": 0.23706, - "o": 0.28, - "v": 4097699.5691991993, - "vw": 0 - }, - "lastTrade": { - "c": [ - 1 - ], - "i": 413131, - "p": 0.293, - "s": 13.6191, - "t": 1605292686010, - "x": 17 - }, - "min": { - "c": 0.296, - "h": 0.296, - "l": 0.294, - "o": 0.296, - "v": 123.4866, - "vw": 0 - }, - "prevDay": { - "c": 0.281, - "h": 0.59714, - "l": 0.23706, - "o": 0.27, - "v": 6070178.786154971, - "vw": 0.4076 - }, - "ticker": "X:FSNUSD", - "todaysChange": 0.012, - "todaysChangePerc": 4.270463, - "updated": 1605330008999 - } - ] + "next_url": "https://api.massive.com/v1/indicators/sma/I:NDX?cursor=YWRqdXN0ZWQ9dHJ1ZSZhcD0lN0IlMjJ2JTIyJTNBMCUyQyUyMm8lMjIlM0EwJTJDJTIyYyUyMiUzQTE1MDg0Ljk5OTM4OTgyMDAzJTJDJTIyaCUyMiUzQTAlMkMlMjJsJTIyJTNBMCUyQyUyMnQlMjIlM0ExNjg3MjE5MjAwMDAwJTdEJmFzPSZleHBhbmRfdW5kZXJseWluZz1mYWxzZSZsaW1pdD0xJm9yZGVyPWRlc2Mmc2VyaWVzX3R5cGU9Y2xvc2UmdGltZXNwYW49ZGF5JnRpbWVzdGFtcC5sdD0xNjg3MjM3MjAwMDAwJndpbmRvdz01Mw", + "request_id": "4cae270008cb3f947e3f92c206e3888a", + "results": { + "underlying": { + "url": "https://api.massive.com/v2/aggs/ticker/I:NDX/range/1/day/1678338000000/1687366378997?limit=240&sort=desc" + }, + "values": [ + { + "timestamp": 1687237200000, + "value": 14362.676417589264 + } + ] + }, + "status": "OK" }, "schema": { - "allOf": [ - { - "properties": { - "status": { - "description": "The status of this request's response.", - "type": "string" - } - }, - "type": "object" + "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" }, - { + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "results": { "properties": { - "tickers": { - "items": { - "properties": { - "day": { - "description": "The most recent daily bar for this ticker.", + "underlying": { + "properties": { + "aggregates": { + "items": { "properties": { "c": { "description": "The close price for the symbol in the given time period.", - "format": "double", + "format": "float", "type": "number" }, "h": { "description": "The highest price for the symbol in the given time period.", - "format": "double", + "format": "float", "type": "number" }, "l": { "description": "The lowest price for the symbol in the given time period.", - "format": "double", + "format": "float", "type": "number" }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, "o": { "description": "The open price for the symbol in the given time period.", - "format": "double", + "format": "float", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "format": "float", "type": "number" }, "v": { "description": "The trading volume of the symbol in the given time period.", - "format": "double", + "format": "float", "type": "number" }, "vw": { "description": "The volume weighted average price.", - "format": "double", + "format": "float", "type": "number" } }, - "type": "object" - }, - "lastTrade": { - "allOf": [ - { - "description": "The most recent trade for this ticker." - }, - { - "properties": { - "c": { - "description": "The trade conditions.", - "items": { - "type": "string" - }, - "type": "array" - }, - "i": { - "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n", - "type": "string" - }, - "p": { - "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n", - "format": "double", - "type": "number" - }, - "s": { - "description": "The size (volume) of the trade.", - "type": "integer" - }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" - }, - "x": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", - "type": "integer" - } - }, - "type": "object" - }, - { - "properties": { - "x": { - "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n", - "type": "integer" - } - } - } - ] + "required": [ + "v", + "vw", + "o", + "c", + "h", + "l", + "t", + "n" + ], + "type": "object", + "x-massive-go-type": { + "name": "Aggregate", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } }, - "min": { - "description": "The most recent minute bar for this ticker.", - "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "prevDay": { - "description": "The previous day's bar for this ticker.", - "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "ticker": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - }, - "todaysChange": { - "description": "The value of the change the from previous day.", - "format": "double", - "type": "number" - }, - "todaysChangePerc": { - "description": "The percentage change since the previous day.", - "format": "double", - "type": "number" + "type": "array" + }, + "url": { + "description": "The URL which can be used to request the underlying aggregates used in this request.", + "type": "string" + } + }, + "type": "object" + }, + "values": { + "items": { + "properties": { + "timestamp": { + "description": "The Unix Msec timestamp from the last aggregate used in this calculation.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "IMicroseconds", + "path": "github.com/massive-com/ptime" + } }, - "updated": { - "description": "The last updated timestamp.", - "type": "integer" + "value": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } } }, "type": "object" @@ -10198,52 +11658,182 @@ "type": "array" } }, - "type": "object" + "type": "object", + "x-massive-go-type": { + "name": "SMAResults" + } + }, + "status": { + "description": "The status of this request's response.", + "type": "string" } - ] + }, + "type": "object" } } }, - "description": "Get current state for all tickers" - }, - "default": { - "description": "Unexpected error" + "description": "Simple Moving Average (SMA) data for each period." } }, - "summary": "All Tickers", + "summary": "Simple Moving Average (SMA)", "tags": [ - "crypto:snapshot" - ], - "x-polygon-entitlement-allowed-timeframes": [ - { - "description": "Real Time Data", - "name": "realtime" - }, - { - "description": "15 minute delayed data", - "name": "delayed" - } + "indices:aggregates" ], - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-allowed-limited-tickers": true, + "x-massive-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, - "x-polygon-entitlement-market-type": { - "description": "Crypto data", - "name": "crypto" + "x-massive-entitlement-market-type": { + "description": "Indices data", + "name": "indices" } - } + }, + "x-massive-ignore": true }, - "/v2/snapshot/locale/global/markets/crypto/tickers/{ticker}": { + "/v1/indicators/sma/{optionsTicker}": { "get": { - "description": "Get the current minute, day, and previous day’s aggregate, as well as the last trade and quote for a single traded cryptocurrency symbol.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n", + "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.", + "operationId": "OptionsSMA", "parameters": [ { - "description": "Ticker of the snapshot", - "example": "X:BTCUSD", + "description": "The ticker symbol for which to get simple moving average (SMA) data.", + "example": "O:SPY241220P00720000", "in": "path", - "name": "ticker", + "name": "optionsTicker", "required": true, + "schema": { + "type": "string" + }, + "x-massive-go-id": "Ticker" + }, + { + "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "in": "query", + "name": "timestamp", + "schema": { + "type": "string" + }, + "x-massive-filter-field": { + "range": true + } + }, + { + "description": "The size of the aggregate time window.", + "example": "day", + "in": "query", + "name": "timespan", + "schema": { + "default": "day", + "enum": [ + "minute", + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "type": "string" + } + }, + { + "description": "Whether or not the aggregates used to calculate the simple moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.", + "example": true, + "in": "query", + "name": "adjusted", + "schema": { + "default": true, + "type": "boolean" + } + }, + { + "description": "The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.", + "example": 50, + "in": "query", + "name": "window", + "schema": { + "default": 50, + "type": "integer" + } + }, + { + "description": "The price in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close prices to \ncalculate the simple moving average (SMA).", + "example": "close", + "in": "query", + "name": "series_type", + "schema": { + "default": "close", + "enum": [ + "open", + "high", + "low", + "close" + ], + "type": "string" + } + }, + { + "description": "Whether or not to include the aggregates used to calculate this indicator in the response.", + "in": "query", + "name": "expand_underlying", + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "description": "The order in which to return the results, ordered by timestamp.", + "example": "desc", + "in": "query", + "name": "order", + "schema": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + { + "description": "Limit the number of results returned, default is 10 and max is 5000", + "in": "query", + "name": "limit", + "schema": { + "default": 10, + "maximum": 5000, + "type": "integer" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gt", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lt", "schema": { "type": "string" } @@ -10254,297 +11844,336 @@ "content": { "application/json": { "example": { - "request_id": "ad92e92ce183112c593717f00dfebd2c", - "status": "OK", - "ticker": { - "day": { - "c": 16260.85, - "h": 16428.4, - "l": 15830.4, - "o": 16418.07, - "v": 105008.84231068, - "vw": 0 - }, - "lastTrade": { - "c": [ - 2 + "next_url": "https://api.massive.com/v1/indicators/sma/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", + "results": { + "underlying": { + "aggregates": [ + { + "c": 75.0875, + "h": 75.15, + "l": 73.7975, + "n": 1, + "o": 74.06, + "t": 1577941200000, + "v": 135647456, + "vw": 74.6099 + }, + { + "c": 74.3575, + "h": 75.145, + "l": 74.125, + "n": 1, + "o": 74.2875, + "t": 1578027600000, + "v": 146535512, + "vw": 74.7026 + } ], - "i": "464569520", - "p": 16242.31, - "s": 0.001933, - "t": 1605294230780, - "x": 4 + "url": "https://api.massive.com/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25" }, - "min": { - "c": 16235.1, - "h": 16264.29, - "l": 16129.3, - "o": 16257.51, - "v": 19.30791925, - "vw": 0 - }, - "prevDay": { - "c": 16399.24, - "h": 16418.07, - "l": 16399.24, - "o": 16418.07, - "v": 0.99167108, - "vw": 16402.6893 - }, - "ticker": "X:BTCUSD", - "todaysChange": -156.93, - "todaysChangePerc": -0.956935, - "updated": 1605330008999 - } + "values": [ + { + "timestamp": 1517562000016, + "value": 140.139 + } + ] + }, + "status": "OK" }, "schema": { - "allOf": [ - { - "properties": { - "status": { - "description": "The status of this request's response.", - "type": "string" - } - }, - "type": "object" + "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" }, - { - "properties": { - "request_id": { - "description": "A request id assigned by the server.", - "type": "string" - } - }, - "type": "object" + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" }, - { + "results": { "properties": { - "ticker": { + "underlying": { "properties": { - "day": { - "description": "The most recent daily bar for this ticker.", - "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "lastTrade": { - "allOf": [ - { - "description": "The most recent trade for this ticker." - }, - { - "properties": { - "c": { - "description": "The trade conditions.", - "items": { - "type": "string" - }, - "type": "array" - }, - "i": { - "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n", - "type": "string" - }, - "p": { - "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n", - "format": "double", - "type": "number" - }, - "s": { - "description": "The size (volume) of the trade.", - "type": "integer" - }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" - }, - "x": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", - "type": "integer" - } + "aggregates": { + "items": { + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "float", + "type": "number" }, - "type": "object" - }, - { - "properties": { - "x": { - "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n", - "type": "integer" - } + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "format": "float", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "float", + "type": "number" } - } - ] - }, - "min": { - "description": "The most recent minute bar for this ticker.", - "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "prevDay": { - "description": "The previous day's bar for this ticker.", - "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" + "required": [ + "v", + "vw", + "o", + "c", + "h", + "l", + "t", + "n" + ], + "type": "object", + "x-massive-go-type": { + "name": "Aggregate", + "path": "github.com/massive-com/go-lib-models/v2/globals" } }, - "type": "object" + "type": "array" }, - "ticker": { - "description": "The exchange symbol that this item is traded under.", + "url": { + "description": "The URL which can be used to request the underlying aggregates used in this request.", "type": "string" - }, - "todaysChange": { - "description": "The value of the change the from previous day.", - "format": "double", - "type": "number" - }, - "todaysChangePerc": { - "description": "The percentage change since the previous day.", - "format": "double", - "type": "number" - }, - "updated": { - "description": "The last updated timestamp.", - "type": "integer" } }, "type": "object" - } - }, - "type": "object" - } - ] - } - } + }, + "values": { + "items": { + "properties": { + "timestamp": { + "description": "The Unix Msec timestamp from the last aggregate used in this calculation.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "IMicroseconds", + "path": "github.com/massive-com/ptime" + } + }, + "value": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object", + "x-massive-go-type": { + "name": "SMAResults" + } + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "type": "object" + } + }, + "text/csv": { + "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649304000000,1,,0,,0,0,0,0,0,false,1649304000000,286.0121999999996\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649131200000,1,,0,,0,0,0,0,0,false,1649131200000,284.61099999999965\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648699200000,1,,0,,0,0,0,0,0,false,1648699200000,282.50919999999974\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648612800000,1,,0,,0,0,0,0,0,false,1648612800000,281.80859999999973\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648526400000,1,,0,,0,0,0,0,0,false,1648526400000,281.1079999999998\nO:SPY241220P00720000,3,277.8267,0,277.82,277.83,277.83,277.82,1649649600000,2,,0,,0,0,0,0,0,false,1649649600000,285.4949999999996\nO:SPY241220P00720000,2,270.49,0,270.49,270.49,270.49,270.49,1649390400000,1,,0,,0,0,0,0,0,false,1649390400000,285.6801999999996\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649217600000,1,,0,,0,0,0,0,0,false,1649217600000,285.31159999999966\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649044800000,1,,0,,0,0,0,0,0,false,1649044800000,283.9103999999997\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648785600000,1,,0,,0,0,0,0,0,false,1648785600000,283.2097999999997\n", + "schema": { + "type": "string" + } + } }, - "description": "Get current state for a ticker" - }, - "default": { - "description": "Unexpected error" + "description": "Simple Moving Average (SMA) data for each period." } }, - "summary": "Ticker", + "summary": "Simple Moving Average (SMA)", "tags": [ - "crypto:snapshot" - ], - "x-polygon-entitlement-allowed-timeframes": [ - { - "description": "Real Time Data", - "name": "realtime" - }, - { - "description": "15 minute delayed data", - "name": "delayed" - } + "options:aggregates" ], - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, - "x-polygon-entitlement-market-type": { - "description": "Crypto data", - "name": "crypto" + "x-massive-entitlement-market-type": { + "description": "Options data", + "name": "options" } - } + }, + "x-massive-ignore": true }, - "/v2/snapshot/locale/global/markets/crypto/tickers/{ticker}/book": { + "/v1/indicators/sma/{stockTicker}": { "get": { - "description": "Get the current level 2 book of a single ticker. This is the combined book from all of the exchanges.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n", + "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.", + "operationId": "SMA", "parameters": [ { - "description": "The cryptocurrency ticker.", - "example": "X:BTCUSD", + "description": "Specify a case-sensitive ticker symbol for which to get simple moving average (SMA) data. For example, AAPL represents Apple Inc.", + "example": "AAPL", "in": "path", - "name": "ticker", + "name": "stockTicker", "required": true, + "schema": { + "type": "string" + }, + "x-massive-go-id": "Ticker" + }, + { + "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "in": "query", + "name": "timestamp", + "schema": { + "type": "string" + }, + "x-massive-filter-field": { + "range": true + } + }, + { + "description": "The size of the aggregate time window.", + "example": "day", + "in": "query", + "name": "timespan", + "schema": { + "default": "day", + "enum": [ + "minute", + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "type": "string" + } + }, + { + "description": "Whether or not the aggregates used to calculate the simple moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.", + "example": true, + "in": "query", + "name": "adjusted", + "schema": { + "default": true, + "type": "boolean" + } + }, + { + "description": "The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.", + "example": 50, + "in": "query", + "name": "window", + "schema": { + "default": 50, + "type": "integer" + } + }, + { + "description": "The price in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close prices to \ncalculate the simple moving average (SMA).", + "example": "close", + "in": "query", + "name": "series_type", + "schema": { + "default": "close", + "enum": [ + "open", + "high", + "low", + "close" + ], + "type": "string" + } + }, + { + "description": "Whether or not to include the aggregates used to calculate this indicator in the response.", + "in": "query", + "name": "expand_underlying", + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "description": "The order in which to return the results, ordered by timestamp.", + "example": "desc", + "in": "query", + "name": "order", + "schema": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + { + "description": "Limit the number of results returned, default is 10 and max is 5000", + "in": "query", + "name": "limit", + "schema": { + "default": 10, + "maximum": 5000, + "type": "integer" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gt", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lt", "schema": { "type": "string" } @@ -10555,166 +12184,214 @@ "content": { "application/json": { "example": { - "data": { - "askCount": 593.1412981600005, - "asks": [ - { - "p": 11454, - "x": { - "2": 1 - } - }, - { - "p": 11455, - "x": { - "2": 1 - } - } - ], - "bidCount": 694.951789670001, - "bids": [ - { - "p": 16303.17, - "x": { - "1": 2 + "next_url": "https://api.massive.com/v1/indicators/sma/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", + "results": { + "underlying": { + "aggregates": [ + { + "c": 75.0875, + "h": 75.15, + "l": 73.7975, + "n": 1, + "o": 74.06, + "t": 1577941200000, + "v": 135647456, + "vw": 74.6099 + }, + { + "c": 74.3575, + "h": 75.145, + "l": 74.125, + "n": 1, + "o": 74.2875, + "t": 1578027600000, + "v": 146535512, + "vw": 74.7026 } - }, + ], + "url": "https://api.massive.com/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25" + }, + "values": [ { - "p": 16302.94, - "x": { - "1": 0.02859424, - "6": 0.023455 - } + "timestamp": 1517562000016, + "value": 140.139 } - ], - "spread": -4849.17, - "ticker": "X:BTCUSD", - "updated": 1605295074162 + ] }, "status": "OK" }, "schema": { - "allOf": [ - { - "description": "The status of this request's response.", + "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", "type": "string" }, - { + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "results": { "properties": { - "data": { + "underlying": { "properties": { - "askCount": { - "description": "The combined total number of asks in the book.", - "format": "double", - "type": "number" - }, - "asks": { + "aggregates": { "items": { "properties": { - "p": { - "description": "The price of this book level.", - "format": "double", + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "float", "type": "number" }, - "x": { - "description": "A map of the exchange ID to number of shares at this price level.\n\u003cbr /\u003e\n\u003cbr /\u003e\n**Example:**\n\u003cbr /\u003e\n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n\u003cbr /\u003e\n\u003cbr /\u003e\nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n", - "type": "object" - } - }, - "type": "object" - }, - "type": "array" - }, - "bidCount": { - "description": "The combined total number of bids in the book.", - "format": "double", - "type": "number" - }, - "bids": { - "items": { - "properties": { - "p": { - "description": "The price of this book level.", - "format": "double", + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "float", "type": "number" }, - "x": { - "description": "A map of the exchange ID to number of shares at this price level.\n\u003cbr /\u003e\n\u003cbr /\u003e\n**Example:**\n\u003cbr /\u003e\n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n\u003cbr /\u003e\n\u003cbr /\u003e\nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n", - "type": "object" - } - }, - "type": "object" - }, - "type": "array" - }, - "spread": { - "description": "The difference between the best bid and the best ask price accross exchanges.", - "format": "double", - "type": "number" + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "format": "float", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "float", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "float", + "type": "number" + } + }, + "required": [ + "v", + "vw", + "o", + "c", + "h", + "l", + "t", + "n" + ], + "type": "object", + "x-massive-go-type": { + "name": "Aggregate", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + }, + "type": "array" }, - "ticker": { - "description": "The exchange symbol that this item is traded under.", + "url": { + "description": "The URL which can be used to request the underlying aggregates used in this request.", "type": "string" - }, - "updated": { - "description": "The last updated timestamp.", - "type": "integer" } }, "type": "object" + }, + "values": { + "items": { + "properties": { + "timestamp": { + "description": "The Unix Msec timestamp from the last aggregate used in this calculation.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "IMicroseconds", + "path": "github.com/massive-com/ptime" + } + }, + "value": { + "description": "The indicator value for this period.", + "format": "float", + "type": "number", + "x-massive-go-type": { + "name": "*float64" + } + } + }, + "type": "object" + }, + "type": "array" } }, - "type": "object" + "type": "object", + "x-massive-go-type": { + "name": "SMAResults" + } + }, + "status": { + "description": "The status of this request's response.", + "type": "string" } - ] + }, + "type": "object" + } + }, + "text/csv": { + "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nAAPL,1.27849501E+08,142.9012,0,146.1,142.48,146.72,140.68,1664424000000,1061692,,0,,0,0,0,0,0,false,1664424000000,164.19240000000005\nAAPL,1.46755122E+08,147.599,0,147.64,149.84,150.6414,144.84,1664337600000,1140818,,0,,0,0,0,0,0,false,1664337600000,164.40360000000007\nAAPL,8.4461761E+07,152.1354,0,152.74,151.76,154.72,149.945,1664251200000,683781,,0,,0,0,0,0,0,false,1664251200000,164.42680000000007\nAAPL,9.3339409E+07,151.5222,0,149.66,150.77,153.7701,149.64,1664164800000,747666,,0,,0,0,0,0,0,false,1664164800000,164.33300000000006\nAAPL,9.3308449E+07,156.1877,0,157.34,153.72,158.61,153.6,1663732800000,712645,,0,,0,0,0,0,0,false,1663732800000,164.13680000000005\nAAPL,9.6031641E+07,150.0222,0,151.19,150.43,151.47,148.56,1663905600000,766888,,0,,0,0,0,0,0,false,1663905600000,164.32100000000005\nAAPL,8.6651514E+07,152.5709,0,152.38,152.74,154.47,150.91,1663819200000,686866,,0,,0,0,0,0,0,false,1663819200000,164.28180000000003\nAAPL,1.07691097E+08,156.1317,0,153.4,156.9,158.08,153.08,1663646400000,792177,,0,,0,0,0,0,0,false,1663646400000,163.97960000000006\nAAPL,8.1599225E+07,152.5505,0,149.31,154.48,154.56,149.1,1663560000000,671961,,0,,0,0,0,0,0,false,1663560000000,163.73900000000006\nAAPL,1.64879031E+08,150.2387,0,151.21,150.7,151.35,148.37,1663300800000,850358,,0,,0,0,0,0,0,false,1663300800000,163.59020000000007\n", + "schema": { + "type": "string" } } }, - "description": "Get current level 2 book for a ticker" - }, - "default": { - "description": "Unexpected error" + "description": "Simple Moving Average (SMA) data for each period." } }, - "summary": "Ticker Full Book (L2)", + "summary": "Simple Moving Average (SMA)", "tags": [ - "crypto:snapshot" - ], - "x-polygon-entitlement-allowed-timeframes": [ - { - "description": "Real Time Data", - "name": "realtime" - }, - { - "description": "15 minute delayed data", - "name": "delayed" - } + "stocks:aggregates" ], - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, - "x-polygon-entitlement-market-type": { - "description": "Crypto data", - "name": "crypto" + "x-massive-entitlement-market-type": { + "description": "Stocks data", + "name": "stocks" } } }, - "/v2/snapshot/locale/global/markets/crypto/{direction}": { + "/v1/last/crypto/{from}/{to}": { "get": { - "description": "Get the current top 20 gainers or losers of the day in cryptocurrency markets.\n\u003cbr /\u003e\n\u003cbr /\u003e\nTop gainers are those tickers whose price has increased by the highest percentage since the previous day's close.\nTop losers are those tickers whose price has decreased by the highest percentage since the previous day's close.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n", + "description": "Get the last trade tick for a cryptocurrency pair.", + "operationId": "LastTradeCrypto", "parameters": [ { - "description": "The direction of the snapshot results to return.\n", - "example": "gainers", + "description": "The \"from\" symbol of the pair.", + "example": "BTC", "in": "path", - "name": "direction", + "name": "from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The \"to\" symbol of the pair.", + "example": "USD", + "in": "path", + "name": "to", "required": true, "schema": { - "enum": [ - "gainers", - "losers" - ], "type": "string" } } @@ -10724,290 +12401,140 @@ "content": { "application/json": { "example": { - "status": "OK", - "tickers": [ - { - "day": { - "c": 0.0374, - "h": 0.062377, - "l": 0.01162, - "o": 0.044834, - "v": 27313165.159427017, - "vw": 0 - }, - "lastTrade": { - "c": [ - 2 - ], - "i": "517478762", - "p": 0.0374, - "s": 499, - "t": 1604409649544, - "x": 2 - }, - "min": { - "c": 0.062377, - "h": 0.062377, - "l": 0.062377, - "o": 0.062377, - "v": 35420, - "vw": 0 - }, - "prevDay": { - "c": 0.01162, - "h": 0.044834, - "l": 0.01162, - "o": 0.044834, - "v": 53616273.36827199, - "vw": 0.0296 - }, - "ticker": "X:DRNUSD", - "todaysChange": 0.02578, - "todaysChangePerc": 221.858864, - "updated": 1605330008999 - } - ] + "last": { + "conditions": [ + 1 + ], + "exchange": 4, + "price": 16835.42, + "size": 0.006909, + "timestamp": 1605560885027 + }, + "request_id": "d2d779df015fe2b7fbb8e58366610ef7", + "status": "success", + "symbol": "BTC-USD" }, "schema": { - "allOf": [ - { + "properties": { + "last": { + "properties": { + "conditions": { + "description": "A list of condition codes.", + "items": { + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.", + "format": "int32", + "type": "integer" + }, + "type": "array", + "x-massive-go-type": { + "name": "Int32Array" + } + }, + "exchange": { + "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.", + "type": "integer" + }, + "price": { + "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.", + "format": "double", + "type": "number" + }, + "size": { + "description": "The size of a trade (also known as volume).", + "format": "double", + "type": "number" + }, + "timestamp": { + "description": "The Unix millisecond timestamp.", + "type": "integer", + "x-massive-go-type": { + "name": "IMilliseconds", + "path": "github.com/massive-com/ptime" + } + } + }, + "required": [ + "exchange", + "price", + "size", + "timestamp" + ], + "type": "object", + "x-massive-go-type": { + "name": "LastTradeCrypto" + } + }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "status": { "description": "The status of this request's response.", "type": "string" }, - { - "properties": { - "tickers": { - "items": { - "properties": { - "day": { - "description": "The most recent daily bar for this ticker.", - "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "lastTrade": { - "allOf": [ - { - "description": "The most recent trade for this ticker." - }, - { - "properties": { - "c": { - "description": "The trade conditions.", - "items": { - "type": "string" - }, - "type": "array" - }, - "i": { - "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n", - "type": "string" - }, - "p": { - "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n", - "format": "double", - "type": "number" - }, - "s": { - "description": "The size (volume) of the trade.", - "type": "integer" - }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" - }, - "x": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", - "type": "integer" - } - }, - "type": "object" - }, - { - "properties": { - "x": { - "description": "The exchange that this crypto trade happened on. \nSee \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\"\u003eExchanges\u003c/a\u003e for a mapping of exchanges to IDs.\n", - "type": "integer" - } - } - } - ] - }, - "min": { - "description": "The most recent minute bar for this ticker.", - "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "prevDay": { - "description": "The previous day's bar for this ticker.", - "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "ticker": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - }, - "todaysChange": { - "description": "The value of the change the from previous day.", - "format": "double", - "type": "number" - }, - "todaysChangePerc": { - "description": "The percentage change since the previous day.", - "format": "double", - "type": "number" - }, - "updated": { - "description": "The last updated timestamp.", - "type": "integer" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" + "symbol": { + "description": "The symbol pair that was evaluated from the request.", + "type": "string" } - ] + }, + "required": [ + "status", + "request_id", + "symbol" + ], + "type": "object" + } + }, + "text/csv": { + "example": "conditions,exchange,price,size,timestamp\n1,4,16835.42,0.006909,1605560885027\n", + "schema": { + "type": "string" } } }, - "description": "Get the current gainers / losers of the day" + "description": "The last tick for this currency pair." }, "default": { "description": "Unexpected error" } }, - "summary": "Gainers/Losers", + "summary": "Last Trade for a Crypto Pair", "tags": [ - "crypto:snapshot" - ], - "x-polygon-entitlement-allowed-timeframes": [ - { - "description": "Real Time Data", - "name": "realtime" - }, - { - "description": "15 minute delayed data", - "name": "delayed" - } + "crypto:last:trade" ], - "x-polygon-entitlement-data-type": { - "description": "Aggregate data", - "name": "aggregates" + "x-massive-entitlement-data-type": { + "description": "Trade data", + "name": "trades" }, - "x-polygon-entitlement-market-type": { + "x-massive-entitlement-market-type": { "description": "Crypto data", "name": "crypto" } } }, - "/v2/snapshot/locale/global/markets/forex/tickers": { + "/v1/last_quote/currencies/{from}/{to}": { "get": { - "description": "Get the current minute, day, and previous day’s aggregate, as well as the last trade and quote for all traded forex symbols.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n", + "description": "Get the last quote tick for a forex currency pair.", + "operationId": "LastQuoteCurrencies", "parameters": [ { - "description": "A comma separated list of tickers to get snapshots for.", - "in": "query", - "name": "tickers", + "description": "The \"from\" symbol of the pair.", + "example": "AUD", + "in": "path", + "name": "from", + "required": true, "schema": { - "items": { - "type": "string" - }, - "type": "array" + "type": "string" + } + }, + { + "description": "The \"to\" symbol of the pair.", + "example": "USD", + "in": "path", + "name": "to", + "required": true, + "schema": { + "type": "string" } } ], @@ -11016,521 +12543,387 @@ "content": { "application/json": { "example": { - "status": "OK", - "tickers": [ - { - "day": { - "c": 0.11778221, - "h": 0.11812263, - "l": 0.11766631, - "o": 0.11797149, - "v": 77794 - }, - "lastQuote": { - "a": 0.11780678, - "b": 0.11777952, - "t": 1605280919000, - "x": 48 - }, - "min": { - "c": 0.117769, - "h": 0.11779633, - "l": 0.11773698, - "o": 0.11778, - "v": 202 - }, - "prevDay": { - "c": 0.11797258, - "h": 0.11797258, - "l": 0.11797149, - "o": 0.11797149, - "v": 2, - "vw": 0 - }, - "ticker": "C:HKDCHF", - "todaysChange": -0.00019306, - "todaysChangePerc": -0.1636482, - "updated": 1605280919000 - } - ] + "last": { + "ask": 0.73124, + "bid": 0.73122, + "exchange": 48, + "timestamp": 1605557756000 + }, + "request_id": "a73a29dbcab4613eeaf48583d3baacf0", + "status": "success", + "symbol": "AUD/USD" }, "schema": { - "allOf": [ - { - "properties": { - "status": { - "description": "The status of this request's response.", - "type": "string" - } - }, - "type": "object" - }, - { + "properties": { + "last": { "properties": { - "tickers": { - "items": { - "properties": { - "day": { - "description": "The most recent daily bar for this ticker.", - "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "lastQuote": { - "description": "The most recent quote for this ticker.", - "properties": { - "a": { - "description": "The ask price.", - "format": "double", - "type": "number" - }, - "b": { - "description": "The bid price.", - "format": "double", - "type": "number" - }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" - }, - "x": { - "description": "The exchange ID on which this quote happened.", - "type": "integer" - } - }, - "type": "object" - }, - "min": { - "description": "The most recent minute bar for this ticker.", - "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "prevDay": { - "description": "The previous day's bar for this ticker.", - "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "ticker": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - }, - "todaysChange": { - "description": "The value of the change the from previous day.", - "format": "double", - "type": "number" - }, - "todaysChangePerc": { - "description": "The percentage change since the previous day.", - "format": "double", - "type": "number" - }, - "updated": { - "description": "The last updated timestamp.", - "type": "integer" - } - }, - "type": "object" - }, - "type": "array" + "ask": { + "description": "The ask price.", + "format": "double", + "type": "number" + }, + "bid": { + "description": "The bid price.", + "format": "double", + "type": "number" + }, + "exchange": { + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", + "type": "integer" + }, + "timestamp": { + "description": "The Unix millisecond timestamp.", + "type": "integer", + "x-massive-go-type": { + "name": "IMilliseconds", + "path": "github.com/massive-com/ptime" + } } }, - "type": "object" + "required": [ + "ask", + "bid", + "exchange", + "timestamp" + ], + "type": "object", + "x-massive-go-type": { + "name": "LastQuoteCurrencies" + } + }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + }, + "symbol": { + "description": "The symbol pair that was evaluated from the request.", + "type": "string" } - ] + }, + "required": [ + "status", + "request_id", + "symbol" + ], + "type": "object" + } + }, + "text/csv": { + "example": "ask,bid,exchange,timestamp\n0.73124,0.73122,48,1605557756000\n", + "schema": { + "type": "string" } } }, - "description": "Get current state for all tickers" + "description": "The last quote tick for this currency pair." }, "default": { "description": "Unexpected error" } }, - "summary": "All Tickers", + "summary": "Last Quote for a Currency Pair", "tags": [ - "fx:snapshot" - ], - "x-polygon-entitlement-allowed-timeframes": [ - { - "description": "Real Time Data", - "name": "realtime" - }, - { - "description": "15 minute delayed data", - "name": "delayed" - } + "fx:last:quote" ], - "x-polygon-entitlement-data-type": { - "description": "Aggregate data", - "name": "aggregates" + "x-massive-entitlement-data-type": { + "description": "NBBO data", + "name": "nbbo" }, - "x-polygon-entitlement-market-type": { + "x-massive-entitlement-market-type": { "description": "Forex data", "name": "fx" } } }, - "/v2/snapshot/locale/global/markets/forex/tickers/{ticker}": { + "/v1/marketstatus/now": { "get": { - "description": "Get the current minute, day, and previous day’s aggregate, as well as the last trade and quote for a single traded currency symbol.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n", - "parameters": [ - { - "description": "The forex ticker.", - "example": "C:EURUSD", - "in": "path", - "name": "ticker", - "required": true, - "schema": { - "type": "string" - } - } - ], + "description": "Get the current trading status of the exchanges and overall financial markets.", + "operationId": "GetMarketStatus", "responses": { "200": { "content": { "application/json": { "example": { - "request_id": "ad76e76ce183002c5937a7f02dfebde4", - "status": "OK", - "ticker": { - "day": { - "c": 1.18403, - "h": 1.1906, - "l": 1.18001, - "o": 1.18725, - "v": 83578 + "afterHours": true, + "currencies": { + "crypto": "open", + "fx": "open" + }, + "earlyHours": false, + "exchanges": { + "nasdaq": "extended-hours", + "nyse": "extended-hours", + "otc": "closed" + }, + "market": "extended-hours", + "serverTime": "2020-11-10T17:37:37-05:00" + }, + "schema": { + "properties": { + "afterHours": { + "description": "Whether or not the market is in post-market hours.", + "type": "boolean", + "x-massive-go-type": { + "name": "*bool" + } }, - "lastQuote": { - "a": 1.18403, - "b": 1.18398, - "i": 0, - "t": 1606163759000, - "x": 48 - }, - "min": { - "c": 1.18396, - "h": 1.18423, - "l": 1.1838, - "o": 1.18404, - "v": 41 - }, - "prevDay": { - "c": 1.18724, - "h": 1.18727, - "l": 1.18725, - "o": 1.18725, - "v": 5, - "vw": 0 - }, - "ticker": "C:EURUSD", - "todaysChange": -0.00316, - "todaysChangePerc": -0.27458312, - "updated": 1606163759000 - } - }, - "schema": { - "allOf": [ - { + "currencies": { "properties": { - "status": { - "description": "The status of this request's response.", + "crypto": { + "description": "The status of the crypto market.", + "type": "string" + }, + "fx": { + "description": "The status of the forex market.", "type": "string" } }, - "type": "object" + "type": "object", + "x-massive-go-type": { + "name": "Currencies" + } }, - { + "earlyHours": { + "description": "Whether or not the market is in pre-market hours.", + "type": "boolean", + "x-massive-go-type": { + "name": "*bool" + } + }, + "exchanges": { "properties": { - "request_id": { - "description": "A request id assigned by the server.", + "nasdaq": { + "description": "The status of the Nasdaq market.", + "type": "string" + }, + "nyse": { + "description": "The status of the NYSE market.", + "type": "string" + }, + "otc": { + "description": "The status of the OTC market.", "type": "string" } }, - "type": "object" + "type": "object", + "x-massive-go-type": { + "name": "Exchanges" + } }, - { + "indicesGroups": { "properties": { - "ticker": { - "properties": { - "day": { - "description": "The most recent daily bar for this ticker.", - "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "lastQuote": { - "description": "The most recent quote for this ticker.", - "properties": { - "a": { - "description": "The ask price.", - "format": "double", - "type": "number" - }, - "b": { - "description": "The bid price.", - "format": "double", - "type": "number" - }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" - }, - "x": { - "description": "The exchange ID on which this quote happened.", - "type": "integer" - } - }, - "type": "object" - }, - "min": { - "description": "The most recent minute bar for this ticker.", - "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "prevDay": { - "description": "The previous day's bar for this ticker.", - "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "ticker": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - }, - "todaysChange": { - "description": "The value of the change the from previous day.", - "format": "double", - "type": "number" - }, - "todaysChangePerc": { - "description": "The percentage change since the previous day.", - "format": "double", - "type": "number" - }, - "updated": { - "description": "The last updated timestamp.", - "type": "integer" - } - }, - "type": "object" + "cccy": { + "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" + }, + "ftse_russell": { + "description": "The status of Financial Times Stock Exchange Group (\"FTSE\") Russell indices trading hours.", + "type": "string" + }, + "msci": { + "description": "The status of Morgan Stanley Capital International (\"MSCI\") indices trading hours.", + "type": "string" + }, + "mstar": { + "description": "The status of Morningstar (\"MSTAR\") indices trading hours.", + "type": "string" + }, + "mstarc": { + "description": "The status of Morningstar Customer (\"MSTARC\") indices trading hours." + }, + "nasdaq": { + "description": "The status of National Association of Securities Dealers Automated Quotations (\"Nasdaq\") indices trading hours.", + "type": "string" + }, + "s_and_p": { + "description": "The status of Standard & Poors's (\"S&P\") indices trading hours.", + "type": "string" + }, + "societe_generale": { + "description": "The status of Societe Generale indices trading hours.", + "type": "string" } }, - "type": "object" + "type": "object", + "x-massive-go-type": { + "name": "IndicesGroups" + } + }, + "market": { + "description": "The status of the market as a whole.", + "type": "string" + }, + "serverTime": { + "description": "The current time of the server, returned as a date-time in RFC3339 format.", + "type": "string" } - ] + }, + "type": "object" } } }, - "description": "Get current state for a ticker" - }, - "default": { - "description": "Unexpected error" + "description": "OK" } }, - "summary": "Ticker", + "summary": "Market Status", "tags": [ - "fx:snapshot" - ], - "x-polygon-entitlement-allowed-timeframes": [ - { - "description": "Real Time Data", - "name": "realtime" - }, - { - "description": "15 minute delayed data", - "name": "delayed" - } + "reference:stocks:market" ], - "x-polygon-entitlement-data-type": { - "description": "Aggregate data", - "name": "aggregates" - }, - "x-polygon-entitlement-market-type": { - "description": "Forex data", - "name": "fx" + "x-massive-entitlement-data-type": { + "description": "Reference data", + "name": "reference" } } }, - "/v2/snapshot/locale/global/markets/forex/{direction}": { + "/v1/marketstatus/upcoming": { + "get": { + "description": "Get upcoming market holidays and their open/close times.", + "operationId": "GetMarketHolidays", + "responses": { + "200": { + "content": { + "application/json": { + "example": [ + { + "date": "2020-11-26", + "exchange": "NYSE", + "name": "Thanksgiving", + "status": "closed" + }, + { + "date": "2020-11-26", + "exchange": "NASDAQ", + "name": "Thanksgiving", + "status": "closed" + }, + { + "date": "2020-11-26", + "exchange": "OTC", + "name": "Thanksgiving", + "status": "closed" + }, + { + "close": "2020-11-27T18:00:00.000Z", + "date": "2020-11-27", + "exchange": "NASDAQ", + "name": "Thanksgiving", + "open": "2020-11-27T14:30:00.000Z", + "status": "early-close" + }, + { + "close": "2020-11-27T18:00:00.000Z", + "date": "2020-11-27", + "exchange": "NYSE", + "name": "Thanksgiving", + "open": "2020-11-27T14:30:00.000Z", + "status": "early-close" + } + ], + "schema": { + "items": { + "properties": { + "close": { + "description": "The market close time on the holiday (if it's not closed).", + "type": "string" + }, + "date": { + "description": "The date of the holiday.", + "type": "string" + }, + "exchange": { + "description": "Which market the record is for.", + "type": "string" + }, + "name": { + "description": "The name of the holiday.", + "type": "string" + }, + "open": { + "description": "The market open time on the holiday (if it's not closed).", + "type": "string" + }, + "status": { + "description": "The status of the market on the holiday.", + "type": "string" + } + }, + "type": "object", + "x-massive-go-type": { + "name": "MarketHoliday" + } + }, + "type": "array" + } + } + }, + "description": "OK" + } + }, + "summary": "Market Holidays", + "tags": [ + "reference:stocks:market" + ], + "x-massive-entitlement-data-type": { + "description": "Reference data", + "name": "reference" + } + } + }, + "/v1/open-close/crypto/{from}/{to}/{date}": { "get": { - "description": "Get the current top 20 gainers or losers of the day in forex markets.\n\u003cbr /\u003e\n\u003cbr /\u003e\nTop gainers are those tickers whose price has increased by the highest percentage since the previous day's close.\nTop losers are those tickers whose price has decreased by the highest percentage since the previous day's close.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n", + "description": "Get the open, close prices of a cryptocurrency symbol on a certain day.\n", "parameters": [ { - "description": "The direction of the snapshot results to return.\n", - "example": "gainers", + "description": "The \"from\" symbol of the pair.", + "example": "BTC", "in": "path", - "name": "direction", + "name": "from", "required": true, "schema": { - "enum": [ - "gainers", - "losers" - ], "type": "string" } + }, + { + "description": "The \"to\" symbol of the pair.", + "example": "USD", + "in": "path", + "name": "to", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The date of the requested open/close in the format YYYY-MM-DD.", + "example": "2023-01-09", + "in": "path", + "name": "date", + "required": true, + "schema": { + "format": "date", + "type": "string" + } + }, + { + "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", + "example": true, + "in": "query", + "name": "adjusted", + "schema": { + "type": "boolean" + } } ], "responses": { @@ -11538,263 +12931,235 @@ "content": { "application/json": { "example": { - "status": "OK", - "tickers": [ + "close": 11050.64, + "closingTrades": [ { - "day": { - "c": 0.886156, - "h": 0.887111, - "l": 0.8825327, - "o": 0.8844732, - "v": 1041 - }, - "lastQuote": { - "a": 0.8879606, - "b": 0.886156, - "t": 1605283204000, - "x": 48 - }, - "min": { - "c": 0.886156, - "h": 0.886156, - "l": 0.886156, - "o": 0.886156, - "v": 1 - }, - "prevDay": { - "c": 0.8428527, - "h": 0.889773, - "l": 0.8428527, - "o": 0.8848539, - "v": 1078, - "vw": 0 - }, - "ticker": "C:PLNILS", - "todaysChange": 0.0433033, - "todaysChangePerc": 5.13770674, - "updated": 1605330008999 + "c": [ + 2 + ], + "i": "973323250", + "p": 11050.64, + "s": 0.006128, + "t": 1602287999795, + "x": 4 + }, + { + "c": [ + 1 + ], + "i": "105717893", + "p": 11049.4, + "s": 0.014, + "t": 1602287999659, + "x": 17 } - ] - }, - "schema": { - "allOf": [ + ], + "day": "2020-10-09T00:00:00.000Z", + "isUTC": true, + "open": 10932.44, + "openTrades": [ { - "properties": { - "status": { - "description": "The status of this request's response.", - "type": "string" - } - }, - "type": "object" + "c": [ + 2 + ], + "i": "511235746", + "p": 10932.44, + "s": 0.002, + "t": 1602201600056, + "x": 1 }, { - "properties": { - "tickers": { - "items": { - "properties": { - "day": { - "description": "The most recent daily bar for this ticker.", - "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "lastQuote": { - "description": "The most recent quote for this ticker.", - "properties": { - "a": { - "description": "The ask price.", - "format": "double", - "type": "number" - }, - "b": { - "description": "The bid price.", - "format": "double", - "type": "number" - }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" - }, - "x": { - "description": "The exchange ID on which this quote happened.", - "type": "integer" - } - }, - "type": "object" - }, - "min": { - "description": "The most recent minute bar for this ticker.", - "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "prevDay": { - "description": "The previous day's bar for this ticker.", - "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "ticker": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - }, - "todaysChange": { - "description": "The value of the change the from previous day.", - "format": "double", - "type": "number" - }, - "todaysChangePerc": { - "description": "The percentage change since the previous day.", - "format": "double", - "type": "number" - }, - "updated": { - "description": "The last updated timestamp.", - "type": "integer" - } + "c": [ + 2 + ], + "i": "511235751", + "p": 10923.76, + "s": 0.02, + "t": 1602201600141, + "x": 4 + } + ], + "symbol": "BTC-USD" + }, + "schema": { + "properties": { + "close": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "closingTrades": { + "items": { + "properties": { + "c": { + "description": "A list of condition codes.\n", + "items": { + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", + "type": "integer" }, - "type": "object" + "type": "array" }, - "type": "array" - } + "i": { + "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n", + "type": "string" + }, + "p": { + "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n", + "format": "double", + "type": "number" + }, + "s": { + "description": "The size of a trade (also known as volume).\n", + "format": "double", + "type": "number" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, + "x": { + "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n", + "type": "integer" + } + }, + "required": [ + "p", + "s", + "x", + "c", + "t", + "i" + ], + "type": "object" }, - "type": "object" + "type": "array" + }, + "day": { + "description": "The date requested.", + "format": "date", + "type": "string" + }, + "isUTC": { + "description": "Whether or not the timestamps are in UTC timezone.", + "type": "boolean" + }, + "open": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "openTrades": { + "items": { + "properties": { + "c": { + "description": "A list of condition codes.\n", + "items": { + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", + "type": "integer" + }, + "type": "array" + }, + "i": { + "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n", + "type": "string" + }, + "p": { + "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n", + "format": "double", + "type": "number" + }, + "s": { + "description": "The size of a trade (also known as volume).\n", + "format": "double", + "type": "number" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, + "x": { + "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n", + "type": "integer" + } + }, + "required": [ + "p", + "s", + "x", + "c", + "t", + "i" + ], + "type": "object" + }, + "type": "array" + }, + "symbol": { + "description": "The symbol pair that was evaluated from the request.", + "type": "string" } - ] + }, + "required": [ + "symbol", + "isUTC", + "day", + "open", + "close", + "openTrades", + "closingTrades" + ], + "type": "object" + } + }, + "text/csv": { + "example": "isUTC,day,open,close,openTrades,closingTrades\ntrue,2020-10-09,10932.44,11050.64,\"[{\\\"s\\\":0.002,\\\"p\\\":10932.44,\\\"x\\\":1,\\\"t\\\":1602201600056,\\\"c\\\":[2],\\\"i\\\":\\\"511235746\\\"},{\\\"s\\\":0.02,\\\"p\\\":10923.76,\\\"x\\\":4,\\\"t\\\":1602201600141,\\\"c\\\":[2],\\\"i\\\":\\\"511235751\\\"}]\",\"[{\\\"s\\\":0.006128,\\\"p\\\":11050.64,\\\"x\\\":4,\\\"t\\\":1602287999795,\\\"c\\\":[2],\\\"i\\\":\\\"973323250\\\"},{\\\"s\\\":0.014,\\\"p\\\":11049.4,\\\"x\\\":17,\\\"t\\\":1602287999659,\\\"c\\\":[1],\\\"i\\\":\\\"105717893\\\"}]\"\n", + "schema": { + "type": "string" } } }, - "description": "Get the current gainers / losers of the day" + "description": "The open/close of this symbol." }, "default": { "description": "Unexpected error" } }, - "summary": "Gainers/Losers", + "summary": "Daily Open/Close", "tags": [ - "fx:snapshot" - ], - "x-polygon-entitlement-allowed-timeframes": [ - { - "description": "Real Time Data", - "name": "realtime" - }, - { - "description": "15 minute delayed data", - "name": "delayed" - } + "crypto:open-close" ], - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, - "x-polygon-entitlement-market-type": { - "description": "Forex data", - "name": "fx" + "x-massive-entitlement-market-type": { + "description": "Crypto data", + "name": "crypto" } } }, - "/v2/snapshot/locale/us/markets/stocks/tickers": { + "/v1/open-close/{indicesTicker}/{date}": { "get": { - "description": "Get the most up-to-date market data for all traded stock symbols.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 3:30am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n", + "description": "Get the open, close and afterhours values of a index symbol on a certain date.\n", "parameters": [ { - "description": "A comma separated list of tickers to get snapshots for.", - "in": "query", - "name": "tickers", + "description": "The ticker symbol of Index.", + "example": "I:NDX", + "in": "path", + "name": "indicesTicker", + "required": true, "schema": { - "items": { - "type": "string" - }, - "type": "array" + "type": "string" } }, { - "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n", - "in": "query", - "name": "include_otc", + "description": "The date of the requested open/close in the format YYYY-MM-DD.", + "example": "2023-03-10", + "in": "path", + "name": "date", + "required": true, "schema": { - "type": "boolean" + "type": "string" } } ], @@ -11803,332 +13168,252 @@ "content": { "application/json": { "example": { - "count": 1, + "afterHours": 11830.43006295237, + "close": 11830.28178808306, + "from": "2023-03-10T00:00:00.000Z", + "high": 12069.62262033557, + "low": 11789.85923449393, + "open": 12001.69552583921, + "preMarket": 12001.69552583921, "status": "OK", - "tickers": [ - { - "day": { - "c": 20.506, - "h": 20.64, - "l": 20.506, - "o": 20.64, - "v": 37216, - "vw": 20.616 - }, - "lastQuote": { - "P": 20.6, - "S": 22, - "p": 20.5, - "s": 13, - "t": 1605192959994246100 - }, - "lastTrade": { - "c": [ - 14, - 41 - ], - "i": "71675577320245", - "p": 20.506, - "s": 2416, - "t": 1605192894630916600, - "x": 4 - }, - "min": { - "av": 37216, - "c": 20.506, - "h": 20.506, - "l": 20.506, - "o": 20.506, - "v": 5000, - "vw": 20.5105 - }, - "prevDay": { - "c": 20.63, - "h": 21, - "l": 20.5, - "o": 20.79, - "v": 292738, - "vw": 20.6939 - }, - "ticker": "BCAT", - "todaysChange": -0.124, - "todaysChangePerc": -0.601, - "updated": 1605192894630916600 + "symbol": "I:NDX" + }, + "schema": { + "properties": { + "afterHours": { + "description": "The close value of the ticker symbol in after hours trading.", + "format": "double", + "type": "number" + }, + "close": { + "description": "The close value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "from": { + "description": "The requested date.", + "format": "date", + "type": "string" + }, + "high": { + "description": "The highest value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "low": { + "description": "The lowest value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "open": { + "description": "The open value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "preMarket": { + "description": "The open value of the ticker symbol in pre-market trading.", + "type": "integer" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + }, + "symbol": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" } - ] + }, + "required": [ + "status", + "from", + "symbol", + "open", + "high", + "low", + "close" + ], + "type": "object" + } + }, + "text/csv": { + "example": "from,open,high,low,close,afterHours,preMarket\n2023-01-10,12001.69552583921,12069.62262033557,11789.85923449393,11830.28178808306,26122646,11830.43006295237,12001.69552583921\n", + "schema": { + "type": "string" + } + } + }, + "description": "The open/close of this stock symbol." + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "Daily Open/Close", + "tags": [ + "stocks:open-close" + ], + "x-massive-entitlement-allowed-limited-tickers": true, + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Indices data", + "name": "indices" + } + } + }, + "/v1/open-close/{optionsTicker}/{date}": { + "get": { + "description": "Get the open, close and afterhours prices of an options contract on a certain date.\n", + "parameters": [ + { + "description": "The ticker symbol of the options contract.", + "example": "O:SPY251219C00650000", + "in": "path", + "name": "optionsTicker", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The date of the requested open/close in the format YYYY-MM-DD.", + "example": "2023-01-09", + "in": "path", + "name": "date", + "required": true, + "schema": { + "format": "date", + "type": "string" + } + }, + { + "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", + "example": true, + "in": "query", + "name": "adjusted", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "afterHours": 26.35, + "close": 26.35, + "from": "2023-01-09", + "high": 26.35, + "low": 25, + "open": 25, + "preMarket": 25, + "status": "OK", + "symbol": "O:TSLA210903C00700000", + "volume": 2 }, "schema": { - "allOf": [ - { - "properties": { - "count": { - "description": "The total number of results for this request.", - "type": "integer" - }, - "status": { - "description": "The status of this request's response.", - "type": "string" - } - }, - "type": "object" + "properties": { + "afterHours": { + "description": "The close price of the ticker symbol in after hours trading.", + "format": "double", + "type": "number" }, - { - "properties": { - "tickers": { - "items": { - "properties": { - "day": { - "description": "The most recent daily bar for this ticker.", - "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "otc": { - "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", - "type": "boolean" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "lastQuote": { - "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.", - "properties": { - "P": { - "description": "The ask price.", - "format": "double", - "type": "number" - }, - "S": { - "description": "The ask size in lots.", - "type": "integer" - }, - "p": { - "description": "The bid price.", - "format": "double", - "type": "number" - }, - "s": { - "description": "The bid size in lots.", - "type": "integer" - }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" - } - }, - "type": "object" - }, - "lastTrade": { - "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.", - "properties": { - "c": { - "description": "The trade conditions.", - "items": { - "type": "string" - }, - "type": "array" - }, - "i": { - "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n", - "type": "string" - }, - "p": { - "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n", - "format": "double", - "type": "number" - }, - "s": { - "description": "The size (volume) of the trade.", - "type": "integer" - }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" - }, - "x": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", - "type": "integer" - } - }, - "type": "object" - }, - "min": { - "description": "The most recent minute bar for this ticker.", - "properties": { - "av": { - "description": "The accumulated volume.", - "type": "integer" - }, - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "otc": { - "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", - "type": "boolean" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "prevDay": { - "description": "The previous day's bar for this ticker.", - "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "otc": { - "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", - "type": "boolean" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "ticker": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - }, - "todaysChange": { - "description": "The value of the change the from previous day.", - "format": "double", - "type": "number" - }, - "todaysChangePerc": { - "description": "The percentage change since the previous day.", - "format": "double", - "type": "number" - }, - "updated": { - "description": "The last updated timestamp.", - "type": "integer" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" + "close": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "from": { + "description": "The requested date.", + "format": "date", + "type": "string" + }, + "high": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "low": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "open": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "preMarket": { + "description": "The open price of the ticker symbol in pre-market trading.", + "type": "integer" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + }, + "symbol": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "volume": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" } - ] + }, + "required": [ + "status", + "from", + "symbol", + "open", + "high", + "low", + "close", + "volume" + ], + "type": "object" + } + }, + "text/csv": { + "example": "from,open,high,low,close,volume,afterHours,preMarket\n2023-01-09,25,26.35,25,26.35,2,26.35,25\n", + "schema": { + "type": "string" } } }, - "description": "Get current state for all tickers" + "description": "The open/close of this stock symbol." }, "default": { "description": "Unexpected error" } }, - "summary": "All Tickers", + "summary": "Daily Open/Close", "tags": [ - "stocks:snapshot" - ], - "x-polygon-entitlement-allowed-timeframes": [ - { - "description": "Real Time Data", - "name": "realtime" - }, - { - "description": "15 minute delayed data", - "name": "delayed" - } + "options:open-close" ], - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "description": "Aggregate data", "name": "aggregates" }, - "x-polygon-entitlement-market-type": { - "description": "Stocks data", - "name": "stocks" + "x-massive-entitlement-market-type": { + "description": "Options data", + "name": "options" } } }, - "/v2/snapshot/locale/us/markets/stocks/tickers/{stocksTicker}": { + "/v1/open-close/{stocksTicker}/{date}": { "get": { - "description": "Get the most up-to-date market data for a single traded stock ticker.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 3:30am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n", + "description": "Get the open, close and afterhours prices of a stock symbol on a certain date.\n", "parameters": [ { - "description": "The ticker symbol of the stock/equity.", + "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.", "example": "AAPL", "in": "path", "name": "stocksTicker", @@ -12136,6 +13421,26 @@ "schema": { "type": "string" } + }, + { + "description": "The date of the requested open/close in the format YYYY-MM-DD.", + "example": "2023-01-09", + "in": "path", + "name": "date", + "required": true, + "schema": { + "format": "date", + "type": "string" + } + }, + { + "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", + "example": true, + "in": "query", + "name": "adjusted", + "schema": { + "type": "boolean" + } } ], "responses": { @@ -12143,350 +13448,10244 @@ "content": { "application/json": { "example": { - "request_id": "657e430f1ae768891f018e08e03598d8", + "afterHours": 322.1, + "close": 325.12, + "from": "2023-01-09", + "high": 326.2, + "low": 322.3, + "open": 324.66, + "preMarket": 324.5, "status": "OK", - "ticker": { - "day": { - "c": 120.4229, - "h": 120.53, - "l": 118.81, - "o": 119.62, - "v": 28727868, - "vw": 119.725 - }, - "lastQuote": { - "P": 120.47, - "S": 4, - "p": 120.46, - "s": 8, - "t": 1605195918507251700 + "symbol": "AAPL", + "volume": 26122646 + }, + "schema": { + "properties": { + "afterHours": { + "description": "The close price of the ticker symbol in after hours trading.", + "format": "double", + "type": "number" }, - "lastTrade": { - "c": [ - 14, - 41 - ], - "i": "4046", - "p": 120.47, - "s": 236, - "t": 1605195918306274000, - "x": 10 + "close": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" }, - "min": { - "av": 28724441, - "c": 120.4201, - "h": 120.468, - "l": 120.37, - "o": 120.435, - "v": 270796, - "vw": 120.4129 + "from": { + "description": "The requested date.", + "format": "date", + "type": "string" }, - "prevDay": { - "c": 119.49, - "h": 119.63, - "l": 116.44, - "o": 117.19, - "v": 110597265, - "vw": 118.4998 + "high": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" }, - "ticker": "AAPL", - "todaysChange": 0.98, - "todaysChangePerc": 0.82, - "updated": 1605195918306274000 - } - }, - "schema": { - "allOf": [ - { - "properties": { - "status": { - "description": "The status of this request's response.", - "type": "string" - } - }, - "type": "object" + "low": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" }, - { - "properties": { - "request_id": { - "description": "A request id assigned by the server.", - "type": "string" - } - }, - "type": "object" + "open": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" }, - { - "properties": { - "ticker": { - "properties": { - "day": { - "description": "The most recent daily bar for this ticker.", - "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "otc": { - "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", - "type": "boolean" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "lastQuote": { - "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.", - "properties": { - "P": { - "description": "The ask price.", - "format": "double", - "type": "number" - }, - "S": { - "description": "The ask size in lots.", - "type": "integer" - }, - "p": { - "description": "The bid price.", - "format": "double", - "type": "number" - }, - "s": { - "description": "The bid size in lots.", - "type": "integer" - }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" - } - }, - "type": "object" - }, - "lastTrade": { - "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.", - "properties": { - "c": { - "description": "The trade conditions.", - "items": { - "type": "string" - }, - "type": "array" - }, - "i": { - "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n", - "type": "string" - }, - "p": { - "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n", - "format": "double", - "type": "number" - }, - "s": { - "description": "The size (volume) of the trade.", - "type": "integer" - }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" - }, - "x": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", - "type": "integer" - } - }, - "type": "object" - }, - "min": { - "description": "The most recent minute bar for this ticker.", - "properties": { - "av": { - "description": "The accumulated volume.", - "type": "integer" - }, - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "otc": { - "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", - "type": "boolean" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "prevDay": { - "description": "The previous day's bar for this ticker.", - "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "otc": { - "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", - "type": "boolean" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "preMarket": { + "description": "The open price of the ticker symbol in pre-market trading.", + "type": "integer" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + }, + "symbol": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "volume": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + } + }, + "required": [ + "status", + "from", + "symbol", + "open", + "high", + "low", + "close", + "volume" + ], + "type": "object" + } + }, + "text/csv": { + "example": "from,open,high,low,close,volume,afterHours,preMarket\n2023-01-09,324.66,326.2,322.3,325.12,26122646,322.1,324.5\n", + "schema": { + "type": "string" + } + } + }, + "description": "The open/close of this stock symbol." + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "Daily Open/Close", + "tags": [ + "stocks:open-close" + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Stocks data", + "name": "stocks" + } + } + }, + "/v1/reference/sec/filings": { + "get": { + "description": "List filings", + "operationId": "ListFilings", + "parameters": [ + { + "description": "Query by filing type.", + "in": "query", + "name": "type", + "schema": { + "description": "Filing Type", + "enum": [ + "10-K", + "10-Q" + ], + "type": "string" + } + }, + { + "description": "Query by filing date.", + "in": "query", + "name": "filing_date", + "schema": { + "description": "The date when the filing was filed in YYYYMMDD format.", + "example": "20210101", + "pattern": "^[0-9]{8}$", + "type": "string" + }, + "x-massive-filter-field": { + "range": true + } + }, + { + "description": "Query by period of report.", + "in": "query", + "name": "period_of_report_date", + "schema": { + "description": "The period of report for the filing in YYYYMMDD format.", + "example": "20210101", + "pattern": "^[0-9]{8}$", + "type": "string" + }, + "x-massive-filter-field": { + "range": true + } + }, + { + "description": "If true, query only for filings with an XBRL instance file.\nIf false, query for filings without an XBRL instance file.\nIf this parameter is not provided, query for filings with or without XBRL instance files.", + "in": "query", + "name": "has_xbrl", + "schema": { + "nullable": true, + "type": "boolean" + }, + "x-massive-go-id": "HasXBRL" + }, + { + "description": "Query by entity company name.", + "in": "query", + "name": "entities.company_data.name", + "schema": { + "example": "Facebook Inc", + "type": "string" + }, + "x-massive-filter-field": { + "search": true + } + }, + { + "description": "Query by entity company CIK.", + "in": "query", + "name": "entities.company_data.cik", + "schema": { + "description": "Central Index Key (CIK) Number", + "type": "string" + } + }, + { + "description": "Query by entity company ticker.", + "in": "query", + "name": "entities.company_data.ticker", + "schema": { + "description": "Ticker", + "type": "string" + } + }, + { + "description": "Query by entity company SIC.", + "in": "query", + "name": "entities.company_data.sic", + "schema": { + "description": "Standard Industrial Classification (SIC)", + "type": "string" + } + }, + { + "description": "Search by filing_date.", + "in": "query", + "name": "filing_date.gte", + "schema": { + "description": "The date when the filing was filed in YYYYMMDD format.", + "example": "20210101", + "pattern": "^[0-9]{8}$", + "type": "string" + } + }, + { + "description": "Search by filing_date.", + "in": "query", + "name": "filing_date.gt", + "schema": { + "description": "The date when the filing was filed in YYYYMMDD format.", + "example": "20210101", + "pattern": "^[0-9]{8}$", + "type": "string" + } + }, + { + "description": "Search by filing_date.", + "in": "query", + "name": "filing_date.lte", + "schema": { + "description": "The date when the filing was filed in YYYYMMDD format.", + "example": "20210101", + "pattern": "^[0-9]{8}$", + "type": "string" + } + }, + { + "description": "Search by filing_date.", + "in": "query", + "name": "filing_date.lt", + "schema": { + "description": "The date when the filing was filed in YYYYMMDD format.", + "example": "20210101", + "pattern": "^[0-9]{8}$", + "type": "string" + } + }, + { + "description": "Search by period_of_report_date.", + "in": "query", + "name": "period_of_report_date.gte", + "schema": { + "description": "The period of report for the filing in YYYYMMDD format.", + "example": "20210101", + "pattern": "^[0-9]{8}$", + "type": "string" + } + }, + { + "description": "Search by period_of_report_date.", + "in": "query", + "name": "period_of_report_date.gt", + "schema": { + "description": "The period of report for the filing in YYYYMMDD format.", + "example": "20210101", + "pattern": "^[0-9]{8}$", + "type": "string" + } + }, + { + "description": "Search by period_of_report_date.", + "in": "query", + "name": "period_of_report_date.lte", + "schema": { + "description": "The period of report for the filing in YYYYMMDD format.", + "example": "20210101", + "pattern": "^[0-9]{8}$", + "type": "string" + } + }, + { + "description": "Search by period_of_report_date.", + "in": "query", + "name": "period_of_report_date.lt", + "schema": { + "description": "The period of report for the filing in YYYYMMDD format.", + "example": "20210101", + "pattern": "^[0-9]{8}$", + "type": "string" + } + }, + { + "description": "Search by entities.company_data.name.", + "in": "query", + "name": "entities.company_data.name.search", + "schema": { + "type": "string" + } + }, + { + "description": "Order results based on the `sort` field.", + "in": "query", + "name": "order", + "schema": { + "enum": [ + "asc", + "desc" + ], + "example": "asc", + "type": "string" + } + }, + { + "description": "Limit the number of results returned, default is 10 and max is 1000.", + "in": "query", + "name": "limit", + "schema": { + "default": 10, + "example": 10, + "maximum": 1000, + "minimum": 1, + "type": "integer" + } + }, + { + "description": "Sort field used for ordering.", + "in": "query", + "name": "sort", + "schema": { + "default": "filing_date", + "enum": [ + "filing_date", + "period_of_report_date" + ], + "example": "filing_date", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "description": "FIXME", + "example": {}, + "schema": { + "properties": { + "count": { + "type": "integer" + }, + "next_url": { + "type": "string" + }, + "request_id": { + "type": "string" + }, + "results": { + "items": { + "properties": { + "acceptance_datetime": { + "description": "The datetime when the filing was accepted by EDGAR in EST (format: YYYYMMDDHHMMSS)", + "type": "string" + }, + "accession_number": { + "description": "Filing Accession Number", + "type": "string" + }, + "entities": { + "description": "Entities related to the filing (e.g. the document filers).", + "items": { + "description": "A filing entity (e.g. the document filer).", + "properties": { + "company_data": { + "properties": { + "cik": { + "description": "Central Index Key (CIK) Number", + "type": "string" + }, + "name": { + "example": "Facebook Inc", + "type": "string" + }, + "sic": { + "description": "Standard Industrial Classification (SIC)", + "type": "string" + }, + "ticker": { + "description": "Ticker", + "type": "string" + } + }, + "required": [ + "name", + "cik", + "sic" + ], + "type": "object", + "x-massive-go-type": { + "name": "SECCompanyData", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + }, + "relation": { + "description": "Relationship of this entity to the filing.", + "enum": [ + "filer" + ], + "type": "string" + } + }, + "required": [ + "relation" + ], + "type": "object", + "x-massive-go-type": { + "name": "SECFilingEntity", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + }, + "type": "array" + }, + "files_count": { + "description": "The number of files associated with the filing.", + "format": "int64", + "type": "integer" + }, + "filing_date": { + "description": "The date when the filing was filed in YYYYMMDD format.", + "example": "20210101", + "pattern": "^[0-9]{8}$", + "type": "string" + }, + "id": { + "description": "Unique identifier for the filing.", + "type": "string" + }, + "period_of_report_date": { + "description": "The period of report for the filing in YYYYMMDD format.", + "example": "20210101", + "pattern": "^[0-9]{8}$", + "type": "string" + }, + "source_url": { + "description": "The source URL is a link back to the upstream source for this filing\ndocument.", + "example": "https://www.sec.gov/Archives/edgar/data/0001326801/000132680119000037/0001326801-19-000037-index.html", + "format": "uri", + "type": "string" + }, + "type": { + "description": "Filing Type", + "enum": [ + "10-K", + "10-Q" + ], + "type": "string" + } + }, + "required": [ + "id", + "accession_number", + "type", + "filing_date", + "period_of_report_date", + "files_count", + "source_url", + "download_url", + "entities" + ], + "type": "object", + "x-massive-go-type": { + "name": "SECFiling", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + }, + "type": "array" + }, + "status": { + "type": "string" + } + }, + "required": [ + "status", + "request_id", + "count", + "results" + ], + "type": "object" + } + } + }, + "description": "FIXME" + } + }, + "summary": "SEC Filings", + "tags": [ + "reference:sec:filings" + ], + "x-massive-entitlement-data-type": { + "description": "Reference data", + "name": "reference" + }, + "x-massive-paginate": { + "sort": { + "default": "filing_date", + "enum": [ + "filing_date", + "period_of_report_date" + ] + } + } + }, + "x-massive-draft": true + }, + "/v1/reference/sec/filings/{filing_id}": { + "get": { + "description": "Get filing", + "operationId": "GetFiling", + "parameters": [ + { + "description": "Select by filing id.", + "in": "path", + "name": "filing_id", + "schema": { + "description": "Unique identifier for the filing.", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "description": "FIXME", + "example": {}, + "schema": { + "properties": { + "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": { + "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-massive-go-type": { + "name": "SECCompanyData", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + }, + "relation": { + "description": "Relationship of this entity to the filing.", + "enum": [ + "filer" + ], + "type": "string" + } + }, + "required": [ + "relation" + ], + "type": "object", + "x-massive-go-type": { + "name": "SECFilingEntity", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + }, + "type": "array" + }, + "files_count": { + "description": "The number of files associated with the filing.", + "format": "int64", + "type": "integer" + }, + "filing_date": { + "description": "The date when the filing was filed in YYYYMMDD format.", + "example": "20210101", + "pattern": "^[0-9]{8}$", + "type": "string" + }, + "id": { + "description": "Unique identifier for the filing.", + "type": "string" + }, + "period_of_report_date": { + "description": "The period of report for the filing in YYYYMMDD format.", + "example": "20210101", + "pattern": "^[0-9]{8}$", + "type": "string" + }, + "source_url": { + "description": "The source URL is a link back to the upstream source for this filing\ndocument.", + "example": "https://www.sec.gov/Archives/edgar/data/0001326801/000132680119000037/0001326801-19-000037-index.html", + "format": "uri", + "type": "string" + }, + "type": { + "description": "Filing Type", + "enum": [ + "10-K", + "10-Q" + ], + "type": "string" + } + }, + "required": [ + "id", + "accession_number", + "type", + "filing_date", + "period_of_report_date", + "files_count", + "source_url", + "download_url", + "entities" + ], + "type": "object", + "x-massive-go-type": { + "name": "SECFiling", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + } + }, + "type": "object" + } + } + }, + "description": "FIXME" + } + }, + "summary": "SEC Filing", + "tags": [ + "reference:sec:filing" + ], + "x-massive-entitlement-data-type": { + "description": "Reference data", + "name": "reference" + } + }, + "x-massive-draft": true + }, + "/v1/reference/sec/filings/{filing_id}/files": { + "get": { + "description": "List filing files", + "operationId": "ListFilingFiles", + "parameters": [ + { + "description": "Select by filing id.", + "in": "path", + "name": "filing_id", + "schema": { + "description": "Unique identifier for the filing.", + "type": "string" + } + }, + { + "description": "Query by file sequence number.", + "in": "query", + "name": "sequence", + "schema": { + "description": "File Sequence Number", + "format": "int64", + "max": 999, + "min": 1, + "type": "integer" + }, + "x-massive-filter-field": { + "range": true + } + }, + { + "description": "Query by file name.", + "in": "query", + "name": "filename", + "schema": { + "description": "The name for the file.", + "type": "string" + }, + "x-massive-filter-field": { + "range": true + } + }, + { + "description": "Search by sequence.", + "in": "query", + "name": "sequence.gte", + "schema": { + "description": "File Sequence Number", + "format": "int64", + "max": 999, + "min": 1, + "type": "integer" + } + }, + { + "description": "Search by sequence.", + "in": "query", + "name": "sequence.gt", + "schema": { + "description": "File Sequence Number", + "format": "int64", + "max": 999, + "min": 1, + "type": "integer" + } + }, + { + "description": "Search by sequence.", + "in": "query", + "name": "sequence.lte", + "schema": { + "description": "File Sequence Number", + "format": "int64", + "max": 999, + "min": 1, + "type": "integer" + } + }, + { + "description": "Search by sequence.", + "in": "query", + "name": "sequence.lt", + "schema": { + "description": "File Sequence Number", + "format": "int64", + "max": 999, + "min": 1, + "type": "integer" + } + }, + { + "description": "Search by filename.", + "in": "query", + "name": "filename.gte", + "schema": { + "description": "The name for the file.", + "type": "string" + } + }, + { + "description": "Search by filename.", + "in": "query", + "name": "filename.gt", + "schema": { + "description": "The name for the file.", + "type": "string" + } + }, + { + "description": "Search by filename.", + "in": "query", + "name": "filename.lte", + "schema": { + "description": "The name for the file.", + "type": "string" + } + }, + { + "description": "Search by filename.", + "in": "query", + "name": "filename.lt", + "schema": { + "description": "The name for the file.", + "type": "string" + } + }, + { + "description": "Order results based on the `sort` field.", + "in": "query", + "name": "order", + "schema": { + "enum": [ + "asc", + "desc" + ], + "example": "asc", + "type": "string" + } + }, + { + "description": "Limit the number of results returned, default is 10 and max is 1000.", + "in": "query", + "name": "limit", + "schema": { + "default": 10, + "example": 10, + "maximum": 1000, + "minimum": 1, + "type": "integer" + } + }, + { + "description": "Sort field used for ordering.", + "in": "query", + "name": "sort", + "schema": { + "default": "sequence", + "enum": [ + "sequence", + "filename" + ], + "example": "sequence", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "description": "FIXME", + "example": {}, + "schema": { + "properties": { + "count": { + "type": "integer" + }, + "next_url": { + "type": "string" + }, + "request_id": { + "type": "string" + }, + "results": { + "items": { + "description": "File associated with the filing.\n\nThis provides information to uniquly identify the additional data and a URL\nwhere the file may be downloaded.", + "properties": { + "description": { + "description": "A description for the contents of the file.", + "type": "string" + }, + "filename": { + "description": "The name for the file.", + "type": "string" + }, + "id": { + "description": "An identifier unique to the filing for this data entry.", + "example": "1", + "type": "string" + }, + "sequence": { + "description": "File Sequence Number", + "format": "int64", + "max": 999, + "min": 1, + "type": "integer" + }, + "size_bytes": { + "description": "The size of the file in bytes.", + "format": "int64", + "type": "integer" + }, + "source_url": { + "description": "The source URL is a link back to the upstream source for this file.", + "format": "uri", + "type": "string" + }, + "type": { + "description": "The type of document contained in the file.", + "type": "string" + } + }, + "required": [ + "id", + "file", + "description", + "type", + "size_bytes", + "sequence", + "source_url" + ], + "type": "object", + "x-massive-go-type": { + "name": "SECFilingFile", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + }, + "type": "array" + }, + "status": { + "type": "string" + } + }, + "required": [ + "status", + "request_id", + "count", + "results" + ], + "type": "object" + } + } + }, + "description": "FIXME" + } + }, + "summary": "SEC Filing Files", + "tags": [ + "reference:sec:filing:files" + ], + "x-massive-entitlement-data-type": { + "description": "Reference data", + "name": "reference" + }, + "x-massive-paginate": { + "sort": { + "default": "sequence", + "enum": [ + "sequence", + "filename" + ] + } + } + }, + "x-massive-draft": true + }, + "/v1/reference/sec/filings/{filing_id}/files/{file_id}": { + "get": { + "description": "Get filing file", + "operationId": "GetFilingFile", + "parameters": [ + { + "description": "Select by filing id.", + "in": "path", + "name": "filing_id", + "schema": { + "description": "Unique identifier for the filing.", + "type": "string" + } + }, + { + "description": "Select by file id.", + "in": "path", + "name": "file_id", + "schema": { + "description": "An identifier unique to the filing for this data entry.", + "example": "1", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "File associated with the filing.\n\nThis provides information to uniquly identify the additional data and a URL\nwhere the file may be downloaded.", + "properties": { + "description": { + "description": "A description for the contents of the file.", + "type": "string" + }, + "filename": { + "description": "The name for the file.", + "type": "string" + }, + "id": { + "description": "An identifier unique to the filing for this data entry.", + "example": "1", + "type": "string" + }, + "sequence": { + "description": "File Sequence Number", + "format": "int64", + "max": 999, + "min": 1, + "type": "integer" + }, + "size_bytes": { + "description": "The size of the file in bytes.", + "format": "int64", + "type": "integer" + }, + "source_url": { + "description": "The source URL is a link back to the upstream source for this file.", + "format": "uri", + "type": "string" + }, + "type": { + "description": "The type of document contained in the file.", + "type": "string" + } + }, + "required": [ + "id", + "file", + "description", + "type", + "size_bytes", + "sequence", + "source_url" + ], + "type": "object", + "x-massive-go-type": { + "name": "SECFilingFile", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + } + } + }, + "description": "The file data." + } + }, + "summary": "SEC Filing File", + "tags": [ + "reference:sec:filing:file" + ], + "x-massive-entitlement-data-type": { + "description": "Reference data", + "name": "reference" + } + }, + "x-massive-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-massive-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.", + "operationId": "SnapshotSummary", + "parameters": [ + { + "description": "Comma separated list of tickers. This API currently supports Stocks/Equities, Crypto, Options, and Forex. See the tickers endpoint for more details on supported tickers. If no tickers are passed then no results will be returned.\n\nWarning: The maximum number of characters allowed in a URL are subject to your technology stack.", + "example": "NCLH,O:SPY250321C00380000,C:EURUSD,X:BTCUSD", + "in": "query", + "name": "ticker.any_of", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "request_id": "abc123", + "results": [ + { + "branding": { + "icon_url": "https://api.massive.com/icon.png", + "logo_url": "https://api.massive.com/logo.svg" + }, + "last_updated": 1679597116344223500, + "market_status": "closed", + "name": "Norwegian Cruise Lines", + "price": 22.3, + "session": { + "change": -1.05, + "change_percent": -4.67, + "close": 21.4, + "early_trading_change": -0.39, + "early_trading_change_percent": -0.07, + "high": 22.49, + "late_trading_change": 1.2, + "late_trading_change_percent": 3.92, + "low": 21.35, + "open": 22.49, + "previous_close": 22.45, + "volume": 37 + }, + "ticker": "NCLH", + "type": "stocks" + }, + { + "last_updated": 1679597116344223500, + "market_status": "closed", + "name": "NCLH $5 Call", + "options": { + "contract_type": "call", + "exercise_style": "american", + "expiration_date": "2022-10-14", + "shares_per_contract": 100, + "strike_price": 5, + "underlying_ticker": "NCLH" + }, + "price": 6.6, + "session": { + "change": -0.05, + "change_percent": -1.07, + "close": 6.65, + "early_trading_change": -0.01, + "early_trading_change_percent": -0.03, + "high": 7.01, + "late_trading_change": -0.4, + "late_trading_change_percent": -0.02, + "low": 5.42, + "open": 6.7, + "previous_close": 6.71, + "volume": 67 + }, + "ticker": "O:NCLH221014C00005000", + "type": "options" + }, + { + "last_updated": 1679597116344223500, + "market_status": "open", + "name": "Euro - United States Dollar", + "price": 0.97989, + "session": { + "change": -0.0001, + "change_percent": -0.67, + "close": 0.97989, + "high": 0.98999, + "low": 0.96689, + "open": 0.97889, + "previous_close": 0.98001 + }, + "ticker": "C:EURUSD", + "type": "fx" + }, + { + "branding": { + "icon_url": "https://api.massive.com/icon.png", + "logo_url": "https://api.massive.com/logo.svg" + }, + "last_updated": 1679597116344223500, + "market_status": "open", + "name": "Bitcoin - United States Dollar", + "price": 32154.68, + "session": { + "change": -201.23, + "change_percent": -0.77, + "close": 32154.68, + "high": 33124.28, + "low": 28182.88, + "open": 31129.32, + "previous_close": 33362.18 + }, + "ticker": "X:BTCUSD", + "type": "crypto" + }, + { + "error": "NOT_FOUND", + "message": "Ticker not found.", + "ticker": "APx" + } + ], + "status": "OK" + }, + "schema": { + "properties": { + "request_id": { + "type": "string" + }, + "results": { + "items": { + "properties": { + "branding": { + "properties": { + "icon_url": { + "description": "A link to this ticker's company's icon. Icon's are generally smaller, square images that represent the company at a glance.\nNote that you must provide an API key when accessing this URL. See the \"Authentication\" section at the top of this page for more details.", + "type": "string" + }, + "logo_url": { + "description": "A link to this ticker's company's logo.\nNote that you must provide an API key when accessing this URL. See the \"Authentication\" section at the top of this page for more details.", + "type": "string" + } + }, + "type": "object", + "x-massive-go-type": { + "name": "Branding" + } + }, + "error": { + "description": "The error while looking for this ticker.", + "type": "string" + }, + "last_updated": { + "description": "The nanosecond timestamp of when this information was updated.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "INanoseconds", + "path": "github.com/massive-com/ptime" + } + }, + "market_status": { + "description": "The market status for the market that trades this ticker.", + "type": "string" + }, + "message": { + "description": "The error message while looking for this ticker.", + "type": "string" + }, + "name": { + "description": "Name of ticker, forex, or crypto asset.", + "type": "string" + }, + "options": { + "properties": { + "contract_type": { + "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".", + "enum": [ + "put", + "call", + "other" + ], + "type": "string" + }, + "exercise_style": { + "description": "The exercise style of this contract. See this link for more details on exercise styles.", + "enum": [ + "american", + "european", + "bermudan" + ], + "type": "string" + }, + "expiration_date": { + "description": "The contract's expiration date in YYYY-MM-DD format.", + "format": "date", + "type": "string", + "x-massive-go-type": { + "name": "IDaysMassiveDateString", + "path": "github.com/massive-com/ptime" + } + }, + "shares_per_contract": { + "description": "The number of shares per contract for this contract.", + "format": "double", + "type": "number" + }, + "strike_price": { + "description": "The strike price of the option contract.", + "format": "double", + "type": "number" + }, + "underlying_ticker": { + "description": "The ticker for the option contract.", + "type": "string" + } + }, + "required": [ + "contract_type", + "expiration_date", + "exercise_style", + "shares_per_contract", + "strike_price", + "underlying_ticker" + ], + "type": "object", + "x-massive-go-type": { + "name": "Options" + } + }, + "price": { + "description": "The most up to date ticker price.", + "format": "double", + "type": "number" + }, + "session": { + "properties": { + "change": { + "description": "The value of the price change for the asset from the previous trading day.", + "format": "double", + "type": "number" + }, + "change_percent": { + "description": "The percent of the price change for the asset from the previous trading day.", + "format": "double", + "type": "number" + }, + "close": { + "description": "The closing price of the asset for the day.", + "format": "double", + "type": "number" + }, + "early_trading_change": { + "description": "Today's early trading change amount, difference between price and previous close if in early trading hours, otherwise difference between last price during early trading and previous close.", + "format": "double", + "type": "number" + }, + "early_trading_change_percent": { + "description": "Today's early trading change as a percentage.", + "format": "double", + "type": "number" + }, + "high": { + "description": "The highest price of the asset for the day.", + "format": "double", + "type": "number" + }, + "late_trading_change": { + "description": "Today's late trading change amount, difference between price and today's close if in late trading hours, otherwise difference between last price during late trading and today's close.", + "format": "double", + "type": "number" + }, + "late_trading_change_percent": { + "description": "Today's late trading change as a percentage.", + "format": "double", + "type": "number" + }, + "low": { + "description": "The lowest price of the asset for the day.", + "format": "double", + "type": "number" + }, + "open": { + "description": "The open price of the asset for the day.", + "format": "double", + "type": "number" + }, + "previous_close": { + "description": "The closing price of the asset for the previous trading day.", + "format": "double", + "type": "number" + }, + "price": { + "description": "The price of the most recent trade or bid price for this asset.", + "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", + "type": "number" + } + }, + "required": [ + "change", + "change_percent", + "close", + "high", + "low", + "open", + "previous_close" + ], + "type": "object", + "x-massive-go-type": { + "name": "Session" + } + }, + "ticker": { + "description": "Ticker of asset queried.", + "type": "string" + }, + "type": { + "description": "The market for this ticker of stock, crypto, fx, option.", + "enum": [ + "stocks", + "crypto", + "options", + "fx" + ], + "type": "string" + } + }, + "required": [ + "ticker" + ], + "type": "object", + "x-massive-go-type": { + "name": "SummaryResult" + } + }, + "type": "array" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status", + "request_id" + ], + "type": "object" + } + } + }, + "description": "Snapshot Summary for ticker list" + } + }, + "summary": "Summaries", + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Stocks data", + "name": "stocks" + } + } + }, + "/v2/aggs/grouped/locale/global/market/crypto/{date}": { + "get": { + "description": "Get the daily open, high, low, and close (OHLC) for the entire cryptocurrency markets.\n", + "parameters": [ + { + "description": "The beginning date for the aggregate window.", + "example": "2023-01-09", + "in": "path", + "name": "date", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", + "example": true, + "in": "query", + "name": "adjusted", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "adjusted": true, + "queryCount": 3, + "results": [ + { + "T": "X:ARDRUSD", + "c": 0.0550762, + "h": 0.0550762, + "l": 0.0550762, + "n": 18388, + "o": 0.0550762, + "t": 1580676480000, + "v": 2, + "vw": 0.0551 + }, + { + "T": "X:NGCUSD", + "c": 0.0272983, + "h": 0.0273733, + "l": 0.0272983, + "n": 18, + "o": 0.0273733, + "t": 1580674080000, + "v": 4734, + "vw": 0.0273 + }, + { + "T": "X:ZSCUSD", + "c": 0.00028531, + "h": 0.00028531, + "l": 0.00028531, + "n": 151, + "o": 0.00028531, + "t": 1580671080000, + "v": 390, + "vw": 0.0003 + } + ], + "resultsCount": 3, + "status": "OK" + }, + "schema": { + "allOf": [ + { + "properties": { + "adjusted": { + "description": "Whether or not this response was adjusted for splits.", + "type": "boolean" + }, + "queryCount": { + "description": "The number of aggregates (minute or day) used to generate the response.", + "type": "integer" + }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "resultsCount": { + "description": "The total number of results for this request.", + "type": "integer" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status", + "adjusted", + "queryCount", + "resultsCount", + "request_id" + ], + "type": "object" + }, + { + "properties": { + "results": { + "items": { + "properties": { + "T": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t", + "T" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + ] + } + }, + "text/csv": { + "example": "T,c,h,l,n,o,t,v,vw\nX:ARDRUSD,0.0550762,0.0550762,0.0550762,18388,0.0550762,1580676480000,2,0.0551\nX:NGCUSD,0.0272983,0.0273733,0.0272983,18,0.0273733,1580674080000,4734,0.0273\nX:ZSCUSD,0.00028531,0.00028531,0.00028531,151,0.00028531,1580671080000,390,0.0003\n", + "schema": { + "type": "string" + } + } + }, + "description": "The previous day OHLC for the ticker." + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "Grouped Daily (Bars)", + "tags": [ + "crypto:aggregates" + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Crypto data", + "name": "crypto" + } + } + }, + "/v2/aggs/grouped/locale/global/market/fx/{date}": { + "get": { + "description": "Get the daily open, high, low, and close (OHLC) for the entire forex markets.\n", + "parameters": [ + { + "description": "The beginning date for the aggregate window.", + "example": "2023-01-09", + "in": "path", + "name": "date", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", + "example": true, + "in": "query", + "name": "adjusted", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "adjusted": true, + "queryCount": 3, + "results": [ + { + "T": "C:ILSCHF", + "c": 0.2704, + "h": 0.2706, + "l": 0.2693, + "n": 689, + "o": 0.2698, + "t": 1602719999999, + "v": 689, + "vw": 0.2702 + }, + { + "T": "C:GBPCAD", + "c": 1.71103, + "h": 1.71642, + "l": 1.69064, + "n": 407324, + "o": 1.69955, + "t": 1602719999999, + "v": 407324, + "vw": 1.7062 + }, + { + "T": "C:DKKAUD", + "c": 0.2214, + "h": 0.2214, + "l": 0.2195, + "n": 10639, + "o": 0.22, + "t": 1602719999999, + "v": 10639, + "vw": 0.2202 + } + ], + "resultsCount": 3, + "status": "OK" + }, + "schema": { + "allOf": [ + { + "properties": { + "adjusted": { + "description": "Whether or not this response was adjusted for splits.", + "type": "boolean" + }, + "queryCount": { + "description": "The number of aggregates (minute or day) used to generate the response.", + "type": "integer" + }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "resultsCount": { + "description": "The total number of results for this request.", + "type": "integer" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status", + "adjusted", + "queryCount", + "resultsCount", + "request_id" + ], + "type": "object" + }, + { + "properties": { + "results": { + "items": { + "properties": { + "T": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t", + "T" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + ] + } + }, + "text/csv": { + "example": "T,c,h,l,n,o,t,v,vw\nC:ILSCHF,0.2704,0.2706,0.2693,689,0.2698,1602719999999,689,0.2702\nC:GBPCAD,1.71103,1.71642,1.69064,407324,1.69955,1602719999999,407324,1.7062\nC:DKKAUD,0.2214,0.2214,0.2195,10639,0.22,1602719999999,10639,0.2202\n", + "schema": { + "type": "string" + } + } + }, + "description": "Previous day OHLC for ticker" + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "Grouped Daily (Bars)", + "tags": [ + "fx:aggregates" + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Forex data", + "name": "fx" + } + } + }, + "/v2/aggs/grouped/locale/us/market/stocks/{date}": { + "get": { + "description": "Get the daily open, high, low, and close (OHLC) for the entire stocks/equities markets.\n", + "parameters": [ + { + "description": "The beginning date for the aggregate window.", + "example": "2023-01-09", + "in": "path", + "name": "date", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", + "example": true, + "in": "query", + "name": "adjusted", + "schema": { + "type": "boolean" + } + }, + { + "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n", + "in": "query", + "name": "include_otc", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "adjusted": true, + "queryCount": 3, + "results": [ + { + "T": "KIMpL", + "c": 25.9102, + "h": 26.25, + "l": 25.91, + "n": 74, + "o": 26.07, + "t": 1602705600000, + "v": 4369, + "vw": 26.0407 + }, + { + "T": "TANH", + "c": 23.4, + "h": 24.763, + "l": 22.65, + "n": 1096, + "o": 24.5, + "t": 1602705600000, + "v": 25933.6, + "vw": 23.493 + }, + { + "T": "VSAT", + "c": 34.24, + "h": 35.47, + "l": 34.21, + "n": 4966, + "o": 34.9, + "t": 1602705600000, + "v": 312583, + "vw": 34.4736 + } + ], + "resultsCount": 3, + "status": "OK" + }, + "schema": { + "allOf": [ + { + "properties": { + "adjusted": { + "description": "Whether or not this response was adjusted for splits.", + "type": "boolean" + }, + "queryCount": { + "description": "The number of aggregates (minute or day) used to generate the response.", + "type": "integer" + }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "resultsCount": { + "description": "The total number of results for this request.", + "type": "integer" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status", + "adjusted", + "queryCount", + "resultsCount", + "request_id" + ], + "type": "object" + }, + { + "properties": { + "results": { + "items": { + "properties": { + "T": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the end of the aggregate window.", + "type": "integer" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "t", + "v", + "T" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + ] + } + }, + "text/csv": { + "example": "T,c,h,l,n,o,t,v,vw\nKIMpL,25.9102,26.25,25.91,74,26.07,1602705600000,4369,26.0407\nTANH,23.4,24.763,22.65,1096,24.5,1602705600000,25933.6,23.493\nVSAT,34.24,35.47,34.21,4966,34.9,1602705600000,312583,34.4736\n", + "schema": { + "type": "string" + } + } + }, + "description": "Previous day OHLC for ticker" + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "Grouped Daily (Bars)", + "tags": [ + "stocks:aggregates" + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Stocks data", + "name": "stocks" + } + } + }, + "/v2/aggs/ticker/{cryptoTicker}/prev": { + "get": { + "description": "Get the previous day's open, high, low, and close (OHLC) for the specified cryptocurrency pair.\n", + "parameters": [ + { + "description": "The ticker symbol of the currency pair.", + "example": "X:BTCUSD", + "in": "path", + "name": "cryptoTicker", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", + "example": true, + "in": "query", + "name": "adjusted", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "adjusted": true, + "queryCount": 1, + "request_id": "b2170df985474b6d21a6eeccfb6bee67", + "results": [ + { + "T": "X:BTCUSD", + "c": 16035.9, + "h": 16180, + "l": 15639.2, + "o": 15937.1, + "t": 1605416400000, + "v": 95045.16897951, + "vw": 15954.2111 + } + ], + "resultsCount": 1, + "status": "OK", + "ticker": "X:BTCUSD" + }, + "schema": { + "allOf": [ + { + "properties": { + "ticker": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + } + }, + "required": [ + "ticker" + ], + "type": "object" + }, + { + "properties": { + "adjusted": { + "description": "Whether or not this response was adjusted for splits.", + "type": "boolean" + }, + "queryCount": { + "description": "The number of aggregates (minute or day) used to generate the response.", + "type": "integer" + }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "resultsCount": { + "description": "The total number of results for this request.", + "type": "integer" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status", + "adjusted", + "queryCount", + "resultsCount", + "request_id" + ], + "type": "object" + }, + { + "properties": { + "results": { + "items": { + "properties": { + "T": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t", + "T" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + ] + } + }, + "text/csv": { + "example": "T,c,h,l,o,t,v,vw\nX:BTCUSD,16035.9,16180,15639.2,15937.1,1605416400000,95045.16897951,15954.2111\n", + "schema": { + "type": "string" + } + } + }, + "description": "The previous day OHLC for a ticker." + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "Previous Close", + "tags": [ + "crypto:aggregates" + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Crypto data", + "name": "crypto" + } + } + }, + "/v2/aggs/ticker/{cryptoTicker}/range/{multiplier}/{timespan}/{from}/{to}": { + "get": { + "description": "Get aggregate bars for a cryptocurrency pair over a given date range in custom time window sizes.\n
\n
\nFor example, if timespan = \u2018minute\u2019 and multiplier = \u20185\u2019 then 5-minute bars will be returned.\n", + "parameters": [ + { + "description": "The ticker symbol of the currency pair.", + "example": "X:BTCUSD", + "in": "path", + "name": "cryptoTicker", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The size of the timespan multiplier.", + "example": 1, + "in": "path", + "name": "multiplier", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "The size of the time window.", + "example": "day", + "in": "path", + "name": "timespan", + "required": true, + "schema": { + "enum": [ + "second", + "minute", + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "type": "string" + } + }, + { + "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "example": "2023-01-09", + "in": "path", + "name": "from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "example": "2023-02-10", + "in": "path", + "name": "to", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", + "example": true, + "in": "query", + "name": "adjusted", + "schema": { + "type": "boolean" + } + }, + { + "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n", + "example": "asc", + "in": "query", + "name": "sort", + "schema": { + "enum": [ + "asc", + "desc" + ] + } + }, + { + "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on\nAggregate Data API Improvements.\n", + "example": 120, + "in": "query", + "name": "limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "adjusted": true, + "queryCount": 2, + "request_id": "0cf72b6da685bcd386548ffe2895904a", + "results": [ + { + "c": 10094.75, + "h": 10429.26, + "l": 9490, + "n": 1, + "o": 9557.9, + "t": 1590984000000, + "v": 303067.6562332156, + "vw": 9874.5529 + }, + { + "c": 9492.62, + "h": 10222.72, + "l": 9135.68, + "n": 1, + "o": 10096.87, + "t": 1591070400000, + "v": 323339.6922892879, + "vw": 9729.5701 + } + ], + "resultsCount": 2, + "status": "OK", + "ticker": "X:BTCUSD" + }, + "schema": { + "allOf": [ + { + "properties": { + "ticker": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + } + }, + "required": [ + "ticker" + ], + "type": "object" + }, + { + "properties": { + "adjusted": { + "description": "Whether or not this response was adjusted for splits.", + "type": "boolean" + }, + "queryCount": { + "description": "The number of aggregates (minute or day) used to generate the response.", + "type": "integer" + }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "resultsCount": { + "description": "The total number of results for this request.", + "type": "integer" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status", + "adjusted", + "queryCount", + "resultsCount", + "request_id" + ], + "type": "object" + }, + { + "properties": { + "results": { + "items": { + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + ] + } + }, + "text/csv": { + "example": "c,h,l,n,o,t,v,vw\n10094.75,10429.26,9490,1,9557.9,1590984000000,303067.6562332156,9874.5529\n9492.62,10222.72,9135.68,1,10096.87,1591070400000,323339.6922892879,9729.5701\n", + "schema": { + "type": "string" + } + } + }, + "description": "Cryptocurrency Aggregates." + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "Aggregates (Bars)", + "tags": [ + "crypto:aggregates" + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Crypto data", + "name": "crypto" + } + } + }, + "/v2/aggs/ticker/{forexTicker}/prev": { + "get": { + "description": "Get the previous day's open, high, low, and close (OHLC) for the specified forex pair.\n", + "parameters": [ + { + "description": "The ticker symbol of the currency pair.", + "example": "C:EURUSD", + "in": "path", + "name": "forexTicker", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", + "example": true, + "in": "query", + "name": "adjusted", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "adjusted": true, + "queryCount": 1, + "request_id": "08ec061fb85115678d68452c0a609cb7", + "results": [ + { + "T": "C:EURUSD", + "c": 1.06206, + "h": 1.0631, + "l": 1.0505, + "n": 180300, + "o": 1.05252, + "t": 1651708799999, + "v": 180300, + "vw": 1.055 + } + ], + "resultsCount": 1, + "status": "OK", + "ticker": "C:EURUSD" + }, + "schema": { + "allOf": [ + { + "properties": { + "ticker": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + } + }, + "required": [ + "ticker" + ], + "type": "object" + }, + { + "properties": { + "adjusted": { + "description": "Whether or not this response was adjusted for splits.", + "type": "boolean" + }, + "queryCount": { + "description": "The number of aggregates (minute or day) used to generate the response.", + "type": "integer" + }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "resultsCount": { + "description": "The total number of results for this request.", + "type": "integer" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status", + "adjusted", + "queryCount", + "resultsCount", + "request_id" + ], + "type": "object" + }, + { + "properties": { + "results": { + "items": { + "properties": { + "T": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "T", + "v", + "o", + "c", + "h", + "l", + "t" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + ] + } + }, + "text/csv": { + "example": "T,c,h,l,n,o,t,v,vw\nC:EURUSD,1.06206,1.0631,1.0505,180300,1.05252,1651708799999,180300,1.055\n", + "schema": { + "type": "string" + } + } + }, + "description": "The previous day OHLC for the ticker." + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "Previous Close", + "tags": [ + "fx:aggregates" + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Forex data", + "name": "fx" + } + } + }, + "/v2/aggs/ticker/{forexTicker}/range/{multiplier}/{timespan}/{from}/{to}": { + "get": { + "description": "Get aggregate bars for a forex pair over a given date range in custom time window sizes.\n
\n
\nFor example, if timespan = \u2018minute\u2019 and multiplier = \u20185\u2019 then 5-minute bars will be returned.\n", + "parameters": [ + { + "description": "The ticker symbol of the currency pair.", + "example": "C:EURUSD", + "in": "path", + "name": "forexTicker", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The size of the timespan multiplier.", + "example": 1, + "in": "path", + "name": "multiplier", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "The size of the time window.", + "example": "day", + "in": "path", + "name": "timespan", + "required": true, + "schema": { + "enum": [ + "second", + "minute", + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "type": "string" + } + }, + { + "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "example": "2023-01-09", + "in": "path", + "name": "from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "example": "2023-02-10", + "in": "path", + "name": "to", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", + "example": true, + "in": "query", + "name": "adjusted", + "schema": { + "type": "boolean" + } + }, + { + "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n", + "example": "asc", + "in": "query", + "name": "sort", + "schema": { + "enum": [ + "asc", + "desc" + ] + } + }, + { + "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on\nAggregate Data API Improvements.\n", + "example": 120, + "in": "query", + "name": "limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "adjusted": true, + "queryCount": 1, + "request_id": "79c061995d8b627b736170bc9653f15d", + "results": [ + { + "c": 1.17721, + "h": 1.18305, + "l": 1.1756, + "n": 125329, + "o": 1.17921, + "t": 1626912000000, + "v": 125329, + "vw": 1.1789 + } + ], + "resultsCount": 1, + "status": "OK", + "ticker": "C:EURUSD" + }, + "schema": { + "allOf": [ + { + "properties": { + "ticker": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + } + }, + "required": [ + "ticker" + ], + "type": "object" + }, + { + "properties": { + "adjusted": { + "description": "Whether or not this response was adjusted for splits.", + "type": "boolean" + }, + "queryCount": { + "description": "The number of aggregates (minute or day) used to generate the response.", + "type": "integer" + }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "resultsCount": { + "description": "The total number of results for this request.", + "type": "integer" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status", + "adjusted", + "queryCount", + "resultsCount", + "request_id" + ], + "type": "object" + }, + { + "properties": { + "results": { + "items": { + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + ] + } + }, + "text/csv": { + "example": "c,h,l,n,o,t,v,vw\n1.17721,1.18305,1.1756,125329,1.17921,1626912000000,125329,1.1789\n", + "schema": { + "type": "string" + } + } + }, + "description": "Forex Aggregates." + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "Aggregates (Bars)", + "tags": [ + "fx:aggregates" + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Forex data", + "name": "fx" + } + } + }, + "/v2/aggs/ticker/{indicesTicker}/prev": { + "get": { + "description": "Get the previous day's open, high, low, and close (OHLC) for the specified index.\n", + "parameters": [ + { + "description": "The ticker symbol of Index.", + "example": "I:NDX", + "in": "path", + "name": "indicesTicker", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "queryCount": 1, + "request_id": "b2170df985474b6d21a6eeccfb6bee67", + "results": [ + { + "T": "I:NDX", + "c": 15070.14948566977, + "h": 15127.4195807999, + "l": 14946.7243781848, + "o": 15036.48391066877, + "t": 1687291200000 + } + ], + "resultsCount": 1, + "status": "OK", + "ticker": "I:NDX" + }, + "schema": { + "allOf": [ + { + "properties": { + "ticker": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + } + }, + "required": [ + "ticker" + ], + "type": "object" + }, + { + "properties": { + "queryCount": { + "description": "The number of aggregates (minute or day) used to generate the response.", + "type": "integer" + }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "resultsCount": { + "description": "The total number of results for this request.", + "type": "integer" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status", + "queryCount", + "resultsCount", + "request_id" + ], + "type": "object" + }, + { + "properties": { + "results": { + "items": { + "properties": { + "c": { + "description": "The close value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "o": { + "description": "The open value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "t" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + ] + } + }, + "text/csv": { + "example": "T,c,h,l,o,t,v,vw\nI:NDX,15036.48391066877,15070.14948566977,15127.4195807999,14946.7243781848,1687291200000\n", + "schema": { + "type": "string" + } + } + }, + "description": "The previous day OHLC for a index." + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "Previous Close", + "tags": [ + "indices:aggregates" + ], + "x-massive-entitlement-allowed-limited-tickers": true, + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Indices data", + "name": "indices" + } + } + }, + "/v2/aggs/ticker/{indicesTicker}/range/{multiplier}/{timespan}/{from}/{to}": { + "get": { + "description": "Get aggregate bars for an index over a given date range in custom time window sizes.\n
\n
\nFor example, if timespan = \u2018minute\u2019 and multiplier = \u20185\u2019 then 5-minute bars will be returned.\n", + "parameters": [ + { + "description": "The ticker symbol of Index.", + "example": "I:NDX", + "in": "path", + "name": "indicesTicker", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The size of the timespan multiplier.", + "example": 1, + "in": "path", + "name": "multiplier", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "The size of the time window.", + "example": "day", + "in": "path", + "name": "timespan", + "required": true, + "schema": { + "enum": [ + "second", + "minute", + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "type": "string" + } + }, + { + "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "example": "2023-03-13", + "in": "path", + "name": "from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "example": "2023-03-24", + "in": "path", + "name": "to", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n", + "example": "asc", + "in": "query", + "name": "sort", + "schema": { + "enum": [ + "asc", + "desc" + ] + } + }, + { + "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on\nAggregate Data API Improvements.\n", + "example": 120, + "in": "query", + "name": "limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "count": 2, + "queryCount": 2, + "request_id": "0cf72b6da685bcd386548ffe2895904a", + "results": [ + { + "c": 11995.88235998666, + "h": 12340.44936267155, + "l": 11970.34221717375, + "o": 12230.83658266843, + "t": 1678341600000 + }, + { + "c": 11830.28178808306, + "h": 12069.62262033557, + "l": 11789.85923449393, + "o": 12001.69552583921, + "t": 1678428000000 + } + ], + "status": "OK", + "ticker": "I:NDX" + }, + "schema": { + "allOf": [ + { + "properties": { + "ticker": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + } + }, + "required": [ + "ticker" + ], + "type": "object" + }, + { + "properties": { + "queryCount": { + "description": "The number of aggregates (minute or day) used to generate the response.", + "type": "integer" + }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "resultsCount": { + "description": "The total number of results for this request.", + "type": "integer" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status", + "queryCount", + "resultsCount", + "request_id" + ], + "type": "object" + }, + { + "properties": { + "results": { + "items": { + "properties": { + "c": { + "description": "The close value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "o": { + "description": "The open value for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "t" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + ] + } + }, + "text/csv": { + "example": "c,h,l,n,o,t\n11995.88235998666,12340.44936267155,11970.34221717375,12230.83658266843,1678341600000\n11830.28178808306,12069.62262033557,11789.85923449393,12001.69552583921,1678341600000\n", + "schema": { + "type": "string" + } + } + }, + "description": "Index Aggregates." + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "Aggregates (Bars)", + "tags": [ + "indices:aggregates" + ], + "x-massive-entitlement-allowed-limited-tickers": true, + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Indices data", + "name": "indices" + } + } + }, + "/v2/aggs/ticker/{optionsTicker}/prev": { + "get": { + "description": "Get the previous day's open, high, low, and close (OHLC) for the specified option contract.\n", + "parameters": [ + { + "description": "The ticker symbol of the options contract.", + "example": "O:SPY251219C00650000", + "in": "path", + "name": "optionsTicker", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", + "example": true, + "in": "query", + "name": "adjusted", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "adjusted": true, + "queryCount": 1, + "request_id": "6a7e466379af0a71039d60cc78e72282", + "results": [ + { + "T": "O:TSLA210903C00700000", + "c": 115.97, + "h": 117.59, + "l": 114.13, + "n": 2, + "o": 115.55, + "t": 1605042000000, + "v": 131704427, + "vw": 116.3058 + } + ], + "resultsCount": 1, + "status": "OK", + "ticker": "O:TSLA210903C00700000" + }, + "schema": { + "allOf": [ + { + "properties": { + "ticker": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + } + }, + "required": [ + "ticker" + ], + "type": "object" + }, + { + "properties": { + "adjusted": { + "description": "Whether or not this response was adjusted for splits.", + "type": "boolean" + }, + "queryCount": { + "description": "The number of aggregates (minute or day) used to generate the response.", + "type": "integer" + }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "resultsCount": { + "description": "The total number of results for this request.", + "type": "integer" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status", + "adjusted", + "queryCount", + "resultsCount", + "request_id" + ], + "type": "object" + }, + { + "properties": { + "results": { + "items": { + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + ] + } + }, + "text/csv": { + "example": "T,c,h,l,n,o,t,v,vw\nO:TSLA210903C00700000,115.97,117.59,114.13,2,115.55,1605042000000,131704427.0,116.3058\n", + "schema": { + "type": "string" + } + } + }, + "description": "The previous day OHLC for the options contract." + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "Previous Close", + "tags": [ + "options:aggregates" + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Options data", + "name": "options" + } + } + }, + "/v2/aggs/ticker/{optionsTicker}/range/{multiplier}/{timespan}/{from}/{to}": { + "get": { + "description": "Get aggregate bars for an option contract over a given date range in custom time window sizes.\n
\n
\nFor example, if timespan = \u2018minute\u2019 and multiplier = \u20185\u2019 then 5-minute bars will be returned.\n", + "parameters": [ + { + "description": "The ticker symbol of the options contract.", + "example": "O:SPY251219C00650000", + "in": "path", + "name": "optionsTicker", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The size of the timespan multiplier.", + "example": 1, + "in": "path", + "name": "multiplier", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "The size of the time window.", + "example": "day", + "in": "path", + "name": "timespan", + "required": true, + "schema": { + "enum": [ + "second", + "minute", + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "type": "string" + } + }, + { + "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "example": "2023-01-09", + "in": "path", + "name": "from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "example": "2023-02-10", + "in": "path", + "name": "to", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", + "example": true, + "in": "query", + "name": "adjusted", + "schema": { + "type": "boolean" + } + }, + { + "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n", + "example": "asc", + "in": "query", + "name": "sort", + "schema": { + "enum": [ + "asc", + "desc" + ] + } + }, + { + "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on\nAggregate Data API Improvements.\n", + "example": 120, + "in": "query", + "name": "limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "adjusted": true, + "count": 2, + "queryCount": 2, + "request_id": "5585acde-5085-42d6-95b2-2e388a28370a", + "results": [ + { + "c": 26.2, + "h": 26.2, + "l": 26.2, + "n": 1, + "o": 26.2, + "t": 1632369600000, + "v": 2, + "vw": 26.2 + }, + { + "c": 28.3, + "h": 28.3, + "l": 28.3, + "n": 1, + "o": 28.3, + "t": 1632456000000, + "v": 2, + "vw": 28.3 + } + ], + "resultsCount": 2, + "status": "OK", + "ticker": "O:RDFN211119C00025000" + }, + "schema": { + "allOf": [ + { + "properties": { + "ticker": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + } + }, + "required": [ + "ticker" + ], + "type": "object" + }, + { + "properties": { + "adjusted": { + "description": "Whether or not this response was adjusted for splits.", + "type": "boolean" + }, + "queryCount": { + "description": "The number of aggregates (minute or day) used to generate the response.", + "type": "integer" + }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "resultsCount": { + "description": "The total number of results for this request.", + "type": "integer" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status", + "adjusted", + "queryCount", + "resultsCount", + "request_id" + ], + "type": "object" + }, + { + "properties": { + "results": { + "items": { + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + ] + } + }, + "text/csv": { + "example": "c,h,l,n,o,t,v,vw\n26.2,26.2,26.2,1,26.2,1632369600000,2,26.2\n28.3,28.3,28.3,1,28.3,1632456000000,2,28.3\n", + "schema": { + "type": "string" + } + } + }, + "description": "Options Aggregates." + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "Aggregates (Bars)", + "tags": [ + "options:aggregates" + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Options data", + "name": "options" + } + } + }, + "/v2/aggs/ticker/{stocksTicker}/prev": { + "get": { + "description": "Get the previous day's open, high, low, and close (OHLC) for the specified stock ticker.\n", + "parameters": [ + { + "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.", + "example": "AAPL", + "in": "path", + "name": "stocksTicker", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", + "example": true, + "in": "query", + "name": "adjusted", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "adjusted": true, + "queryCount": 1, + "request_id": "6a7e466379af0a71039d60cc78e72282", + "results": [ + { + "T": "AAPL", + "c": 115.97, + "h": 117.59, + "l": 114.13, + "o": 115.55, + "t": 1605042000000, + "v": 131704427, + "vw": 116.3058 + } + ], + "resultsCount": 1, + "status": "OK", + "ticker": "AAPL" + }, + "schema": { + "allOf": [ + { + "properties": { + "ticker": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + } + }, + "required": [ + "ticker" + ], + "type": "object" + }, + { + "properties": { + "adjusted": { + "description": "Whether or not this response was adjusted for splits.", + "type": "boolean" + }, + "queryCount": { + "description": "The number of aggregates (minute or day) used to generate the response.", + "type": "integer" + }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "resultsCount": { + "description": "The total number of results for this request.", + "type": "integer" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status", + "adjusted", + "queryCount", + "resultsCount", + "request_id" + ], + "type": "object" + }, + { + "properties": { + "results": { + "items": { + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + ] + } + }, + "text/csv": { + "example": "T,c,h,l,o,t,v,vw\nAAPL,115.97,117.59,114.13,115.55,1605042000000,131704427.0,116.3058\n", + "schema": { + "type": "string" + } + } + }, + "description": "The previous day OHLC for the ticker." + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "Previous Close", + "tags": [ + "stocks:aggregates" + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Stocks data", + "name": "stocks" + } + } + }, + "/v2/aggs/ticker/{stocksTicker}/range/{multiplier}/{timespan}/{from}/{to}": { + "get": { + "description": "Get aggregate bars for a stock over a given date range in custom time window sizes.\n
\n
\nFor example, if timespan = \u2018minute\u2019 and multiplier = \u20185\u2019 then 5-minute bars will be returned.\n", + "parameters": [ + { + "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.", + "example": "AAPL", + "in": "path", + "name": "stocksTicker", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The size of the timespan multiplier.", + "example": 1, + "in": "path", + "name": "multiplier", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "The size of the time window.", + "example": "day", + "in": "path", + "name": "timespan", + "required": true, + "schema": { + "enum": [ + "second", + "minute", + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "type": "string" + } + }, + { + "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "example": "2023-01-09", + "in": "path", + "name": "from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.", + "example": "2023-02-10", + "in": "path", + "name": "to", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n", + "example": true, + "in": "query", + "name": "adjusted", + "schema": { + "type": "boolean" + } + }, + { + "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n", + "example": "asc", + "in": "query", + "name": "sort", + "schema": { + "enum": [ + "asc", + "desc" + ] + } + }, + { + "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on\nAggregate Data API Improvements.\n", + "example": 120, + "in": "query", + "name": "limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "adjusted": true, + "next_url": "https://api.massive.com/v2/aggs/ticker/AAPL/range/1/day/1578114000000/2020-01-10?cursor=bGltaXQ9MiZzb3J0PWFzYw", + "queryCount": 2, + "request_id": "6a7e466379af0a71039d60cc78e72282", + "results": [ + { + "c": 75.0875, + "h": 75.15, + "l": 73.7975, + "n": 1, + "o": 74.06, + "t": 1577941200000, + "v": 135647456, + "vw": 74.6099 + }, + { + "c": 74.3575, + "h": 75.145, + "l": 74.125, + "n": 1, + "o": 74.2875, + "t": 1578027600000, + "v": 146535512, + "vw": 74.7026 + } + ], + "resultsCount": 2, + "status": "OK", + "ticker": "AAPL" + }, + "schema": { + "allOf": [ + { + "properties": { + "ticker": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + } + }, + "required": [ + "ticker" + ], + "type": "object" + }, + { + "properties": { + "adjusted": { + "description": "Whether or not this response was adjusted for splits.", + "type": "boolean" + }, + "queryCount": { + "description": "The number of aggregates (minute or day) used to generate the response.", + "type": "integer" + }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "resultsCount": { + "description": "The total number of results for this request.", + "type": "integer" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status", + "adjusted", + "queryCount", + "resultsCount", + "request_id" + ], + "type": "object" + }, + { + "properties": { + "results": { + "items": { + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "t" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + { + "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" + } + }, + "type": "object" + } + ] + } + }, + "text/csv": { + "example": "c,h,l,n,o,t,v,vw\n75.0875,75.15,73.7975,1,74.06,1577941200000,135647456.0,74.6099\n74.3575,75.145,74.125,1,74.2875,1578027600000,146535512.0,74.7026\n", + "schema": { + "type": "string" + } + } + }, + "description": "Stock Aggregates." + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "Aggregates (Bars)", + "tags": [ + "stocks:aggregates" + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Stocks data", + "name": "stocks" + } + } + }, + "/v2/last/nbbo/{stocksTicker}": { + "get": { + "description": "Get the most recent NBBO (Quote) tick for a given stock.", + "operationId": "LastQuote", + "parameters": [ + { + "description": "The ticker symbol of the stock/equity.", + "example": "AAPL", + "in": "path", + "name": "stocksTicker", + "required": true, + "schema": { + "type": "string" + }, + "x-massive-go-id": "Ticker" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "request_id": "b84e24636301f19f88e0dfbf9a45ed5c", + "results": { + "P": 127.98, + "S": 7, + "T": "AAPL", + "X": 19, + "p": 127.96, + "q": 83480742, + "s": 1, + "t": 1617827221349730300, + "x": 11, + "y": 1617827221349366000, + "z": 3 + }, + "status": "OK" + }, + "schema": { + "properties": { + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "results": { + "properties": { + "P": { + "description": "The ask price.", + "format": "double", + "type": "number" + }, + "S": { + "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.", + "type": "integer" + }, + "T": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "X": { + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", + "type": "integer" + }, + "c": { + "description": "A list of condition codes.", + "items": { + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.", + "format": "int32", + "type": "integer" + }, + "type": "array", + "x-massive-go-type": { + "name": "Int32Array" + } + }, + "f": { + "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.", + "type": "integer" + }, + "i": { + "description": "A list of indicator codes.", + "items": { + "description": "The indicator codes. For more information, see our glossary of [Conditions and\nIndicators](https://massive.com/glossary/us/stocks/conditions-indicators).", + "format": "int32", + "type": "integer" + }, + "type": "array", + "x-massive-go-type": { + "name": "Int32Array" + } + }, + "p": { + "description": "The bid price.", + "format": "double", + "type": "number" + }, + "q": { + "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).", + "format": "int64", + "type": "integer" + }, + "s": { + "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.", + "type": "integer" + }, + "t": { + "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.", + "type": "integer" + }, + "x": { + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", + "type": "integer" + }, + "y": { + "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.", + "type": "integer" + }, + "z": { + "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ", + "type": "integer" + } + }, + "required": [ + "T", + "t", + "y", + "q" + ], + "type": "object", + "x-massive-go-type": { + "name": "LastQuoteResult" + } + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status", + "request_id" + ], + "type": "object" + } + }, + "text/csv": { + "example": "P,S,T,X,p,q,s,t,x,y,z\n127.98,7,AAPL,19,127.96,83480742,1,1617827221349730300,11,1617827221349366000,3\n", + "schema": { + "type": "string" + } + } + }, + "description": "The last NBBO tick for this stock." + }, + "401": { + "description": "Unauthorized - Check our API Key and account status" + }, + "404": { + "description": "The specified resource was not found" + } + }, + "summary": "Last Quote", + "tags": [ + "stocks:last:quote" + ], + "x-massive-entitlement-allowed-timeframes": [ + { + "description": "Real Time Data", + "name": "realtime" + }, + { + "description": "15 minute delayed data", + "name": "delayed" + } + ], + "x-massive-entitlement-data-type": { + "description": "NBBO data", + "name": "nbbo" + }, + "x-massive-entitlement-market-type": { + "description": "Stocks data", + "name": "stocks" + } + } + }, + "/v2/last/trade/{optionsTicker}": { + "get": { + "description": "Get the most recent trade for a given options contract.", + "operationId": "LastTradeOptions", + "parameters": [ + { + "description": "The ticker symbol of the options contract.", + "example": "O:TSLA210903C00700000", + "in": "path", + "name": "optionsTicker", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "request_id": "f05562305bd26ced64b98ed68b3c5d96", + "results": { + "T": "O:TSLA210903C00700000", + "c": [ + 227 + ], + "f": 1617901342969796400, + "i": "", + "p": 115.55, + "q": 1325541950, + "r": 202, + "s": 25, + "t": 1617901342969834000, + "x": 312, + "y": 1617901342969834000 + }, + "status": "OK" + }, + "schema": { + "properties": { + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "results": { + "properties": { + "T": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "c": { + "description": "A list of condition codes.", + "items": { + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.", + "format": "int32", + "type": "integer" + }, + "type": "array", + "x-massive-go-type": { + "name": "Int32Array" + } + }, + "e": { + "description": "The trade correction indicator.", + "type": "integer" + }, + "f": { + "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.", + "type": "integer" + }, + "i": { + "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.", + "type": "string" + }, + "p": { + "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.", + "format": "double", + "type": "number" + }, + "q": { + "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).", + "format": "int64", + "type": "integer" + }, + "r": { + "description": "The ID for the Trade Reporting Facility where the trade took place.", + "type": "integer" + }, + "s": { + "description": "The size of a trade (also known as volume).", + "format": "double", + "type": "number" + }, + "t": { + "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.", + "type": "integer" + }, + "x": { + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", + "type": "integer" + }, + "y": { + "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.", + "type": "integer" + }, + "z": { + "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ", + "type": "integer" + } + }, + "required": [ + "T", + "t", + "y", + "q", + "i", + "p", + "x" + ], + "type": "object", + "x-massive-go-type": { + "name": "LastTradeResult" + } + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status", + "request_id" + ], + "type": "object" + } + }, + "text/csv": { + "example": "T,c,f,i,p,q,r,s,t,x\nO:TSLA210903C00700000,227,1617901342969796400,,115.55,1325541950,202,25,1617901342969834000,312\n", + "schema": { + "type": "string" + } + } + }, + "description": "The last trade for this options contract." + }, + "401": { + "description": "Unauthorized - Check our API Key and account status" + }, + "404": { + "description": "The specified resource was not found" + } + }, + "summary": "Last Trade", + "tags": [ + "options:last:trade" + ], + "x-massive-entitlement-allowed-timeframes": [ + { + "description": "Real Time Data", + "name": "realtime" + }, + { + "description": "15 minute delayed data", + "name": "delayed" + } + ], + "x-massive-entitlement-data-type": { + "description": "Trade data", + "name": "trades" + }, + "x-massive-entitlement-market-type": { + "description": "Options data", + "name": "options" + } + }, + "x-massive-ignore": true + }, + "/v2/last/trade/{stocksTicker}": { + "get": { + "description": "Get the most recent trade for a given stock.", + "operationId": "LastTrade", + "parameters": [ + { + "description": "The ticker symbol of the stock/equity.", + "example": "AAPL", + "in": "path", + "name": "stocksTicker", + "required": true, + "schema": { + "type": "string" + }, + "x-massive-go-id": "Ticker" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "request_id": "f05562305bd26ced64b98ed68b3c5d96", + "results": { + "T": "AAPL", + "c": [ + 37 + ], + "f": 1617901342969796400, + "i": "118749", + "p": 129.8473, + "q": 3135876, + "r": 202, + "s": 25, + "t": 1617901342969834000, + "x": 4, + "y": 1617901342968000000, + "z": 3 + }, + "status": "OK" + }, + "schema": { + "properties": { + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "results": { + "properties": { + "T": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "c": { + "description": "A list of condition codes.", + "items": { + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.", + "format": "int32", + "type": "integer" + }, + "type": "array", + "x-massive-go-type": { + "name": "Int32Array" + } + }, + "e": { + "description": "The trade correction indicator.", + "type": "integer" + }, + "f": { + "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.", + "type": "integer" + }, + "i": { + "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.", + "type": "string" + }, + "p": { + "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.", + "format": "double", + "type": "number" + }, + "q": { + "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).", + "format": "int64", + "type": "integer" + }, + "r": { + "description": "The ID for the Trade Reporting Facility where the trade took place.", + "type": "integer" + }, + "s": { + "description": "The size of a trade (also known as volume).", + "format": "double", + "type": "number" + }, + "t": { + "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.", + "type": "integer" + }, + "x": { + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", + "type": "integer" + }, + "y": { + "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.", + "type": "integer" + }, + "z": { + "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ", + "type": "integer" + } + }, + "required": [ + "T", + "t", + "y", + "q", + "i", + "p", + "x" + ], + "type": "object", + "x-massive-go-type": { + "name": "LastTradeResult" + } + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status", + "request_id" + ], + "type": "object" + } + }, + "text/csv": { + "example": "T,c,f,i,p,q,r,s,t,x,y,z\nAAPL,37,1617901342969796400,118749,129.8473,3135876,202,25,1617901342969834000,4,1617901342968000000,3\n", + "schema": { + "type": "string" + } + } + }, + "description": "The last trade for this stock." + }, + "401": { + "description": "Unauthorized - Check our API Key and account status" + }, + "404": { + "description": "The specified resource was not found" + } + }, + "summary": "Last Trade", + "tags": [ + "stocks:last:trade" + ], + "x-massive-entitlement-allowed-timeframes": [ + { + "description": "Real Time Data", + "name": "realtime" + }, + { + "description": "15 minute delayed data", + "name": "delayed" + } + ], + "x-massive-entitlement-data-type": { + "description": "Trade data", + "name": "trades" + }, + "x-massive-entitlement-market-type": { + "description": "Stocks data", + "name": "stocks" + } + } + }, + "/v2/reference/news": { + "get": { + "description": "Get the most recent news articles relating to a stock ticker symbol, including a summary of the article and a link to the original source.", + "operationId": "ListNews", + "parameters": [ + { + "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.", + "in": "query", + "name": "ticker", + "schema": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "x-massive-filter-field": { + "range": true + } + }, + { + "description": "Return results published on, before, or after this date.", + "in": "query", + "name": "published_utc", + "schema": { + "oneOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "format": "date", + "type": "string" + } + ] + }, + "x-massive-filter-field": { + "range": true + } + }, + { + "description": "Search by ticker.", + "in": "query", + "name": "ticker.gte", + "schema": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + } + }, + { + "description": "Search by ticker.", + "in": "query", + "name": "ticker.gt", + "schema": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + } + }, + { + "description": "Search by ticker.", + "in": "query", + "name": "ticker.lte", + "schema": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + } + }, + { + "description": "Search by ticker.", + "in": "query", + "name": "ticker.lt", + "schema": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + } + }, + { + "description": "Search by published_utc.", + "in": "query", + "name": "published_utc.gte", + "schema": { + "oneOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "format": "date", + "type": "string" + } + ] + } + }, + { + "description": "Search by published_utc.", + "in": "query", + "name": "published_utc.gt", + "schema": { + "oneOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "format": "date", + "type": "string" + } + ] + } + }, + { + "description": "Search by published_utc.", + "in": "query", + "name": "published_utc.lte", + "schema": { + "oneOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "format": "date", + "type": "string" + } + ] + } + }, + { + "description": "Search by published_utc.", + "in": "query", + "name": "published_utc.lt", + "schema": { + "oneOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "format": "date", + "type": "string" + } + ] + } + }, + { + "description": "Order results based on the `sort` field.", + "in": "query", + "name": "order", + "schema": { + "enum": [ + "asc", + "desc" + ], + "example": "asc", + "type": "string" + } + }, + { + "description": "Limit the number of results returned, default is 10 and max is 1000.", + "in": "query", + "name": "limit", + "schema": { + "default": 10, + "example": 10, + "maximum": 1000, + "minimum": 1, + "type": "integer" + } + }, + { + "description": "Sort field used for ordering.", + "in": "query", + "name": "sort", + "schema": { + "default": "published_utc", + "enum": [ + "published_utc" + ], + "example": "published_utc", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "count": 1, + "next_url": "https://api.massive.com:443/v2/reference/news?cursor=eyJsaW1pdCI6MSwic29ydCI6InB1Ymxpc2hlZF91dGMiLCJvcmRlciI6ImFzY2VuZGluZyIsInRpY2tlciI6e30sInB1Ymxpc2hlZF91dGMiOnsiZ3RlIjoiMjAyMS0wNC0yNiJ9LCJzZWFyY2hfYWZ0ZXIiOlsxNjE5NDA0Mzk3MDAwLG51bGxdfQ", + "request_id": "831afdb0b8078549fed053476984947a", + "results": [ + { + "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": [ + "Federal Reserve", + "interest rates", + "economic data" + ], + "published_utc": "2024-06-24T18:33:53Z", + "publisher": { + "favicon_url": "https://s3.massive.com/public/assets/news/favicons/investing.ico", + "homepage_url": "https://www.investing.com/", + "logo_url": "https://s3.massive.com/public/assets/news/logos/investing.png", + "name": "Investing.com" + }, + "tickers": [ + "UBS" + ], + "title": "Markets are underestimating Fed cuts: UBS By Investing.com - Investing.com UK" + } + ], + "status": "OK" + }, + "schema": { + "properties": { + "count": { + "description": "The total number of results for this request.", + "type": "integer" + }, + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" + }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "results": { + "items": { + "properties": { + "amp_url": { + "description": "The mobile friendly Accelerated Mobile Page (AMP) URL.", + "type": "string" + }, + "article_url": { + "description": "A link to the news article.", + "type": "string" + }, + "author": { + "description": "The article's author.", + "type": "string" + }, + "description": { + "description": "A description of the article.", + "type": "string" + }, + "id": { + "description": "Unique identifier for the article.", + "type": "string" + }, + "image_url": { + "description": "The article's image URL.", + "type": "string" + }, + "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": { + "type": "string" + }, + "type": "array" + }, + "published_utc": { + "description": "The date the article was published on.", + "format": "date-time", + "type": "string" + }, + "publisher": { + "properties": { + "favicon_url": { + "description": "The publisher's homepage favicon URL.", + "type": "string" + }, + "homepage_url": { + "description": "The publisher's homepage URL.", + "type": "string" + }, + "logo_url": { + "description": "The publisher's logo URL.", + "type": "string" + }, + "name": { + "description": "The publisher's name.", + "type": "string" + } + }, + "required": [ + "name", + "logo_url", + "homepage_url" + ], + "type": "object" + }, + "tickers": { + "description": "The ticker symbols associated with the article.", + "items": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "type": "array" + }, + "title": { + "description": "The title of the news article.", + "type": "string" + } + }, + "required": [ + "id", + "publisher", + "title", + "author", + "published_utc", + "article_url", + "tickers" + ], + "type": "object", + "x-massive-go-type": { + "name": "NewsArticleMetadata", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + }, + "type": "array", + "x-massive-go-type": { + "name": "ListNewsArticlesResults" + } + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "type": "object" + } + }, + "text/csv": { + "example": "id,publisher_name,publisher_homepage_url,publisher_logo_url,publisher_favicon_url,title,author,published_utc,article_url,ticker,amp_url,image_url,description,keywords,sentiment,sentiment_reasoning\n8ec638777ca03b553ae516761c2a22ba2fdd2f37befae3ab6fdab74e9e5193eb,Investing.com,https://www.investing.com/,https://s3.massive.com/public/assets/news/logos/investing.png,https://s3.massive.com/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" + } + } + }, + "description": "An array of news articles." + }, + "401": { + "description": "Unauthorized - Check our API Key and account status" + }, + "404": { + "description": "The specified resource was not found" + } + }, + "summary": "Ticker News", + "tags": [ + "reference:news" + ], + "x-massive-entitlement-data-type": { + "description": "Reference data", + "name": "reference" + }, + "x-massive-paginate": { + "sort": { + "default": "published_utc", + "enum": [ + "published_utc" + ], + "limit": { + "default": 10, + "maximum": 1000, + "minimum": 1 + } + } + } + } + }, + "/v2/snapshot/locale/global/markets/crypto/tickers": { + "get": { + "description": "Get the current minute, day, and previous day\u2019s aggregate, as well as the last trade and quote for all traded cryptocurrency symbols.\n
\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, X:BTCUSD, X:ETHBTC, and X:BOBAUSD. Empty string defaults to querying all tickers.", + "in": "query", + "name": "tickers", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "status": "OK", + "tickers": [ + { + "day": { + "c": 0.296, + "h": 0.59714, + "l": 0.23706, + "o": 0.28, + "v": 4097699.5691991993, + "vw": 0 + }, + "lastTrade": { + "c": [ + 1 + ], + "i": 413131, + "p": 0.293, + "s": 13.6191, + "t": 1605292686010, + "x": 17 + }, + "min": { + "c": 0.296, + "h": 0.296, + "l": 0.294, + "n": 2, + "o": 0.296, + "t": 1684427880000, + "v": 123.4866, + "vw": 0 + }, + "prevDay": { + "c": 0.281, + "h": 0.59714, + "l": 0.23706, + "o": 0.27, + "v": 6070178.786154971, + "vw": 0.4076 + }, + "ticker": "X:FSNUSD", + "todaysChange": 0.012, + "todaysChangePerc": 4.270463, + "updated": 1605330008999 + } + ] + }, + "schema": { + "allOf": [ + { + "properties": { + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" + }, + { + "properties": { + "tickers": { + "items": { + "properties": { + "day": { + "description": "The most recent daily bar for this ticker.", + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], + "type": "object" + }, + "fmv": { + "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.", + "format": "double", + "type": "number" + }, + "lastTrade": { + "allOf": [ + { + "description": "The most recent trade for this ticker." + }, + { + "properties": { + "c": { + "description": "The trade conditions.", + "items": { + "type": "integer" + }, + "type": "array" + }, + "i": { + "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n", + "type": "string" + }, + "p": { + "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n", + "format": "double", + "type": "number" + }, + "s": { + "description": "The size (volume) of the trade.", + "type": "number" + }, + "t": { + "description": "The millisecond accuracy timestamp. This is the timestamp of when the trade was generated at the exchange.", + "type": "integer" + }, + "x": { + "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n", + "type": "integer" + } + }, + "required": [ + "c", + "i", + "p", + "s", + "t", + "x" + ], + "type": "object" + } + ] + }, + "min": { + "description": "The most recent minute bar for this ticker.", + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw", + "t", + "n" + ], + "type": "object" + }, + "prevDay": { + "description": "The previous day's bar for this ticker.", + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], + "type": "object" + }, + "ticker": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "todaysChange": { + "description": "The value of the change from the previous day.", + "format": "double", + "type": "number" + }, + "todaysChangePerc": { + "description": "The percentage change since the previous day.", + "format": "double", + "type": "number" + }, + "updated": { + "description": "The last updated timestamp.", + "type": "integer" + } + }, + "required": [ + "day", + "lastTrade", + "min", + "prevDay", + "ticker", + "todaysChange", + "todaysChangePerc", + "updated" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + ] + } + }, + "text/csv": { + "example": "day_c,day_h,day_l,day_o,day_v,lastTrade_c,lastTrade_i,lastTrade_p,lastTrade_s,lastTrade_t,lastTrade_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n16260.85,16428.4,15830.4,16418.07,105008.84231068,0,\"[2]\",464569520,16242.31,0.001933,1605294230780,4,16235.1,16264.29,16129.3,16257.51,19.30791925,0,16399.24,16418.07,16399.24,16418.07,0.99167108,16402.6893\n", + "schema": { + "type": "string" + } + } + }, + "description": "Get current state for all tickers" + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "All Tickers", + "tags": [ + "crypto:snapshot" + ], + "x-massive-entitlement-allowed-timeframes": [ + { + "description": "Real Time Data", + "name": "realtime" + }, + { + "description": "15 minute delayed data", + "name": "delayed" + } + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Crypto data", + "name": "crypto" + } + } + }, + "/v2/snapshot/locale/global/markets/crypto/tickers/{ticker}": { + "get": { + "description": "Get the current minute, day, and previous day\u2019s aggregate, as well as the last trade and quote for a single traded cryptocurrency symbol.\n
\n
\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n", + "parameters": [ + { + "description": "Ticker of the snapshot", + "example": "X:BTCUSD", + "in": "path", + "name": "ticker", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "request_id": "ad92e92ce183112c593717f00dfebd2c", + "status": "OK", + "ticker": { + "day": { + "c": 16260.85, + "h": 16428.4, + "l": 15830.4, + "o": 16418.07, + "v": 105008.84231068, + "vw": 0 + }, + "lastTrade": { + "c": [ + 2 + ], + "i": "464569520", + "p": 16242.31, + "s": 0.001933, + "t": 1605294230780, + "x": 4 + }, + "min": { + "c": 16235.1, + "h": 16264.29, + "l": 16129.3, + "n": 558, + "o": 16257.51, + "t": 1684428960000, + "v": 19.30791925, + "vw": 0 + }, + "prevDay": { + "c": 16399.24, + "h": 16418.07, + "l": 16399.24, + "o": 16418.07, + "v": 0.99167108, + "vw": 16402.6893 + }, + "ticker": "X:BTCUSD", + "todaysChange": -156.93, + "todaysChangePerc": -0.956935, + "updated": 1605330008999 + } + }, + "schema": { + "allOf": [ + { + "properties": { + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" + }, + { + "properties": { + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + } + }, + "required": [ + "request_id" + ], + "type": "object" + }, + { + "properties": { + "ticker": { + "properties": { + "day": { + "description": "The most recent daily bar for this ticker.", + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], + "type": "object" + }, + "fmv": { + "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.", + "format": "double", + "type": "number" + }, + "lastTrade": { + "allOf": [ + { + "description": "The most recent trade for this ticker." + }, + { + "properties": { + "c": { + "description": "The trade conditions.", + "items": { + "type": "integer" + }, + "type": "array" + }, + "i": { + "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n", + "type": "string" + }, + "p": { + "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n", + "format": "double", + "type": "number" + }, + "s": { + "description": "The size (volume) of the trade.", + "type": "number" + }, + "t": { + "description": "The millisecond accuracy timestamp. This is the timestamp of when the trade was generated at the exchange.", + "type": "integer" + }, + "x": { + "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n", + "type": "integer" + } + }, + "required": [ + "c", + "i", + "p", + "s", + "t", + "x" + ], + "type": "object" + } + ] + }, + "min": { + "description": "The most recent minute bar for this ticker.", + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw", + "t", + "n" + ], + "type": "object" + }, + "prevDay": { + "description": "The previous day's bar for this ticker.", + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], + "type": "object" + }, + "ticker": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "todaysChange": { + "description": "The value of the change from the previous day.", + "format": "double", + "type": "number" + }, + "todaysChangePerc": { + "description": "The percentage change since the previous day.", + "format": "double", + "type": "number" + }, + "updated": { + "description": "The last updated timestamp.", + "type": "integer" + } + }, + "required": [ + "day", + "lastTrade", + "min", + "prevDay", + "ticker", + "todaysChange", + "todaysChangePerc", + "updated" + ], + "type": "object" + } + }, + "type": "object" + } + ] + } + }, + "text/csv": { + "example": "day_c,day_h,day_l,day_o,day_v,lastTrade_c,lastTrade_i,lastTrade_p,lastTrade_s,lastTrade_t,lastTrade_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n16260.85,16428.4,15830.4,16418.07,105008.84231068,0,\"[2]\",464569520,16242.31,0.001933,1605294230780,4,16235.1,16264.29,16129.3,16257.51,19.30791925,0,16399.24,16418.07,16399.24,16418.07,0.99167108,16402.6893\n", + "schema": { + "type": "string" + } + } + }, + "description": "Get current state for a ticker" + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "Ticker", + "tags": [ + "crypto:snapshot" + ], + "x-massive-entitlement-allowed-timeframes": [ + { + "description": "Real Time Data", + "name": "realtime" + }, + { + "description": "15 minute delayed data", + "name": "delayed" + } + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Crypto data", + "name": "crypto" + } + } + }, + "/v2/snapshot/locale/global/markets/crypto/tickers/{ticker}/book": { + "get": { + "description": "Get the current level 2 book of a single ticker. This is the combined book from all of the exchanges.\n
\n
\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n", + "parameters": [ + { + "description": "The cryptocurrency ticker.", + "example": "X:BTCUSD", + "in": "path", + "name": "ticker", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "data": { + "askCount": 593.1412981600005, + "asks": [ + { + "p": 11454, + "x": { + "2": 1 + } + }, + { + "p": 11455, + "x": { + "2": 1 + } + } + ], + "bidCount": 694.951789670001, + "bids": [ + { + "p": 16303.17, + "x": { + "1": 2 + } + }, + { + "p": 16302.94, + "x": { + "1": 0.02859424, + "6": 0.023455 + } + } + ], + "spread": -4849.17, + "ticker": "X:BTCUSD", + "updated": 1605295074162 + }, + "status": "OK" + }, + "schema": { + "allOf": [ + { + "description": "The status of this request's response.", + "type": "string" + }, + { + "properties": { + "data": { + "properties": { + "askCount": { + "description": "The combined total number of asks in the book.", + "format": "double", + "type": "number" + }, + "asks": { + "items": { + "properties": { + "p": { + "description": "The price of this book level.", + "format": "double", + "type": "number" + }, + "x": { + "description": "A map of the exchange ID to number of shares at this price level.\n
\n
\n**Example:**\n
\n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n
\n
\nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n", + "type": "object" + } + }, + "required": [ + "p", + "x" + ], + "type": "object" + }, + "type": "array" + }, + "bidCount": { + "description": "The combined total number of bids in the book.", + "format": "double", + "type": "number" + }, + "bids": { + "items": { + "properties": { + "p": { + "description": "The price of this book level.", + "format": "double", + "type": "number" + }, + "x": { + "description": "A map of the exchange ID to number of shares at this price level.\n
\n
\n**Example:**\n
\n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n
\n
\nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n", + "type": "object" + } + }, + "required": [ + "p", + "x" + ], + "type": "object" + }, + "type": "array" + }, + "spread": { + "description": "The difference between the best bid and the best ask price across exchanges.", + "format": "double", + "type": "number" + }, + "ticker": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "updated": { + "description": "The last updated timestamp.", + "type": "integer" + } + }, + "required": [ + "ticker", + "bids", + "asks", + "bidCount", + "askCount", + "spread", + "updated" + ], + "type": "object" + } + }, + "type": "object" + } + ] + } + }, + "text/csv": { + "example": "side,price,size,exchange\nbid,20292.97,0.01501,1\nbid,20291.93,0.00218483,1\nask,18445.61,0.22,1\nask,18463.07,0.00234104,1\nask,18464.83,0.04159475,1\n", + "schema": { + "type": "string" + } + } + }, + "description": "Get current level 2 book for a ticker" + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "Ticker Full Book (L2)", + "tags": [ + "crypto:snapshot" + ], + "x-massive-deprecation": { + "date": 1719838800000 + }, + "x-massive-entitlement-allowed-timeframes": [ + { + "description": "Real Time Data", + "name": "realtime" + }, + { + "description": "15 minute delayed data", + "name": "delayed" + } + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Crypto data", + "name": "crypto" + } + } + }, + "/v2/snapshot/locale/global/markets/crypto/{direction}": { + "get": { + "description": "Get the current top 20 gainers or losers of the day in cryptocurrency markets.\n
\n
\nTop gainers are those tickers whose price has increased by the highest percentage since the previous day's close.\nTop losers are those tickers whose price has decreased by the highest percentage since the previous day's close.\n
\n
\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n", + "parameters": [ + { + "description": "The direction of the snapshot results to return.\n", + "example": "gainers", + "in": "path", + "name": "direction", + "required": true, + "schema": { + "enum": [ + "gainers", + "losers" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "status": "OK", + "tickers": [ + { + "day": { + "c": 0.0374, + "h": 0.062377, + "l": 0.01162, + "o": 0.044834, + "v": 27313165.159427017, + "vw": 0 + }, + "lastTrade": { + "c": [ + 2 + ], + "i": "517478762", + "p": 0.0374, + "s": 499, + "t": 1604409649544, + "x": 2 + }, + "min": { + "c": 0.062377, + "h": 0.062377, + "l": 0.062377, + "n": 2, + "o": 0.062377, + "t": 1684426740000, + "v": 35420, + "vw": 0 + }, + "prevDay": { + "c": 0.01162, + "h": 0.044834, + "l": 0.01162, + "o": 0.044834, + "v": 53616273.36827199, + "vw": 0.0296 + }, + "ticker": "X:DRNUSD", + "todaysChange": 0.02578, + "todaysChangePerc": 221.858864, + "updated": 1605330008999 + } + ] + }, + "schema": { + "allOf": [ + { + "description": "The status of this request's response.", + "type": "string" + }, + { + "properties": { + "tickers": { + "items": { + "properties": { + "day": { + "description": "The most recent daily bar for this ticker.", + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], + "type": "object" + }, + "fmv": { + "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.", + "format": "double", + "type": "number" + }, + "lastTrade": { + "allOf": [ + { + "description": "The most recent trade for this ticker." + }, + { + "properties": { + "c": { + "description": "The trade conditions.", + "items": { + "type": "integer" + }, + "type": "array" + }, + "i": { + "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n", + "type": "string" + }, + "p": { + "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n", + "format": "double", + "type": "number" + }, + "s": { + "description": "The size (volume) of the trade.", + "type": "number" + }, + "t": { + "description": "The millisecond accuracy timestamp. This is the timestamp of when the trade was generated at the exchange.", + "type": "integer" + }, + "x": { + "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n", + "type": "integer" + } + }, + "required": [ + "c", + "i", + "p", + "s", + "t", + "x" + ], + "type": "object" + } + ] + }, + "min": { + "description": "The most recent minute bar for this ticker.", + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw", + "t", + "n" + ], + "type": "object" + }, + "prevDay": { + "description": "The previous day's bar for this ticker.", + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], + "type": "object" + }, + "ticker": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "todaysChange": { + "description": "The value of the change from the previous day.", + "format": "double", + "type": "number" + }, + "todaysChangePerc": { + "description": "The percentage change since the previous day.", + "format": "double", + "type": "number" + }, + "updated": { + "description": "The last updated timestamp.", + "type": "integer" + } + }, + "required": [ + "day", + "lastTrade", + "min", + "prevDay", + "ticker", + "todaysChange", + "todaysChangePerc", + "updated" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + ] + } + }, + "text/csv": { + "example": "day_c,day_h,day_l,day_o,day_v,day_vw,lastTrade_c,lastTrade_i,lastTrade_p,lastTrade_s,lastTrade_t,lastTrade_x,day_c,day_h,day_l,day_o,day_v,day_vw,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n0.0374,0.062377,0.01162,0.044834,27313165.159427017,0,\"[2]\",517478762,0.0374,499,1604409649544,2,0.062377,0.062377,0.062377,0.062377,35420,0,0.01162,0.044834,0.01162,0.044834,53616273.36827199,0.0296\n", + "schema": { + "type": "string" + } + } + }, + "description": "Get the current gainers / losers of the day" + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "Gainers/Losers", + "tags": [ + "crypto:snapshot" + ], + "x-massive-entitlement-allowed-timeframes": [ + { + "description": "Real Time Data", + "name": "realtime" + }, + { + "description": "15 minute delayed data", + "name": "delayed" + } + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Crypto data", + "name": "crypto" + } + } + }, + "/v2/snapshot/locale/global/markets/forex/tickers": { + "get": { + "description": "Get the current minute, day, and previous day\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, C:EURUSD, C:GBPCAD, and C:AUDINR. Empty string defaults to querying all tickers.", + "in": "query", + "name": "tickers", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "status": "OK", + "tickers": [ + { + "day": { + "c": 0.11778221, + "h": 0.11812263, + "l": 0.11766631, + "o": 0.11797149, + "v": 77794 + }, + "lastQuote": { + "a": 0.11780678, + "b": 0.11777952, + "t": 1605280919000, + "x": 48 + }, + "min": { + "c": 0.117769, + "h": 0.11779633, + "l": 0.11773698, + "n": 1, + "o": 0.11778, + "t": 1684422000000, + "v": 202 + }, + "prevDay": { + "c": 0.11797258, + "h": 0.11797258, + "l": 0.11797149, + "o": 0.11797149, + "v": 2, + "vw": 0 + }, + "ticker": "C:HKDCHF", + "todaysChange": -0.00019306, + "todaysChangePerc": -0.1636482, + "updated": 1605280919000 + } + ] + }, + "schema": { + "allOf": [ + { + "properties": { + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" + }, + { + "properties": { + "tickers": { + "items": { + "properties": { + "day": { + "description": "The most recent daily bar for this ticker.", + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v" + ], + "type": "object" + }, + "fmv": { + "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.", + "format": "double", + "type": "number" + }, + "lastQuote": { + "description": "The most recent quote for this ticker.", + "properties": { + "a": { + "description": "The ask price.", + "format": "double", + "type": "number" + }, + "b": { + "description": "The bid price.", + "format": "double", + "type": "number" + }, + "t": { + "description": "The millisecond accuracy timestamp of the quote.", + "type": "integer" + }, + "x": { + "description": "The exchange ID on which this quote happened.", + "type": "integer" + } + }, + "required": [ + "a", + "b", + "t", + "x" + ], + "type": "object" + }, + "min": { + "description": "The most recent minute bar for this ticker.", + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "prevDay": { + "description": "The previous day's bar for this ticker.", + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], + "type": "object" + }, + "ticker": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "todaysChange": { + "description": "The value of the change from the previous day.", + "format": "double", + "type": "number" + }, + "todaysChangePerc": { + "description": "The percentage change since the previous day.", + "format": "double", + "type": "number" + }, + "updated": { + "description": "The last updated timestamp.", + "type": "integer" + } + }, + "required": [ + "day", + "lastQuote", + "min", + "prevDay", + "ticker", + "todaysChange", + "todaysChangePerc", + "updated" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + ] + } + }, + "text/csv": { + "example": "day_c,day_h,day_l,day_o,day_v,lastQuote_a,lastQuote_b,lastQuote_i,lastQuote_t,lastQuote_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n1.18403,1.1906,1.18001,1.18725,83578,1.18403,1.18398,0,1606163759000,48,1.18396,1.18423,1.1838,1.18404,41,1.18724,1.18727,1.18725,1.18725,5,0\n", + "schema": { + "type": "string" + } + } + }, + "description": "Get current state for all tickers" + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "All Tickers", + "tags": [ + "fx:snapshot" + ], + "x-massive-entitlement-allowed-timeframes": [ + { + "description": "Real Time Data", + "name": "realtime" + }, + { + "description": "15 minute delayed data", + "name": "delayed" + } + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Forex data", + "name": "fx" + } + } + }, + "/v2/snapshot/locale/global/markets/forex/tickers/{ticker}": { + "get": { + "description": "Get the current minute, day, and previous day\u2019s aggregate, as well as the last trade and quote for a single traded currency symbol.\n
\n
\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n", + "parameters": [ + { + "description": "The forex ticker.", + "example": "C:EURUSD", + "in": "path", + "name": "ticker", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "request_id": "ad76e76ce183002c5937a7f02dfebde4", + "status": "OK", + "ticker": { + "day": { + "c": 1.18403, + "h": 1.1906, + "l": 1.18001, + "o": 1.18725, + "v": 83578 + }, + "lastQuote": { + "a": 1.18403, + "b": 1.18398, + "i": 0, + "t": 1606163759000, + "x": 48 + }, + "min": { + "c": 1.18396, + "h": 1.18423, + "l": 1.1838, + "n": 85, + "o": 1.18404, + "t": 1684422000000, + "v": 41 + }, + "prevDay": { + "c": 1.18724, + "h": 1.18727, + "l": 1.18725, + "o": 1.18725, + "v": 5, + "vw": 0 + }, + "ticker": "C:EURUSD", + "todaysChange": -0.00316, + "todaysChangePerc": -0.27458312, + "updated": 1606163759000 + } + }, + "schema": { + "allOf": [ + { + "properties": { + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" + }, + { + "properties": { + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + } + }, + "required": [ + "request_id" + ], + "type": "object" + }, + { + "properties": { + "ticker": { + "properties": { + "day": { + "description": "The most recent daily bar for this ticker.", + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v" + ], + "type": "object" + }, + "fmv": { + "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.", + "format": "double", + "type": "number" + }, + "lastQuote": { + "description": "The most recent quote for this ticker.", + "properties": { + "a": { + "description": "The ask price.", + "format": "double", + "type": "number" + }, + "b": { + "description": "The bid price.", + "format": "double", + "type": "number" + }, + "t": { + "description": "The millisecond accuracy timestamp of the quote.", + "type": "integer" + }, + "x": { + "description": "The exchange ID on which this quote happened.", + "type": "integer" + } + }, + "required": [ + "a", + "b", + "t", + "x" + ], + "type": "object" + }, + "min": { + "description": "The most recent minute bar for this ticker.", + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "prevDay": { + "description": "The previous day's bar for this ticker.", + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], + "type": "object" + }, + "ticker": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "todaysChange": { + "description": "The value of the change from the previous day.", + "format": "double", + "type": "number" + }, + "todaysChangePerc": { + "description": "The percentage change since the previous day.", + "format": "double", + "type": "number" + }, + "updated": { + "description": "The last updated timestamp.", + "type": "integer" + } + }, + "required": [ + "day", + "lastQuote", + "min", + "prevDay", + "ticker", + "todaysChange", + "todaysChangePerc", + "updated" + ], + "type": "object" + } + }, + "type": "object" + } + ] + } + }, + "text/csv": { + "example": "day_c,day_h,day_l,day_o,day_v,lastQuote_a,lastQuote_b,lastQuote_i,lastQuote_t,lastQuote_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n1.18403,1.1906,1.18001,1.18725,83578,1.18403,1.18398,0,1606163759000,48,1.18396,1.18423,1.1838,1.18404,41,1.18724,1.18727,1.18725,1.18725,5,0\n", + "schema": { + "type": "string" + } + } + }, + "description": "Get current state for a ticker" + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "Ticker", + "tags": [ + "fx:snapshot" + ], + "x-massive-entitlement-allowed-timeframes": [ + { + "description": "Real Time Data", + "name": "realtime" + }, + { + "description": "15 minute delayed data", + "name": "delayed" + } + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Forex data", + "name": "fx" + } + } + }, + "/v2/snapshot/locale/global/markets/forex/{direction}": { + "get": { + "description": "Get the current top 20 gainers or losers of the day in forex markets.\n
\n
\nTop gainers are those tickers whose price has increased by the highest percentage since the previous day's close.\nTop losers are those tickers whose price has decreased by the highest percentage since the previous day's close.\n
\n
\nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n", + "parameters": [ + { + "description": "The direction of the snapshot results to return.\n", + "example": "gainers", + "in": "path", + "name": "direction", + "required": true, + "schema": { + "enum": [ + "gainers", + "losers" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "status": "OK", + "tickers": [ + { + "day": { + "c": 0.886156, + "h": 0.887111, + "l": 0.8825327, + "o": 0.8844732, + "v": 1041 + }, + "lastQuote": { + "a": 0.8879606, + "b": 0.886156, + "t": 1605283204000, + "x": 48 + }, + "min": { + "c": 0.886156, + "h": 0.886156, + "l": 0.886156, + "n": 1, + "o": 0.886156, + "t": 1684422000000, + "v": 1 + }, + "prevDay": { + "c": 0.8428527, + "h": 0.889773, + "l": 0.8428527, + "o": 0.8848539, + "v": 1078, + "vw": 0 + }, + "ticker": "C:PLNILS", + "todaysChange": 0.0433033, + "todaysChangePerc": 5.13770674, + "updated": 1605330008999 + } + ] + }, + "schema": { + "allOf": [ + { + "properties": { + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" + }, + { + "properties": { + "tickers": { + "items": { + "properties": { + "day": { + "description": "The most recent daily bar for this ticker.", + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v" + ], + "type": "object" + }, + "fmv": { + "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.", + "format": "double", + "type": "number" + }, + "lastQuote": { + "description": "The most recent quote for this ticker.", + "properties": { + "a": { + "description": "The ask price.", + "format": "double", + "type": "number" + }, + "b": { + "description": "The bid price.", + "format": "double", + "type": "number" + }, + "t": { + "description": "The millisecond accuracy timestamp of the quote.", + "type": "integer" + }, + "x": { + "description": "The exchange ID on which this quote happened.", + "type": "integer" + } + }, + "required": [ + "a", + "b", + "t", + "x" + ], + "type": "object" + }, + "min": { + "description": "The most recent minute bar for this ticker.", + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "prevDay": { + "description": "The previous day's bar for this ticker.", + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], + "type": "object" + }, + "ticker": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "todaysChange": { + "description": "The value of the change from the previous day.", + "format": "double", + "type": "number" + }, + "todaysChangePerc": { + "description": "The percentage change since the previous day.", + "format": "double", + "type": "number" + }, + "updated": { + "description": "The last updated timestamp.", + "type": "integer" + } + }, + "required": [ + "day", + "lastQuote", + "min", + "prevDay", + "ticker", + "todaysChange", + "todaysChangePerc", + "updated" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + ] + } + }, + "text/csv": { + "example": { + "tickers": "day_c,day_h,day_l,day_o,day_v,lastQuote_a,lastQuote_b,lastQuote_t,lastQuote_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n0.886156,0.887111,0.8825327,0.8844732,1041,0.8879606,0.886156,1605283204000,48,0.886156,0.886156,0.886156,0.886156,1,0.8428527,0.889773,0.8428527,0.8848539,1078,0\n" + }, + "schema": { + "type": "string" + } + } + }, + "description": "Get the current gainers / losers of the day" + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "Gainers/Losers", + "tags": [ + "fx:snapshot" + ], + "x-massive-entitlement-allowed-timeframes": [ + { + "description": "Real Time Data", + "name": "realtime" + }, + { + "description": "15 minute delayed data", + "name": "delayed" + } + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Forex data", + "name": "fx" + } + } + }, + "/v2/snapshot/locale/us/markets/stocks/tickers": { + "get": { + "description": "Get the most up-to-date market data for all traded stock symbols.\n
\n
\nNote: Snapshot data is cleared at 3:30am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n", + "parameters": [ + { + "description": "A case-sensitive comma separated list of tickers to get snapshots for. For example, AAPL,TSLA,GOOG. Empty string defaults to querying all tickers.", + "in": "query", + "name": "tickers", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + { + "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n", + "in": "query", + "name": "include_otc", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "count": 1, + "status": "OK", + "tickers": [ + { + "day": { + "c": 20.506, + "h": 20.64, + "l": 20.506, + "o": 20.64, + "v": 37216, + "vw": 20.616 + }, + "lastQuote": { + "P": 20.6, + "S": 22, + "p": 20.5, + "s": 13, + "t": 1605192959994246100 + }, + "lastTrade": { + "c": [ + 14, + 41 + ], + "i": "71675577320245", + "p": 20.506, + "s": 2416, + "t": 1605192894630916600, + "x": 4 + }, + "min": { + "av": 37216, + "c": 20.506, + "h": 20.506, + "l": 20.506, + "n": 1, + "o": 20.506, + "t": 1684428600000, + "v": 5000, + "vw": 20.5105 + }, + "prevDay": { + "c": 20.63, + "h": 21, + "l": 20.5, + "o": 20.79, + "v": 292738, + "vw": 20.6939 + }, + "ticker": "BCAT", + "todaysChange": -0.124, + "todaysChangePerc": -0.601, + "updated": 1605192894630916600 + } + ] + }, + "schema": { + "allOf": [ + { + "properties": { + "count": { + "description": "The total number of results for this request.", + "type": "integer" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" + }, + { + "properties": { + "tickers": { + "items": { + "properties": { + "day": { + "description": "The most recent daily bar for this ticker.", + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], + "type": "object" + }, + "fmv": { + "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.", + "format": "double", + "type": "number" + }, + "lastQuote": { + "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.", + "properties": { + "P": { + "description": "The ask price.", + "format": "double", + "type": "number" + }, + "S": { + "description": "The ask size in lots.", + "type": "integer" + }, + "p": { + "description": "The bid price.", + "format": "double", + "type": "number" + }, + "s": { + "description": "The bid size in lots.", + "type": "integer" + }, + "t": { + "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.", + "type": "integer" + } + }, + "required": [ + "p", + "s", + "P", + "S", + "t" + ], + "type": "object" + }, + "lastTrade": { + "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.", + "properties": { + "c": { + "description": "The trade conditions.", + "items": { + "type": "integer" + }, + "type": "array" + }, + "i": { + "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n", + "type": "string" + }, + "p": { + "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n", + "format": "double", + "type": "number" + }, + "s": { + "description": "The size (volume) of the trade.", + "type": "integer" + }, + "t": { + "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.", + "type": "integer" + }, + "x": { + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", + "type": "integer" + } + }, + "required": [ + "c", + "i", + "p", + "s", + "t", + "x" + ], + "type": "object" + }, + "min": { + "description": "The most recent minute bar for this ticker.", + "properties": { + "av": { + "description": "The accumulated volume.", + "type": "integer" + }, + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "av", + "o", + "h", + "l", + "c", + "v", + "vw", + "t", + "n" + ], + "type": "object" + }, + "prevDay": { + "description": "The previous day's bar for this ticker.", + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], + "type": "object" + }, + "ticker": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "todaysChange": { + "description": "The value of the change from the previous day.", + "format": "double", + "type": "number" + }, + "todaysChangePerc": { + "description": "The percentage change since the previous day.", + "format": "double", + "type": "number" + }, + "updated": { + "description": "The last updated timestamp.", + "type": "integer" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + ] + } + }, + "text/csv": { + "example": "day_c,day_h,day_l,day_o,day_v,lastQuote_a,lastQuote_b,lastQuote_i,lastQuote_t,lastQuote_x,lastTrade_c,lastTrade_i,lastTrade_p,lastTrade_s,lastTrade_t,lastTrade_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n120.4229,120.53,118.81,119.62,28727868,119.725,120.47,4,120.46,8,1605195918507251817,\"[14,41]\",4046,120.47,236,1605195918306274031,10,28724441,120.4201,120.468,120.37,120.435,270796,120.4129,119.49,119.63,116.44,117.19,110597265,118.4998\n", + "schema": { + "type": "string" + } + } + }, + "description": "Get current state for all tickers" + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "All Tickers", + "tags": [ + "stocks:snapshot" + ], + "x-massive-entitlement-allowed-timeframes": [ + { + "description": "Real Time Data", + "name": "realtime" + }, + { + "description": "15 minute delayed data", + "name": "delayed" + } + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Stocks data", + "name": "stocks" + } + } + }, + "/v2/snapshot/locale/us/markets/stocks/tickers/{stocksTicker}": { + "get": { + "description": "Get the most up-to-date market data for a single traded stock ticker.\n
\n
\nNote: Snapshot data is cleared at 3:30am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n", + "parameters": [ + { + "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.", + "example": "AAPL", + "in": "path", + "name": "stocksTicker", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "request_id": "657e430f1ae768891f018e08e03598d8", + "status": "OK", + "ticker": { + "day": { + "c": 120.4229, + "h": 120.53, + "l": 118.81, + "o": 119.62, + "v": 28727868, + "vw": 119.725 + }, + "lastQuote": { + "P": 120.47, + "S": 4, + "p": 120.46, + "s": 8, + "t": 1605195918507251700 + }, + "lastTrade": { + "c": [ + 14, + 41 + ], + "i": "4046", + "p": 120.47, + "s": 236, + "t": 1605195918306274000, + "x": 10 + }, + "min": { + "av": 28724441, + "c": 120.4201, + "h": 120.468, + "l": 120.37, + "n": 762, + "o": 120.435, + "t": 1684428720000, + "v": 270796, + "vw": 120.4129 + }, + "prevDay": { + "c": 119.49, + "h": 119.63, + "l": 116.44, + "o": 117.19, + "v": 110597265, + "vw": 118.4998 + }, + "ticker": "AAPL", + "todaysChange": 0.98, + "todaysChangePerc": 0.82, + "updated": 1605195918306274000 + } + }, + "schema": { + "allOf": [ + { + "properties": { + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" + }, + { + "properties": { + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + } + }, + "required": [ + "request_id" + ], + "type": "object" + }, + { + "properties": { + "ticker": { + "properties": { + "day": { + "description": "The most recent daily bar for this ticker.", + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], + "type": "object" + }, + "fmv": { + "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.", + "format": "double", + "type": "number" + }, + "lastQuote": { + "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.", + "properties": { + "P": { + "description": "The ask price.", + "format": "double", + "type": "number" + }, + "S": { + "description": "The ask size in lots.", + "type": "integer" + }, + "p": { + "description": "The bid price.", + "format": "double", + "type": "number" + }, + "s": { + "description": "The bid size in lots.", + "type": "integer" + }, + "t": { + "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.", + "type": "integer" + } + }, + "required": [ + "p", + "s", + "P", + "S", + "t" + ], + "type": "object" + }, + "lastTrade": { + "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.", + "properties": { + "c": { + "description": "The trade conditions.", + "items": { + "type": "integer" + }, + "type": "array" + }, + "i": { + "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n", + "type": "string" + }, + "p": { + "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n", + "format": "double", + "type": "number" + }, + "s": { + "description": "The size (volume) of the trade.", + "type": "integer" + }, + "t": { + "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.", + "type": "integer" + }, + "x": { + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", + "type": "integer" + } + }, + "required": [ + "c", + "i", + "p", + "s", + "t", + "x" + ], + "type": "object" + }, + "min": { + "description": "The most recent minute bar for this ticker.", + "properties": { + "av": { + "description": "The accumulated volume.", + "type": "integer" + }, + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "av", + "o", + "h", + "l", + "c", + "v", + "vw", + "t", + "n" + ], + "type": "object" + }, + "prevDay": { + "description": "The previous day's bar for this ticker.", + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", "format": "double", "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], + "type": "object" + }, + "ticker": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "todaysChange": { + "description": "The value of the change from the previous day.", + "format": "double", + "type": "number" + }, + "todaysChangePerc": { + "description": "The percentage change since the previous day.", + "format": "double", + "type": "number" + }, + "updated": { + "description": "The last updated timestamp.", + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object" + } + ] + } + }, + "text/csv": { + "example": "day_c,day_h,day_l,day_o,day_v,lastQuote_a,lastQuote_b,lastQuote_i,lastQuote_t,lastQuote_x,lastTrade_c,lastTrade_i,lastTrade_p,lastTrade_s,lastTrade_t,lastTrade_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n120.4229,120.53,118.81,119.62,28727868,119.725,120.47,4,120.46,8,1605195918507251817,\"[14,41]\",4046,120.47,236,1605195918306274031,10,28724441,120.4201,120.468,120.37,120.435,270796,120.4129,119.49,119.63,116.44,117.19,110597265,118.4998\n", + "schema": { + "type": "string" + } + } + }, + "description": "Get current state for a ticker" + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "Ticker", + "tags": [ + "stocks:snapshot" + ], + "x-massive-entitlement-allowed-timeframes": [ + { + "description": "Real Time Data", + "name": "realtime" + }, + { + "description": "15 minute delayed data", + "name": "delayed" + } + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Stocks data", + "name": "stocks" + } + } + }, + "/v2/snapshot/locale/us/markets/stocks/{direction}": { + "get": { + "description": "Get the most up-to-date market data for the current top 20 gainers or losers of the day in the stocks/equities markets.\n
\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", + "example": "gainers", + "in": "path", + "name": "direction", + "required": true, + "schema": { + "enum": [ + "gainers", + "losers" + ], + "type": "string" + } + }, + { + "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n", + "in": "query", + "name": "include_otc", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "status": "OK", + "tickers": [ + { + "day": { + "c": 14.2284, + "h": 15.09, + "l": 14.2, + "o": 14.33, + "v": 133963, + "vw": 14.5311 + }, + "lastQuote": { + "P": 14.44, + "S": 11, + "p": 14.2, + "s": 25, + "t": 1605195929997325600 + }, + "lastTrade": { + "c": [ + 63 + ], + "i": "79372124707124", + "p": 14.2284, + "s": 536, + "t": 1605195848258266000, + "x": 4 + }, + "min": { + "av": 133963, + "c": 14.2284, + "h": 14.325, + "l": 14.2, + "n": 5, + "o": 14.28, + "t": 1684428600000, + "v": 6108, + "vw": 14.2426 + }, + "prevDay": { + "c": 0.73, + "h": 0.799, + "l": 0.73, + "o": 0.75, + "v": 1568097, + "vw": 0.7721 + }, + "ticker": "PDS", + "todaysChange": 13.498, + "todaysChangePerc": 1849.096, + "updated": 1605195848258266000 + } + ] + }, + "schema": { + "allOf": [ + { + "properties": { + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" + }, + { + "properties": { + "tickers": { + "items": { + "properties": { + "day": { + "description": "The most recent daily bar for this ticker.", + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], + "type": "object" + }, + "fmv": { + "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.", + "format": "double", + "type": "number" + }, + "lastQuote": { + "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.", + "properties": { + "P": { + "description": "The ask price.", + "format": "double", + "type": "number" + }, + "S": { + "description": "The ask size in lots.", + "type": "integer" + }, + "p": { + "description": "The bid price.", + "format": "double", + "type": "number" + }, + "s": { + "description": "The bid size in lots.", + "type": "integer" + }, + "t": { + "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.", + "type": "integer" + } + }, + "required": [ + "p", + "s", + "P", + "S", + "t" + ], + "type": "object" + }, + "lastTrade": { + "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.", + "properties": { + "c": { + "description": "The trade conditions.", + "items": { + "type": "integer" + }, + "type": "array" + }, + "i": { + "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n", + "type": "string" + }, + "p": { + "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n", + "format": "double", + "type": "number" + }, + "s": { + "description": "The size (volume) of the trade.", + "type": "integer" + }, + "t": { + "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.", + "type": "integer" + }, + "x": { + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", + "type": "integer" + } + }, + "required": [ + "c", + "i", + "p", + "s", + "t", + "x" + ], + "type": "object" + }, + "min": { + "description": "The most recent minute bar for this ticker.", + "properties": { + "av": { + "description": "The accumulated volume.", + "type": "integer" + }, + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "n": { + "description": "The number of transactions in the aggregate window.", + "type": "integer" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "t": { + "description": "The Unix Msec timestamp for the start of the aggregate window.", + "type": "integer" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "av", + "o", + "h", + "l", + "c", + "v", + "vw", + "t", + "n" + ], + "type": "object" + }, + "prevDay": { + "description": "The previous day's bar for this ticker.", + "properties": { + "c": { + "description": "The close price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "h": { + "description": "The highest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "l": { + "description": "The lowest price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "o": { + "description": "The open price for the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "otc": { + "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "type": "boolean" + }, + "v": { + "description": "The trading volume of the symbol in the given time period.", + "format": "double", + "type": "number" + }, + "vw": { + "description": "The volume weighted average price.", + "format": "double", + "type": "number" + } + }, + "required": [ + "o", + "h", + "l", + "c", + "v", + "vw" + ], + "type": "object" + }, + "ticker": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "todaysChange": { + "description": "The value of the change from the previous day.", + "format": "double", + "type": "number" + }, + "todaysChangePerc": { + "description": "The percentage change since the previous day.", + "format": "double", + "type": "number" + }, + "updated": { + "description": "The last updated timestamp.", + "type": "integer" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + ] + } + }, + "text/csv": { + "example": "day_c,day_h,day_l,day_o,day_v,day_vw,lastQuote_P,lastQuote_S,lastQuote_p,lastQuote_s,lastQuote_t,lastTrade_c,lastTrade_i,lastTrade_p,lastTrade_s,lastTrade_t,lastTrade_x,min_av,min_c,min_h,min_l,min_o,min_v,min_vw,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n14.2284,15.09,14.2,14.33,133963,14.5311,14.44,11,14.2,25,1605195929997325568,\"[63]\",79372124707124,14.2284,536,1605195848258266112,4,133963,14.2284,14.325,14.2,14.28,6108,14.2426,0.73,0.799,0.73,0.75,1568097,0.7721\n", + "schema": { + "type": "string" + } + } + }, + "description": "Get the current tickers of the day" + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "Gainers/Losers", + "tags": [ + "stocks:snapshot" + ], + "x-massive-entitlement-allowed-timeframes": [ + { + "description": "Real Time Data", + "name": "realtime" + }, + { + "description": "15 minute delayed data", + "name": "delayed" + } + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Stocks data", + "name": "stocks" + } + } + }, + "/v2/ticks/stocks/nbbo/{ticker}/{date}": { + "get": { + "description": "Get NBBO quotes for a given ticker symbol on a specified date.\n", + "parameters": [ + { + "description": "The ticker symbol we want quotes for.", + "example": "AAPL", + "in": "path", + "name": "ticker", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The date/day of the quotes to retrieve in the format YYYY-MM-DD.", + "example": "2020-10-14", + "in": "path", + "name": "date", + "required": true, + "schema": { + "format": "date", + "type": "string" + } + }, + { + "description": "The timestamp offset, used for pagination. This is the offset at which to start the results. Using the `timestamp` of the last result as the offset will give you the next page of results.\n", + "in": "query", + "name": "timestamp", + "schema": { + "type": "integer" + } + }, + { + "description": "The maximum timestamp allowed in the results.\n", + "in": "query", + "name": "timestampLimit", + "schema": { + "type": "integer" + } + }, + { + "description": "Reverse the order of the results.\n", + "example": true, + "in": "query", + "name": "reverse", + "schema": { + "type": "boolean" + } + }, + { + "description": "Limit the size of the response, max 50000 and default 5000.", + "example": 10, + "in": "query", + "name": "limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "db_latency": 43, + "map": { + "P": { + "name": "ask_price", + "type": "float64" + }, + "S": { + "name": "ask_size", + "type": "int" + }, + "X": { + "name": "ask_exchange", + "type": "int" + }, + "c": { + "name": "conditions", + "type": "int" + }, + "f": { + "name": "trf_timestamp", + "type": "int64" + }, + "i": { + "name": "indicators", + "type": "int" + }, + "p": { + "name": "bid_price", + "type": "float64" + }, + "q": { + "name": "sequence_number", + "type": "int" + }, + "s": { + "name": "bid_size", + "type": "int" + }, + "t": { + "name": "sip_timestamp", + "type": "int64" + }, + "x": { + "name": "bid_exchange", + "type": "int" + }, + "y": { + "name": "participant_timestamp", + "type": "int64" + }, + "z": { + "name": "tape", + "type": "int" + } + }, + "results": [ + { + "P": 0, + "S": 0, + "X": 0, + "c": [ + 1 + ], + "p": 102.7, + "q": 2060, + "s": 60, + "t": 1517562000065700400, + "x": 11, + "y": 1517562000065321200, + "z": 3 + }, + { + "P": 0, + "S": 0, + "X": 0, + "c": [ + 1 + ], + "p": 170, + "q": 2061, + "s": 2, + "t": 1517562000065791500, + "x": 11, + "y": 1517562000065408300, + "z": 3 + } + ], + "results_count": 2, + "success": true, + "ticker": "AAPL" + }, + "schema": { + "allOf": [ + { + "properties": { + "db_latency": { + "description": "Latency in milliseconds for the query results from the database.", + "type": "integer" + }, + "results_count": { + "description": "The total number of results for this request.", + "type": "integer" + }, + "success": { + "description": "Whether or not this query was executed successfully.", + "type": "boolean" + }, + "ticker": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + } + }, + "type": "object" + }, + { + "properties": { + "results": { + "items": { + "allOf": [ + { + "properties": { + "T": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "f": { + "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.", + "type": "integer" + }, + "q": { + "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n", + "format": "int64", + "type": "integer" + }, + "t": { + "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.", + "type": "integer" + }, + "y": { + "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.", + "type": "integer" + } + }, + "required": [ + "T", + "t", + "y", + "f", + "q" + ], + "type": "object" + }, + { + "properties": { + "P": { + "description": "The ask price.", + "format": "double", + "type": "number" + }, + "S": { + "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.", + "type": "integer" + }, + "X": { + "allOf": [ + { + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", + "type": "integer" + }, + { + "description": "Ask Exchange Id" + } + ] + }, + "c": { + "description": "A list of condition codes.\n", + "items": { + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", + "type": "integer" + }, + "type": "array" + }, + "i": { + "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://massive.com/glossary/us/stocks/conditions-indicators).\n", + "items": { + "description": "The indicator code.\n", + "type": "integer" + }, + "type": "array" + }, + "p": { + "description": "The bid price.", + "format": "double", + "type": "number" + }, + "s": { + "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.", + "type": "integer" + }, + "x": { + "allOf": [ + { + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", + "type": "integer" + }, + { + "description": "Bid Exchange Id" + } + ] + }, + "z": { + "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n", + "type": "integer" + } + }, + "required": [ + "c", + "i", + "p", + "s", + "x", + "P", + "S", + "X", + "z" + ], + "type": "object" + } + ] + }, + "type": "array" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "A list of quotes." + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "Quotes (NBBO)", + "tags": [ + "stocks:quotes" + ], + "x-massive-deprecation": { + "date": 1654056060000, + "replaces": { + "name": "Quotes (NBBO) v3", + "path": "get_v3_quotes__stockticker" + } + }, + "x-massive-entitlement-data-type": { + "description": "NBBO data", + "name": "nbbo" + }, + "x-massive-entitlement-market-type": { + "description": "Stocks data", + "name": "stocks" + } + } + }, + "/v2/ticks/stocks/trades/{ticker}/{date}": { + "get": { + "description": "Get trades for a given ticker symbol on a specified date.\n", + "parameters": [ + { + "description": "The ticker symbol we want trades for.", + "example": "AAPL", + "in": "path", + "name": "ticker", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The date/day of the trades to retrieve in the format YYYY-MM-DD.", + "example": "2020-10-14", + "in": "path", + "name": "date", + "required": true, + "schema": { + "format": "date", + "type": "string" + } + }, + { + "description": "The timestamp offset, used for pagination. This is the offset at which to start the results. Using the `timestamp` of the last result as the offset will give you the next page of results.\n", + "in": "query", + "name": "timestamp", + "schema": { + "type": "integer" + } + }, + { + "description": "The maximum timestamp allowed in the results.\n", + "in": "query", + "name": "timestampLimit", + "schema": { + "type": "integer" + } + }, + { + "description": "Reverse the order of the results.\n", + "example": true, + "in": "query", + "name": "reverse", + "schema": { + "type": "boolean" + } + }, + { + "description": "Limit the size of the response, max 50000 and default 5000.", + "example": 10, + "in": "query", + "name": "limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "db_latency": 11, + "map": { + "I": { + "name": "orig_id", + "type": "string" + }, + "c": { + "name": "conditions", + "type": "int" + }, + "e": { + "name": "correction", + "type": "int" + }, + "f": { + "name": "trf_timestamp", + "type": "int64" + }, + "i": { + "name": "id", + "type": "string" + }, + "p": { + "name": "price", + "type": "float64" + }, + "q": { + "name": "sequence_number", + "type": "int64" + }, + "r": { + "name": "trf_id", + "type": "int" + }, + "s": { + "name": "size", + "type": "int" + }, + "t": { + "name": "sip_timestamp", + "type": "int64" + }, + "x": { + "name": "exchange", + "type": "int" + }, + "y": { + "name": "participant_timestamp", + "type": "int64" + }, + "z": { + "name": "tape", + "type": "int" + } + }, + "results": [ + { + "c": [ + 12, + 41 + ], + "i": "1", + "p": 171.55, + "q": 1063, + "s": 100, + "t": 1517562000016036600, + "x": 11, + "y": 1517562000015577000, + "z": 3 + }, + { + "c": [ + 12, + 41 + ], + "i": "2", + "p": 171.55, + "q": 1064, + "s": 100, + "t": 1517562000016038100, + "x": 11, + "y": 1517562000015577600, + "z": 3 + } + ], + "results_count": 2, + "success": true, + "ticker": "AAPL" + }, + "schema": { + "allOf": [ + { + "properties": { + "db_latency": { + "description": "Latency in milliseconds for the query results from the database.", + "type": "integer" + }, + "results_count": { + "description": "The total number of results for this request.", + "type": "integer" + }, + "success": { + "description": "Whether or not this query was executed successfully.", + "type": "boolean" + }, + "ticker": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + } + }, + "type": "object" + }, + { + "properties": { + "results": { + "items": { + "allOf": [ + { + "properties": { + "T": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "f": { + "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.", + "type": "integer" + }, + "q": { + "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n", + "format": "int64", + "type": "integer" + }, + "t": { + "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.", + "type": "integer" + }, + "y": { + "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.", + "type": "integer" + } }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" - } + "required": [ + "T", + "t", + "y", + "f", + "q" + ], + "type": "object" }, - "type": "object" - }, - "ticker": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - }, - "todaysChange": { - "description": "The value of the change the from previous day.", - "format": "double", - "type": "number" - }, - "todaysChangePerc": { - "description": "The percentage change since the previous day.", - "format": "double", - "type": "number" + { + "properties": { + "c": { + "description": "A list of condition codes.\n", + "items": { + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", + "type": "integer" + }, + "type": "array" + }, + "e": { + "description": "The trade correction indicator.\n", + "type": "integer" + }, + "i": { + "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n", + "type": "string" + }, + "p": { + "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n", + "format": "double", + "type": "number" + }, + "r": { + "description": "The ID for the Trade Reporting Facility where the trade took place.\n", + "type": "integer" + }, + "s": { + "description": "The size of a trade (also known as volume).\n", + "format": "double", + "type": "number" + }, + "x": { + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", + "type": "integer" + }, + "z": { + "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n", + "type": "integer" + } + }, + "required": [ + "c", + "i", + "p", + "s", + "e", + "x", + "r", + "z" + ], + "type": "object" + } + ] + }, + "type": "array" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "A list of trades." + }, + "default": { + "description": "Unexpected error" + } + }, + "summary": "Trades", + "tags": [ + "stocks:trades" + ], + "x-massive-deprecation": { + "date": 1654056060000, + "replaces": { + "name": "Trades v3", + "path": "get_v3_trades__stockticker" + } + }, + "x-massive-entitlement-data-type": { + "description": "Trade data", + "name": "trades" + }, + "x-massive-entitlement-market-type": { + "description": "Stocks data", + "name": "stocks" + } + } + }, + "/v3/quotes/{fxTicker}": { + "get": { + "description": "Get BBO quotes for a ticker symbol in a given time range.", + "operationId": "QuotesFx", + "parameters": [ + { + "description": "The ticker symbol to get quotes for.", + "example": "C:EUR-USD", + "in": "path", + "name": "fxTicker", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.", + "in": "query", + "name": "timestamp", + "schema": { + "type": "string" + }, + "x-massive-filter-field": { + "range": true + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gt", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lt", + "schema": { + "type": "string" + } + }, + { + "description": "Order results based on the `sort` field.", + "in": "query", + "name": "order", + "schema": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "example": "asc", + "type": "string" + } + }, + { + "description": "Limit the number of results returned, default is 1000 and max is 50000.", + "in": "query", + "name": "limit", + "schema": { + "default": 1000, + "example": 10, + "maximum": 50000, + "minimum": 1, + "type": "integer" + } + }, + { + "description": "Sort field used for ordering.", + "in": "query", + "name": "sort", + "schema": { + "default": "timestamp", + "enum": [ + "timestamp" + ], + "example": "timestamp", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "next_url": "https://api.massive.com/v3/quotes/C:EUR-USD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", + "results": [ + { + "ask_exchange": 48, + "ask_price": 1.18565, + "bid_exchange": 48, + "bid_price": 1.18558, + "participant_timestamp": 1625097600000000000 + }, + { + "ask_exchange": 48, + "ask_price": 1.18565, + "bid_exchange": 48, + "bid_price": 1.18559, + "participant_timestamp": 1625097600000000000 + } + ], + "status": "OK" + }, + "schema": { + "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" + }, + "results": { + "items": { + "properties": { + "ask_exchange": { + "description": "The ask exchange ID", + "type": "integer" + }, + "ask_price": { + "description": "The ask price.", + "format": "double", + "type": "number" + }, + "bid_exchange": { + "description": "The bid exchange ID", + "type": "integer" + }, + "bid_price": { + "description": "The bid price.", + "format": "double", + "type": "number" + }, + "participant_timestamp": { + "description": "The nanosecond Exchange Unix Timestamp. This is the timestamp of when the quote was generated at the exchange.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "INanoseconds", + "path": "github.com/massive-com/ptime" + } + } + }, + "required": [ + "participant_timestamp" + ], + "type": "object" + }, + "type": "array" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" + } + }, + "text/csv": { + "example": "ask_exchange,ask_price,bid_exchange,bid_price,participant_timestamp\n48,,1.18565,,48,,1.18558,,1625097600000000000\n48,,1.18565,,48,,1.18559,,1625097600000000000\n", + "schema": { + "type": "string" + } + } + }, + "description": "A list of quotes." + } + }, + "summary": "Quotes (BBO)", + "tags": [ + "fx:quotes" + ], + "x-massive-entitlement-data-type": { + "description": "NBBO data", + "name": "nbbo" + }, + "x-massive-entitlement-market-type": { + "description": "Forex data", + "name": "fx" + }, + "x-massive-paginate": { + "limit": { + "default": 1000, + "example": 10, + "max": 50000 + }, + "order": { + "default": "desc" + }, + "sort": { + "default": "timestamp", + "enum": [ + "timestamp" + ] + } + }, + "x-massive-replaces": { + "date": 1654056060000, + "replaces": { + "name": "Historic Forex Ticks", + "path": "get_v1_historic_forex__from___to___date" + } + } + }, + "x-massive-ignore": true + }, + "/v3/quotes/{optionsTicker}": { + "get": { + "description": "Get quotes for an options ticker symbol in a given time range.", + "operationId": "QuotesOptions", + "parameters": [ + { + "description": "The ticker symbol to get quotes for.", + "example": "O:SPY241220P00720000", + "in": "path", + "name": "optionsTicker", + "required": true, + "schema": { + "type": "string" + }, + "x-massive-go-id": "Ticker" + }, + { + "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.", + "in": "query", + "name": "timestamp", + "schema": { + "type": "string" + }, + "x-massive-filter-field": { + "range": true + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gt", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lt", + "schema": { + "type": "string" + } + }, + { + "description": "Order results based on the `sort` field.", + "in": "query", + "name": "order", + "schema": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "example": "asc", + "type": "string" + } + }, + { + "description": "Limit the number of results returned, default is 1000 and max is 50000.", + "in": "query", + "name": "limit", + "schema": { + "default": 1000, + "example": 10, + "maximum": 50000, + "minimum": 1, + "type": "integer" + } + }, + { + "description": "Sort field used for ordering.", + "in": "query", + "name": "sort", + "schema": { + "default": "timestamp", + "enum": [ + "timestamp" + ], + "example": "timestamp", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "next_url": "https://api.massive.com/v3/quotes/O:SPY241220P00720000?cursor=YXA9NzY5Nzg0NzAxJmFzPSZsaW1pdD0xMCZvcmRlcj1kZXNjJnNvcnQ9dGltZXN0YW1wJnRpbWVzdGFtcC5sdGU9MjAyMi0wMi0xN1QxNyUzQTI1JTNBMTMuMDA5MzU2MDMyWg", + "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", + "results": [ + { + "ask_exchange": 323, + "ask_price": 282, + "ask_size": 10, + "bid_exchange": 316, + "bid_price": 277.5, + "bid_size": 1, + "sequence_number": 789539218, + "sip_timestamp": 1645119125346243600 + }, + { + "ask_exchange": 301, + "ask_price": 282, + "ask_size": 1, + "bid_exchange": 323, + "bid_price": 277.5, + "bid_size": 10, + "sequence_number": 788994206, + "sip_timestamp": 1645119118474271000 + } + ], + "status": "OK" + }, + "schema": { + "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" + }, + "results": { + "items": { + "properties": { + "ask_exchange": { + "description": "The ask exchange ID", + "type": "integer" + }, + "ask_price": { + "description": "The ask price.", + "format": "double", + "type": "number" + }, + "ask_size": { + "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.", + "format": "double", + "type": "number" + }, + "bid_exchange": { + "description": "The bid exchange ID", + "type": "integer" + }, + "bid_price": { + "description": "The bid price.", + "format": "double", + "type": "number" + }, + "bid_size": { + "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.", + "format": "double", + "type": "number" + }, + "sequence_number": { + "description": "The sequence number represents the sequence in which quote events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).", + "format": "int64", + "type": "integer" + }, + "sip_timestamp": { + "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this quote from the exchange which produced it.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "INanoseconds", + "path": "github.com/massive-com/ptime" + } + } + }, + "required": [ + "sip_timestamp", + "sequence_number" + ], + "type": "object" + }, + "type": "array" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" + } + }, + "text/csv": { + "example": "ask_exchange,ask_price,ask_size,bid_exchange,bid_price,bid_size,sequence_number,sip_timestamp\n323,282,10,316,277.5,1,789539218,1645119125346243600\n301,282,1,323,277.5,10,788994206,1645119118474271000\n", + "schema": { + "type": "string" + } + } + }, + "description": "A list of quotes." + } + }, + "summary": "Quotes", + "tags": [ + "options:quotes" + ], + "x-massive-entitlement-data-type": { + "description": "NBBO data", + "name": "nbbo" + }, + "x-massive-entitlement-market-type": { + "description": "Options data", + "name": "options" + }, + "x-massive-paginate": { + "limit": { + "default": 1000, + "example": 10, + "max": 50000 + }, + "order": { + "default": "desc" + }, + "sort": { + "default": "timestamp", + "enum": [ + "timestamp" + ] + } + } + }, + "x-massive-ignore": true + }, + "/v3/quotes/{stockTicker}": { + "get": { + "description": "Get NBBO quotes for a ticker symbol in a given time range.", + "operationId": "Quotes", + "parameters": [ + { + "description": "The ticker symbol to get quotes for.", + "example": "AAPL", + "in": "path", + "name": "stockTicker", + "required": true, + "schema": { + "type": "string" + }, + "x-massive-go-id": "Ticker" + }, + { + "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.", + "in": "query", + "name": "timestamp", + "schema": { + "type": "string" + }, + "x-massive-filter-field": { + "range": true + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gt", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lt", + "schema": { + "type": "string" + } + }, + { + "description": "Order results based on the `sort` field.", + "in": "query", + "name": "order", + "schema": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "example": "asc", + "type": "string" + } + }, + { + "description": "Limit the number of results returned, default is 1000 and max is 50000.", + "in": "query", + "name": "limit", + "schema": { + "default": 1000, + "example": 10, + "maximum": 50000, + "minimum": 1, + "type": "integer" + } + }, + { + "description": "Sort field used for ordering.", + "in": "query", + "name": "sort", + "schema": { + "default": "timestamp", + "enum": [ + "timestamp" + ], + "example": "timestamp", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "next_url": "https://api.massive.com/v3/quotes/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", + "results": [ + { + "ask_exchange": 0, + "ask_price": 0, + "ask_size": 0, + "bid_exchange": 11, + "bid_price": 102.7, + "bid_size": 60, + "conditions": [ + 1 + ], + "participant_timestamp": 1517562000065321200, + "sequence_number": 2060, + "sip_timestamp": 1517562000065700400, + "tape": 3 + }, + { + "ask_exchange": 0, + "ask_price": 0, + "ask_size": 0, + "bid_exchange": 11, + "bid_price": 170, + "bid_size": 2, + "conditions": [ + 1 + ], + "participant_timestamp": 1517562000065408300, + "sequence_number": 2061, + "sip_timestamp": 1517562000065791500, + "tape": 3 + } + ], + "status": "OK" + }, + "schema": { + "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" + }, + "results": { + "items": { + "properties": { + "ask_exchange": { + "description": "The ask exchange ID", + "type": "integer" + }, + "ask_price": { + "description": "The ask price.", + "format": "double", + "type": "number" + }, + "ask_size": { + "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.", + "format": "double", + "type": "number" + }, + "bid_exchange": { + "description": "The bid exchange ID", + "type": "integer" + }, + "bid_price": { + "description": "The bid price.", + "format": "double", + "type": "number" + }, + "bid_size": { + "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.", + "format": "double", + "type": "number" + }, + "conditions": { + "description": "A list of condition codes.", + "items": { + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.", + "format": "int32", + "type": "integer" }, - "updated": { - "description": "The last updated timestamp.", + "type": "array", + "x-massive-go-type": { + "name": "Int32Array" + } + }, + "indicators": { + "description": "A list of indicator codes.", + "items": { + "description": "The indicator codes. For more information, see our glossary of [Conditions and\nIndicators](https://massive.com/glossary/us/stocks/conditions-indicators).", + "format": "int32", "type": "integer" + }, + "type": "array", + "x-massive-go-type": { + "name": "Int32Array" } }, - "type": "object" + "participant_timestamp": { + "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "INanoseconds", + "path": "github.com/massive-com/ptime" + } + }, + "sequence_number": { + "description": "The sequence number represents the sequence in which quote events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11). Values reset after each trading session/day.", + "format": "int64", + "type": "integer" + }, + "sip_timestamp": { + "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this quote from the exchange which produced it.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "INanoseconds", + "path": "github.com/massive-com/ptime" + } + }, + "tape": { + "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ", + "format": "int32", + "type": "integer" + }, + "trf_timestamp": { + "description": "The nanosecond accuracy TRF (Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this quote.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "INanoseconds", + "path": "github.com/massive-com/ptime" + } + } + }, + "required": [ + "participant_timestamp", + "sequence_number", + "sip_timestamp" + ], + "type": "object", + "x-massive-go-type": { + "name": "CommonQuote" } }, - "type": "object" + "type": "array" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" } - ] + }, + "required": [ + "status" + ], + "type": "object" } - } - }, - "description": "Get current state for a ticker" - }, - "default": { - "description": "Unexpected error" + }, + "text/csv": { + "example": "ask_exchange,ask_price,ask_size,bid_exchange,bid_price,bid_size,conditions,participant_timestamp,sequence_number,sip_timestamp,tape\n0,0,0,11,102.7,60,1,1517562000065321216,2060,1517562000065700260,3\n0,0,0,11,170,2,1,1517562000065408256,2061,1517562000065791515,3\n", + "schema": { + "type": "string" + } + } + }, + "description": "A list of quotes." } }, - "summary": "Ticker", + "summary": "Quotes (NBBO)", "tags": [ - "stocks:snapshot" - ], - "x-polygon-entitlement-allowed-timeframes": [ - { - "description": "Real Time Data", - "name": "realtime" - }, - { - "description": "15 minute delayed data", - "name": "delayed" - } + "stocks:quotes" ], - "x-polygon-entitlement-data-type": { - "description": "Aggregate data", - "name": "aggregates" + "x-massive-entitlement-data-type": { + "description": "NBBO data", + "name": "nbbo" }, - "x-polygon-entitlement-market-type": { + "x-massive-entitlement-market-type": { "description": "Stocks data", "name": "stocks" + }, + "x-massive-paginate": { + "limit": { + "default": 1000, + "example": 10, + "max": 50000 + }, + "order": { + "default": "desc" + }, + "sort": { + "default": "timestamp", + "enum": [ + "timestamp" + ] + } + }, + "x-massive-replaces": { + "date": 1654056060000, + "replaces": { + "name": "Quotes (NBBO)", + "path": "get_v2_ticks_stocks_nbbo__ticker___date" + } } } }, - "/v2/snapshot/locale/us/markets/stocks/{direction}": { + "/v3/reference/conditions": { "get": { - "description": "Get the most up-to-date market data for the current top 20 gainers or losers of the day in the stocks/equities markets.\n\u003cbr /\u003e\n\u003cbr /\u003e\nTop gainers are those tickers whose price has increased by the highest percentage since the previous day's close.\nTop losers are those tickers whose price has decreased by the highest percentage since the previous day's close.\n\u003cbr /\u003e\n\u003cbr /\u003e\nNote: Snapshot data is cleared at 3:30am EST and gets populated as data is received from the exchanges.\n", + "description": "List all conditions that Massive.com uses.", + "operationId": "ListConditions", "parameters": [ { - "description": "The direction of the snapshot results to return.\n", - "example": "gainers", - "in": "path", - "name": "direction", - "required": true, + "description": "Filter for conditions within a given asset class.", + "in": "query", + "name": "asset_class", "schema": { + "description": "An identifier for a group of similar financial instruments.", "enum": [ - "gainers", - "losers" + "stocks", + "options", + "crypto", + "fx" ], + "example": "stocks", "type": "string" } }, { - "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n", + "description": "Filter by data type.", "in": "query", - "name": "include_otc", + "name": "data_type", "schema": { - "type": "boolean" + "description": "The type of financial data represented by a data model.", + "enum": [ + "trade", + "bbo", + "nbbo" + ], + "example": "trade", + "type": "string" + } + }, + { + "description": "Filter for conditions with a given ID.", + "in": "query", + "name": "id", + "schema": { + "description": "An identifier used by Massive.com for this condition. Unique per data type.", + "example": 1, + "type": "integer" + } + }, + { + "description": "Filter by SIP. If the condition contains a mapping for that SIP, the condition will be returned.", + "in": "query", + "name": "sip", + "schema": { + "description": "One of the SIPs.", + "enum": [ + "CTA", + "UTP", + "OPRA" + ], + "example": "CTA", + "type": "string" + } + }, + { + "description": "Order results based on the `sort` field.", + "in": "query", + "name": "order", + "schema": { + "enum": [ + "asc", + "desc" + ], + "example": "asc", + "type": "string" + } + }, + { + "description": "Limit the number of results returned, default is 10 and max is 1000.", + "in": "query", + "name": "limit", + "schema": { + "default": 10, + "example": 10, + "maximum": 1000, + "minimum": 1, + "type": "integer" + } + }, + { + "description": "Sort field used for ordering.", + "in": "query", + "name": "sort", + "schema": { + "default": "asset_class", + "enum": [ + "asset_class", + "id", + "type", + "name", + "data_types", + "legacy" + ], + "example": "asset_class", + "type": "string" } } ], @@ -12494,1192 +23693,967 @@ "200": { "content": { "application/json": { - "example": { - "status": "OK", - "tickers": [ - { - "day": { - "c": 14.2284, - "h": 15.09, - "l": 14.2, - "o": 14.33, - "v": 133963, - "vw": 14.5311 - }, - "lastQuote": { - "P": 14.44, - "S": 11, - "p": 14.2, - "s": 25, - "t": 1605195929997325600 - }, - "lastTrade": { - "c": [ - 63 - ], - "i": "79372124707124", - "p": 14.2284, - "s": 536, - "t": 1605195848258266000, - "x": 4 - }, - "min": { - "av": 133963, - "c": 14.2284, - "h": 14.325, - "l": 14.2, - "o": 14.28, - "v": 6108, - "vw": 14.2426 - }, - "prevDay": { - "c": 0.73, - "h": 0.799, - "l": 0.73, - "o": 0.75, - "v": 1568097, - "vw": 0.7721 - }, - "ticker": "PDS", - "todaysChange": 13.498, - "todaysChangePerc": 1849.096, - "updated": 1605195848258266000 - } - ] - }, "schema": { - "allOf": [ - { - "properties": { - "status": { - "description": "The status of this request's response.", - "type": "string" + "example": { + "count": 1, + "request_id": "31d59dda-80e5-4721-8496-d0d32a654afe", + "results": [ + { + "asset_class": "stocks", + "data_types": [ + "trade" + ], + "id": 2, + "name": "Average Price Trade", + "sip_mapping": { + "CTA": "B", + "UTP": "W" + }, + "type": "condition", + "update_rules": { + "consolidated": { + "updates_high_low": false, + "updates_open_close": false, + "updates_volume": true + }, + "market_center": { + "updates_high_low": false, + "updates_open_close": false, + "updates_volume": true + } } - }, - "type": "object" + } + ], + "status": "OK" + }, + "properties": { + "count": { + "description": "The total number of results for this request.", + "example": 1, + "type": "integer" }, - { - "properties": { - "tickers": { - "items": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" + }, + "request_id": { + "description": "A request ID assigned by the server.", + "example": "31d59dda-80e5-4721-8496-d0d32a654afe", + "type": "string" + }, + "results": { + "description": "An array of conditions that match your query.", + "items": { + "description": "A condition generally refers to any extra information passed in a trade or a quote. These conditions\nmay or may not affect the behavior of aggregates.", + "properties": { + "abbreviation": { + "description": "A commonly-used abbreviation for this condition.", + "type": "string" + }, + "asset_class": { + "description": "An identifier for a group of similar financial instruments.", + "enum": [ + "stocks", + "options", + "crypto", + "fx" + ], + "example": "stocks", + "type": "string" + }, + "data_types": { + "description": "Data types that this condition applies to.", + "items": { + "description": "The type of financial data represented by a data model.", + "enum": [ + "trade", + "bbo", + "nbbo" + ], + "example": "trade", + "type": "string" + }, + "type": "array" + }, + "description": { + "description": "A short description of the semantics of this condition.", + "type": "string" + }, + "exchange": { + "description": "If present, mapping this condition from a Massive.com code to a SIP symbol depends on this attribute.\nIn other words, data with this condition attached comes exclusively from the given exchange.", + "type": "integer" + }, + "id": { + "description": "An identifier used by Massive.com for this condition. Unique per data type.", + "example": 1, + "type": "integer" + }, + "legacy": { + "description": "If true, this condition is from an old version of the SIPs' specs and no longer is used.\nOther conditions may or may not reuse the same symbol as this one.", + "type": "boolean" + }, + "name": { + "description": "The name of this condition.", + "example": "Acquisition", + "type": "string" + }, + "sip_mapping": { + "description": "A mapping to a symbol for each SIP that has this condition.", "properties": { - "day": { - "description": "The most recent daily bar for this ticker.", - "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "otc": { - "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", - "type": "boolean" - }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "lastQuote": { - "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.", - "properties": { - "P": { - "description": "The ask price.", - "format": "double", - "type": "number" - }, - "S": { - "description": "The ask size in lots.", - "type": "integer" - }, - "p": { - "description": "The bid price.", - "format": "double", - "type": "number" - }, - "s": { - "description": "The bid size in lots.", - "type": "integer" - }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" - } - }, - "type": "object" + "CTA": { + "type": "string" }, - "lastTrade": { - "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.", - "properties": { - "c": { - "description": "The trade conditions.", - "items": { - "type": "string" - }, - "type": "array" - }, - "i": { - "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n", - "type": "string" - }, - "p": { - "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n", - "format": "double", - "type": "number" - }, - "s": { - "description": "The size (volume) of the trade.", - "type": "integer" - }, - "t": { - "description": "The Unix Msec timestamp for the start of the aggregate window.", - "type": "integer" - }, - "x": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", - "type": "integer" - } - }, - "type": "object" + "OPRA": { + "type": "string" }, - "min": { - "description": "The most recent minute bar for this ticker.", + "UTP": { + "type": "string" + } + }, + "type": "object" + }, + "type": { + "description": "An identifier for a collection of related conditions.", + "enum": [ + "sale_condition", + "quote_condition", + "sip_generated_flag", + "financial_status_indicator", + "short_sale_restriction_indicator", + "settlement_condition", + "market_condition", + "trade_thru_exempt" + ], + "type": "string" + }, + "update_rules": { + "description": "A list of aggregation rules.", + "properties": { + "consolidated": { + "description": "Describes aggregation rules on a consolidated (all exchanges) basis.", "properties": { - "av": { - "description": "The accumulated volume.", - "type": "integer" - }, - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "otc": { - "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "updates_high_low": { + "description": "Whether or not trades with this condition update the high/low.", "type": "boolean" }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" + "updates_open_close": { + "description": "Whether or not trades with this condition update the open/close.", + "type": "boolean" }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" + "updates_volume": { + "description": "Whether or not trades with this condition update the volume.", + "type": "boolean" } }, + "required": [ + "updates_high_low", + "updates_open_close", + "updates_volume" + ], "type": "object" }, - "prevDay": { - "description": "The previous day's bar for this ticker.", + "market_center": { + "description": "Describes aggregation rules on a per-market-center basis.", "properties": { - "c": { - "description": "The close price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "h": { - "description": "The highest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "l": { - "description": "The lowest price for the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "o": { - "description": "The open price for the symbol in the given time period.", - "format": "double", - "type": "number" + "updates_high_low": { + "description": "Whether or not trades with this condition update the high/low.", + "type": "boolean" }, - "otc": { - "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.", + "updates_open_close": { + "description": "Whether or not trades with this condition update the open/close.", "type": "boolean" }, - "v": { - "description": "The trading volume of the symbol in the given time period.", - "format": "double", - "type": "number" - }, - "vw": { - "description": "The volume weighted average price.", - "format": "double", - "type": "number" + "updates_volume": { + "description": "Whether or not trades with this condition update the volume.", + "type": "boolean" } }, + "required": [ + "updates_high_low", + "updates_open_close", + "updates_volume" + ], "type": "object" - }, - "ticker": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - }, - "todaysChange": { - "description": "The value of the change the from previous day.", - "format": "double", - "type": "number" - }, - "todaysChangePerc": { - "description": "The percentage change since the previous day.", - "format": "double", - "type": "number" - }, - "updated": { - "description": "The last updated timestamp.", - "type": "integer" } }, + "required": [ + "consolidated", + "market_center" + ], "type": "object" - }, - "type": "array" - } + } + }, + "required": [ + "id", + "type", + "name", + "asset_class", + "sip_mapping", + "data_types" + ], + "type": "object" }, - "type": "object" + "type": "array" + }, + "status": { + "description": "The status of this request's response.", + "example": "OK", + "type": "string" } - ] + }, + "required": [ + "status", + "request_id", + "count", + "results" + ], + "type": "object" + } + }, + "text/csv": { + "example": "id,type,abbreviation,name,description,asset_class,sip_mapping,exchange,consolidated_updates_high_low,consolidated_updates_open_close,consolidated_updates_volume,market_center_updates_high_low,market_center_updates_open_close,market_center_updates_volume,data_types,legacy\n0,regular,,Regular Trade,,crypto,null,0,,,,,,,trade,false\n1,buy_or_sell_side,,Sell Side,The asset was sold at the prevailing best bid price on an exchange.,crypto,null,0,,,,,,,trade,false\n2,buy_or_sell_side,,Buy Side,The asset was bought at the prevailing best ask price on an exchange.,crypto,null,0,,,,,,,trade,false\n", + "schema": { + "type": "string" } } }, - "description": "Get the current tickers of the day" - }, - "default": { - "description": "Unexpected error" - } - }, - "summary": "Gainers/Losers", - "tags": [ - "stocks:snapshot" - ], - "x-polygon-entitlement-allowed-timeframes": [ - { - "description": "Real Time Data", - "name": "realtime" - }, - { - "description": "15 minute delayed data", - "name": "delayed" - } - ], - "x-polygon-entitlement-data-type": { - "description": "Aggregate data", - "name": "aggregates" - }, - "x-polygon-entitlement-market-type": { - "description": "Stocks data", - "name": "stocks" - } - } - }, - "/v2/ticks/stocks/nbbo/{ticker}/{date}": { - "get": { - "description": "Get NBBO quotes for a given ticker symbol on a specified date.\n", - "parameters": [ - { - "description": "The ticker symbol we want quotes for.", - "example": "AAPL", - "in": "path", - "name": "ticker", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "The date/day of the quotes to retrieve in the format YYYY-MM-DD.", - "example": "2020-10-14", - "in": "path", - "name": "date", - "required": true, - "schema": { - "format": "date", - "type": "string" - } - }, - { - "description": "The timestamp offset, used for pagination. This is the offset at which to start the results. Using the `timestamp` of the last result as the offset will give you the next page of results.\n", - "in": "query", - "name": "timestamp", - "schema": { - "type": "integer" - } - }, - { - "description": "The maximum timestamp allowed in the results.\n", - "in": "query", - "name": "timestampLimit", - "schema": { - "type": "integer" - } - }, - { - "description": "Reverse the order of the results.\n", - "example": true, - "in": "query", - "name": "reverse", - "schema": { - "type": "boolean" - } + "description": "OK" }, - { - "description": "Limit the size of the response, max 50000 and default 5000.", - "example": 10, - "in": "query", - "name": "limit", - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { + "400": { "content": { "application/json": { - "example": { - "db_latency": 43, - "map": { - "P": { - "name": "ask_price", - "type": "float64" - }, - "S": { - "name": "ask_size", - "type": "int" - }, - "X": { - "name": "ask_exchange", - "type": "int" - }, - "c": { - "name": "conditions", - "type": "int" - }, - "f": { - "name": "trf_timestamp", - "type": "int64" - }, - "i": { - "name": "indicators", - "type": "int" - }, - "p": { - "name": "bid_price", - "type": "float64" - }, - "q": { - "name": "sequence_number", - "type": "int" - }, - "s": { - "name": "bid_size", - "type": "int" + "schema": { + "properties": { + "count": { + "description": "The total number of results for this request.", + "example": 1, + "type": "integer" }, - "t": { - "name": "sip_timestamp", - "type": "int64" + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" }, - "x": { - "name": "bid_exchange", - "type": "int" + "request_id": { + "description": "A request ID assigned by the server.", + "example": "31d59dda-80e5-4721-8496-d0d32a654afe", + "type": "string" }, - "y": { - "name": "participant_timestamp", - "type": "int64" + "results": { + "description": "An array of conditions that match your query.", + "items": { + "description": "A condition generally refers to any extra information passed in a trade or a quote. These conditions\nmay or may not affect the behavior of aggregates.", + "properties": { + "abbreviation": { + "description": "A commonly-used abbreviation for this condition.", + "type": "string" + }, + "asset_class": { + "description": "An identifier for a group of similar financial instruments.", + "enum": [ + "stocks", + "options", + "crypto", + "fx" + ], + "example": "stocks", + "type": "string" + }, + "data_types": { + "description": "Data types that this condition applies to.", + "items": { + "description": "The type of financial data represented by a data model.", + "enum": [ + "trade", + "bbo", + "nbbo" + ], + "example": "trade", + "type": "string" + }, + "type": "array" + }, + "description": { + "description": "A short description of the semantics of this condition.", + "type": "string" + }, + "exchange": { + "description": "If present, mapping this condition from a Massive.com code to a SIP symbol depends on this attribute.\nIn other words, data with this condition attached comes exclusively from the given exchange.", + "type": "integer" + }, + "id": { + "description": "An identifier used by Massive.com for this condition. Unique per data type.", + "example": 1, + "type": "integer" + }, + "legacy": { + "description": "If true, this condition is from an old version of the SIPs' specs and no longer is used.\nOther conditions may or may not reuse the same symbol as this one.", + "type": "boolean" + }, + "name": { + "description": "The name of this condition.", + "example": "Acquisition", + "type": "string" + }, + "sip_mapping": { + "description": "A mapping to a symbol for each SIP that has this condition.", + "properties": { + "CTA": { + "type": "string" + }, + "OPRA": { + "type": "string" + }, + "UTP": { + "type": "string" + } + }, + "type": "object" + }, + "type": { + "description": "An identifier for a collection of related conditions.", + "enum": [ + "sale_condition", + "quote_condition", + "sip_generated_flag", + "financial_status_indicator", + "short_sale_restriction_indicator", + "settlement_condition", + "market_condition", + "trade_thru_exempt" + ], + "type": "string" + }, + "update_rules": { + "description": "A list of aggregation rules.", + "properties": { + "consolidated": { + "description": "Describes aggregation rules on a consolidated (all exchanges) basis.", + "properties": { + "updates_high_low": { + "description": "Whether or not trades with this condition update the high/low.", + "type": "boolean" + }, + "updates_open_close": { + "description": "Whether or not trades with this condition update the open/close.", + "type": "boolean" + }, + "updates_volume": { + "description": "Whether or not trades with this condition update the volume.", + "type": "boolean" + } + }, + "required": [ + "updates_high_low", + "updates_open_close", + "updates_volume" + ], + "type": "object" + }, + "market_center": { + "description": "Describes aggregation rules on a per-market-center basis.", + "properties": { + "updates_high_low": { + "description": "Whether or not trades with this condition update the high/low.", + "type": "boolean" + }, + "updates_open_close": { + "description": "Whether or not trades with this condition update the open/close.", + "type": "boolean" + }, + "updates_volume": { + "description": "Whether or not trades with this condition update the volume.", + "type": "boolean" + } + }, + "required": [ + "updates_high_low", + "updates_open_close", + "updates_volume" + ], + "type": "object" + } + }, + "required": [ + "consolidated", + "market_center" + ], + "type": "object" + } + }, + "required": [ + "id", + "type", + "name", + "asset_class", + "sip_mapping", + "data_types" + ], + "type": "object" + }, + "type": "array" }, - "z": { - "name": "tape", - "type": "int" + "status": { + "description": "The status of this request's response.", + "example": "OK", + "type": "string" } }, - "results": [ - { - "P": 0, - "S": 0, - "X": 0, - "c": [ - 1 - ], - "p": 102.7, - "q": 2060, - "s": 60, - "t": 1517562000065700400, - "x": 11, - "y": 1517562000065321200, - "z": 3 - }, - { - "P": 0, - "S": 0, - "X": 0, - "c": [ - 1 - ], - "p": 170, - "q": 2061, - "s": 2, - "t": 1517562000065791500, - "x": 11, - "y": 1517562000065408300, - "z": 3 - } + "required": [ + "status", + "request_id", + "count", + "results" ], - "results_count": 2, - "success": true, - "ticker": "AAPL" - }, + "type": "object" + } + } + }, + "description": "a query parameter was malformed" + }, + "default": { + "content": { + "application/json": { "schema": { - "allOf": [ - { - "properties": { - "db_latency": { - "description": "Latency in milliseconds for the query results from the database.", - "type": "integer" - }, - "results_count": { - "description": "The total number of results for this request.", - "type": "integer" - }, - "success": { - "description": "Whether or not this query was executed successfully.", - "type": "boolean" - }, - "ticker": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - } - }, - "type": "object" + "properties": { + "count": { + "description": "The total number of results for this request.", + "example": 1, + "type": "integer" }, - { - "properties": { - "results": { - "items": { - "allOf": [ - { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" + }, + "request_id": { + "description": "A request ID assigned by the server.", + "example": "31d59dda-80e5-4721-8496-d0d32a654afe", + "type": "string" + }, + "results": { + "description": "An array of conditions that match your query.", + "items": { + "description": "A condition generally refers to any extra information passed in a trade or a quote. These conditions\nmay or may not affect the behavior of aggregates.", + "properties": { + "abbreviation": { + "description": "A commonly-used abbreviation for this condition.", + "type": "string" + }, + "asset_class": { + "description": "An identifier for a group of similar financial instruments.", + "enum": [ + "stocks", + "options", + "crypto", + "fx" + ], + "example": "stocks", + "type": "string" + }, + "data_types": { + "description": "Data types that this condition applies to.", + "items": { + "description": "The type of financial data represented by a data model.", + "enum": [ + "trade", + "bbo", + "nbbo" + ], + "example": "trade", + "type": "string" + }, + "type": "array" + }, + "description": { + "description": "A short description of the semantics of this condition.", + "type": "string" + }, + "exchange": { + "description": "If present, mapping this condition from a Massive.com code to a SIP symbol depends on this attribute.\nIn other words, data with this condition attached comes exclusively from the given exchange.", + "type": "integer" + }, + "id": { + "description": "An identifier used by Massive.com for this condition. Unique per data type.", + "example": 1, + "type": "integer" + }, + "legacy": { + "description": "If true, this condition is from an old version of the SIPs' specs and no longer is used.\nOther conditions may or may not reuse the same symbol as this one.", + "type": "boolean" + }, + "name": { + "description": "The name of this condition.", + "example": "Acquisition", + "type": "string" + }, + "sip_mapping": { + "description": "A mapping to a symbol for each SIP that has this condition.", + "properties": { + "CTA": { + "type": "string" + }, + "OPRA": { + "type": "string" + }, + "UTP": { + "type": "string" + } + }, + "type": "object" + }, + "type": { + "description": "An identifier for a collection of related conditions.", + "enum": [ + "sale_condition", + "quote_condition", + "sip_generated_flag", + "financial_status_indicator", + "short_sale_restriction_indicator", + "settlement_condition", + "market_condition", + "trade_thru_exempt" + ], + "type": "string" + }, + "update_rules": { + "description": "A list of aggregation rules.", + "properties": { + "consolidated": { + "description": "Describes aggregation rules on a consolidated (all exchanges) basis.", "properties": { - "T": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - }, - "f": { - "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.", - "type": "integer" - }, - "q": { - "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n", - "format": "int64", - "type": "integer" + "updates_high_low": { + "description": "Whether or not trades with this condition update the high/low.", + "type": "boolean" }, - "t": { - "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.", - "type": "integer" + "updates_open_close": { + "description": "Whether or not trades with this condition update the open/close.", + "type": "boolean" }, - "y": { - "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.", - "type": "integer" + "updates_volume": { + "description": "Whether or not trades with this condition update the volume.", + "type": "boolean" } }, + "required": [ + "updates_high_low", + "updates_open_close", + "updates_volume" + ], "type": "object" }, - { + "market_center": { + "description": "Describes aggregation rules on a per-market-center basis.", "properties": { - "P": { - "description": "The ask price.", - "format": "double", - "type": "number" - }, - "S": { - "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.", - "type": "integer" - }, - "X": { - "allOf": [ - { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", - "type": "integer" - }, - { - "description": "Ask Exchange Id" - } - ] - }, - "c": { - "description": "A list of condition codes.\n", - "items": { - "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", - "type": "integer" - }, - "type": "array" - }, - "i": { - "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n", - "items": { - "description": "The indicator code.\n", - "type": "integer" - }, - "type": "array" - }, - "p": { - "description": "The bid price.", - "format": "double", - "type": "number" - }, - "s": { - "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.", - "type": "integer" + "updates_high_low": { + "description": "Whether or not trades with this condition update the high/low.", + "type": "boolean" }, - "x": { - "allOf": [ - { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", - "type": "integer" - }, - { - "description": "Bid Exchange Id" - } - ] + "updates_open_close": { + "description": "Whether or not trades with this condition update the open/close.", + "type": "boolean" }, - "z": { - "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n", - "type": "integer" + "updates_volume": { + "description": "Whether or not trades with this condition update the volume.", + "type": "boolean" } }, + "required": [ + "updates_high_low", + "updates_open_close", + "updates_volume" + ], "type": "object" } - ] - }, - "type": "array" - } + }, + "required": [ + "consolidated", + "market_center" + ], + "type": "object" + } + }, + "required": [ + "id", + "type", + "name", + "asset_class", + "sip_mapping", + "data_types" + ], + "type": "object" }, - "type": "object" + "type": "array" + }, + "status": { + "description": "The status of this request's response.", + "example": "OK", + "type": "string" } - ] + }, + "required": [ + "status", + "request_id", + "count", + "results" + ], + "type": "object" } } }, - "description": "A list of quotes." - }, - "default": { - "description": "Unexpected error" + "description": "an unknown error occurred" } }, - "summary": "Quotes (NBBO)", + "summary": "Conditions", "tags": [ - "stocks:quotes" + "reference:conditions" ], - "x-polygon-deprecation": { - "date": 1654056060000, - "replaces": { - "name": "Quotes (NBBO) v3", - "path": "get_v3_quotes__stockticker" - } - }, - "x-polygon-entitlement-data-type": { - "description": "NBBO data", - "name": "nbbo" + "x-massive-entitlement-data-type": { + "description": "Reference data", + "name": "reference" }, - "x-polygon-entitlement-market-type": { - "description": "Stocks data", - "name": "stocks" + "x-massive-paginate": { + "limit": { + "default": 10, + "max": 1000 + }, + "sort": { + "default": "asset_class", + "enum": [ + "asset_class", + "id", + "type", + "name", + "data_types", + "legacy" + ] + } } } }, - "/v2/ticks/stocks/trades/{ticker}/{date}": { + "/v3/reference/dividends": { "get": { - "description": "Get trades for a given ticker symbol on a specified date.\n", + "description": "Get a list of historical cash dividends, including the ticker symbol,\ndeclaration date, ex-dividend date, record date, pay date, frequency,\nand amount.", + "operationId": "ListDividends", "parameters": [ { - "description": "The ticker symbol we want trades for.", - "example": "AAPL", - "in": "path", + "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.", + "in": "query", "name": "ticker", - "required": true, "schema": { "type": "string" + }, + "x-massive-filter-field": { + "range": true, + "type": "string" + } + }, + { + "description": "Query by ex-dividend date with the format YYYY-MM-DD.", + "in": "query", + "name": "ex_dividend_date", + "schema": { + "format": "date", + "type": "string" + }, + "x-massive-filter-field": { + "range": true, + "type": "string" + } + }, + { + "description": "Query by record date with the format YYYY-MM-DD.", + "in": "query", + "name": "record_date", + "schema": { + "format": "date", + "type": "string" + }, + "x-massive-filter-field": { + "range": true, + "type": "string" } }, { - "description": "The date/day of the trades to retrieve in the format YYYY-MM-DD.", - "example": "2020-10-14", - "in": "path", - "name": "date", - "required": true, + "description": "Query by declaration date with the format YYYY-MM-DD.", + "in": "query", + "name": "declaration_date", "schema": { "format": "date", "type": "string" + }, + "x-massive-filter-field": { + "range": true, + "type": "string" } }, { - "description": "The timestamp offset, used for pagination. This is the offset at which to start the results. Using the `timestamp` of the last result as the offset will give you the next page of results.\n", + "description": "Query by pay date with the format YYYY-MM-DD.", "in": "query", - "name": "timestamp", + "name": "pay_date", "schema": { - "type": "integer" + "format": "date", + "type": "string" + }, + "x-massive-filter-field": { + "range": true, + "type": "string" } }, { - "description": "The maximum timestamp allowed in the results.\n", + "description": "Query by the number of times per year the dividend is paid out. Possible values are 0 (one-time), 1 (annually), 2 (bi-annually), 4 (quarterly), and 12 (monthly).", "in": "query", - "name": "timestampLimit", + "name": "frequency", "schema": { + "enum": [ + 0, + 1, + 2, + 4, + 12 + ], "type": "integer" } }, { - "description": "Reverse the order of the results.\n", - "example": true, + "description": "Query by the cash amount of the dividend.", "in": "query", - "name": "reverse", + "name": "cash_amount", "schema": { - "type": "boolean" + "type": "number" + }, + "x-massive-filter-field": { + "range": true, + "type": "number" } }, { - "description": "Limit the size of the response, max 50000 and default 5000.", - "example": 10, + "description": "Query by the type of dividend. Dividends that have been paid and/or are expected to be paid on consistent schedules are denoted as CD.\nSpecial Cash dividends that have been paid that are infrequent or unusual, and/or can not be expected to occur in the future are denoted as SC.", "in": "query", - "name": "limit", + "name": "dividend_type", "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "db_latency": 11, - "map": { - "I": { - "name": "orig_id", - "type": "string" - }, - "c": { - "name": "conditions", - "type": "int" - }, - "e": { - "name": "correction", - "type": "int" - }, - "f": { - "name": "trf_timestamp", - "type": "int64" - }, - "i": { - "name": "id", - "type": "string" - }, - "p": { - "name": "price", - "type": "float64" - }, - "q": { - "name": "sequence_number", - "type": "int64" - }, - "r": { - "name": "trf_id", - "type": "int" - }, - "s": { - "name": "size", - "type": "int" - }, - "t": { - "name": "sip_timestamp", - "type": "int64" - }, - "x": { - "name": "exchange", - "type": "int" - }, - "y": { - "name": "participant_timestamp", - "type": "int64" - }, - "z": { - "name": "tape", - "type": "int" - } - }, - "results": [ - { - "c": [ - 12, - 41 - ], - "i": "1", - "p": 171.55, - "q": 1063, - "s": 100, - "t": 1517562000016036600, - "x": 11, - "y": 1517562000015577000, - "z": 3 - }, - { - "c": [ - 12, - 41 - ], - "i": "2", - "p": 171.55, - "q": 1064, - "s": 100, - "t": 1517562000016038100, - "x": 11, - "y": 1517562000015577600, - "z": 3 - } - ], - "results_count": 2, - "success": true, - "ticker": "AAPL" - }, - "schema": { - "allOf": [ - { - "properties": { - "db_latency": { - "description": "Latency in milliseconds for the query results from the database.", - "type": "integer" - }, - "results_count": { - "description": "The total number of results for this request.", - "type": "integer" - }, - "success": { - "description": "Whether or not this query was executed successfully.", - "type": "boolean" - }, - "ticker": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - } - }, - "type": "object" - }, - { - "properties": { - "results": { - "items": { - "allOf": [ - { - "properties": { - "T": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - }, - "f": { - "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.", - "type": "integer" - }, - "q": { - "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n", - "format": "int64", - "type": "integer" - }, - "t": { - "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.", - "type": "integer" - }, - "y": { - "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.", - "type": "integer" - } - }, - "type": "object" - }, - { - "properties": { - "c": { - "description": "A list of condition codes.\n", - "items": { - "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n", - "type": "integer" - }, - "type": "array" - }, - "e": { - "description": "The trade correction indicator.\n", - "type": "integer" - }, - "i": { - "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n", - "type": "string" - }, - "p": { - "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n", - "format": "double", - "type": "number" - }, - "r": { - "description": "The ID for the Trade Reporting Facility where the trade took place.\n", - "type": "integer" - }, - "s": { - "description": "The size of a trade (also known as volume).\n", - "format": "double", - "type": "number" - }, - "x": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", - "type": "integer" - }, - "z": { - "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n", - "type": "integer" - } - }, - "type": "object" - } - ] - }, - "type": "array" - } - }, - "type": "object" - } - ] - } + "description": "The type of dividend. Dividends that have been paid and/or are expected to be paid on consistent schedules are denoted as CD.\nSpecial Cash dividends that have been paid that are infrequent or unusual, and/or can not be expected to occur in the future are denoted as SC.\nLong-Term and Short-Term capital gain distributions are denoted as LT and ST, respectively.", + "enum": [ + "CD", + "SC", + "LT", + "ST" + ], + "type": "string", + "x-massive-go-field-tags": { + "tags": [ + { + "key": "binding", + "value": "required" + } + ] } - }, - "description": "A list of trades." + } }, - "default": { - "description": "Unexpected error" - } - }, - "summary": "Trades", - "tags": [ - "stocks:trades" - ], - "x-polygon-deprecation": { - "date": 1654056060000, - "replaces": { - "name": "Trades v3", - "path": "get_v3_trades__stockticker" - } - }, - "x-polygon-entitlement-data-type": { - "description": "Trade data", - "name": "trades" - }, - "x-polygon-entitlement-market-type": { - "description": "Stocks data", - "name": "stocks" - } - } - }, - "/v3/quotes/{fxTicker}": { - "get": { - "description": "Get BBO quotes for a ticker symbol in a given time range.", - "operationId": "QuotesFx", - "parameters": [ { - "description": "The ticker symbol to get quotes for.", - "example": "C:EUR-USD", - "in": "path", - "name": "fxTicker", - "required": true, + "description": "Range by ticker.", + "in": "query", + "name": "ticker.gte", "schema": { "type": "string" } }, { - "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.", + "description": "Range by ticker.", "in": "query", - "name": "timestamp", + "name": "ticker.gt", "schema": { "type": "string" - }, - "x-polygon-filter-field": { - "range": true } }, { - "description": "Search by timestamp.", + "description": "Range by ticker.", "in": "query", - "name": "timestamp.gte", + "name": "ticker.lte", "schema": { "type": "string" } }, { - "description": "Search by timestamp.", + "description": "Range by ticker.", "in": "query", - "name": "timestamp.gt", + "name": "ticker.lt", "schema": { "type": "string" } }, { - "description": "Search by timestamp.", + "description": "Range by ex_dividend_date.", "in": "query", - "name": "timestamp.lte", + "name": "ex_dividend_date.gte", "schema": { + "format": "date", "type": "string" } }, { - "description": "Search by timestamp.", + "description": "Range by ex_dividend_date.", "in": "query", - "name": "timestamp.lt", + "name": "ex_dividend_date.gt", "schema": { + "format": "date", "type": "string" } }, { - "description": "Order results based on the `sort` field.", + "description": "Range by ex_dividend_date.", "in": "query", - "name": "order", + "name": "ex_dividend_date.lte", "schema": { - "default": "desc", - "enum": [ - "asc", - "desc" - ], - "example": "asc", + "format": "date", "type": "string" } }, { - "description": "Limit the number of results returned, default is 10 and max is 50000.", + "description": "Range by ex_dividend_date.", "in": "query", - "name": "limit", + "name": "ex_dividend_date.lt", "schema": { - "default": 10, - "example": 10, - "maximum": 50000, - "minimum": 1, - "type": "integer" + "format": "date", + "type": "string" } }, { - "description": "Sort field used for ordering.", + "description": "Range by record_date.", "in": "query", - "name": "sort", + "name": "record_date.gte", "schema": { - "default": "timestamp", - "enum": [ - "timestamp" - ], - "example": "timestamp", + "format": "date", "type": "string" } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "next_url": "https://api.polygon.io/v3/quotes/C:EUR-USD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", - "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", - "results": [ - { - "ask_exchange": 48, - "ask_price": 1.18565, - "bid_exchange": 48, - "bid_price": 1.18558, - "participant_timestamp": 1625097600000000000 - }, - { - "ask_exchange": 48, - "ask_price": 1.18565, - "bid_exchange": 48, - "bid_price": 1.18559, - "participant_timestamp": 1625097600000000000 - } - ], - "status": "OK" - }, - "schema": { - "properties": { - "next_url": { - "description": "If present, this value can be used to fetch the next page of data.", - "type": "string" - }, - "results": { - "items": { - "properties": { - "ask_exchange": { - "description": "The ask exchange ID", - "type": "integer" - }, - "ask_price": { - "description": "The ask price.", - "format": "double", - "type": "number" - }, - "bid_exchange": { - "description": "The bid exchange ID", - "type": "integer" - }, - "bid_price": { - "description": "The bid price.", - "format": "double", - "type": "number" - }, - "participant_timestamp": { - "description": "The nanosecond Exchange Unix Timestamp. This is the timestamp of when the quote was generated at the exchange.", - "format": "int64", - "type": "integer", - "x-polygon-go-type": { - "name": "INanoseconds", - "path": "github.com/polygon-io/ptime" - } - } - }, - "type": "object" - }, - "type": "array" - }, - "status": { - "description": "The status of this request's response.", - "type": "string" - } - }, - "type": "object" - } - } - }, - "description": "A list of quotes." - } - }, - "summary": "Quotes (BBO)", - "tags": [ - "fx:quotes" - ], - "x-polygon-entitlement-data-type": { - "description": "NBBO data", - "name": "nbbo" - }, - "x-polygon-entitlement-market-type": { - "description": "Forex data", - "name": "fx" - }, - "x-polygon-paginate": { - "limit": { - "max": 50000 }, - "order": { - "default": "desc" + { + "description": "Range by record_date.", + "in": "query", + "name": "record_date.gt", + "schema": { + "format": "date", + "type": "string" + } }, - "sort": { - "default": "timestamp", - "enum": [ - "timestamp" - ] - } - }, - "x-polygon-replaces": { - "date": 1654056060000, - "replaces": { - "name": "Historic Forex Ticks", - "path": "get_v1_historic_forex__from___to___date" - } - } - }, - "x-polygon-ignore": true - }, - "/v3/quotes/{optionsTicker}": { - "get": { - "description": "Get quotes for an options ticker symbol in a given time range.", - "operationId": "QuotesOptions", - "parameters": [ { - "description": "The ticker symbol to get quotes for.", - "example": "O:SPY241220P00720000", - "in": "path", - "name": "optionsTicker", - "required": true, + "description": "Range by record_date.", + "in": "query", + "name": "record_date.lte", + "schema": { + "format": "date", + "type": "string" + } + }, + { + "description": "Range by record_date.", + "in": "query", + "name": "record_date.lt", + "schema": { + "format": "date", + "type": "string" + } + }, + { + "description": "Range by declaration_date.", + "in": "query", + "name": "declaration_date.gte", + "schema": { + "format": "date", + "type": "string" + } + }, + { + "description": "Range by declaration_date.", + "in": "query", + "name": "declaration_date.gt", + "schema": { + "format": "date", + "type": "string" + } + }, + { + "description": "Range by declaration_date.", + "in": "query", + "name": "declaration_date.lte", + "schema": { + "format": "date", + "type": "string" + } + }, + { + "description": "Range by declaration_date.", + "in": "query", + "name": "declaration_date.lt", + "schema": { + "format": "date", + "type": "string" + } + }, + { + "description": "Range by pay_date.", + "in": "query", + "name": "pay_date.gte", "schema": { + "format": "date", "type": "string" - }, - "x-polygon-go-id": "Ticker" + } }, { - "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.", + "description": "Range by pay_date.", "in": "query", - "name": "timestamp", + "name": "pay_date.gt", "schema": { + "format": "date", "type": "string" - }, - "x-polygon-filter-field": { - "range": true } }, { - "description": "Search by timestamp.", + "description": "Range by pay_date.", "in": "query", - "name": "timestamp.gte", + "name": "pay_date.lte", "schema": { + "format": "date", "type": "string" } }, { - "description": "Search by timestamp.", + "description": "Range by pay_date.", "in": "query", - "name": "timestamp.gt", + "name": "pay_date.lt", "schema": { + "format": "date", "type": "string" } }, { - "description": "Search by timestamp.", + "description": "Range by cash_amount.", "in": "query", - "name": "timestamp.lte", + "name": "cash_amount.gte", "schema": { - "type": "string" + "type": "number" } }, { - "description": "Search by timestamp.", + "description": "Range by cash_amount.", "in": "query", - "name": "timestamp.lt", + "name": "cash_amount.gt", "schema": { - "type": "string" + "type": "number" + } + }, + { + "description": "Range by cash_amount.", + "in": "query", + "name": "cash_amount.lte", + "schema": { + "type": "number" + } + }, + { + "description": "Range by cash_amount.", + "in": "query", + "name": "cash_amount.lt", + "schema": { + "type": "number" } }, { @@ -13687,7 +24661,6 @@ "in": "query", "name": "order", "schema": { - "default": "desc", "enum": [ "asc", "desc" @@ -13697,13 +24670,13 @@ } }, { - "description": "Limit the number of results returned, default is 10 and max is 50000.", + "description": "Limit the number of results returned, default is 10 and max is 1000.", "in": "query", "name": "limit", "schema": { "default": 10, "example": 10, - "maximum": 50000, + "maximum": 1000, "minimum": 1, "type": "integer" } @@ -13713,11 +24686,256 @@ "in": "query", "name": "sort", "schema": { - "default": "timestamp", + "default": "ex_dividend_date", "enum": [ - "timestamp" + "ex_dividend_date", + "pay_date", + "declaration_date", + "record_date", + "cash_amount", + "ticker" + ], + "example": "ex_dividend_date", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "A list of dividends.", + "example": { + "next_url": "https://api.massive.com/v3/reference/dividends/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "results": [ + { + "cash_amount": 0.22, + "declaration_date": "2021-10-28", + "dividend_type": "CD", + "ex_dividend_date": "2021-11-05", + "frequency": 4, + "id": "E8e3c4f794613e9205e2f178a36c53fcc57cdabb55e1988c87b33f9e52e221444", + "pay_date": "2021-11-11", + "record_date": "2021-11-08", + "ticker": "AAPL" + }, + { + "cash_amount": 0.22, + "declaration_date": "2021-07-27", + "dividend_type": "CD", + "ex_dividend_date": "2021-08-06", + "frequency": 4, + "id": "E6436c5475706773f03490acf0b63fdb90b2c72bfeed329a6eb4afc080acd80ae", + "pay_date": "2021-08-12", + "record_date": "2021-08-09", + "ticker": "AAPL" + } + ], + "status": "OK" + }, + "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" + }, + "request_id": { + "type": "string" + }, + "results": { + "items": { + "properties": { + "cash_amount": { + "description": "The cash amount of the dividend per share owned.", + "type": "number", + "x-massive-go-field-tags": { + "tags": [ + { + "key": "binding", + "value": "required" + } + ] + } + }, + "currency": { + "description": "The currency in which the dividend is paid.", + "type": "string", + "x-massive-go-field-tags": { + "tags": [ + { + "key": "binding", + "value": "required" + } + ] + } + }, + "declaration_date": { + "description": "The date that the dividend was announced.", + "type": "string" + }, + "dividend_type": { + "description": "The type of dividend. Dividends that have been paid and/or are expected to be paid on consistent schedules are denoted as CD.\nSpecial Cash dividends that have been paid that are infrequent or unusual, and/or can not be expected to occur in the future are denoted as SC.\nLong-Term and Short-Term capital gain distributions are denoted as LT and ST, respectively.", + "enum": [ + "CD", + "SC", + "LT", + "ST" + ], + "type": "string", + "x-massive-go-field-tags": { + "tags": [ + { + "key": "binding", + "value": "required" + } + ] + } + }, + "ex_dividend_date": { + "description": "The date that the stock first trades without the dividend, determined by the exchange.", + "type": "string", + "x-massive-go-field-tags": { + "tags": [ + { + "key": "binding", + "value": "required" + } + ] + } + }, + "frequency": { + "description": "The number of times per year the dividend is paid out. Possible values are 0 (one-time), 1 (annually), 2 (bi-annually), 4 (quarterly), and 12 (monthly).", + "type": "integer", + "x-massive-go-field-tags": { + "tags": [ + { + "key": "binding", + "value": "required" + } + ] + } + }, + "id": { + "description": "The unique identifier of the dividend.", + "type": "string" + }, + "pay_date": { + "description": "The date that the dividend is paid out.", + "type": "string" + }, + "record_date": { + "description": "The date that the stock must be held to receive the dividend, set by the company.", + "type": "string" + }, + "ticker": { + "description": "The ticker symbol of the dividend.", + "type": "string", + "x-massive-go-field-tags": { + "tags": [ + { + "key": "binding", + "value": "required" + } + ] + } + } + }, + "required": [ + "ticker", + "ex_dividend_date", + "frequency", + "cash_amount", + "dividend_type", + "id" + ], + "type": "object", + "x-massive-go-struct-tags": { + "tags": [ + "db" + ] + } + }, + "type": "array" + }, + "status": { + "type": "string" + } + }, + "required": [ + "request_id" + ], + "type": "object" + } + }, + "text/csv": { + "schema": { + "example": "ticker,declaration_date,ex_dividend_date,record_date,pay_date,frequency,cash_amount,dividend_type\nAAPL,2021-10-28,2021-11-05,2021-11-08,2021-11-11,4,0.22,CD\nAAPL,2021-07-27,2021-08-06,2021-08-09,2021-08-12,4,0.22,CD\n", + "type": "string" + } + } + }, + "description": "OK" + } + }, + "summary": "Dividends v3", + "tags": [ + "reference:dividends" + ], + "x-massive-entitlement-data-type": { + "description": "Reference data", + "name": "reference" + }, + "x-massive-paginate": { + "limit": { + "default": 10, + "max": 1000 + }, + "sort": { + "default": "ex_dividend_date", + "enum": [ + "ex_dividend_date", + "pay_date", + "declaration_date", + "record_date", + "cash_amount", + "ticker" + ] + } + } + } + }, + "/v3/reference/exchanges": { + "get": { + "description": "List all exchanges that Massive.com knows about.", + "operationId": "ListExchanges", + "parameters": [ + { + "description": "Filter by asset class.", + "in": "query", + "name": "asset_class", + "schema": { + "description": "An identifier for a group of similar financial instruments.", + "enum": [ + "stocks", + "options", + "crypto", + "fx" + ], + "example": "stocks", + "type": "string" + } + }, + { + "description": "Filter by locale.", + "in": "query", + "name": "locale", + "schema": { + "description": "An identifier for a geographical location.", + "enum": [ + "us", + "global" ], - "example": "timestamp", + "example": "us", "type": "string" } } @@ -13726,473 +24944,364 @@ "200": { "content": { "application/json": { - "example": { - "next_url": "https://api.polygon.io/v3/quotes/O:SPY241220P00720000?cursor=YXA9NzY5Nzg0NzAxJmFzPSZsaW1pdD0xMCZvcmRlcj1kZXNjJnNvcnQ9dGltZXN0YW1wJnRpbWVzdGFtcC5sdGU9MjAyMi0wMi0xN1QxNyUzQTI1JTNBMTMuMDA5MzU2MDMyWg", - "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", - "results": [ - { - "ask_exchange": 323, - "ask_price": 282, - "ask_size": 10, - "bid_exchange": 316, - "bid_price": 277.5, - "bid_size": 1, - "sequence_number": 789539218, - "sip_timestamp": 1645119125346243600 - }, - { - "ask_exchange": 301, - "ask_price": 282, - "ask_size": 1, - "bid_exchange": 323, - "bid_price": 277.5, - "bid_size": 10, - "sequence_number": 788994206, - "sip_timestamp": 1645119118474271000 - } - ], - "status": "OK" - }, "schema": { "properties": { - "next_url": { - "description": "If present, this value can be used to fetch the next page of data.", + "count": { + "description": "The total number of results for this request.", + "example": 1, + "type": "integer" + }, + "request_id": { + "description": "A request ID assigned by the server.", + "example": "31d59dda-80e5-4721-8496-d0d32a654afe", "type": "string" }, "results": { "items": { + "description": "An entity that reports trades.", "properties": { - "ask_exchange": { - "description": "The ask exchange ID", + "acronym": { + "description": "A commonly used abbreviation for this exchange.", + "example": "AMEX", + "type": "string" + }, + "asset_class": { + "description": "An identifier for a group of similar financial instruments.", + "enum": [ + "stocks", + "options", + "crypto", + "fx" + ], + "example": "stocks", + "type": "string" + }, + "id": { + "description": "A unique identifier used by Massive.com for this exchange.", + "example": 1, "type": "integer" }, - "ask_price": { - "description": "The ask price.", - "format": "double", - "type": "number" + "locale": { + "description": "An identifier for a geographical location.", + "enum": [ + "us", + "global" + ], + "example": "us", + "type": "string" }, - "ask_size": { - "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.", - "format": "double", - "type": "number" + "mic": { + "description": "The Market Identifier Code of this exchange (see ISO 10383).", + "example": "XASE", + "type": "string" }, - "bid_exchange": { - "description": "The bid exchange ID", - "type": "integer" + "name": { + "description": "Name of this exchange.", + "example": "NYSE American, LLC", + "type": "string" }, - "bid_price": { - "description": "The bid price.", - "format": "double", - "type": "number" + "operating_mic": { + "description": "The MIC of the entity that operates this exchange.", + "example": "XNYS", + "type": "string" }, - "bid_size": { - "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.", - "format": "double", - "type": "number" + "participant_id": { + "description": "The ID used by SIP's to represent this exchange.", + "example": "A", + "type": "string" }, - "sequence_number": { - "description": "The sequence number represents the sequence in which quote events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).", - "format": "int64", - "type": "integer" + "type": { + "description": "Represents the type of exchange.", + "enum": [ + "exchange", + "TRF", + "SIP" + ], + "example": "exchange", + "type": "string" }, - "sip_timestamp": { - "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this quote from the exchange which produced it.", - "format": "int64", - "type": "integer", - "x-polygon-go-type": { - "name": "INanoseconds", - "path": "github.com/polygon-io/ptime" - } + "url": { + "description": "A link to this exchange's website, if one exists.", + "example": "https://www.nyse.com/markets/nyse-american", + "type": "string" } }, + "required": [ + "id", + "type", + "asset_class", + "locale", + "name" + ], "type": "object" }, "type": "array" }, "status": { "description": "The status of this request's response.", + "example": "OK", "type": "string" } }, + "required": [ + "status", + "request_id" + ], "type": "object" } + }, + "text/csv": { + "example": "id,type,asset_class,locale,name,acronym,mic,operating_mic,participant_id,url\n1,exchange,stocks,us,\"NYSE American, LLC\",AMEX,XASE,XNYS,65,https://www.nyse.com/markets/nyse-american\n2,exchange,stocks,us,\"Nasdaq OMX BX, Inc.\",,XBOS,XNAS,66,https://www.nasdaq.com/solutions/nasdaq-bx-stock-market\n3,exchange,stocks,us,\"NYSE National, Inc.\",NSX,XCIS,XNYS,67,https://www.nyse.com/markets/nyse-national\n", + "schema": { + "type": "string" + } } }, - "description": "A list of quotes." + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "properties": { + "count": { + "description": "The total number of results for this request.", + "example": 1, + "type": "integer" + }, + "request_id": { + "description": "A request ID assigned by the server.", + "example": "31d59dda-80e5-4721-8496-d0d32a654afe", + "type": "string" + }, + "status": { + "description": "The status of this request's response.", + "example": "OK", + "type": "string" + } + }, + "required": [ + "status", + "request_id" + ], + "type": "object" + } + } + }, + "description": "a query parameter was malformed" + }, + "default": { + "content": { + "application/json": { + "schema": { + "properties": { + "count": { + "description": "The total number of results for this request.", + "example": 1, + "type": "integer" + }, + "request_id": { + "description": "A request ID assigned by the server.", + "example": "31d59dda-80e5-4721-8496-d0d32a654afe", + "type": "string" + }, + "status": { + "description": "The status of this request's response.", + "example": "OK", + "type": "string" + } + }, + "required": [ + "status", + "request_id" + ], + "type": "object" + } + } + }, + "description": "an unknown error occurred" } }, - "summary": "Quotes", + "summary": "Exchanges", "tags": [ - "options:quotes" + "reference:exchanges" ], - "x-polygon-entitlement-data-type": { - "description": "NBBO data", - "name": "nbbo" - }, - "x-polygon-entitlement-market-type": { - "description": "Options data", - "name": "options" - }, - "x-polygon-paginate": { - "limit": { - "max": 50000 - }, - "order": { - "default": "desc" - }, - "sort": { - "default": "timestamp", - "enum": [ - "timestamp" - ] - } + "x-massive-entitlement-data-type": { + "description": "Reference data", + "name": "reference" } - }, - "x-polygon-ignore": true + } }, - "/v3/quotes/{stockTicker}": { + "/v3/reference/options/contracts": { "get": { - "description": "Get NBBO quotes for a ticker symbol in a given time range.", - "operationId": "Quotes", + "description": "Query for historical options contracts. This provides both active and expired options contracts.", + "operationId": "ListOptionsContracts", "parameters": [ { - "description": "The ticker symbol to get quotes for.", - "example": "AAPL", - "in": "path", - "name": "stockTicker", - "required": true, + "description": "This parameter has been deprecated. To search by specific options ticker, use the Options Contract endpoint [here](https://massive.com/docs/options/get_v3_reference_options_contracts__options_ticker).", + "in": "query", + "name": "ticker", + "schema": { + "type": "string" + } + }, + { + "description": "Query for contracts relating to an underlying stock ticker.", + "in": "query", + "name": "underlying_ticker", + "schema": { + "type": "string" + }, + "x-massive-filter-field": { + "range": true, + "type": "string" + } + }, + { + "description": "Query by the type of contract.", + "in": "query", + "name": "contract_type", "schema": { + "enum": [ + "call", + "put" + ], "type": "string" - }, - "x-polygon-go-id": "Ticker" + } }, { - "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.", + "description": "Query by contract expiration with date format YYYY-MM-DD.", "in": "query", - "name": "timestamp", + "name": "expiration_date", "schema": { "type": "string" }, - "x-polygon-filter-field": { + "x-massive-filter-field": { "range": true } }, { - "description": "Search by timestamp.", + "description": "Specify a point in time for contracts as of this date with format YYYY-MM-DD. Defaults to today's date.", "in": "query", - "name": "timestamp.gte", + "name": "as_of", "schema": { "type": "string" } }, { - "description": "Search by timestamp.", + "description": "Query by strike price of a contract.", "in": "query", - "name": "timestamp.gt", + "name": "strike_price", "schema": { - "type": "string" + "type": "number" + }, + "x-massive-filter-field": { + "range": true, + "type": "number" } }, { - "description": "Search by timestamp.", + "description": "Query for expired contracts. Default is false.", "in": "query", - "name": "timestamp.lte", + "name": "expired", + "schema": { + "type": "boolean" + } + }, + { + "description": "Range by underlying_ticker.", + "in": "query", + "name": "underlying_ticker.gte", "schema": { "type": "string" } }, { - "description": "Search by timestamp.", + "description": "Range by underlying_ticker.", "in": "query", - "name": "timestamp.lt", + "name": "underlying_ticker.gt", "schema": { "type": "string" } }, { - "description": "Order results based on the `sort` field.", + "description": "Range by underlying_ticker.", "in": "query", - "name": "order", + "name": "underlying_ticker.lte", "schema": { - "default": "desc", - "enum": [ - "asc", - "desc" - ], - "example": "asc", "type": "string" } }, { - "description": "Limit the number of results returned, default is 10 and max is 50000.", + "description": "Range by underlying_ticker.", "in": "query", - "name": "limit", + "name": "underlying_ticker.lt", "schema": { - "default": 10, - "example": 10, - "maximum": 50000, - "minimum": 1, - "type": "integer" + "type": "string" } }, { - "description": "Sort field used for ordering.", + "description": "Range by expiration_date.", "in": "query", - "name": "sort", + "name": "expiration_date.gte", "schema": { - "default": "timestamp", - "enum": [ - "timestamp" - ], - "example": "timestamp", "type": "string" } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "next_url": "https://api.polygon.io/v3/quotes/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", - "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", - "results": [ - { - "ask_exchange": 0, - "ask_price": 0, - "ask_size": 0, - "bid_exchange": 11, - "bid_price": 102.7, - "bid_size": 60, - "conditions": [ - 1 - ], - "participant_timestamp": 1517562000065321200, - "sequence_number": 2060, - "sip_timestamp": 1517562000065700400, - "tape": 3 - }, - { - "ask_exchange": 0, - "ask_price": 0, - "ask_size": 0, - "bid_exchange": 11, - "bid_price": 170, - "bid_size": 2, - "conditions": [ - 1 - ], - "participant_timestamp": 1517562000065408300, - "sequence_number": 2061, - "sip_timestamp": 1517562000065791500, - "tape": 3 - } - ], - "status": "OK" - }, - "schema": { - "properties": { - "next_url": { - "description": "If present, this value can be used to fetch the next page of data.", - "type": "string" - }, - "results": { - "items": { - "properties": { - "ask_exchange": { - "description": "The ask exchange ID", - "type": "integer" - }, - "ask_price": { - "description": "The ask price.", - "format": "double", - "type": "number" - }, - "ask_size": { - "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.", - "format": "double", - "type": "number" - }, - "bid_exchange": { - "description": "The bid exchange ID", - "type": "integer" - }, - "bid_price": { - "description": "The bid price.", - "format": "double", - "type": "number" - }, - "bid_size": { - "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.", - "format": "double", - "type": "number" - }, - "conditions": { - "description": "A list of condition codes.", - "items": { - "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.", - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "indicators": { - "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).", - "items": { - "description": "The indicator code.", - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "participant_timestamp": { - "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.", - "format": "int64", - "type": "integer", - "x-polygon-go-type": { - "name": "INanoseconds", - "path": "github.com/polygon-io/ptime" - } - }, - "sequence_number": { - "description": "The sequence number represents the sequence in which quote events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11). Values reset after each trading session/day.", - "format": "int64", - "type": "integer" - }, - "sip_timestamp": { - "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this quote from the exchange which produced it.", - "format": "int64", - "type": "integer", - "x-polygon-go-type": { - "name": "INanoseconds", - "path": "github.com/polygon-io/ptime" - } - }, - "tape": { - "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ", - "format": "int32", - "type": "integer" - }, - "trf_timestamp": { - "description": "The nanosecond accuracy TRF (Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this quote.", - "format": "int64", - "type": "integer", - "x-polygon-go-type": { - "name": "INanoseconds", - "path": "github.com/polygon-io/ptime" - } - } - }, - "type": "object" - }, - "type": "array" - }, - "status": { - "description": "The status of this request's response.", - "type": "string" - } - }, - "type": "object" - } - } - }, - "description": "A list of quotes." - } - }, - "summary": "Quotes (NBBO)", - "tags": [ - "stocks:quotes" - ], - "x-polygon-entitlement-data-type": { - "description": "NBBO data", - "name": "nbbo" - }, - "x-polygon-entitlement-market-type": { - "description": "Stocks data", - "name": "stocks" - }, - "x-polygon-paginate": { - "limit": { - "max": 50000 }, - "order": { - "default": "desc" + { + "description": "Range by expiration_date.", + "in": "query", + "name": "expiration_date.gt", + "schema": { + "type": "string" + } }, - "sort": { - "default": "timestamp", - "enum": [ - "timestamp" - ] - } - }, - "x-polygon-replaces": { - "date": 1654056060000, - "replaces": { - "name": "Quotes (NBBO)", - "path": "get_v2_ticks_stocks_nbbo__ticker___date" - } - } - } - }, - "/v3/reference/conditions": { - "get": { - "description": "List all conditions that Polygon.io uses.", - "operationId": "ListConditions", - "parameters": [ { - "description": "Filter for conditions within a given asset class.", + "description": "Range by expiration_date.", "in": "query", - "name": "asset_class", + "name": "expiration_date.lte", "schema": { - "description": "An identifier for a group of similar financial instruments.", - "enum": [ - "stocks", - "options", - "crypto", - "fx" - ], - "example": "stocks", "type": "string" } }, { - "description": "Filter by data type.", + "description": "Range by expiration_date.", "in": "query", - "name": "data_type", + "name": "expiration_date.lt", "schema": { - "description": "The type of financial data represented by a data model.", - "enum": [ - "trade", - "bbo", - "nbbo" - ], - "example": "trade", "type": "string" } }, { - "description": "Filter for conditions with a given ID.", + "description": "Range by strike_price.", "in": "query", - "name": "id", + "name": "strike_price.gte", "schema": { - "description": "An identifier used by Polygon.io for this condition. Unique per data type.", - "example": 1, - "type": "integer" + "type": "number" } }, { - "description": "Filter by SIP. If the condition contains a mapping for that SIP, the condition will be returned.", + "description": "Range by strike_price.", "in": "query", - "name": "sip", + "name": "strike_price.gt", "schema": { - "description": "One of the SIPs.", - "enum": [ - "CTA", - "UTP", - "OPRA" - ], - "example": "CTA", - "type": "string" + "type": "number" + } + }, + { + "description": "Range by strike_price.", + "in": "query", + "name": "strike_price.lte", + "schema": { + "type": "number" + } + }, + { + "description": "Range by strike_price.", + "in": "query", + "name": "strike_price.lt", + "schema": { + "type": "number" } }, { @@ -14225,16 +25334,14 @@ "in": "query", "name": "sort", "schema": { - "default": "asset_class", + "default": "ticker", "enum": [ - "asset_class", - "id", - "type", - "name", - "data_types", - "legacy" + "ticker", + "underlying_ticker", + "expiration_date", + "strike_price" ], - "example": "asset_class", + "example": "ticker", "type": "string" } } @@ -14243,955 +25350,759 @@ "200": { "content": { "application/json": { - "schema": { - "example": { - "count": 1, - "request_id": "31d59dda-80e5-4721-8496-d0d32a654afe", - "results": [ - { - "asset_class": "stocks", - "data_types": [ - "trade" - ], - "id": 2, - "name": "Average Price Trade", - "sip_mapping": { - "CTA": "B", - "UTP": "W" - }, - "type": "condition", - "update_rules": { - "consolidated": { - "updates_high_low": false, - "updates_open_close": false, - "updates_volume": true - }, - "market_center": { - "updates_high_low": false, - "updates_open_close": false, - "updates_volume": true - } - } - } - ], - "status": "OK" - }, - "properties": { - "count": { - "description": "The total number of results for this request.", - "example": 1, - "type": "integer" - }, - "next_url": { - "description": "If present, this value can be used to fetch the next page of data.", - "type": "string" - }, - "request_id": { - "description": "A request ID assigned by the server.", - "example": "31d59dda-80e5-4721-8496-d0d32a654afe", - "type": "string" - }, - "results": { - "description": "An array of conditions that match your query.", - "items": { - "description": "A condition generally refers to any extra information passed in a trade or a quote. These conditions\nmay or may not affect the behavior of aggregates.", - "properties": { - "abbreviation": { - "description": "A commonly-used abbreviation for this condition.", - "type": "string" - }, - "asset_class": { - "description": "An identifier for a group of similar financial instruments.", - "enum": [ - "stocks", - "options", - "crypto", - "fx" - ], - "example": "stocks", - "type": "string" - }, - "data_types": { - "description": "Data types that this condition applies to.", - "items": { - "description": "The type of financial data represented by a data model.", - "enum": [ - "trade", - "bbo", - "nbbo" - ], - "example": "trade", - "type": "string" - }, - "type": "array" - }, - "description": { - "description": "A short description of the semantics of this condition.", - "type": "string" - }, - "exchange": { - "description": "If present, mapping this condition from a Polygon.io code to a SIP symbol depends on this attribute.\nIn other words, data with this condition attached comes exclusively from the given exchange.", - "type": "integer" - }, - "id": { - "description": "An identifier used by Polygon.io for this condition. Unique per data type.", - "example": 1, - "type": "integer" - }, - "legacy": { - "description": "If true, this condition is from an old version of the SIPs' specs and no longer is used.\nOther conditions may or may not reuse the same symbol as this one.", - "type": "boolean" - }, - "name": { - "description": "The name of this condition.", - "example": "Acquisition", - "type": "string" - }, - "sip_mapping": { - "description": "A mapping to a symbol for each SIP that has this condition.", - "properties": { - "CTA": { - "type": "string" - }, - "OPRA": { - "type": "string" - }, - "UTP": { - "type": "string" - } - }, - "type": "object" - }, - "type": { - "description": "An identifier for a collection of related conditions.", - "enum": [ - "sale_condition", - "quote_condition", - "sip_generated_flag", - "financial_status_indicator", - "short_sale_restriction_indicator", - "settlement_condition", - "market_condition", - "trade_thru_exempt" - ], - "type": "string" - }, - "update_rules": { - "description": "A list of aggregation rules.", - "properties": { - "consolidated": { - "description": "Describes aggregation rules on a consolidated (all exchanges) basis.", - "properties": { - "updates_high_low": { - "description": "Whether or not trades with this condition update the high/low.", - "type": "boolean" - }, - "updates_open_close": { - "description": "Whether or not trades with this condition update the open/close.", - "type": "boolean" - }, - "updates_volume": { - "description": "Whether or not trades with this condition update the volume.", - "type": "boolean" - } - }, - "required": [ - "updates_high_low", - "updates_open_close", - "updates_volume" - ], - "type": "object" - }, - "market_center": { - "description": "Describes aggregation rules on a per-market-center basis.", - "properties": { - "updates_high_low": { - "description": "Whether or not trades with this condition update the high/low.", - "type": "boolean" - }, - "updates_open_close": { - "description": "Whether or not trades with this condition update the open/close.", - "type": "boolean" - }, - "updates_volume": { - "description": "Whether or not trades with this condition update the volume.", - "type": "boolean" - } - }, - "required": [ - "updates_high_low", - "updates_open_close", - "updates_volume" - ], - "type": "object" - } - }, - "required": [ - "consolidated", - "market_center" - ], - "type": "object" - } - }, - "required": [ - "id", - "type", - "name", - "asset_class", - "sip_mapping", - "data_types" - ], - "type": "object" - }, - "type": "array" + "example": { + "request_id": "603902c0-a5a5-406f-bd08-f030f92418fa", + "results": [ + { + "cfi": "OCASPS", + "contract_type": "call", + "exercise_style": "american", + "expiration_date": "2021-11-19", + "primary_exchange": "BATO", + "shares_per_contract": 100, + "strike_price": 85, + "ticker": "O:AAPL211119C00085000", + "underlying_ticker": "AAPL" }, - "status": { - "description": "The status of this request's response.", - "example": "OK", - "type": "string" + { + "additional_underlyings": [ + { + "amount": 44, + "type": "equity", + "underlying": "VMW" + }, + { + "amount": 6.53, + "type": "currency", + "underlying": "USD" + } + ], + "cfi": "OCASPS", + "contract_type": "call", + "exercise_style": "american", + "expiration_date": "2021-11-19", + "primary_exchange": "BATO", + "shares_per_contract": 100, + "strike_price": 90, + "ticker": "O:AAPL211119C00090000", + "underlying_ticker": "AAPL" } - }, - "required": [ - "status", - "request_id", - "count", - "results" ], - "type": "object" - } - } - }, - "description": "OK" - }, - "400": { - "content": { - "application/json": { + "status": "OK" + }, "schema": { "properties": { - "count": { - "description": "The total number of results for this request.", - "example": 1, - "type": "integer" - }, "next_url": { "description": "If present, this value can be used to fetch the next page of data.", "type": "string" }, "request_id": { - "description": "A request ID assigned by the server.", - "example": "31d59dda-80e5-4721-8496-d0d32a654afe", "type": "string" }, "results": { - "description": "An array of conditions that match your query.", "items": { - "description": "A condition generally refers to any extra information passed in a trade or a quote. These conditions\nmay or may not affect the behavior of aggregates.", "properties": { - "abbreviation": { - "description": "A commonly-used abbreviation for this condition.", - "type": "string" - }, - "asset_class": { - "description": "An identifier for a group of similar financial instruments.", - "enum": [ - "stocks", - "options", - "crypto", - "fx" - ], - "example": "stocks", - "type": "string" - }, - "data_types": { - "description": "Data types that this condition applies to.", + "additional_underlyings": { + "description": "If an option contract has additional underlyings or deliverables associated with it, they will appear here.\nSee here for some examples of what might cause a contract to have additional underlyings.", "items": { - "description": "The type of financial data represented by a data model.", - "enum": [ - "trade", - "bbo", - "nbbo" - ], - "example": "trade", - "type": "string" + "properties": { + "amount": { + "description": "The number of shares per contract of the additional underlying, or the cash-in-lieu amount of the currency.", + "type": "number" + }, + "type": { + "description": "The type of the additional underlying asset, either equity or currency.", + "type": "string" + }, + "underlying": { + "description": "The name of the additional underlying asset.", + "type": "string" + } + }, + "type": "object", + "x-massive-go-type": { + "name": "AdditionalUnderlying" + } }, - "type": "array" + "type": "array", + "x-massive-go-type": { + "name": "AdditionalUnderlyings" + } }, - "description": { - "description": "A short description of the semantics of this condition.", + "cfi": { + "description": "The 6 letter CFI code of the contract (defined in ISO 10962)", "type": "string" }, - "exchange": { - "description": "If present, mapping this condition from a Polygon.io code to a SIP symbol depends on this attribute.\nIn other words, data with this condition attached comes exclusively from the given exchange.", - "type": "integer" + "contract_type": { + "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".", + "type": "string" }, - "id": { - "description": "An identifier used by Polygon.io for this condition. Unique per data type.", - "example": 1, + "correction": { + "description": "The correction number for this option contract.", "type": "integer" }, - "legacy": { - "description": "If true, this condition is from an old version of the SIPs' specs and no longer is used.\nOther conditions may or may not reuse the same symbol as this one.", - "type": "boolean" + "exercise_style": { + "description": "The exercise style of this contract. See this link for more details on exercise styles.", + "enum": [ + "american", + "european", + "bermudan" + ], + "type": "string" }, - "name": { - "description": "The name of this condition.", - "example": "Acquisition", + "expiration_date": { + "description": "The contract's expiration date in YYYY-MM-DD format.", + "type": "string", + "x-massive-go-type": { + "name": "IDaysMassiveDateString", + "path": "github.com/massive-com/ptime" + } + }, + "primary_exchange": { + "description": "The MIC code of the primary exchange that this contract is listed on.", "type": "string" }, - "sip_mapping": { - "description": "A mapping to a symbol for each SIP that has this condition.", - "properties": { - "CTA": { - "type": "string" - }, - "OPRA": { - "type": "string" - }, - "UTP": { - "type": "string" - } - }, - "type": "object" + "shares_per_contract": { + "description": "The number of shares per contract for this contract.", + "type": "number" }, - "type": { - "description": "An identifier for a collection of related conditions.", - "enum": [ - "sale_condition", - "quote_condition", - "sip_generated_flag", - "financial_status_indicator", - "short_sale_restriction_indicator", - "settlement_condition", - "market_condition", - "trade_thru_exempt" - ], + "strike_price": { + "description": "The strike price of the option contract.", + "type": "number" + }, + "ticker": { + "description": "The ticker for the option contract.", "type": "string" }, - "update_rules": { - "description": "A list of aggregation rules.", - "properties": { - "consolidated": { - "description": "Describes aggregation rules on a consolidated (all exchanges) basis.", - "properties": { - "updates_high_low": { - "description": "Whether or not trades with this condition update the high/low.", - "type": "boolean" - }, - "updates_open_close": { - "description": "Whether or not trades with this condition update the open/close.", - "type": "boolean" - }, - "updates_volume": { - "description": "Whether or not trades with this condition update the volume.", - "type": "boolean" - } - }, - "required": [ - "updates_high_low", - "updates_open_close", - "updates_volume" - ], - "type": "object" - }, - "market_center": { - "description": "Describes aggregation rules on a per-market-center basis.", - "properties": { - "updates_high_low": { - "description": "Whether or not trades with this condition update the high/low.", - "type": "boolean" - }, - "updates_open_close": { - "description": "Whether or not trades with this condition update the open/close.", - "type": "boolean" - }, - "updates_volume": { - "description": "Whether or not trades with this condition update the volume.", - "type": "boolean" - } - }, - "required": [ - "updates_high_low", - "updates_open_close", - "updates_volume" - ], - "type": "object" - } - }, - "required": [ - "consolidated", - "market_center" - ], - "type": "object" + "underlying_ticker": { + "description": "The underlying ticker that the option contract relates to.", + "type": "string" } }, - "required": [ - "id", - "type", - "name", - "asset_class", - "sip_mapping", - "data_types" - ], - "type": "object" + "type": "object", + "x-massive-go-type": { + "name": "OptionsContract" + } }, "type": "array" }, "status": { - "description": "The status of this request's response.", - "example": "OK", "type": "string" } - }, - "required": [ - "status", - "request_id", - "count", - "results" - ], + }, "type": "object" } + }, + "text/csv": { + "schema": { + "example": "cfi,contract_type,exercise_style,expiration_date,primary_exchange,shares_per_contract,strike_price,ticker,underlying_ticker,additional_underlyings_json\nOCASPS,call,american,2021-11-19,BATO,100,85,O:AAPL211119C00085000,AAPL,\nOCASPS,call,american,2021-11-19,BATO,100,90,O:AAPL211119C00090000,AAPL,\"[{'type': 'equity', 'underlying': 'VMW', 'amount': 44}, {'type': 'currency', 'underlying': 'USD', 'amount': 6.53}]\"\n", + "type": "string" + } } }, - "description": "a query parameter was malformed" + "description": "A list of options contracts" + } + }, + "summary": "Options Contracts", + "tags": [ + "reference:options:contracts:list" + ], + "x-massive-entitlement-data-type": { + "description": "Reference data", + "name": "reference" + }, + "x-massive-paginate": { + "limit": { + "default": 10, + "max": 1000 }, - "default": { + "sort": { + "default": "ticker", + "enum": [ + "ticker", + "underlying_ticker", + "expiration_date", + "strike_price" + ] + } + } + } + }, + "/v3/reference/options/contracts/{options_ticker}": { + "get": { + "description": "Get an options contract", + "operationId": "GetOptionsContract", + "parameters": [ + { + "description": "Query for a contract by options ticker. You can learn more about the structure of options tickers [here](https://massive.com/blog/how-to-read-a-stock-options-ticker/).", + "example": "O:SPY251219C00650000", + "in": "path", + "name": "options_ticker", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Specify a point in time for the contract as of this date with format YYYY-MM-DD. Defaults to today's date.", + "in": "query", + "name": "as_of", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { "content": { "application/json": { + "example": { + "request_id": "603902c0-a5a5-406f-bd08-f030f92418fa", + "results": { + "additional_underlyings": [ + { + "amount": 44, + "type": "equity", + "underlying": "VMW" + }, + { + "amount": 6.53, + "type": "currency", + "underlying": "USD" + } + ], + "cfi": "OCASPS", + "contract_type": "call", + "exercise_style": "american", + "expiration_date": "2021-11-19", + "primary_exchange": "BATO", + "shares_per_contract": 100, + "strike_price": 85, + "ticker": "O:AAPL211119C00085000", + "underlying_ticker": "AAPL" + }, + "status": "OK" + }, "schema": { "properties": { - "count": { - "description": "The total number of results for this request.", - "example": 1, - "type": "integer" - }, - "next_url": { - "description": "If present, this value can be used to fetch the next page of data.", - "type": "string" - }, "request_id": { - "description": "A request ID assigned by the server.", - "example": "31d59dda-80e5-4721-8496-d0d32a654afe", "type": "string" }, "results": { - "description": "An array of conditions that match your query.", - "items": { - "description": "A condition generally refers to any extra information passed in a trade or a quote. These conditions\nmay or may not affect the behavior of aggregates.", - "properties": { - "abbreviation": { - "description": "A commonly-used abbreviation for this condition.", - "type": "string" - }, - "asset_class": { - "description": "An identifier for a group of similar financial instruments.", - "enum": [ - "stocks", - "options", - "crypto", - "fx" - ], - "example": "stocks", - "type": "string" - }, - "data_types": { - "description": "Data types that this condition applies to.", - "items": { - "description": "The type of financial data represented by a data model.", - "enum": [ - "trade", - "bbo", - "nbbo" - ], - "example": "trade", - "type": "string" - }, - "type": "array" - }, - "description": { - "description": "A short description of the semantics of this condition.", - "type": "string" - }, - "exchange": { - "description": "If present, mapping this condition from a Polygon.io code to a SIP symbol depends on this attribute.\nIn other words, data with this condition attached comes exclusively from the given exchange.", - "type": "integer" - }, - "id": { - "description": "An identifier used by Polygon.io for this condition. Unique per data type.", - "example": 1, - "type": "integer" - }, - "legacy": { - "description": "If true, this condition is from an old version of the SIPs' specs and no longer is used.\nOther conditions may or may not reuse the same symbol as this one.", - "type": "boolean" - }, - "name": { - "description": "The name of this condition.", - "example": "Acquisition", - "type": "string" - }, - "sip_mapping": { - "description": "A mapping to a symbol for each SIP that has this condition.", + "properties": { + "additional_underlyings": { + "description": "If an option contract has additional underlyings or deliverables associated with it, they will appear here.\nSee here for some examples of what might cause a contract to have additional underlyings.", + "items": { "properties": { - "CTA": { - "type": "string" + "amount": { + "description": "The number of shares per contract of the additional underlying, or the cash-in-lieu amount of the currency.", + "type": "number" }, - "OPRA": { + "type": { + "description": "The type of the additional underlying asset, either equity or currency.", "type": "string" }, - "UTP": { + "underlying": { + "description": "The name of the additional underlying asset.", "type": "string" } }, - "type": "object" - }, - "type": { - "description": "An identifier for a collection of related conditions.", - "enum": [ - "sale_condition", - "quote_condition", - "sip_generated_flag", - "financial_status_indicator", - "short_sale_restriction_indicator", - "settlement_condition", - "market_condition", - "trade_thru_exempt" - ], - "type": "string" + "type": "object", + "x-massive-go-type": { + "name": "AdditionalUnderlying" + } }, - "update_rules": { - "description": "A list of aggregation rules.", - "properties": { - "consolidated": { - "description": "Describes aggregation rules on a consolidated (all exchanges) basis.", - "properties": { - "updates_high_low": { - "description": "Whether or not trades with this condition update the high/low.", - "type": "boolean" - }, - "updates_open_close": { - "description": "Whether or not trades with this condition update the open/close.", - "type": "boolean" - }, - "updates_volume": { - "description": "Whether or not trades with this condition update the volume.", - "type": "boolean" - } - }, - "required": [ - "updates_high_low", - "updates_open_close", - "updates_volume" - ], - "type": "object" - }, - "market_center": { - "description": "Describes aggregation rules on a per-market-center basis.", - "properties": { - "updates_high_low": { - "description": "Whether or not trades with this condition update the high/low.", - "type": "boolean" - }, - "updates_open_close": { - "description": "Whether or not trades with this condition update the open/close.", - "type": "boolean" - }, - "updates_volume": { - "description": "Whether or not trades with this condition update the volume.", - "type": "boolean" - } - }, - "required": [ - "updates_high_low", - "updates_open_close", - "updates_volume" - ], - "type": "object" - } - }, - "required": [ - "consolidated", - "market_center" - ], - "type": "object" + "type": "array", + "x-massive-go-type": { + "name": "AdditionalUnderlyings" + } + }, + "cfi": { + "description": "The 6 letter CFI code of the contract (defined in ISO 10962)", + "type": "string" + }, + "contract_type": { + "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".", + "type": "string" + }, + "correction": { + "description": "The correction number for this option contract.", + "type": "integer" + }, + "exercise_style": { + "description": "The exercise style of this contract. See this link for more details on exercise styles.", + "enum": [ + "american", + "european", + "bermudan" + ], + "type": "string" + }, + "expiration_date": { + "description": "The contract's expiration date in YYYY-MM-DD format.", + "type": "string", + "x-massive-go-type": { + "name": "IDaysMassiveDateString", + "path": "github.com/massive-com/ptime" } }, - "required": [ - "id", - "type", - "name", - "asset_class", - "sip_mapping", - "data_types" - ], - "type": "object" + "primary_exchange": { + "description": "The MIC code of the primary exchange that this contract is listed on.", + "type": "string" + }, + "shares_per_contract": { + "description": "The number of shares per contract for this contract.", + "type": "number" + }, + "strike_price": { + "description": "The strike price of the option contract.", + "type": "number" + }, + "ticker": { + "description": "The ticker for the option contract.", + "type": "string" + }, + "underlying_ticker": { + "description": "The underlying ticker that the option contract relates to.", + "type": "string" + } }, - "type": "array" + "type": "object", + "x-massive-go-type": { + "name": "OptionsContract" + } }, "status": { - "description": "The status of this request's response.", - "example": "OK", "type": "string" } }, - "required": [ - "status", - "request_id", - "count", - "results" - ], "type": "object" } + }, + "text/csv": { + "schema": { + "example": "cfi,contract_type,exercise_style,expiration_date,primary_exchange,shares_per_contract,strike_price,ticker,underlying_ticker,additional_underlyings_json\nOCASPS,call,american,2021-11-19,BATO,100,90,O:AAPL211119C00090000,AAPL,\"[{'type': 'equity', 'underlying': 'VMW', 'amount': 44}, {'type': 'currency', 'underlying': 'USD', 'amount': 6.53}]\"\n", + "type": "string" + } } }, - "description": "an unknown error occurred" + "description": "A specific options contract" } }, - "summary": "Conditions", + "summary": "Options Contract", "tags": [ - "reference:conditions" + "reference:options:contract" ], - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "description": "Reference data", "name": "reference" - }, - "x-polygon-paginate": { - "limit": { - "default": 10, - "max": 1000 - }, - "sort": { - "default": "asset_class", - "enum": [ - "asset_class", - "id", - "type", - "name", - "data_types", - "legacy" - ] - } } } }, - "/v3/reference/dividends": { + "/v3/reference/splits": { "get": { - "description": "Get a list of historical cash dividends, including the ticker symbol,\ndeclaration date, ex-dividend date, record date, pay date, frequency,\nand amount.", - "operationId": "ListDividends", + "description": "Get a list of historical stock splits, including the ticker symbol, the execution date, and the factors of the split ratio.", + "operationId": "ListStockSplits", "parameters": [ { - "description": "Return the dividends that contain this ticker.", + "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.", "in": "query", "name": "ticker", "schema": { "type": "string" }, - "x-polygon-filter-field": { + "x-massive-filter-field": { "range": true, "type": "string" } }, { - "description": "Query by ex-dividend date with the format YYYY-MM-DD.", + "description": "Query by execution date with the format YYYY-MM-DD.", "in": "query", - "name": "ex_dividend_date", + "name": "execution_date", "schema": { "format": "date", "type": "string" }, - "x-polygon-filter-field": { + "x-massive-filter-field": { "range": true, "type": "string" } }, { - "description": "Query by record date with the format YYYY-MM-DD.", + "description": "Query for reverse stock splits. A split ratio where split_from is greater than split_to represents a reverse split. By default this filter is not used.", "in": "query", - "name": "record_date", + "name": "reverse_split", "schema": { - "format": "date", - "type": "string" - }, - "x-polygon-filter-field": { - "range": true, - "type": "string" + "nullable": true, + "type": "boolean" } }, { - "description": "Query by declaration date with the format YYYY-MM-DD.", + "description": "Range by ticker.", "in": "query", - "name": "declaration_date", + "name": "ticker.gte", "schema": { - "format": "date", - "type": "string" - }, - "x-polygon-filter-field": { - "range": true, "type": "string" } }, { - "description": "Query by pay date with the format YYYY-MM-DD.", + "description": "Range by ticker.", "in": "query", - "name": "pay_date", + "name": "ticker.gt", "schema": { - "format": "date", "type": "string" - }, - "x-polygon-filter-field": { - "range": true, - "type": "string" - } - }, - { - "description": "Query by the number of times per year the dividend is paid out. Possible values are 0 (one-time), 1 (annually), 2 (bi-annually), 4 (quarterly), and 12 (monthly).", - "in": "query", - "name": "frequency", - "schema": { - "enum": [ - 0, - 1, - 2, - 4, - 12 - ], - "type": "integer" } }, { - "description": "Query by the cash amount of the dividend.", + "description": "Range by ticker.", "in": "query", - "name": "cash_amount", + "name": "ticker.lte", "schema": { - "type": "number" - }, - "x-polygon-filter-field": { - "range": true, - "type": "number" + "type": "string" } }, { - "description": "Query by the type of dividend. Dividends that have been paid and/or are expected to be paid on consistent schedules are denoted as CD.\nSpecial Cash dividends that have been paid that are infrequent or unusual, and/or can not be expected to occur in the future are denoted as SC.", + "description": "Range by ticker.", "in": "query", - "name": "dividend_type", + "name": "ticker.lt", "schema": { - "description": "The type of dividend. Dividends that have been paid and/or are expected to be paid on consistent schedules are denoted as CD.\nSpecial Cash dividends that have been paid that are infrequent or unusual, and/or can not be expected to occur in the future are denoted as SC.\nLong-Term and Short-Term capital gain distributions are denoted as LT and ST, respectively.", - "enum": [ - "CD", - "SC", - "LT", - "ST" - ], "type": "string" } }, { - "description": "Search by ticker.", + "description": "Range by execution_date.", "in": "query", - "name": "ticker.gte", + "name": "execution_date.gte", "schema": { + "format": "date", "type": "string" } }, { - "description": "Search by ticker.", + "description": "Range by execution_date.", "in": "query", - "name": "ticker.gt", + "name": "execution_date.gt", "schema": { + "format": "date", "type": "string" } }, { - "description": "Search by ticker.", + "description": "Range by execution_date.", "in": "query", - "name": "ticker.lte", + "name": "execution_date.lte", "schema": { + "format": "date", "type": "string" } }, { - "description": "Search by ticker.", + "description": "Range by execution_date.", "in": "query", - "name": "ticker.lt", + "name": "execution_date.lt", "schema": { + "format": "date", "type": "string" } }, { - "description": "Search by ex_dividend_date.", + "description": "Order results based on the `sort` field.", "in": "query", - "name": "ex_dividend_date.gte", + "name": "order", "schema": { - "format": "date", + "enum": [ + "asc", + "desc" + ], + "example": "asc", "type": "string" } }, { - "description": "Search by ex_dividend_date.", + "description": "Limit the number of results returned, default is 10 and max is 1000.", "in": "query", - "name": "ex_dividend_date.gt", + "name": "limit", "schema": { - "format": "date", - "type": "string" + "default": 10, + "example": 10, + "maximum": 1000, + "minimum": 1, + "type": "integer" } }, { - "description": "Search by ex_dividend_date.", + "description": "Sort field used for ordering.", "in": "query", - "name": "ex_dividend_date.lte", + "name": "sort", "schema": { - "format": "date", + "default": "execution_date", + "enum": [ + "execution_date", + "ticker" + ], + "example": "execution_date", "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "next_url": "https://api.massive.com/v3/splits/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "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" + } + ], + "status": "OK" + }, + "schema": { + "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" + }, + "request_id": { + "type": "string" + }, + "results": { + "items": { + "properties": { + "execution_date": { + "description": "The execution date of the stock split. On this date the stock split was applied.", + "type": "string" + }, + "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", + "type": "number" + }, + "split_to": { + "description": "The first number in the split ratio.\n\nFor example: In a 2-for-1 split, split_to would be 2.", + "format": "float", + "type": "number" + }, + "ticker": { + "description": "The ticker symbol of the stock split.", + "type": "string" + } + }, + "required": [ + "split_from", + "split_to", + "id", + "ticker", + "execution_date" + ], + "type": "object" + }, + "type": "array" + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "type": "object" + } + }, + "text/csv": { + "example": "ticker,execution_date,split_from,split_to\nAAPL,2020-08-31,1.0,4.0\nAAPL,2005-02-28,1.0,2.0\n", + "schema": { + "type": "string" + } + } + }, + "description": "A list of stock splits." + } + }, + "summary": "Stock Splits v3", + "tags": [ + "reference:stocks" + ], + "x-massive-entitlement-data-type": { + "description": "Reference data", + "name": "reference" + }, + "x-massive-paginate": { + "limit": { + "default": 10, + "max": 1000 }, + "sort": { + "default": "execution_date", + "enum": [ + "execution_date", + "ticker" + ] + } + } + } + }, + "/v3/reference/tickers": { + "get": { + "description": "Query all ticker symbols which are supported by Massive.com. This API currently includes Stocks/Equities, Indices, Forex, and Crypto.", + "operationId": "ListTickers", + "parameters": [ { - "description": "Search by ex_dividend_date.", + "description": "Specify a ticker symbol.\nDefaults to empty string which queries all tickers.", "in": "query", - "name": "ex_dividend_date.lt", + "name": "ticker", "schema": { - "format": "date", "type": "string" + }, + "x-massive-filter-field": { + "range": true } }, { - "description": "Search by record_date.", + "description": "Specify the type of the tickers. Find the types that we support via our [Ticker Types API](https://massive.com/docs/stocks/get_v3_reference_tickers_types).\nDefaults to empty string which queries all types.", "in": "query", - "name": "record_date.gte", + "name": "type", "schema": { - "format": "date", + "enum": [ + "CS", + "ADRC", + "ADRP", + "ADRR", + "UNIT", + "RIGHT", + "PFD", + "FUND", + "SP", + "WARRANT", + "INDEX", + "ETF", + "ETN", + "OS", + "GDR", + "OTHER", + "NYRS", + "AGEN", + "EQLK", + "BOND", + "ADRW", + "BASKET", + "LT" + ], "type": "string" } }, { - "description": "Search by record_date.", + "description": "Filter by market type. By default all markets are included.", "in": "query", - "name": "record_date.gt", + "name": "market", "schema": { - "format": "date", + "enum": [ + "stocks", + "crypto", + "fx", + "otc", + "indices" + ], "type": "string" } }, { - "description": "Search by record_date.", + "description": "Specify the primary exchange of the asset in the ISO code format. Find more information about the ISO codes [at the ISO org website](https://www.iso20022.org/market-identifier-codes).\nDefaults to empty string which queries all exchanges.", "in": "query", - "name": "record_date.lte", + "name": "exchange", "schema": { - "format": "date", "type": "string" } }, { - "description": "Search by record_date.", + "description": "Specify the CUSIP code of the asset you want to search for. Find more information about CUSIP codes [at their website](https://www.cusip.com/identifiers.html#/CUSIP).\nDefaults to empty string which queries all CUSIPs.\n\nNote: Although you can query by CUSIP, due to legal reasons we do not return the CUSIP in the response.", "in": "query", - "name": "record_date.lt", + "name": "cusip", "schema": { - "format": "date", "type": "string" } }, { - "description": "Search by declaration_date.", + "description": "Specify the CIK of the asset you want to search for. Find more information about CIK codes [at their website](https://www.sec.gov/edgar/searchedgar/cik.htm).\nDefaults to empty string which queries all CIKs.", "in": "query", - "name": "declaration_date.gte", + "name": "cik", "schema": { - "format": "date", "type": "string" } }, { - "description": "Search by declaration_date.", + "description": "Specify a point in time to retrieve tickers available on that date.\nDefaults to the most recent available date.", "in": "query", - "name": "declaration_date.gt", + "name": "date", "schema": { "format": "date", "type": "string" } }, { - "description": "Search by declaration_date.", + "description": "Search for terms within the ticker and/or company name.", "in": "query", - "name": "declaration_date.lte", + "name": "search", "schema": { - "format": "date", "type": "string" } }, { - "description": "Search by declaration_date.", + "description": "Specify if the tickers returned should be actively traded on the queried date. Default is true.", + "example": true, "in": "query", - "name": "declaration_date.lt", + "name": "active", "schema": { - "format": "date", - "type": "string" + "type": "boolean" } }, { - "description": "Search by pay_date.", + "description": "Range by ticker.", "in": "query", - "name": "pay_date.gte", + "name": "ticker.gte", "schema": { - "format": "date", "type": "string" } }, { - "description": "Search by pay_date.", + "description": "Range by ticker.", "in": "query", - "name": "pay_date.gt", + "name": "ticker.gt", "schema": { - "format": "date", "type": "string" } }, { - "description": "Search by pay_date.", + "description": "Range by ticker.", "in": "query", - "name": "pay_date.lte", + "name": "ticker.lte", "schema": { - "format": "date", "type": "string" } }, { - "description": "Search by pay_date.", + "description": "Range by ticker.", "in": "query", - "name": "pay_date.lt", + "name": "ticker.lt", "schema": { - "format": "date", "type": "string" } }, - { - "description": "Search by cash_amount.", - "in": "query", - "name": "cash_amount.gte", - "schema": { - "type": "number" - } - }, - { - "description": "Search by cash_amount.", - "in": "query", - "name": "cash_amount.gt", - "schema": { - "type": "number" - } - }, - { - "description": "Search by cash_amount.", - "in": "query", - "name": "cash_amount.lte", - "schema": { - "type": "number" - } - }, - { - "description": "Search by cash_amount.", - "in": "query", - "name": "cash_amount.lt", - "schema": { - "type": "number" - } - }, { "description": "Order results based on the `sort` field.", "in": "query", @@ -15206,12 +26117,12 @@ } }, { - "description": "Limit the number of results returned, default is 10 and max is 1000.", + "description": "Limit the number of results returned, default is 100 and max is 1000.", "in": "query", "name": "limit", "schema": { - "default": 10, - "example": 10, + "default": 100, + "example": 100, "maximum": 1000, "minimum": 1, "type": "integer" @@ -15222,16 +26133,25 @@ "in": "query", "name": "sort", "schema": { - "default": "ex_dividend_date", + "default": "ticker", "enum": [ - "ex_dividend_date", - "pay_date", - "declaration_date", - "record_date", - "cash_amount", - "ticker" + "ticker", + "name", + "market", + "locale", + "primary_exchange", + "type", + "currency_symbol", + "currency_name", + "base_currency_symbol", + "base_currency_name", + "cik", + "composite_figi", + "share_class_figi", + "last_updated_utc", + "delisted_utc" ], - "example": "ex_dividend_date", + "example": "ticker", "type": "string" } } @@ -15240,404 +26160,187 @@ "200": { "content": { "application/json": { + "example": { + "count": 1, + "next_url": "https://api.massive.com/v3/reference/tickers?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "request_id": "e70013d92930de90e089dc8fa098888e", + "results": [ + { + "active": true, + "cik": "0001090872", + "composite_figi": "BBG000BWQYZ5", + "currency_name": "usd", + "last_updated_utc": "2021-04-25T00:00:00Z", + "locale": "us", + "market": "stocks", + "name": "Agilent Technologies Inc.", + "primary_exchange": "XNYS", + "share_class_figi": "BBG001SCTQY4", + "ticker": "A", + "type": "CS" + } + ], + "status": "OK" + }, "schema": { - "description": "A list of dividends.", - "example": { - "next_url": "https://api.polygon.io/v3/reference/dividends/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", - "results": [ - { - "cash_amount": 0.22, - "declaration_date": "2021-10-28", - "dividend_type": "CD", - "ex_dividend_date": "2021-11-05", - "frequency": 4, - "pay_date": "2021-11-11", - "record_date": "2021-11-08", - "ticker": "AAPL" - }, - { - "cash_amount": 0.22, - "declaration_date": "2021-07-27", - "dividend_type": "CD", - "ex_dividend_date": "2021-08-06", - "frequency": 4, - "pay_date": "2021-08-12", - "record_date": "2021-08-09", - "ticker": "AAPL" - } - ], - "status": "OK" - }, "properties": { + "count": { + "description": "The total number of results for this request.", + "type": "integer" + }, "next_url": { "description": "If present, this value can be used to fetch the next page of data.", "type": "string" }, "request_id": { + "description": "A request id assigned by the server.", "type": "string" }, "results": { + "description": "An array of tickers that match your query.\n\nNote: Although you can query by CUSIP, due to legal reasons we do not return the CUSIP in the response.", "items": { "properties": { - "cash_amount": { - "description": "The cash amount of the dividend per share owned.", - "type": "number" + "active": { + "description": "Whether or not the asset is actively traded. False means the asset has been delisted.", + "type": "boolean" }, - "currency": { - "description": "The currency in which the dividend is paid.", + "cik": { + "description": "The CIK number for this ticker. Find more information [here](https://en.wikipedia.org/wiki/Central_Index_Key).", "type": "string" }, - "declaration_date": { - "description": "The date that the dividend was announced.", + "composite_figi": { + "description": "The composite OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/about/figi)", "type": "string" }, - "dividend_type": { - "description": "The type of dividend. Dividends that have been paid and/or are expected to be paid on consistent schedules are denoted as CD.\nSpecial Cash dividends that have been paid that are infrequent or unusual, and/or can not be expected to occur in the future are denoted as SC.\nLong-Term and Short-Term capital gain distributions are denoted as LT and ST, respectively.", + "currency_name": { + "description": "The name of the currency that this asset is traded with.", + "type": "string" + }, + "delisted_utc": { + "description": "The last date that the asset was traded.", + "format": "date-time", + "type": "string" + }, + "last_updated_utc": { + "description": "The information is accurate up to this time.", + "format": "date-time", + "type": "string" + }, + "locale": { + "description": "The locale of the asset.", "enum": [ - "CD", - "SC", - "LT", - "ST" + "us", + "global" ], "type": "string" }, - "ex_dividend_date": { - "description": "The date that the stock first trades without the dividend, determined by the exchange.", + "market": { + "description": "The market type of the asset.", + "enum": [ + "stocks", + "crypto", + "fx", + "otc", + "indices" + ], "type": "string" }, - "frequency": { - "description": "The number of times per year the dividend is paid out. Possible values are 0 (one-time), 1 (annually), 2 (bi-annually), 4 (quarterly), and 12 (monthly).", - "type": "integer" - }, - "pay_date": { - "description": "The date that the dividend is paid out.", + "name": { + "description": "The name of the asset. For stocks/equities this will be the companies registered name. For crypto/fx this will be the name of the currency or coin pair.", + "type": "string" + }, + "primary_exchange": { + "description": "The ISO code of the primary listing exchange for this asset.", "type": "string" }, - "record_date": { - "description": "The date that the stock must be held to receive the dividend, set by the company.", + "share_class_figi": { + "description": "The share Class OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/about/figi)", "type": "string" }, "ticker": { - "description": "The ticker symbol of the dividend.", + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "type": { + "description": "The type of the asset. Find the types that we support via our [Ticker Types API](https://massive.com/docs/stocks/get_v3_reference_tickers_types).", "type": "string" } }, "required": [ "ticker", - "declaration_date", - "ex_dividend_date", - "record_date", - "pay_date", - "frequency", - "cash_amount", - "dividend_type" + "name", + "market", + "locale" ], "type": "object", - "x-polygon-go-struct-tags": { - "tags": [ - "db" - ] + "x-massive-go-type": { + "name": "ReferenceTicker", + "path": "github.com/massive-com/go-lib-models/v2/globals" } }, "type": "array" }, "status": { + "description": "The status of this request's response.", "type": "string" } }, - "required": [ - "request_id" - ], "type": "object" } + }, + "text/csv": { + "example": "ticker,name,market,locale,primary_exchange,type,active,currency_name,cik,composite_figi,share_class_figi,last_updated_utc\nA,Agilent Technologies Inc.,stocks,us,XNYS,CS,true,usd,0001090872,BBG000BWQYZ5,BBG001SCTQY4,2021-04-25T00:00:00Z\n", + "schema": { + "type": "string" + } } }, - "description": "OK" + "description": "Reference Tickers." + }, + "401": { + "description": "Unauthorized - Check our API Key and account status" } }, - "summary": "Dividends v3", + "summary": "Tickers", "tags": [ - "reference:dividends" + "reference:tickers:list" ], - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "description": "Reference data", "name": "reference" }, - "x-polygon-paginate": { + "x-massive-paginate": { "limit": { - "default": 10, + "default": 100, "max": 1000 }, "sort": { - "default": "ex_dividend_date", + "default": "ticker", "enum": [ - "ex_dividend_date", - "pay_date", - "declaration_date", - "record_date", - "cash_amount", - "ticker" + "ticker", + "name", + "market", + "locale", + "primary_exchange", + "type", + "currency_symbol", + "currency_name", + "base_currency_symbol", + "base_currency_name", + "cik", + "composite_figi", + "share_class_figi", + "last_updated_utc", + "delisted_utc" ] } } - }, - "post": { - "description": "Manually add Polygon a dividend.", - "operationId": "CreateDividend", - "parameters": [ - { - "description": "If true don't trigger overlay", - "in": "query", - "name": "skip_overlay_trigger", - "schema": { - "type": "boolean" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "cash_amount": { - "description": "The cash amount of the dividend per share owned.", - "type": "number" - }, - "currency": { - "description": "The currency in which the dividend is paid.", - "type": "string" - }, - "declaration_date": { - "description": "The date that the dividend was announced.", - "type": "string" - }, - "dividend_type": { - "description": "The type of dividend. Dividends that have been paid and/or are expected to be paid on consistent schedules are denoted as CD.\nSpecial Cash dividends that have been paid that are infrequent or unusual, and/or can not be expected to occur in the future are denoted as SC.\nLong-Term and Short-Term capital gain distributions are denoted as LT and ST, respectively.", - "enum": [ - "CD", - "SC", - "LT", - "ST" - ], - "type": "string" - }, - "ex_dividend_date": { - "description": "The date that the stock first trades without the dividend, determined by the exchange.", - "type": "string" - }, - "frequency": { - "description": "The number of times per year the dividend is paid out. Possible values are 0 (one-time), 1 (annually), 2 (bi-annually), 4 (quarterly), and 12 (monthly).", - "type": "integer" - }, - "pay_date": { - "description": "The date that the dividend is paid out.", - "type": "string" - }, - "record_date": { - "description": "The date that the stock must be held to receive the dividend, set by the company.", - "type": "string" - }, - "ticker": { - "description": "The ticker symbol of the dividend.", - "type": "string" - } - }, - "required": [ - "ticker", - "declaration_date", - "ex_dividend_date", - "record_date", - "pay_date", - "frequency", - "cash_amount", - "dividend_type" - ], - "type": "object", - "x-polygon-go-struct-tags": { - "tags": [ - "db" - ] - } - } - } - }, - "description": "Pass the desired dividend in the request body.", - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "request_id": { - "type": "string" - }, - "results": { - "properties": { - "cash_amount": { - "description": "The cash amount of the dividend per share owned.", - "type": "number" - }, - "currency": { - "description": "The currency in which the dividend is paid.", - "type": "string" - }, - "declaration_date": { - "description": "The date that the dividend was announced.", - "type": "string" - }, - "dividend_type": { - "description": "The type of dividend. Dividends that have been paid and/or are expected to be paid on consistent schedules are denoted as CD.\nSpecial Cash dividends that have been paid that are infrequent or unusual, and/or can not be expected to occur in the future are denoted as SC.\nLong-Term and Short-Term capital gain distributions are denoted as LT and ST, respectively.", - "enum": [ - "CD", - "SC", - "LT", - "ST" - ], - "type": "string" - }, - "ex_dividend_date": { - "description": "The date that the stock first trades without the dividend, determined by the exchange.", - "type": "string" - }, - "frequency": { - "description": "The number of times per year the dividend is paid out. Possible values are 0 (one-time), 1 (annually), 2 (bi-annually), 4 (quarterly), and 12 (monthly).", - "type": "integer" - }, - "pay_date": { - "description": "The date that the dividend is paid out.", - "type": "string" - }, - "record_date": { - "description": "The date that the stock must be held to receive the dividend, set by the company.", - "type": "string" - }, - "ticker": { - "description": "The ticker symbol of the dividend.", - "type": "string" - } - }, - "required": [ - "ticker", - "declaration_date", - "ex_dividend_date", - "record_date", - "pay_date", - "frequency", - "cash_amount", - "dividend_type" - ], - "type": "object", - "x-polygon-go-struct-tags": { - "tags": [ - "db" - ] - } - }, - "status": { - "type": "string" - } - }, - "required": [ - "request_id" - ], - "type": "object" - } - } - }, - "description": "OK" - }, - "400": { - "content": { - "application/json": { - "schema": { - "properties": { - "error": { - "type": "string" - }, - "request_id": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "required": [ - "request_id", - "error" - ], - "type": "object" - } - } - }, - "description": "the requested update was unable to be performed due to an invalid request body" - }, - "409": { - "content": { - "application/json": { - "schema": { - "properties": { - "error": { - "type": "string" - }, - "request_id": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "required": [ - "request_id", - "error" - ], - "type": "object" - } - } - }, - "description": "a dividend already exists for this date and ticker" - }, - "default": { - "content": { - "application/json": { - "schema": { - "properties": { - "error": { - "type": "string" - }, - "request_id": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "required": [ - "request_id", - "error" - ], - "type": "object" - } - } - }, - "description": "unknown error" - } - }, - "summary": "Dividends v3", - "tags": [ - "reference:stocks" - ], - "x-polygon-entitlement-data-type": { - "description": "Reference data", - "name": "reference" - } } }, - "/v3/reference/exchanges": { + "/v3/reference/tickers/types": { "get": { - "description": "List all exchanges that Polygon.io knows about.", - "operationId": "ListExchanges", + "description": "List all ticker types that Massive.com has.", + "operationId": "ListTickerTypes", "parameters": [ { "description": "Filter by asset class.", @@ -15649,7 +26352,8 @@ "stocks", "options", "crypto", - "fx" + "fx", + "indices" ], "example": "stocks", "type": "string" @@ -15688,80 +26392,45 @@ }, "results": { "items": { - "description": "An entity that reports trades.", + "description": "Describes the type of financial instrument represented by a ticker.", "properties": { - "acronym": { - "description": "A commonly used abbreviation for this exchange.", - "example": "AMEX", - "type": "string" - }, "asset_class": { "description": "An identifier for a group of similar financial instruments.", "enum": [ "stocks", "options", "crypto", - "fx" + "fx", + "indices" ], "example": "stocks", "type": "string" }, - "id": { - "description": "A unique identifier used by Polygon.io for this exchange.", - "example": 1, - "type": "integer" - }, - "locale": { - "description": "An identifier for a geographical location.", - "enum": [ - "us", - "global" - ], - "example": "us", - "type": "string" - }, - "mic": { - "description": "The Market Identifer Code of this exchange (see ISO 10383).", - "example": "XASE", - "type": "string" - }, - "name": { - "description": "Name of this exchange.", - "example": "NYSE American, LLC", - "type": "string" - }, - "operating_mic": { - "description": "The MIC of the entity that operates this exchange.", - "example": "XNYS", + "code": { + "description": "A code used by Massive.com to refer to this ticker type.", + "example": "CS", "type": "string" - }, - "participant_id": { - "description": "The ID used by SIP's to represent this exchange.", - "example": "A", + }, + "description": { + "description": "A short description of this ticker type.", + "example": "Common Stock", "type": "string" }, - "type": { - "description": "Represents the type of exchange.", + "locale": { + "description": "An identifier for a geographical location.", "enum": [ - "exchange", - "TRF", - "SIP" + "us", + "global" ], - "example": "exchange", - "type": "string" - }, - "url": { - "description": "A link to this exchange's website, if one exists.", - "example": "https://www.nyse.com/markets/nyse-american", + "example": "us", "type": "string" } }, "required": [ - "id", - "type", + "code", + "description", "asset_class", - "locale", - "name" + "locale" ], "type": "object" }, @@ -15779,6 +26448,12 @@ ], "type": "object" } + }, + "text/csv": { + "example": "code,description,asset_class,locale\nCS,Common Stock,stocks,us\nPFD,Preferred Stock,stocks,us\n", + "schema": { + "type": "string" + } } }, "description": "OK" @@ -15846,188 +26521,374 @@ "description": "an unknown error occurred" } }, - "summary": "Exchanges", + "summary": "Ticker Types", "tags": [ - "reference:exchanges" + "reference:tickers:types" ], - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "description": "Reference data", "name": "reference" } } }, - "/v3/reference/options/contracts": { + "/v3/reference/tickers/{ticker}": { "get": { - "description": "Query for historical options contracts. This provides both active and expired options contracts.", - "operationId": "ListOptionsContracts", + "description": "Get a single ticker supported by Massive.com. This response will have detailed information about the ticker and the company behind it.", + "operationId": "GetTicker", "parameters": [ { - "description": "This parameter has been deprecated. To search by specific options ticker, use the Options Contract endpoint [here](https://polygon.io/docs/options/get_v3_reference_options_contracts__options_ticker).", - "in": "query", + "description": "The ticker symbol of the asset.", + "example": "AAPL", + "in": "path", "name": "ticker", + "required": true, "schema": { "type": "string" } }, { - "description": "Query for contracts relating to an underlying stock ticker.", - "in": "query", - "name": "underlying_ticker", - "schema": { - "type": "string" - }, - "x-polygon-filter-field": { - "range": true, - "type": "string" - } - }, - { - "description": "Query by the type of contract.", - "in": "query", - "name": "contract_type", - "schema": { - "enum": [ - "call", - "put" - ], - "type": "string" - } - }, - { - "description": "Query by contract expiration with date format YYYY-MM-DD.", - "in": "query", - "name": "expiration_date", - "schema": { - "type": "string" - }, - "x-polygon-filter-field": { - "range": true - } - }, - { - "description": "Specify a point in time for contracts as of this date with format YYYY-MM-DD. Defaults to today's date.", + "description": "Specify a point in time to get information about the ticker available on that date.\nWhen retrieving information from SEC filings, we compare this date with the period of report date on the SEC filing.\n\nFor example, consider an SEC filing submitted by AAPL on 2019-07-31, with a period of report date ending on 2019-06-29.\nThat means that the filing was submitted on 2019-07-31, but the filing was created based on information from 2019-06-29.\nIf you were to query for AAPL details on 2019-06-29, the ticker details would include information from the SEC filing.\n\nDefaults to the most recent available date.", "in": "query", - "name": "as_of", + "name": "date", "schema": { + "format": "date", "type": "string" } - }, - { - "description": "Query by strike price of a contract.", - "in": "query", - "name": "strike_price", - "schema": { - "type": "number" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "request_id": "31d59dda-80e5-4721-8496-d0d32a654afe", + "results": { + "active": true, + "address": { + "address1": "One Apple Park Way", + "city": "Cupertino", + "postal_code": "95014", + "state": "CA" + }, + "branding": { + "icon_url": "https://api.massive.com/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_icon.png", + "logo_url": "https://api.massive.com/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_logo.svg" + }, + "cik": "0000320193", + "composite_figi": "BBG000B9XRY4", + "currency_name": "usd", + "description": "Apple designs a wide variety of consumer electronic devices, including smartphones (iPhone), tablets (iPad), PCs (Mac), smartwatches (Apple Watch), AirPods, and TV boxes (Apple TV), among others. The iPhone makes up the majority of Apple's total revenue. In addition, Apple offers its customers a variety of services such as Apple Music, iCloud, Apple Care, Apple TV+, Apple Arcade, Apple Card, and Apple Pay, among others. Apple's products run internally developed software and semiconductors, and the firm is well known for its integration of hardware, software and services. Apple's products are distributed online as well as through company-owned stores and third-party retailers. The company generates roughly 40% of its revenue from the Americas, with the remainder earned internationally.", + "homepage_url": "https://www.apple.com", + "list_date": "1980-12-12", + "locale": "us", + "market": "stocks", + "market_cap": 2771126040150, + "name": "Apple Inc.", + "phone_number": "(408) 996-1010", + "primary_exchange": "XNAS", + "round_lot": 100, + "share_class_figi": "BBG001S5N8V8", + "share_class_shares_outstanding": 16406400000, + "sic_code": "3571", + "sic_description": "ELECTRONIC COMPUTERS", + "ticker": "AAPL", + "ticker_root": "AAPL", + "total_employees": 154000, + "type": "CS", + "weighted_shares_outstanding": 16334371000 + }, + "status": "OK" + }, + "schema": { + "properties": { + "count": { + "description": "The total number of results for this request.", + "type": "integer" + }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, + "results": { + "description": "Ticker with details.", + "properties": { + "active": { + "description": "Whether or not the asset is actively traded. False means the asset has been delisted.", + "type": "boolean" + }, + "address": { + "properties": { + "address1": { + "description": "The first line of the company's headquarters address.", + "type": "string" + }, + "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" + }, + "postal_code": { + "description": "The postal code of the company's headquarters address.", + "type": "string" + }, + "state": { + "description": "The state of the company's headquarters address.", + "type": "string" + } + }, + "type": "object" + }, + "branding": { + "properties": { + "icon_url": { + "description": "A link to this ticker's company's icon. Icon's are generally smaller, square images that represent the company at a glance.\nNote that you must provide an API key when accessing this URL. See the \"Authentication\" section at the top of this page for more details.", + "type": "string" + }, + "logo_url": { + "description": "A link to this ticker's company's logo.\nNote that you must provide an API key when accessing this URL. See the \"Authentication\" section at the top of this page for more details.", + "type": "string" + } + }, + "type": "object" + }, + "cik": { + "description": "The CIK number for this ticker. Find more information [here](https://en.wikipedia.org/wiki/Central_Index_Key).", + "type": "string" + }, + "composite_figi": { + "description": "The composite OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/about/figi)", + "type": "string" + }, + "currency_name": { + "description": "The name of the currency that this asset is traded with.", + "type": "string" + }, + "delisted_utc": { + "description": "The last date that the asset was traded.", + "format": "date-time", + "type": "string" + }, + "description": { + "description": "A description of the company and what they do/offer.", + "type": "string" + }, + "homepage_url": { + "description": "The URL of the company's website homepage.", + "type": "string" + }, + "list_date": { + "description": "The date that the symbol was first publicly listed in the format YYYY-MM-DD.", + "type": "string" + }, + "locale": { + "description": "The locale of the asset.", + "enum": [ + "us", + "global" + ], + "type": "string" + }, + "market": { + "description": "The market type of the asset.", + "enum": [ + "stocks", + "crypto", + "fx", + "otc", + "indices" + ], + "type": "string" + }, + "market_cap": { + "description": "The most recent close price of the ticker multiplied by weighted outstanding shares.", + "format": "double", + "type": "number" + }, + "name": { + "description": "The name of the asset. For stocks/equities this will be the companies registered name. For crypto/fx this will be the name of the currency or coin pair.", + "type": "string" + }, + "phone_number": { + "description": "The phone number for the company behind this ticker.", + "type": "string" + }, + "primary_exchange": { + "description": "The ISO code of the primary listing exchange for this asset.", + "type": "string" + }, + "round_lot": { + "description": "Round lot size of this security.", + "format": "double", + "type": "number" + }, + "share_class_figi": { + "description": "The share Class OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/about/figi)", + "type": "string" + }, + "share_class_shares_outstanding": { + "description": "The recorded number of outstanding shares for this particular share class.", + "format": "double", + "type": "number" + }, + "sic_code": { + "description": "The standard industrial classification code for this ticker. For a list of SIC Codes, see the SEC's SIC Code List.", + "type": "string" + }, + "sic_description": { + "description": "A description of this ticker's SIC code.", + "type": "string" + }, + "ticker": { + "description": "The exchange symbol that this item is traded under.", + "type": "string" + }, + "ticker_root": { + "description": "The root of a specified ticker. For example, the root of BRK.A is BRK.", + "type": "string" + }, + "ticker_suffix": { + "description": "The suffix of a specified ticker. For example, the suffix of BRK.A is A.", + "type": "string" + }, + "total_employees": { + "description": "The approximate number of employees for the company.", + "type": "number" + }, + "type": { + "description": "The type of the asset. Find the types that we support via our [Ticker Types API](https://massive.com/docs/stocks/get_v3_reference_tickers_types).", + "type": "string" + }, + "weighted_shares_outstanding": { + "description": "The shares outstanding calculated assuming all shares of other share classes are converted to this share class.", + "format": "double", + "type": "number" + } + }, + "required": [ + "ticker", + "name", + "market", + "locale", + "active", + "currency_name" + ], + "type": "object", + "x-massive-go-type": { + "name": "ReferenceTicker", + "path": "github.com/massive-com/go-lib-models/v2/globals" + } + }, + "status": { + "description": "The status of this request's response.", + "type": "string" + } + }, + "type": "object" + } + }, + "text/csv": { + "example": "ticker,name,market,locale,primary_exchange,type,active,currency_name,cik,composite_figi,share_class_figi,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.massive.com/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_logo.svg,https://api.massive.com/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_icon.png\n", + "schema": { + "type": "string" + } + } }, - "x-polygon-filter-field": { - "range": true, - "type": "number" - } - }, - { - "description": "Query for expired contracts. Default is false.", - "in": "query", - "name": "expired", - "schema": { - "type": "boolean" - } + "description": "Reference Tickers." }, + "401": { + "description": "Unauthorized - Check our API Key and account status" + } + }, + "summary": "Ticker Details v3", + "tags": [ + "reference:tickers:get" + ], + "x-massive-entitlement-data-type": { + "description": "Reference data", + "name": "reference" + } + } + }, + "/v3/snapshot": { + "get": { + "description": "Get snapshots for assets of all types", + "operationId": "Snapshots", + "parameters": [ { - "description": "Search by underlying_ticker.", "in": "query", - "name": "underlying_ticker.gte", + "name": "ticker", "schema": { "type": "string" - } - }, - { - "description": "Search by underlying_ticker.", - "in": "query", - "name": "underlying_ticker.gt", - "schema": { + }, + "x-massive-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, "type": "string" } }, { - "description": "Search by underlying_ticker.", + "description": "Query by the type of asset.", "in": "query", - "name": "underlying_ticker.lte", + "name": "type", "schema": { + "enum": [ + "stocks", + "options", + "crypto", + "fx", + "indices" + ], "type": "string" } }, { - "description": "Search by underlying_ticker.", + "description": "Range by ticker.", "in": "query", - "name": "underlying_ticker.lt", + "name": "ticker.gte", "schema": { "type": "string" } }, { - "description": "Search by expiration_date.", + "description": "Range by ticker.", "in": "query", - "name": "expiration_date.gte", + "name": "ticker.gt", "schema": { "type": "string" } }, { - "description": "Search by expiration_date.", + "description": "Range by ticker.", "in": "query", - "name": "expiration_date.gt", + "name": "ticker.lte", "schema": { "type": "string" } }, { - "description": "Search by expiration_date.", + "description": "Range by ticker.", "in": "query", - "name": "expiration_date.lte", + "name": "ticker.lt", "schema": { "type": "string" } }, { - "description": "Search by expiration_date.", + "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", "in": "query", - "name": "expiration_date.lt", + "name": "ticker.any_of", "schema": { "type": "string" } }, - { - "description": "Search by strike_price.", - "in": "query", - "name": "strike_price.gte", - "schema": { - "type": "number" - } - }, - { - "description": "Search by strike_price.", - "in": "query", - "name": "strike_price.gt", - "schema": { - "type": "number" - } - }, - { - "description": "Search by strike_price.", - "in": "query", - "name": "strike_price.lte", - "schema": { - "type": "number" - } - }, - { - "description": "Search by strike_price.", - "in": "query", - "name": "strike_price.lt", - "schema": { - "type": "number" - } - }, { "description": "Order results based on the `sort` field.", "in": "query", @@ -16042,13 +26903,13 @@ } }, { - "description": "Limit the number of results returned, default is 10 and max is 1000.", + "description": "Limit the number of results returned, default is 10 and max is 250.", "in": "query", "name": "limit", "schema": { "default": 10, "example": 10, - "maximum": 1000, + "maximum": 250, "minimum": 1, "type": "integer" } @@ -16060,10 +26921,7 @@ "schema": { "default": "ticker", "enum": [ - "ticker", - "underlying_ticker", - "expiration_date", - "strike_price" + "ticker" ], "example": "ticker", "type": "string" @@ -16075,41 +26933,120 @@ "content": { "application/json": { "example": { - "request_id": "603902c0-a5a5-406f-bd08-f030f92418fa", + "request_id": "abc123", "results": [ { - "cfi": "OCASPS", - "contract_type": "call", - "exercise_style": "american", - "expiration_date": "2021-11-19", - "primary_exchange": "BATO", - "shares_per_contract": 100, - "strike_price": 85, - "ticker": "O:AAPL211119C00085000", - "underlying_ticker": "AAPL" + "break_even_price": 171.075, + "details": { + "contract_type": "call", + "exercise_style": "american", + "expiration_date": "2022-10-14", + "shares_per_contract": 100, + "strike_price": 5, + "underlying_ticker": "NCLH" + }, + "fmv": 0.05, + "greeks": { + "delta": 0.5520187372272933, + "gamma": 0.00706756515659829, + "theta": -0.018532772783847958, + "vega": 0.7274811132998142 + }, + "implied_volatility": 0.3048997097864957, + "last_quote": { + "ask": 21.25, + "ask_exchange": 12, + "ask_size": 110, + "bid": 20.9, + "bid_exchange": 10, + "bid_size": 172, + "last_updated": 1636573458756383500, + "midpoint": 21.075, + "timeframe": "REAL-TIME" + }, + "last_trade": { + "conditions": [ + 209 + ], + "exchange": 316, + "price": 0.05, + "sip_timestamp": 1675280958783136800, + "size": 2, + "timeframe": "REAL-TIME" + }, + "market_status": "closed", + "name": "NCLH $5 Call", + "open_interest": 8921, + "session": { + "change": -0.05, + "change_percent": -1.07, + "close": 6.65, + "early_trading_change": -0.01, + "early_trading_change_percent": -0.03, + "high": 7.01, + "late_trading_change": -0.4, + "late_trading_change_percent": -0.02, + "low": 5.42, + "open": 6.7, + "previous_close": 6.71, + "volume": 67 + }, + "ticker": "O:NCLH221014C00005000", + "type": "options", + "underlying_asset": { + "change_to_break_even": 23.123999999999995, + "last_updated": 1636573459862384600, + "price": 147.951, + "ticker": "AAPL", + "timeframe": "REAL-TIME" + } }, { - "additional_underlyings": [ - { - "amount": 44, - "type": "equity", - "underlying": "VMW" - }, - { - "amount": 6.53, - "type": "currency", - "underlying": "USD" - } - ], - "cfi": "OCASPS", - "contract_type": "call", - "exercise_style": "american", - "expiration_date": "2021-11-19", - "primary_exchange": "BATO", - "shares_per_contract": 100, - "strike_price": 90, - "ticker": "O:AAPL211119C00090000", - "underlying_ticker": "AAPL" + "fmv": 0.05, + "last_quote": { + "ask": 21.25, + "ask_exchange": 300, + "ask_size": 110, + "bid": 20.9, + "bid_exchange": 323, + "bid_size": 172, + "last_updated": 1636573458756383500, + "timeframe": "REAL-TIME" + }, + "last_trade": { + "conditions": [ + 209 + ], + "exchange": 316, + "id": "4064", + "last_updated": 1675280958783136800, + "price": 0.05, + "size": 2, + "timeframe": "REAL-TIME" + }, + "market_status": "closed", + "name": "Apple Inc.", + "session": { + "change": -1.05, + "change_percent": -4.67, + "close": 21.4, + "early_trading_change": -0.39, + "early_trading_change_percent": -0.07, + "high": 22.49, + "late_trading_change": 1.2, + "late_trading_change_percent": 3.92, + "low": 21.35, + "open": 22.49, + "previous_close": 22.45, + "volume": 37 + }, + "ticker": "AAPL", + "type": "stocks" + }, + { + "error": "NOT_FOUND", + "message": "Ticker not found.", + "ticker": "TSLAAPL" } ], "status": "OK" @@ -16126,332 +27063,510 @@ "results": { "items": { "properties": { - "additional_underlyings": { - "description": "If an option contract has additional underlyings or deliverables associated with it, they will appear here.\nSee \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"https://www.optionseducation.org/referencelibrary/faq/splits-mergers-spinoffs-bankruptcies\"\u003ehere\u003c/a\u003e for some examples of what might cause a contract to have additional underlyings.", - "items": { - "properties": { - "amount": { - "description": "The number of shares per contract of the additional underlying, or the cash-in-lieu amount of the currency.", - "type": "number" - }, - "type": { - "description": "The type of the additional underlying asset, either equity or currency.", - "type": "string" - }, - "underlying": { - "description": "The name of the additional underlying asset.", - "type": "string" + "break_even_price": { + "description": "The price of the underlying asset for the contract to break even. For a call, this value is (strike price + premium paid). For a put, this value is (strike price - premium paid).", + "format": "double", + "type": "number" + }, + "details": { + "description": "The details for this contract.", + "properties": { + "contract_type": { + "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".", + "enum": [ + "put", + "call", + "other" + ], + "type": "string" + }, + "exercise_style": { + "description": "The exercise style of this contract. See this link for more details on exercise styles.", + "enum": [ + "american", + "european", + "bermudan" + ], + "type": "string" + }, + "expiration_date": { + "description": "The contract's expiration date in YYYY-MM-DD format.", + "format": "date", + "type": "string", + "x-massive-go-type": { + "name": "IDaysMassiveDateString", + "path": "github.com/massive-com/ptime" + } + }, + "shares_per_contract": { + "description": "The number of shares per contract for this contract.", + "type": "number" + }, + "strike_price": { + "description": "The strike price of the option contract.", + "format": "double", + "type": "number" + } + }, + "required": [ + "contract_type", + "exercise_style", + "expiration_date", + "shares_per_contract", + "strike_price" + ], + "type": "object" + }, + "error": { + "description": "The error while looking for this ticker.", + "type": "string" + }, + "fmv": { + "description": "Fair market value is only available on Business plans. It's it our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security.\nFor more information, contact us.", + "type": "number" + }, + "greeks": { + "description": "The greeks for this contract.\nThere are certain circumstances where greeks will not be returned, such as options contracts that are deep in the money.\nSee this article for more information.", + "properties": { + "delta": { + "description": "The change in the option's price per $0.01 increment in the price of the underlying asset.", + "format": "double", + "type": "number" + }, + "gamma": { + "description": "The change in delta per $0.01 change in the price of the underlying asset.", + "format": "double", + "type": "number" + }, + "theta": { + "description": "The change in the option's price per day.", + "format": "double", + "type": "number" + }, + "vega": { + "description": "The change in the option's price per 1% increment in volatility.", + "format": "double", + "type": "number" + } + }, + "required": [ + "delta", + "gamma", + "theta", + "vega" + ], + "type": "object", + "x-massive-go-type": { + "name": "Greeks" + } + }, + "implied_volatility": { + "description": "The market's forecast for the volatility of the underlying asset, based on this option's current price.", + "format": "double", + "type": "number" + }, + "last_quote": { + "description": "The most recent quote for this contract. This is only returned if your current plan includes quotes.", + "properties": { + "ask": { + "description": "The ask price.", + "format": "double", + "type": "number" + }, + "ask_exchange": { + "description": "The ask side exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", + "type": "integer" + }, + "ask_size": { + "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.", + "format": "double", + "type": "number" + }, + "bid": { + "description": "The bid price.", + "format": "double", + "type": "number" + }, + "bid_exchange": { + "description": "The bid side exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", + "type": "integer" + }, + "bid_size": { + "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.", + "format": "double", + "type": "number" + }, + "last_updated": { + "description": "The nanosecond timestamp of when this information was updated.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "INanoseconds", + "path": "github.com/massive-com/ptime" } }, - "type": "object", - "x-polygon-go-type": { - "name": "AdditionalUnderlying" + "midpoint": { + "description": "The average of the bid and ask price.", + "format": "double", + "type": "number" + }, + "timeframe": { + "description": "The time relevance of the data.", + "enum": [ + "DELAYED", + "REAL-TIME" + ], + "type": "string" } }, - "type": "array", - "x-polygon-go-type": { - "name": "AdditionalUnderlyings" + "required": [ + "ask", + "bid", + "last_updated", + "timeframe" + ], + "type": "object", + "x-massive-go-type": { + "name": "SnapshotLastQuote" } }, - "cfi": { - "description": "The 6 letter CFI code of the contract (defined in \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/ISO_10962\"\u003eISO 10962\u003c/a\u003e)", - "type": "string" + "last_trade": { + "description": "The most recent quote for this contract. This is only returned if your current plan includes trades.", + "properties": { + "conditions": { + "description": "A list of condition codes.", + "items": { + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.", + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "exchange": { + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", + "type": "integer" + }, + "id": { + "description": "The Trade ID which uniquely identifies a trade. These are unique per combination of ticker, exchange, and TRF. For example: A trade for AAPL executed on NYSE and a trade for AAPL executed on NASDAQ could potentially have the same Trade ID.", + "type": "string" + }, + "last_updated": { + "description": "The nanosecond timestamp of when this information was updated.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "INanoseconds", + "path": "github.com/massive-com/ptime" + } + }, + "participant_timestamp": { + "description": "The nanosecond Exchange Unix Timestamp. This is the timestamp of when the trade was generated at the exchange.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "INanoseconds", + "path": "github.com/massive-com/ptime" + } + }, + "price": { + "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.", + "format": "double", + "type": "number" + }, + "sip_timestamp": { + "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this trade from the exchange which produced it.", + "format": "int64", + "type": "integer" + }, + "size": { + "description": "The size of a trade (also known as volume).", + "format": "int32", + "type": "integer" + }, + "timeframe": { + "description": "The time relevance of the data.", + "enum": [ + "DELAYED", + "REAL-TIME" + ], + "type": "string" + } + }, + "required": [ + "price", + "size" + ], + "type": "object", + "x-massive-go-type": { + "name": "SnapshotLastTrade" + } }, - "contract_type": { - "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".", + "market_status": { + "description": "The market status for the market that trades this ticker. Possible values for stocks, options, crypto, and forex snapshots are open, closed, early_trading, or late_trading.\nPossible values for indices snapshots are regular_trading, closed, early_trading, and late_trading.", "type": "string" }, - "correction": { - "description": "The correction number for this option contract.", - "type": "integer" - }, - "exercise_style": { - "description": "The exercise style of this contract. See \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Option_style\"\u003ethis link\u003c/a\u003e for more details on exercise styles.", - "enum": [ - "american", - "european", - "bermudan" - ], + "message": { + "description": "The error message while looking for this ticker.", "type": "string" }, - "expiration_date": { - "description": "The contract's expiration date in YYYY-MM-DD format.", - "type": "string", - "x-polygon-go-type": { - "name": "IDaysPolygonDateString", - "path": "github.com/polygon-io/ptime" - } - }, - "primary_exchange": { - "description": "The MIC code of the primarcy exchange that this contract is listed on.", + "name": { + "description": "The name of this contract.", "type": "string" }, - "shares_per_contract": { - "description": "The number of shares per contract for this contract.", - "type": "number" - }, - "strike_price": { - "description": "The strike price of the option contract.", + "open_interest": { + "description": "The quantity of this contract held at the end of the last trading day.", + "format": "double", "type": "number" }, - "ticker": { - "description": "The ticker for the option contract.", - "type": "string" - }, - "underlying_ticker": { - "description": "The underlying ticker that the option contract relates to.", - "type": "string" - } - }, - "type": "object", - "x-polygon-go-type": { - "name": "OptionsContract" - } - }, - "type": "array" - }, - "status": { - "type": "string" - } - }, - "type": "object" - } - } - }, - "description": "A list of options contracts" - } - }, - "summary": "Options Contracts", - "tags": [ - "reference:options:contracts:list" - ], - "x-polygon-entitlement-data-type": { - "description": "Reference data", - "name": "reference" - }, - "x-polygon-paginate": { - "limit": { - "default": 10, - "max": 1000 - }, - "sort": { - "default": "ticker", - "enum": [ - "ticker", - "underlying_ticker", - "expiration_date", - "strike_price" - ] - } - } - } - }, - "/v3/reference/options/contracts/{options_ticker}": { - "get": { - "description": "Get an options contract", - "operationId": "GetOptionsContract", - "parameters": [ - { - "description": "Query for a contract by options ticker. You can learn more about the structure of options tickers [here](https://polygon.io/blog/how-to-read-a-stock-options-ticker/).", - "example": "O:EVRI240119C00002500", - "in": "path", - "name": "options_ticker", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Specify a point in time for the contract as of this date with format YYYY-MM-DD. Defaults to today's date.", - "in": "query", - "name": "as_of", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "request_id": "603902c0-a5a5-406f-bd08-f030f92418fa", - "results": { - "additional_underlyings": [ - { - "amount": 44, - "type": "equity", - "underlying": "VMW" - }, - { - "amount": 6.53, - "type": "currency", - "underlying": "USD" - } - ], - "cfi": "OCASPS", - "contract_type": "call", - "exercise_style": "american", - "expiration_date": "2021-11-19", - "primary_exchange": "BATO", - "shares_per_contract": 100, - "strike_price": 85, - "ticker": "O:AAPL211119C00085000", - "underlying_ticker": "AAPL" - }, - "status": "OK" - }, - "schema": { - "properties": { - "request_id": { - "type": "string" - }, - "results": { - "properties": { - "additional_underlyings": { - "description": "If an option contract has additional underlyings or deliverables associated with it, they will appear here.\nSee \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"https://www.optionseducation.org/referencelibrary/faq/splits-mergers-spinoffs-bankruptcies\"\u003ehere\u003c/a\u003e for some examples of what might cause a contract to have additional underlyings.", - "items": { + "session": { + "properties": { + "change": { + "description": "The value of the price change for the asset from the previous trading day.", + "format": "double", + "type": "number" + }, + "change_percent": { + "description": "The percent of the price change for the asset from the previous trading day.", + "format": "double", + "type": "number" + }, + "close": { + "description": "The closing price of the asset for the day.", + "format": "double", + "type": "number" + }, + "early_trading_change": { + "description": "Today's early trading change amount, difference between price and previous close if in early trading hours, otherwise difference between last price during early trading and previous close.", + "format": "double", + "type": "number" + }, + "early_trading_change_percent": { + "description": "Today's early trading change as a percentage.", + "format": "double", + "type": "number" + }, + "high": { + "description": "The highest price of the asset for the day.", + "format": "double", + "type": "number" + }, + "late_trading_change": { + "description": "Today's late trading change amount, difference between price and today's close if in late trading hours, otherwise difference between last price during late trading and today's close.", + "format": "double", + "type": "number" + }, + "late_trading_change_percent": { + "description": "Today's late trading change as a percentage.", + "format": "double", + "type": "number" + }, + "low": { + "description": "The lowest price of the asset for the day.", + "format": "double", + "type": "number" + }, + "open": { + "description": "The open price of the asset for the day.", + "format": "double", + "type": "number" + }, + "previous_close": { + "description": "The closing price of the asset for the previous trading day.", + "format": "double", + "type": "number" + }, + "price": { + "description": "The price of the most recent trade or bid price for this asset.", + "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", + "type": "number" + } + }, + "required": [ + "change", + "change_percent", + "close", + "high", + "low", + "open", + "previous_close" + ], + "type": "object", + "x-massive-go-type": { + "name": "Session" + } + }, + "ticker": { + "description": "The ticker symbol for the asset.", + "type": "string" + }, + "type": { + "description": "The asset class for this ticker.", + "enum": [ + "stocks", + "options", + "fx", + "crypto", + "indices" + ], + "type": "string" + }, + "underlying_asset": { + "description": "Information on the underlying stock for this options contract. The market data returned depends on your current stocks plan.", "properties": { - "amount": { - "description": "The number of shares per contract of the additional underlying, or the cash-in-lieu amount of the currency.", + "change_to_break_even": { + "description": "The change in price for the contract to break even.", + "format": "double", "type": "number" }, - "type": { - "description": "The type of the additional underlying asset, either equity or currency.", + "last_updated": { + "description": "The nanosecond timestamp of when this information was updated.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "INanoseconds", + "path": "github.com/massive-com/ptime" + } + }, + "price": { + "description": "The price of the trade. This is the actual dollar value per whole share of this trade. A trade of 100 shares with a price of $2.00 would be worth a total dollar value of $200.00.", + "format": "double", + "type": "number" + }, + "ticker": { + "description": "The ticker symbol for the contract's underlying asset.", "type": "string" }, - "underlying": { - "description": "The name of the additional underlying asset.", + "timeframe": { + "description": "The time relevance of the data.", + "enum": [ + "DELAYED", + "REAL-TIME" + ], "type": "string" + }, + "value": { + "description": "The value of the underlying index.", + "format": "double", + "type": "number" } }, + "required": [ + "ticker", + "change_to_break_even" + ], "type": "object", - "x-polygon-go-type": { - "name": "AdditionalUnderlying" + "x-massive-go-type": { + "name": "UnderlyingAsset" } }, - "type": "array", - "x-polygon-go-type": { - "name": "AdditionalUnderlyings" - } - }, - "cfi": { - "description": "The 6 letter CFI code of the contract (defined in \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/ISO_10962\"\u003eISO 10962\u003c/a\u003e)", - "type": "string" - }, - "contract_type": { - "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".", - "type": "string" - }, - "correction": { - "description": "The correction number for this option contract.", - "type": "integer" - }, - "exercise_style": { - "description": "The exercise style of this contract. See \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Option_style\"\u003ethis link\u003c/a\u003e for more details on exercise styles.", - "enum": [ - "american", - "european", - "bermudan" - ], - "type": "string" - }, - "expiration_date": { - "description": "The contract's expiration date in YYYY-MM-DD format.", - "type": "string", - "x-polygon-go-type": { - "name": "IDaysPolygonDateString", - "path": "github.com/polygon-io/ptime" + "value": { + "description": "Value of Index.", + "type": "number" } }, - "primary_exchange": { - "description": "The MIC code of the primarcy exchange that this contract is listed on.", - "type": "string" - }, - "shares_per_contract": { - "description": "The number of shares per contract for this contract.", - "type": "number" - }, - "strike_price": { - "description": "The strike price of the option contract.", - "type": "number" - }, - "ticker": { - "description": "The ticker for the option contract.", - "type": "string" - }, - "underlying_ticker": { - "description": "The underlying ticker that the option contract relates to.", - "type": "string" + "required": [ + "ticker" + ], + "type": "object", + "x-massive-go-type": { + "name": "SnapshotResponseModel" } }, - "type": "object", - "x-polygon-go-type": { - "name": "OptionsContract" - } + "type": "array" }, "status": { + "description": "The status of this request's response.", "type": "string" } }, + "required": [ + "status", + "request_id" + ], "type": "object" } } }, - "description": "A specific options contract" + "description": "Snapshots for the ticker list" } }, - "summary": "Options Contract", - "tags": [ - "reference:options:contract" + "summary": "Universal Snapshot", + "x-massive-entitlement-allowed-timeframes": [ + { + "description": "Real Time Data", + "name": "realtime" + }, + { + "description": "15 minute delayed data", + "name": "delayed" + } ], - "x-polygon-entitlement-data-type": { - "description": "Reference data", - "name": "reference" + "x-massive-entitlement-data-type": { + "description": "Snapshot data", + "name": "snapshots" + }, + "x-massive-entitlement-market-type": { + "description": "All asset classes", + "name": "universal" + }, + "x-massive-paginate": { + "limit": { + "default": 10, + "max": 250, + "min": 1 + }, + "sort": { + "default": "ticker", + "enum": [ + "ticker" + ] + } } } }, - "/v3/reference/splits": { + "/v3/snapshot/indices": { "get": { - "description": "Get a list of historical stock splits, including the ticker symbol, the execution date, and the factors of the split ratio.", - "operationId": "ListStockSplits", + "description": "Get a Snapshot of indices data for said tickers", + "operationId": "IndicesSnapshot", "parameters": [ { - "description": "Return the stock splits that contain this ticker.", + "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.", + "example": "I:DJI", "in": "query", - "name": "ticker", + "name": "ticker.any_of", "schema": { "type": "string" - }, - "x-polygon-filter-field": { - "range": true, - "type": "string" } }, { - "description": "Query by execution date with the format YYYY-MM-DD.", + "description": "Search a range of tickers lexicographically.", "in": "query", - "name": "execution_date", + "name": "ticker", "schema": { - "format": "date", "type": "string" }, - "x-polygon-filter-field": { + "x-massive-filter-field": { "range": true, "type": "string" } }, { - "description": "Query for reverse stock splits. A split ratio where split_from is greater than split_to represents a reverse split. By default this filter is not used.", - "in": "query", - "name": "reverse_split", - "schema": { - "nullable": true, - "type": "boolean" - } - }, - { - "description": "Search by ticker.", + "description": "Range by ticker.", "in": "query", "name": "ticker.gte", "schema": { @@ -16459,7 +27574,7 @@ } }, { - "description": "Search by ticker.", + "description": "Range by ticker.", "in": "query", "name": "ticker.gt", "schema": { @@ -16467,7 +27582,7 @@ } }, { - "description": "Search by ticker.", + "description": "Range by ticker.", "in": "query", "name": "ticker.lte", "schema": { @@ -16475,49 +27590,13 @@ } }, { - "description": "Search by ticker.", + "description": "Range by ticker.", "in": "query", "name": "ticker.lt", "schema": { "type": "string" } }, - { - "description": "Search by execution_date.", - "in": "query", - "name": "execution_date.gte", - "schema": { - "format": "date", - "type": "string" - } - }, - { - "description": "Search by execution_date.", - "in": "query", - "name": "execution_date.gt", - "schema": { - "format": "date", - "type": "string" - } - }, - { - "description": "Search by execution_date.", - "in": "query", - "name": "execution_date.lte", - "schema": { - "format": "date", - "type": "string" - } - }, - { - "description": "Search by execution_date.", - "in": "query", - "name": "execution_date.lt", - "schema": { - "format": "date", - "type": "string" - } - }, { "description": "Order results based on the `sort` field.", "in": "query", @@ -16532,13 +27611,13 @@ } }, { - "description": "Limit the number of results returned, default is 10 and max is 1000.", + "description": "Limit the number of results returned, default is 10 and max is 250.", "in": "query", "name": "limit", "schema": { "default": 10, "example": 10, - "maximum": 1000, + "maximum": 250, "minimum": 1, "type": "integer" } @@ -16548,12 +27627,11 @@ "in": "query", "name": "sort", "schema": { - "default": "execution_date", + "default": "ticker", "enum": [ - "execution_date", "ticker" ], - "example": "execution_date", + "example": "ticker", "type": "string" } } @@ -16563,19 +27641,35 @@ "content": { "application/json": { "example": { - "next_url": "https://api.polygon.io/v3/splits/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "request_id": "6a7e466379af0a71039d60cc78e72282", "results": [ { - "execution_date": "2020-08-31", - "split_from": 1, - "split_to": 4, - "ticker": "AAPL" + "last_updated": 1679597116344223500, + "market_status": "closed", + "name": "Dow Jones Industrial Average", + "session": { + "change": -50.01, + "change_percent": -1.45, + "close": 3822.39, + "high": 3834.41, + "low": 38217.11, + "open": 3827.38, + "previous_close": 3812.19 + }, + "ticker": "I:DJI", + "timeframe": "REAL-TIME", + "type": "indices", + "value": 3822.39 }, { - "execution_date": "2005-02-28", - "split_from": 1, - "split_to": 2, - "ticker": "AAPL" + "error": "NOT_FOUND", + "message": "Ticker not found.", + "ticker": "APx" + }, + { + "error": "NOT_ENTITLED", + "message": "Not entitled to this ticker.", + "ticker": "APy" } ], "status": "OK" @@ -16592,30 +27686,105 @@ "results": { "items": { "properties": { - "execution_date": { - "description": "The execution date of the stock split. On this date the stock split was applied.", + "error": { + "description": "The error while looking for this ticker.", + "type": "string" + }, + "last_updated": { + "description": "The nanosecond timestamp of when this information was updated.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "INanoseconds", + "path": "github.com/massive-com/ptime" + } + }, + "market_status": { + "description": "The market status for the market that trades this ticker.", "type": "string" }, - "split_from": { - "description": "The second number in the split ratio.\n\nFor example: In a 2-for-1 split, split_from would be 1.", - "format": "float", - "type": "number" + "message": { + "description": "The error message while looking for this ticker.", + "type": "string" + }, + "name": { + "description": "Name of Index.", + "type": "string" + }, + "session": { + "properties": { + "change": { + "description": "The value of the change for the index from the previous trading day.", + "format": "double", + "type": "number" + }, + "change_percent": { + "description": "The percent of the change for the index from the previous trading day.", + "format": "double", + "type": "number" + }, + "close": { + "description": "The closing value for the index of the day.", + "format": "double", + "type": "number" + }, + "high": { + "description": "The highest value for the index of the day.", + "format": "double", + "type": "number" + }, + "low": { + "description": "The lowest value for the index of the day.", + "format": "double", + "type": "number" + }, + "open": { + "description": "The open value for the index of the day.", + "format": "double", + "type": "number" + }, + "previous_close": { + "description": "The closing value for the index of previous trading day.", + "format": "double", + "type": "number" + } + }, + "type": "object", + "x-massive-go-type": { + "name": "IndicesSession" + } + }, + "ticker": { + "description": "Ticker of asset queried.", + "type": "string" }, - "split_to": { - "description": "The first number in the split ratio.\n\nFor example: In a 2-for-1 split, split_to would be 2.", - "format": "float", - "type": "number" + "timeframe": { + "description": "The time relevance of the data.", + "enum": [ + "DELAYED", + "REAL-TIME" + ], + "type": "string" }, - "ticker": { - "description": "The ticker symbol of the stock split.", + "type": { + "description": "The indices market.", + "enum": [ + "indices" + ], "type": "string" + }, + "value": { + "description": "Value of Index.", + "type": "number" } }, "required": [ - "split_from", - "split_to" + "ticker" ], - "type": "object" + "type": "object", + "x-massive-go-type": { + "name": "IndicesResult" + } }, "type": "array" }, @@ -16624,185 +27793,169 @@ "type": "string" } }, + "required": [ + "status", + "request_id" + ], "type": "object" } } }, - "description": "A list of stock splits." + "description": "Snapshots for indices data of the underlying ticker" } }, - "summary": "Stock Splits v3", + "summary": "Indices Snapshot", "tags": [ - "reference:stocks" + "indices:snapshot" ], - "x-polygon-entitlement-data-type": { - "description": "Reference data", - "name": "reference" + "x-massive-entitlement-allowed-timeframes": [ + { + "description": "Real Time Data", + "name": "realtime" + }, + { + "description": "15 minute delayed data", + "name": "delayed" + } + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" }, - "x-polygon-paginate": { + "x-massive-entitlement-market-type": { + "description": "Indices data", + "name": "indices" + }, + "x-massive-paginate": { "limit": { "default": 10, - "max": 1000 + "max": 250 }, "sort": { - "default": "execution_date", + "default": "ticker", "enum": [ - "execution_date", "ticker" ] } } } }, - "/v3/reference/tickers": { + "/v3/snapshot/options/{underlyingAsset}": { "get": { - "description": "Query all ticker symbols which are supported by Polygon.io. This API currently includes Stocks/Equities, Crypto, and Forex.\n", + "description": "Get the snapshot of all options contracts for an underlying ticker.", + "operationId": "OptionsChain", "parameters": [ { - "description": "Specify a ticker symbol.\nDefaults to empty string which queries all tickers.\n", + "description": "The underlying ticker symbol of the option contract.", + "example": "EVRI", + "in": "path", + "name": "underlyingAsset", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Query by strike price of a contract.", "in": "query", - "name": "ticker", + "name": "strike_price", + "schema": { + "type": "number" + }, + "x-massive-filter-field": { + "range": true, + "type": "number" + } + }, + { + "description": "Query by contract expiration with date format YYYY-MM-DD.", + "in": "query", + "name": "expiration_date", "schema": { "type": "string" }, - "x-polygon-filter-field": { + "x-massive-filter-field": { "range": true } }, { - "description": "Specify the type of the tickers. Find the types that we support via our [Ticker Types API](https://polygon.io/docs/stocks/get_v3_reference_tickers_types).\nDefaults to empty string which queries all types.\n", + "description": "Query by the type of contract.", "in": "query", - "name": "type", + "name": "contract_type", "schema": { "enum": [ - "CS", - "ADRC", - "ADRP", - "ADRR", - "UNIT", - "RIGHT", - "PFD", - "FUND", - "SP", - "WARRANT", - "INDEX", - "ETF", - "ETN", - "OS", - "GDR", - "OTHER", - "NYRS", - "AGEN", - "EQLK", - "BOND", - "ADRW", - "BASKET", - "LT" + "call", + "put" ], "type": "string" } }, { - "description": "Filter by market type. By default all markets are included.\n", + "description": "Range by strike_price.", "in": "query", - "name": "market", + "name": "strike_price.gte", "schema": { - "enum": [ - "stocks", - "crypto", - "fx", - "otc" - ], - "type": "string" + "type": "number" } }, { - "description": "Specify the primary exchange of the asset in the ISO code format. Find more information about the ISO codes [at the ISO org website](https://www.iso20022.org/market-identifier-codes).\nDefaults to empty string which queries all exchanges.\n", + "description": "Range by strike_price.", "in": "query", - "name": "exchange", + "name": "strike_price.gt", "schema": { - "type": "string" + "type": "number" } }, { - "description": "Specify the CUSIP code of the asset you want to search for. Find more information about CUSIP codes [at their website](https://www.cusip.com/identifiers.html#/CUSIP).\nDefaults to empty string which queries all CUSIPs.\n\nNote: Although you can query by CUSIP, due to legal reasons we do not return the CUSIP in the response.\n", + "description": "Range by strike_price.", "in": "query", - "name": "cusip", + "name": "strike_price.lte", "schema": { - "type": "string" + "type": "number" } }, { - "description": "Specify the CIK of the asset you want to search for. Find more information about CIK codes [at their website](https://www.sec.gov/edgar/searchedgar/cik.htm).\nDefaults to empty string which queries all CIKs.\n", + "description": "Range by strike_price.", "in": "query", - "name": "cik", + "name": "strike_price.lt", "schema": { - "type": "string" + "type": "number" } }, { - "description": "Specify a point in time to retrieve tickers available on that date.\nDefaults to the most recent available date.\n", + "description": "Range by expiration_date.", "in": "query", - "name": "date", + "name": "expiration_date.gte", "schema": { - "oneOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "format": "date", - "type": "string" - } - ] + "type": "string" } }, { - "description": "Search for terms within the ticker and/or company name.\n", + "description": "Range by expiration_date.", "in": "query", - "name": "search", + "name": "expiration_date.gt", "schema": { "type": "string" } }, { - "description": "Specify if the tickers returned should be actively traded on the queried date. Default is true.\n", - "example": true, + "description": "Range by expiration_date.", "in": "query", - "name": "active", + "name": "expiration_date.lte", "schema": { - "type": "boolean" + "type": "string" } }, { - "description": "The field to sort the results on. Default is ticker.\nIf the `search` query parameter is present, `sort` is ignored and results are ordered by relevance.\n", - "example": "ticker", + "description": "Range by expiration_date.", "in": "query", - "name": "sort", + "name": "expiration_date.lt", "schema": { - "enum": [ - "ticker", - "name", - "market", - "locale", - "primary_exchange", - "type", - "currency_symbol", - "currency_name", - "base_currency_symbol", - "base_currency_name", - "cik", - "composite_figi", - "share_class_figi", - "last_updated_utc", - "delisted_utc" - ], "type": "string" } }, { - "description": "The order to sort the results on. Default is asc (ascending).\n", - "example": "asc", + "description": "Order results based on the `sort` field.", "in": "query", "name": "order", "schema": { @@ -16810,20 +27963,36 @@ "asc", "desc" ], + "example": "asc", "type": "string" } }, { - "description": "Limit the size of the response, default is 100 and max is 1000.\n\nIf your query returns more than the max limit and you want to retrieve the next page of results,\nsee the `next_url` response attribute.\n", - "example": 10, + "description": "Limit the number of results returned, default is 10 and max is 250.", "in": "query", "name": "limit", "schema": { - "default": 100, - "maximum": 1000, + "default": 10, + "example": 10, + "maximum": 250, "minimum": 1, "type": "integer" } + }, + { + "description": "Sort field used for ordering.", + "in": "query", + "name": "sort", + "schema": { + "default": "ticker", + "enum": [ + "ticker", + "expiration_date", + "strike_price" + ], + "example": "ticker", + "type": "string" + } } ], "responses": { @@ -16831,326 +28000,453 @@ "content": { "application/json": { "example": { - "count": 1, - "next_url": "https://api.polygon.io/v3/reference/tickers?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", - "request_id": "e70013d92930de90e089dc8fa098888e", + "request_id": "6a7e466379af0a71039d60cc78e72282", "results": [ { - "active": true, - "cik": "0001090872", - "composite_figi": "BBG000BWQYZ5", - "currency_name": "usd", - "last_updated_utc": "2021-04-25T00:00:00Z", - "locale": "us", - "market": "stocks", - "name": "Agilent Technologies Inc.", - "primary_exchange": "XNYS", - "share_class_figi": "BBG001SCTQY4", - "ticker": "A", - "type": "CS" + "break_even_price": 151.2, + "day": { + "change": 4.5, + "change_percent": 6.76, + "close": 120.73, + "high": 120.81, + "last_updated": 1605195918507251700, + "low": 118.9, + "open": 119.32, + "previous_close": 119.12, + "volume": 868, + "vwap": 119.31 + }, + "details": { + "contract_type": "call", + "exercise_style": "american", + "expiration_date": "2022-01-21", + "shares_per_contract": 100, + "strike_price": 150, + "ticker": "O:AAPL211022C000150000" + }, + "fmv": 0.05, + "greeks": { + "delta": 1, + "gamma": 0, + "theta": 0.00229, + "vega": 0 + }, + "implied_volatility": 5, + "last_quote": { + "ask": 120.3, + "ask_size": 4, + "bid": 120.28, + "bid_size": 8, + "last_updated": 1605195918507251700, + "midpoint": 120.29, + "timeframe": "REAL-TIME" + }, + "last_trade": { + "conditions": [ + 209 + ], + "exchange": 316, + "price": 0.05, + "sip_timestamp": 1675280958783136800, + "size": 2, + "timeframe": "REAL-TIME" + }, + "open_interest": 1543, + "underlying_asset": { + "change_to_break_even": 4.2, + "last_updated": 1605195918507251700, + "price": 147, + "ticker": "AAPL", + "timeframe": "DELAYED" + } } ], "status": "OK" }, "schema": { - "allOf": [ - { - "properties": { - "results": { - "description": "An array of tickers that match your query.\n\nNote: Although you can query by CUSIP, due to legal reasons we do not return the CUSIP in the response.\n", - "items": { + "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" + }, + "request_id": { + "type": "string" + }, + "results": { + "items": { + "properties": { + "break_even_price": { + "description": "The price of the underlying asset for the contract to break even. For a call, this value is (strike price + premium paid). For a put, this value is (strike price - premium paid).", + "format": "double", + "type": "number" + }, + "day": { + "description": "The most recent daily bar for this contract.", "properties": { - "active": { - "description": "Whether or not the asset is actively traded. False means the asset has been delisted.", - "type": "boolean" + "change": { + "description": "The value of the price change for the contract from the previous trading day.", + "format": "double", + "type": "number" }, - "cik": { - "description": "The CIK number for this ticker. Find more information [here](https://en.wikipedia.org/wiki/Central_Index_Key).", - "type": "string" + "change_percent": { + "description": "The percent of the price change for the contract from the previous trading day.", + "format": "double", + "type": "number" }, - "composite_figi": { - "description": "The composite OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)", - "type": "string" + "close": { + "description": "The closing price for the contract of the day.", + "format": "double", + "type": "number" }, - "currency_name": { - "description": "The name of the currency that this asset is traded with.", - "type": "string" + "high": { + "description": "The highest price for the contract of the day.", + "format": "double", + "type": "number" }, - "delisted_utc": { - "description": "The last date that the asset was traded.", - "format": "date-time", - "type": "string" + "last_updated": { + "description": "The nanosecond timestamp of when this information was updated.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "INanoseconds", + "path": "github.com/massive-com/ptime" + } }, - "last_updated_utc": { - "description": "The information is accurate up to this time.", - "format": "date-time", - "type": "string" + "low": { + "description": "The lowest price for the contract of the day.", + "format": "double", + "type": "number" + }, + "open": { + "description": "The open price for the contract of the day.", + "format": "double", + "type": "number" + }, + "previous_close": { + "description": "The closing price for the contract of previous trading day.", + "format": "double", + "type": "number" + }, + "volume": { + "description": "The trading volume for the contract of the day.", + "format": "double", + "type": "number" }, - "locale": { - "description": "The locale of the asset.", + "vwap": { + "description": "The trading volume weighted average price for the contract of the day.", + "format": "double", + "type": "number", + "x-massive-go-id": "VWAP" + } + }, + "required": [ + "open", + "high", + "low", + "close", + "previous_close", + "volume", + "vwap", + "change_percent", + "change" + ], + "type": "object", + "x-massive-go-type": { + "name": "Day" + } + }, + "details": { + "description": "The details for this contract.", + "properties": { + "contract_type": { + "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".", "enum": [ - "us", - "global" + "put", + "call", + "other" ], "type": "string" }, - "market": { - "description": "The market type of the asset.", + "exercise_style": { + "description": "The exercise style of this contract. See this link for more details on exercise styles.", "enum": [ - "stocks", - "crypto", - "fx", - "otc" + "american", + "european", + "bermudan" ], "type": "string" }, - "name": { - "description": "The name of the asset. For stocks/equities this will be the companies registered name. For crypto/fx this will be the name of the currency or coin pair.\n", + "expiration_date": { + "description": "The contract's expiration date in YYYY-MM-DD format.", + "format": "date", + "type": "string", + "x-massive-go-type": { + "name": "IDaysMassiveDateString", + "path": "github.com/massive-com/ptime" + } + }, + "shares_per_contract": { + "description": "The number of shares per contract for this contract.", + "type": "number" + }, + "strike_price": { + "description": "The strike price of the option contract.", + "format": "double", + "type": "number" + }, + "ticker": { + "description": "The ticker symbol for the asset.", "type": "string" + } + }, + "required": [ + "ticker", + "contract_type", + "exercise_style", + "expiration_date", + "shares_per_contract", + "strike_price" + ], + "type": "object", + "x-massive-go-type": { + "name": "Details" + } + }, + "fmv": { + "description": "Fair market value is only available on Business plans. It's it our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security.\nFor more information, contact us.", + "type": "number" + }, + "greeks": { + "description": "The greeks for this contract.\nThere are certain circumstances where greeks will not be returned, such as options contracts that are deep in the money.\nSee this article for more information.", + "properties": { + "delta": { + "description": "The change in the option's price per $0.01 increment in the price of the underlying asset.", + "format": "double", + "type": "number" + }, + "gamma": { + "description": "The change in delta per $0.01 change in the price of the underlying asset.", + "format": "double", + "type": "number" + }, + "theta": { + "description": "The change in the option's price per day.", + "format": "double", + "type": "number" + }, + "vega": { + "description": "The change in the option's price per 1% increment in volatility.", + "format": "double", + "type": "number" + } + }, + "required": [ + "delta", + "gamma", + "theta", + "vega" + ], + "type": "object", + "x-massive-go-type": { + "name": "Greeks" + } + }, + "implied_volatility": { + "description": "The market's forecast for the volatility of the underlying asset, based on this option's current price.", + "format": "double", + "type": "number" + }, + "last_quote": { + "description": "The most recent quote for this contract. This is only returned if your current plan includes quotes.", + "properties": { + "ask": { + "description": "The ask price.", + "format": "double", + "type": "number" + }, + "ask_exchange": { + "description": "The ask side exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", + "format": "int32", + "type": "number" + }, + "ask_size": { + "description": "The ask size.", + "format": "double", + "type": "number" }, - "primary_exchange": { - "description": "The ISO code of the primary listing exchange for this asset.", + "bid": { + "description": "The bid price.", + "format": "double", + "type": "number" + }, + "bid_exchange": { + "description": "The bid side exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", + "format": "int32", + "type": "number" + }, + "bid_size": { + "description": "The bid size.", + "format": "double", + "type": "number" + }, + "last_updated": { + "description": "The nanosecond timestamp of when this information was updated.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "INanoseconds", + "path": "github.com/massive-com/ptime" + } + }, + "midpoint": { + "description": "The average of the bid and ask price.", + "format": "double", + "type": "number" + }, + "timeframe": { + "description": "The time relevance of the data.", + "enum": [ + "DELAYED", + "REAL-TIME" + ], "type": "string" + } + }, + "required": [ + "ask", + "ask_size", + "bid_size", + "bid", + "midpoint" + ], + "type": "object", + "x-massive-go-type": { + "name": "LastQuote" + } + }, + "last_trade": { + "description": "The most recent trade for this contract. This is only returned if your current plan includes trades.", + "properties": { + "conditions": { + "description": "A list of condition codes.", + "items": { + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/options/get_v3_reference_conditions)\nfor a mapping to exchange conditions.", + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "exchange": { + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", + "type": "integer" + }, + "price": { + "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.", + "format": "double", + "type": "number" }, - "share_class_figi": { - "description": "The share Class OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)", + "sip_timestamp": { + "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this trade from the exchange which produced it.", + "format": "int64", + "type": "integer" + }, + "size": { + "description": "The size of a trade (also known as volume).", + "format": "int32", + "type": "integer" + }, + "timeframe": { + "description": "The time relevance of the data.", + "enum": [ + "DELAYED", + "REAL-TIME" + ], "type": "string" + } + }, + "required": [ + "exchange", + "price", + "sip_timestamp", + "size" + ], + "type": "object", + "x-massive-go-type": { + "name": "OptionsLastTrade" + } + }, + "open_interest": { + "description": "The quantity of this contract held at the end of the last trading day.", + "format": "double", + "type": "number" + }, + "underlying_asset": { + "description": "Information on the underlying stock for this options contract. The market data returned depends on your current stocks plan.", + "properties": { + "change_to_break_even": { + "description": "The change in price for the contract to break even.", + "format": "double", + "type": "number" + }, + "last_updated": { + "description": "The nanosecond timestamp of when this information was updated.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "INanoseconds", + "path": "github.com/massive-com/ptime" + } + }, + "price": { + "description": "The price of the trade. This is the actual dollar value per whole share of this trade. A trade of 100 shares with a price of $2.00 would be worth a total dollar value of $200.00.", + "format": "double", + "type": "number" }, "ticker": { - "description": "The exchange symbol that this item is traded under.", + "description": "The ticker symbol for the contract's underlying asset.", + "type": "string" + }, + "timeframe": { + "description": "The time relevance of the data.", + "enum": [ + "DELAYED", + "REAL-TIME" + ], "type": "string" }, - "type": { - "description": "The type of the asset. Find the types that we support via our [Ticker Types API](https://polygon.io/docs/stocks/get_v3_reference_tickers_types).", - "type": "string" + "value": { + "description": "The value of the underlying index.", + "format": "double", + "type": "number" } }, "required": [ "ticker", - "name", - "market", - "locale" - ], - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - { - "properties": { - "next_url": { - "description": "If present, this value can be used to fetch the next page of data.", - "type": "string" - } - }, - "type": "object" - }, - { - "properties": { - "request_id": { - "description": "A request id assigned by the server.", - "type": "string" - } - }, - "type": "object" - }, - { - "properties": { - "count": { - "description": "The total number of results for this request.", - "type": "integer" - }, - "status": { - "description": "The status of this request's response.", - "type": "string" - } - }, - "type": "object" - } - ] - } - } - }, - "description": "Reference Tickers." - }, - "401": { - "description": "Unauthorized - Check our API Key and account status" - } - }, - "summary": "Tickers", - "tags": [ - "reference:tickers:list" - ], - "x-polygon-entitlement-data-type": { - "description": "Reference data", - "name": "reference" - } - } - }, - "/v3/reference/tickers/types": { - "get": { - "description": "List all ticker types that Polygon.io has.", - "operationId": "ListTickerTypes", - "parameters": [ - { - "description": "Filter by asset class.", - "in": "query", - "name": "asset_class", - "schema": { - "description": "An identifier for a group of similar financial instruments.", - "enum": [ - "stocks", - "options", - "crypto", - "fx" - ], - "example": "stocks", - "type": "string" - } - }, - { - "description": "Filter by locale.", - "in": "query", - "name": "locale", - "schema": { - "description": "An identifier for a geographical location.", - "enum": [ - "us", - "global" - ], - "example": "us", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "count": { - "description": "The total number of results for this request.", - "example": 1, - "type": "integer" - }, - "request_id": { - "description": "A request ID assigned by the server.", - "example": "31d59dda-80e5-4721-8496-d0d32a654afe", - "type": "string" - }, - "results": { - "items": { - "description": "Describes the type of financial instrument represented by a ticker.", - "properties": { - "asset_class": { - "description": "An identifier for a group of similar financial instruments.", - "enum": [ - "stocks", - "options", - "crypto", - "fx" - ], - "example": "stocks", - "type": "string" - }, - "code": { - "description": "A code used by Polygon.io to refer to this ticker type.", - "example": "CS", - "type": "string" - }, - "description": { - "description": "A short description of this ticker type.", - "example": "Common Stock", - "type": "string" - }, - "locale": { - "description": "An identifier for a geographical location.", - "enum": [ - "us", - "global" + "change_to_break_even" ], - "example": "us", - "type": "string" + "type": "object", + "x-massive-go-type": { + "name": "UnderlyingAsset" + } } }, "required": [ - "code", - "description", - "asset_class", - "locale" + "day", + "last_quote", + "underlying_asset", + "details", + "break_even_price", + "open_interest" ], - "type": "object" + "type": "object", + "x-massive-go-type": { + "name": "OptionSnapshotResult" + } }, "type": "array" }, "status": { "description": "The status of this request's response.", - "example": "OK", - "type": "string" - } - }, - "required": [ - "status", - "request_id" - ], - "type": "object" - } - } - }, - "description": "OK" - }, - "400": { - "content": { - "application/json": { - "schema": { - "properties": { - "count": { - "description": "The total number of results for this request.", - "example": 1, - "type": "integer" - }, - "request_id": { - "description": "A request ID assigned by the server.", - "example": "31d59dda-80e5-4721-8496-d0d32a654afe", - "type": "string" - }, - "status": { - "description": "The status of this request's response.", - "example": "OK", - "type": "string" - } - }, - "required": [ - "status", - "request_id" - ], - "type": "object" - } - } - }, - "description": "a query parameter was malformed" - }, - "default": { - "content": { - "application/json": { - "schema": { - "properties": { - "count": { - "description": "The total number of results for this request.", - "example": 1, - "type": "integer" - }, - "request_id": { - "description": "A request ID assigned by the server.", - "example": "31d59dda-80e5-4721-8496-d0d32a654afe", - "type": "string" - }, - "status": { - "description": "The status of this request's response.", - "example": "OK", "type": "string" } }, @@ -17162,48 +28458,70 @@ } } }, - "description": "an unknown error occurred" + "description": "Snapshots for options contracts of the underlying ticker" } }, - "summary": "Ticker Types", + "summary": "Options Chain", "tags": [ - "reference:tickers:types" + "options:snapshot" ], - "x-polygon-entitlement-data-type": { - "description": "Reference data", - "name": "reference" + "x-massive-entitlement-allowed-timeframes": [ + { + "description": "Real Time Data", + "name": "realtime" + }, + { + "description": "15 minute delayed data", + "name": "delayed" + } + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Options data", + "name": "options" + }, + "x-massive-paginate": { + "limit": { + "default": 10, + "max": 250 + }, + "sort": { + "default": "ticker", + "enum": [ + "ticker", + "expiration_date", + "strike_price" + ] + } } } }, - "/v3/reference/tickers/{ticker}": { + "/v3/snapshot/options/{underlyingAsset}/{optionContract}": { "get": { - "description": "Get a single ticker supported by Polygon.io. This response will have detailed information about the ticker and the company behind it.\n", + "description": "Get the snapshot of an option contract for a stock equity.", + "operationId": "OptionContract", "parameters": [ { - "description": "The ticker symbol of the asset.", - "example": "AAPL", + "description": "The underlying ticker symbol of the option contract.", + "example": "EVRI", "in": "path", - "name": "ticker", + "name": "underlyingAsset", "required": true, "schema": { "type": "string" } }, { - "description": "Specify a point in time to get information about the ticker available on that date.\nWhen retrieving information from SEC filings, we compare this date with the period of report date on the SEC filing.\n\nFor example, consider an SEC filing submitted by AAPL on 2019-07-31, with a period of report date ending on 2019-06-29.\nThat means that the filing was submitted on 2019-07-31, but the filing was created based on information from 2019-06-29.\nIf you were to query for AAPL details on 2019-06-29, the ticker details would include information from the SEC filing.\n\nDefaults to the most recent available date.\n", - "in": "query", - "name": "date", + "description": "The option contract identifier.", + "example": "O:EVRI240920P00012500", + "in": "path", + "name": "optionContract", + "required": true, "schema": { - "oneOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "format": "date", - "type": "string" - } - ] + "type": "string" } } ], @@ -17212,360 +28530,548 @@ "content": { "application/json": { "example": { - "request_id": "31d59dda-80e5-4721-8496-d0d32a654afe", + "request_id": "d9ff18dac69f55c218f69e4753706acd", "results": { - "active": true, - "address": { - "address1": "One Apple Park Way", - "city": "Cupertino", - "postal_code": "95014", - "state": "CA" + "break_even_price": 171.075, + "day": { + "change": -1.05, + "change_percent": -4.67, + "close": 21.4, + "high": 22.49, + "last_updated": 1636520400000000000, + "low": 21.35, + "open": 22.49, + "previous_close": 22.45, + "volume": 37, + "vwap": 21.6741 }, - "branding": { - "icon_url": "https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_icon.png", - "logo_url": "https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_logo.svg" + "details": { + "contract_type": "call", + "exercise_style": "american", + "expiration_date": "2023-06-16", + "shares_per_contract": 100, + "strike_price": 150, + "ticker": "O:AAPL230616C00150000" }, - "cik": "0000320193", - "composite_figi": "BBG000B9XRY4", - "currency_name": "usd", - "description": "Apple designs a wide variety of consumer electronic devices, including smartphones (iPhone), tablets (iPad), PCs (Mac), smartwatches (Apple Watch), AirPods, and TV boxes (Apple TV), among others. The iPhone makes up the majority of Apple's total revenue. In addition, Apple offers its customers a variety of services such as Apple Music, iCloud, Apple Care, Apple TV+, Apple Arcade, Apple Card, and Apple Pay, among others. Apple's products run internally developed software and semiconductors, and the firm is well known for its integration of hardware, software and services. Apple's products are distributed online as well as through company-owned stores and third-party retailers. The company generates roughly 40% of its revenue from the Americas, with the remainder earned internationally.", - "homepage_url": "https://www.apple.com", - "list_date": "1980-12-12", - "locale": "us", - "market": "stocks", - "market_cap": 2771126040150, - "name": "Apple Inc.", - "phone_number": "(408) 996-1010", - "primary_exchange": "XNAS", - "share_class_figi": "BBG001S5N8V8", - "share_class_shares_outstanding": 16406400000, - "sic_code": "3571", - "sic_description": "ELECTRONIC COMPUTERS", - "ticker": "AAPL", - "ticker_root": "AAPL", - "total_employees": 154000, - "type": "CS", - "weighted_shares_outstanding": 16334371000 + "fmv": 0.05, + "greeks": { + "delta": 0.5520187372272933, + "gamma": 0.00706756515659829, + "theta": -0.018532772783847958, + "vega": 0.7274811132998142 + }, + "implied_volatility": 0.3048997097864957, + "last_quote": { + "ask": 21.25, + "ask_exchange": 301, + "ask_size": 110, + "bid": 20.9, + "bid_exchange": 301, + "bid_size": 172, + "last_updated": 1636573458756383500, + "midpoint": 21.075, + "timeframe": "REAL-TIME" + }, + "last_trade": { + "conditions": [ + 209 + ], + "exchange": 316, + "price": 0.05, + "sip_timestamp": 1675280958783136800, + "size": 2, + "timeframe": "REAL-TIME" + }, + "open_interest": 8921, + "underlying_asset": { + "change_to_break_even": 23.123999999999995, + "last_updated": 1636573459862384600, + "price": 147.951, + "ticker": "AAPL", + "timeframe": "REAL-TIME" + } }, "status": "OK" }, "schema": { - "allOf": [ - { + "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" + }, + "request_id": { + "type": "string" + }, + "results": { "properties": { - "results": { - "description": "Ticker with details.\n", + "break_even_price": { + "description": "The price of the underlying asset for the contract to break even. For a call, this value is (strike price + premium paid). For a put, this value is (strike price - premium paid).", + "format": "double", + "type": "number" + }, + "day": { + "description": "The most recent daily bar for this contract.", + "properties": { + "change": { + "description": "The value of the price change for the contract from the previous trading day.", + "format": "double", + "type": "number" + }, + "change_percent": { + "description": "The percent of the price change for the contract from the previous trading day.", + "format": "double", + "type": "number" + }, + "close": { + "description": "The closing price for the contract of the day.", + "format": "double", + "type": "number" + }, + "high": { + "description": "The highest price for the contract of the day.", + "format": "double", + "type": "number" + }, + "last_updated": { + "description": "The nanosecond timestamp of when this information was updated.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "INanoseconds", + "path": "github.com/massive-com/ptime" + } + }, + "low": { + "description": "The lowest price for the contract of the day.", + "format": "double", + "type": "number" + }, + "open": { + "description": "The open price for the contract of the day.", + "format": "double", + "type": "number" + }, + "previous_close": { + "description": "The closing price for the contract of previous trading day.", + "format": "double", + "type": "number" + }, + "volume": { + "description": "The trading volume for the contract of the day.", + "format": "double", + "type": "number" + }, + "vwap": { + "description": "The trading volume weighted average price for the contract of the day.", + "format": "double", + "type": "number", + "x-massive-go-id": "VWAP" + } + }, + "required": [ + "open", + "high", + "low", + "close", + "previous_close", + "volume", + "vwap", + "change_percent", + "change" + ], + "type": "object", + "x-massive-go-type": { + "name": "Day" + } + }, + "details": { + "description": "The details for this contract.", + "properties": { + "contract_type": { + "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".", + "enum": [ + "put", + "call", + "other" + ], + "type": "string" + }, + "exercise_style": { + "description": "The exercise style of this contract. See this link for more details on exercise styles.", + "enum": [ + "american", + "european", + "bermudan" + ], + "type": "string" + }, + "expiration_date": { + "description": "The contract's expiration date in YYYY-MM-DD format.", + "format": "date", + "type": "string", + "x-massive-go-type": { + "name": "IDaysMassiveDateString", + "path": "github.com/massive-com/ptime" + } + }, + "shares_per_contract": { + "description": "The number of shares per contract for this contract.", + "type": "number" + }, + "strike_price": { + "description": "The strike price of the option contract.", + "format": "double", + "type": "number" + }, + "ticker": { + "description": "The ticker symbol for the asset.", + "type": "string" + } + }, + "required": [ + "ticker", + "contract_type", + "exercise_style", + "expiration_date", + "shares_per_contract", + "strike_price" + ], + "type": "object", + "x-massive-go-type": { + "name": "Details" + } + }, + "fmv": { + "description": "Fair market value is only available on Business plans. It's it our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security.\nFor more information, contact us.", + "type": "number" + }, + "greeks": { + "description": "The greeks for this contract.\nThere are certain circumstances where greeks will not be returned, such as options contracts that are deep in the money.\nSee this article for more information.", + "properties": { + "delta": { + "description": "The change in the option's price per $0.01 increment in the price of the underlying asset.", + "format": "double", + "type": "number" + }, + "gamma": { + "description": "The change in delta per $0.01 change in the price of the underlying asset.", + "format": "double", + "type": "number" + }, + "theta": { + "description": "The change in the option's price per day.", + "format": "double", + "type": "number" + }, + "vega": { + "description": "The change in the option's price per 1% increment in volatility.", + "format": "double", + "type": "number" + } + }, + "required": [ + "delta", + "gamma", + "theta", + "vega" + ], + "type": "object", + "x-massive-go-type": { + "name": "Greeks" + } + }, + "implied_volatility": { + "description": "The market's forecast for the volatility of the underlying asset, based on this option's current price.", + "format": "double", + "type": "number" + }, + "last_quote": { + "description": "The most recent quote for this contract. This is only returned if your current plan includes quotes.", "properties": { - "active": { - "description": "Whether or not the asset is actively traded. False means the asset has been delisted.", - "type": "boolean" - }, - "address": { - "properties": { - "address1": { - "description": "The first line of the company's headquarters address.", - "type": "string" - }, - "city": { - "description": "The city of the company's headquarters address.", - "type": "string" - }, - "postal_code": { - "description": "The postal code of the company's headquarters address.", - "type": "string" - }, - "state": { - "description": "The state of the company's headquarters address.", - "type": "string" - } - }, - "type": "object" - }, - "branding": { - "properties": { - "icon_url": { - "description": "A link to this ticker's company's icon. Icon's are generally smaller, square images that represent the company at a glance.\nNote that you must provide an API key when accessing this URL. See the \"Authentication\" section at the top of this page for more details.\n", - "type": "string" - }, - "logo_url": { - "description": "A link to this ticker's company's logo.\nNote that you must provide an API key when accessing this URL. See the \"Authentication\" section at the top of this page for more details.\n", - "type": "string" - } - }, - "type": "object" + "ask": { + "description": "The ask price.", + "format": "double", + "type": "number" }, - "cik": { - "description": "The CIK number for this ticker. Find more information [here](https://en.wikipedia.org/wiki/Central_Index_Key).", - "type": "string" + "ask_exchange": { + "description": "The ask side exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", + "format": "int32", + "type": "number" }, - "composite_figi": { - "description": "The composite OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)", - "type": "string" + "ask_size": { + "description": "The ask size.", + "format": "double", + "type": "number" }, - "currency_name": { - "description": "The name of the currency that this asset is traded with.", - "type": "string" + "bid": { + "description": "The bid price.", + "format": "double", + "type": "number" }, - "delisted_utc": { - "description": "The last date that the asset was traded.", - "format": "date-time", - "type": "string" + "bid_exchange": { + "description": "The bid side exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", + "format": "int32", + "type": "number" }, - "description": { - "description": "A description of the company and what they do/offer.", - "type": "string" + "bid_size": { + "description": "The bid size.", + "format": "double", + "type": "number" }, - "homepage_url": { - "description": "The URL of the company's website homepage.", - "type": "string" + "last_updated": { + "description": "The nanosecond timestamp of when this information was updated.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "INanoseconds", + "path": "github.com/massive-com/ptime" + } }, - "list_date": { - "description": "The date that the symbol was first publicly listed in the format YYYY-MM-DD.", - "type": "string" + "midpoint": { + "description": "The average of the bid and ask price.", + "format": "double", + "type": "number" }, - "locale": { - "description": "The locale of the asset.", + "timeframe": { + "description": "The time relevance of the data.", "enum": [ - "us", - "global" + "DELAYED", + "REAL-TIME" ], "type": "string" + } + }, + "required": [ + "ask", + "ask_size", + "bid_size", + "bid", + "midpoint" + ], + "type": "object", + "x-massive-go-type": { + "name": "LastQuote" + } + }, + "last_trade": { + "description": "The most recent trade for this contract. This is only returned if your current plan includes trades.", + "properties": { + "conditions": { + "description": "A list of condition codes.", + "items": { + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/options/get_v3_reference_conditions)\nfor a mapping to exchange conditions.", + "format": "int32", + "type": "integer" + }, + "type": "array" }, - "market": { - "description": "The market type of the asset.", - "enum": [ - "stocks", - "crypto", - "fx", - "otc" - ], - "type": "string" + "exchange": { + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", + "type": "integer" }, - "market_cap": { - "description": "The most recent close price of the ticker multiplied by weighted outstanding shares.", + "price": { + "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.", "format": "double", "type": "number" }, - "name": { - "description": "The name of the asset. For stocks/equities this will be the companies registered name. For crypto/fx this will be the name of the currency or coin pair.\n", - "type": "string" - }, - "phone_number": { - "description": "The phone number for the company behind this ticker.", - "type": "string" + "sip_timestamp": { + "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this trade from the exchange which produced it.", + "format": "int64", + "type": "integer" }, - "primary_exchange": { - "description": "The ISO code of the primary listing exchange for this asset.", - "type": "string" + "size": { + "description": "The size of a trade (also known as volume).", + "format": "int32", + "type": "integer" }, - "share_class_figi": { - "description": "The share Class OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)", + "timeframe": { + "description": "The time relevance of the data.", + "enum": [ + "DELAYED", + "REAL-TIME" + ], "type": "string" - }, - "share_class_shares_outstanding": { - "description": "The recorded number of outstanding shares for this particular share class.", + } + }, + "required": [ + "exchange", + "price", + "sip_timestamp", + "size" + ], + "type": "object", + "x-massive-go-type": { + "name": "OptionsLastTrade" + } + }, + "open_interest": { + "description": "The quantity of this contract held at the end of the last trading day.", + "format": "double", + "type": "number" + }, + "underlying_asset": { + "description": "Information on the underlying stock for this options contract. The market data returned depends on your current stocks plan.", + "properties": { + "change_to_break_even": { + "description": "The change in price for the contract to break even.", "format": "double", "type": "number" }, - "sic_code": { - "description": "The standard industrial classification code for this ticker. For a list of SIC Codes, see the SEC's \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://www.sec.gov/info/edgar/siccodes.htm\"\u003eSIC Code List\u003c/a\u003e.\n", - "type": "string" + "last_updated": { + "description": "The nanosecond timestamp of when this information was updated.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "INanoseconds", + "path": "github.com/massive-com/ptime" + } }, - "sic_description": { - "description": "A description of this ticker's SIC code.", - "type": "string" + "price": { + "description": "The price of the trade. This is the actual dollar value per whole share of this trade. A trade of 100 shares with a price of $2.00 would be worth a total dollar value of $200.00.", + "format": "double", + "type": "number" }, "ticker": { - "description": "The exchange symbol that this item is traded under.", - "type": "string" - }, - "ticker_root": { - "description": "The root of a specified ticker. For example, the root of BRK.A is BRK.", - "type": "string" - }, - "ticker_suffix": { - "description": "The suffix of a specified ticker. For example, the suffix of BRK.A is A.", + "description": "The ticker symbol for the contract's underlying asset.", "type": "string" }, - "total_employees": { - "description": "The approximate number of employees for the company.", - "type": "number" - }, - "type": { - "description": "The type of the asset. Find the types that we support via our [Ticker Types API](https://polygon.io/docs/stocks/get_v3_reference_tickers_types).", + "timeframe": { + "description": "The time relevance of the data.", + "enum": [ + "DELAYED", + "REAL-TIME" + ], "type": "string" }, - "weighted_shares_outstanding": { - "description": "The shares outstanding calculated assuming all shares of other share classes are converted to this share class.\n", + "value": { + "description": "The value of the underlying index.", "format": "double", "type": "number" } }, "required": [ "ticker", - "name", - "market", - "locale", - "active", - "currency_name" + "change_to_break_even" ], - "type": "object" - } - }, - "type": "object" - }, - { - "properties": { - "request_id": { - "description": "A request id assigned by the server.", - "type": "string" + "type": "object", + "x-massive-go-type": { + "name": "UnderlyingAsset" + } } }, - "type": "object" + "required": [ + "day", + "last_quote", + "underlying_asset", + "details", + "break_even_price", + "open_interest" + ], + "type": "object", + "x-massive-go-type": { + "name": "OptionSnapshotResult" + } }, - { - "properties": { - "count": { - "description": "The total number of results for this request.", - "type": "integer" - }, - "status": { - "description": "The status of this request's response.", - "type": "string" - } - }, - "type": "object" + "status": { + "description": "The status of this request's response.", + "type": "string" } - ] + }, + "required": [ + "status", + "request_id" + ], + "type": "object" + } + }, + "text/csv": { + "schema": { + "example": "break_even_price,day_close,day_high,day_last_updated,day_low,day_open,day_previous_close,day_volume,day_vwap,day_change,day_change_percent,details_contract_type,details_exercise_style,details_expiration_date,details_shares_per_contract,details_strike_price,details_ticker,greeks_delta,greeks_gamma,greeks_theta,greeks_vega,implied_volatility,last_quote_ask,last_quote_ask_size,last_quote_bid,last_quote_bid_size,last_quote_last_updated,last_quote_midpoint,last_quote_timeframe,open_interest,underlying_asset_change_to_break_even,underlying_asset_last_updated,underlying_asset_price,underlying_asset_ticker,underlying_asset_timeframe\n0,171.075,21.4,22.49,1636520400000000000,21.35,22.49,22.45,37,21.6741,-1.05,-4.67,call,american,2023-06-16,100,150,O:AAPL230616C00150000,0.5520187372272933,0.00706756515659829,-0.018532772783847958,0.7274811132998142,0.3048997097864957,21.25,110,20.9,172,1636573458756383500,21.075,REAL-TIME,8921,23.123999999999995,1636573459862384600,147.951,AAPL,REAL-TIME\n", + "type": "string" } } }, - "description": "Reference Tickers." - }, - "401": { - "description": "Unauthorized - Check our API Key and account status" + "description": "Snapshot of the option contract." } }, - "summary": "Ticker Details v3", + "summary": "Option Contract", "tags": [ - "reference:tickers:get" - ], - "x-polygon-entitlement-data-type": { - "description": "Reference data", - "name": "reference" - } - } - }, - "/v3/snapshot/options/{underlyingAsset}": { - "get": { - "description": "Get the snapshot of all options contracts for an underlying ticker.", - "operationId": "OptionsChain", - "parameters": [ - { - "description": "The underlying ticker symbol of the option contract.", - "example": "AAPL", - "in": "path", - "name": "underlyingAsset", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Query by strike price of a contract.", - "in": "query", - "name": "strike_price", - "schema": { - "type": "number" - }, - "x-polygon-filter-field": { - "range": true, - "type": "number" - } - }, - { - "description": "Query by contract expiration with date format YYYY-MM-DD.", - "in": "query", - "name": "expiration_date", - "schema": { - "type": "string" - }, - "x-polygon-filter-field": { - "range": true - } - }, - { - "description": "Query by the type of contract.", - "in": "query", - "name": "contract_type", - "schema": { - "enum": [ - "call", - "put" - ], - "type": "string" - } - }, - { - "description": "Search by strike_price.", - "in": "query", - "name": "strike_price.gte", - "schema": { - "type": "number" - } - }, - { - "description": "Search by strike_price.", - "in": "query", - "name": "strike_price.gt", - "schema": { - "type": "number" - } + "options:snapshot" + ], + "x-massive-entitlement-allowed-timeframes": [ + { + "description": "Real Time Data", + "name": "realtime" }, { - "description": "Search by strike_price.", - "in": "query", - "name": "strike_price.lte", + "description": "15 minute delayed data", + "name": "delayed" + } + ], + "x-massive-entitlement-data-type": { + "description": "Aggregate data", + "name": "aggregates" + }, + "x-massive-entitlement-market-type": { + "description": "Options data", + "name": "options" + } + } + }, + "/v3/trades/{cryptoTicker}": { + "get": { + "description": "Get trades for a crypto ticker symbol in a given time range.", + "operationId": "TradesCrypto", + "parameters": [ + { + "description": "The ticker symbol to get trades for.", + "example": "X:BTC-USD", + "in": "path", + "name": "cryptoTicker", + "required": true, "schema": { - "type": "number" + "type": "string" } }, { - "description": "Search by strike_price.", + "description": "Query by trade timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.", "in": "query", - "name": "strike_price.lt", + "name": "timestamp", "schema": { - "type": "number" + "type": "string" + }, + "x-massive-filter-field": { + "range": true } }, { - "description": "Search by expiration_date.", + "description": "Range by timestamp.", "in": "query", - "name": "expiration_date.gte", + "name": "timestamp.gte", "schema": { "type": "string" } }, { - "description": "Search by expiration_date.", + "description": "Range by timestamp.", "in": "query", - "name": "expiration_date.gt", + "name": "timestamp.gt", "schema": { "type": "string" } }, { - "description": "Search by expiration_date.", + "description": "Range by timestamp.", "in": "query", - "name": "expiration_date.lte", + "name": "timestamp.lte", "schema": { "type": "string" } }, { - "description": "Search by expiration_date.", + "description": "Range by timestamp.", "in": "query", - "name": "expiration_date.lt", + "name": "timestamp.lt", "schema": { "type": "string" } @@ -17575,6 +29081,7 @@ "in": "query", "name": "order", "schema": { + "default": "desc", "enum": [ "asc", "desc" @@ -17584,13 +29091,13 @@ } }, { - "description": "Limit the number of results returned, default is 10 and max is 1000.", + "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": 1000, + "maximum": 50000, "minimum": 1, "type": "integer" } @@ -17600,13 +29107,11 @@ "in": "query", "name": "sort", "schema": { - "default": "ticker", + "default": "timestamp", "enum": [ - "ticker", - "expiration_date", - "strike_price" + "timestamp" ], - "example": "ticker", + "example": "timestamp", "type": "string" } } @@ -17616,302 +29121,87 @@ "content": { "application/json": { "example": { - "request_id": "6a7e466379af0a71039d60cc78e72282", + "next_url": "https://api.massive.com/v3/trades/X:BTC-USD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", "results": [ { - "break_even_price": 151.2, - "day": { - "change": 4.5, - "change_percent": 6.76, - "close": 120.73, - "high": 120.81, - "last_updated": 1605195918507251700, - "low": 118.9, - "open": 119.32, - "previous_close": 119.12, - "volume": 868, - "vwap": 119.31 - }, - "details": { - "contract_type": "call", - "exercise_style": "american", - "expiration_date": "2022-01-21", - "shares_per_contract": 100, - "strike_price": 150, - "ticker": "AAPL211022C000150000" - }, - "greeks": { - "delta": 1, - "gamma": 0, - "implied_volatility": 5, - "theta": 0.00229, - "vega": 0 - }, - "last_quote": { - "ask": 120.3, - "ask_size": 4, - "bid": 120.28, - "bid_size": 8, - "last_updated": 1605195918507251700, - "midpoint": 120.29 - }, - "open_interest": 1543, - "underlying_asset": { - "change_to_break_even": 4.2, - "last_updated": 1605195918507251700, - "price": 147, - "ticker": "AAPL", - "timeframe": "DELAYED" - } - } - ], - "status": "OK" - }, - "schema": { - "properties": { - "next_url": { - "description": "If present, this value can be used to fetch the next page of data.", - "type": "string" - }, - "request_id": { - "type": "string" + "conditions": [ + 1 + ], + "exchange": 1, + "id": "191450340", + "participant_timestamp": 1625097600103000000, + "price": 35060, + "size": 1.0434526 }, - "results": { - "items": { - "properties": { - "break_even_price": { - "description": "The price the underlying asset for the contract to break even. For a call this value is (strike price + premium paid), where a put this value is (strike price - premium paid)", - "format": "double", - "type": "number" - }, - "day": { - "description": "The most recent daily bar for this contract.", - "properties": { - "change": { - "description": "The value of the price change for the contract from the previous trading day.", - "format": "double", - "type": "number" - }, - "change_percent": { - "description": "The percent of the price change for the contract from the previous trading day.", - "format": "double", - "type": "number" - }, - "close": { - "description": "The closing price for the contract of the day.", - "format": "double", - "type": "number" - }, - "high": { - "description": "The highest price for the contract of the day.", - "format": "double", - "type": "number" - }, - "last_updated": { - "description": "The nanosecond timestamp of when this information was updated.", - "format": "int64", - "type": "integer", - "x-polygon-go-type": { - "name": "INanoseconds", - "path": "github.com/polygon-io/ptime" - } - }, - "low": { - "description": "The lowest price for the contract of the day.", - "format": "double", - "type": "number" - }, - "open": { - "description": "The open price for the contract of the day.", - "format": "double", - "type": "number" - }, - "previous_close": { - "description": "The closing price for the contract of previous trading day.", - "format": "double", - "type": "number" - }, - "volume": { - "description": "The trading volume for the contract of the day.", - "format": "double", - "type": "number" - }, - "vwap": { - "description": "The trading volume weighted average price for the contract of the day.", - "format": "double", - "type": "number", - "x-polygon-go-id": "VWAP" - } - }, - "type": "object" - }, - "details": { - "properties": { - "contract_type": { - "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".", - "enum": [ - "put", - "call", - "other" - ], - "type": "string" - }, - "exercise_style": { - "description": "The exercise style of this contract. See \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Option_style\"\u003ethis link\u003c/a\u003e for more details on exercise styles.", - "enum": [ - "american", - "european", - "bermudan" - ], - "type": "string" - }, - "expiration_date": { - "description": "The contract's expiration date in YYYY-MM-DD format.", - "format": "date", - "type": "string", - "x-polygon-go-type": { - "name": "IDaysPolygonDateString", - "path": "github.com/polygon-io/ptime" - } - }, - "shares_per_contract": { - "description": "The number of shares per contract for this contract.", - "type": "number" - }, - "strike_price": { - "description": "The strike price of the option contract.", - "format": "double", - "type": "number" - }, - "ticker": { - "description": "The ticker for the option contract.", - "type": "string" - } - }, - "type": "object" - }, - "greeks": { - "description": "The greeks for this contract. This is only returned if your current plan includes greeks.", - "properties": { - "delta": { - "description": "The change in the option's price per $0.01 increment in the price of the underlying asset.", - "format": "double", - "type": "number" - }, - "gamma": { - "description": "The change in delta per $0.01 change in the price of the underlying asset.", - "format": "double", - "type": "number" - }, - "theta": { - "description": "The change in the option's price per day.", - "format": "double", - "type": "number" - }, - "vega": { - "description": "The change in the option's price per 1% increment in volatility.", - "format": "double", - "type": "number" - } + { + "conditions": [ + 2 + ], + "exchange": 1, + "id": "191450341", + "participant_timestamp": 1625097600368000000, + "price": 35059.99, + "size": 0.0058883 + } + ], + "status": "OK" + }, + "schema": { + "properties": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" + }, + "results": { + "items": { + "properties": { + "conditions": { + "description": "A list of condition codes.", + "items": { + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.", + "format": "int32", + "type": "integer" }, - "type": "object" + "type": "array", + "x-massive-go-type": { + "name": "Int32Array" + } }, - "implied_volatility": { - "description": "The market's forecast for the volatility of the underlying asset, based on this option's current price.", - "format": "double", - "type": "number" + "exchange": { + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", + "type": "integer" }, - "last_quote": { - "description": "The most recent quote for this contract. This is only returned if your current plan includes quotes.", - "properties": { - "ask": { - "description": "The ask price.", - "format": "double", - "type": "number" - }, - "ask_size": { - "description": "The ask size.", - "format": "double", - "type": "number" - }, - "bid": { - "description": "The bid price.", - "format": "double", - "type": "number" - }, - "bid_size": { - "description": "The bid size.", - "format": "double", - "type": "number" - }, - "last_updated": { - "description": "The nanosecond timestamp of when this information was updated.", - "format": "int64", - "type": "integer", - "x-polygon-go-type": { - "name": "INanoseconds", - "path": "github.com/polygon-io/ptime" - } - }, - "midpoint": { - "description": "The average of the bid and ask price.", - "format": "double", - "type": "number" - }, - "timeframe": { - "description": "The time relevance of the data.", - "enum": [ - "DELAYED", - "REAL-TIME" - ], - "type": "string" - } - }, - "type": "object" + "id": { + "description": "The Trade ID which uniquely identifies a trade on the exchange that the trade happened on.", + "type": "string" }, - "open_interest": { - "description": "The quantity of this contract held at the end of the last trading day.", + "participant_timestamp": { + "description": "The nanosecond Exchange Unix Timestamp. This is the timestamp of when the trade was generated at the exchange.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "INanoseconds", + "path": "github.com/massive-com/ptime" + } + }, + "price": { + "description": "The price of the trade in the base currency of the crypto pair.", "format": "double", "type": "number" }, - "underlying_asset": { - "description": "Information on the underlying stock for this options contract. The market data returned depends on your current stocks plan.", - "properties": { - "change_to_break_even": { - "description": "The change in price for the contract to break even.", - "format": "double", - "type": "number" - }, - "last_updated": { - "description": "The nanosecond timestamp of when this information was updated.", - "format": "int64", - "type": "integer", - "x-polygon-go-type": { - "name": "INanoseconds", - "path": "github.com/polygon-io/ptime" - } - }, - "price": { - "description": "The price of the trade. This is the actual dollar value per whole share of this trade. A trade of 100 shares with a price of $2.00 would be worth a total dollar value of $200.00.", - "format": "double", - "type": "number" - }, - "ticker": { - "description": "The ticker symbol for the contract's underlying asset.", - "type": "string" - }, - "timeframe": { - "description": "The time relevance of the data.", - "enum": [ - "DELAYED", - "REAL-TIME" - ], - "type": "string" - } - }, - "type": "object" + "size": { + "description": "The size of a trade (also known as volume).", + "format": "double", + "type": "number" } }, + "required": [ + "exchange", + "price", + "size", + "id" + ], "type": "object" }, "type": "array" @@ -17921,74 +29211,155 @@ "type": "string" } }, + "required": [ + "status" + ], "type": "object" } + }, + "text/csv": { + "example": "conditions,exchange,id,participant_timestamp,price,size\n1,1,191450340,1625097600103000000,35060,1.0434526\n2,1,191450341,1625097600368000000,35059.99,0.0058883\n", + "schema": { + "type": "string" + } } }, - "description": "Snapshots for options contracts of the underlying ticker" + "description": "A list of trades." } }, - "summary": "Options Chain", + "summary": "Trades", "tags": [ - "options:snapshot" - ], - "x-polygon-entitlement-allowed-timeframes": [ - { - "description": "Real Time Data", - "name": "realtime" - }, - { - "description": "15 minute delayed data", - "name": "delayed" - } + "crypto:trades" ], - "x-polygon-entitlement-data-type": { - "description": "Aggregate data", - "name": "aggregates" + "x-massive-entitlement-data-type": { + "description": "Trade data", + "name": "trades" }, - "x-polygon-entitlement-market-type": { - "description": "Options data", - "name": "options" + "x-massive-entitlement-market-type": { + "description": "Crypto data", + "name": "crypto" }, - "x-polygon-paginate": { + "x-massive-paginate": { "limit": { - "default": 10, - "max": 1000 + "default": 1000, + "example": 10, + "max": 50000 + }, + "order": { + "default": "desc" }, "sort": { - "default": "ticker", + "default": "timestamp", "enum": [ - "ticker", - "expiration_date", - "strike_price" + "timestamp" ] } + }, + "x-massive-replaces": { + "date": 1654056060000, + "replaces": { + "name": "Historic Crypto Trades", + "path": "get_v1_historic_crypto__from___to___date" + } } }, - "x-polygon-draft": true + "x-massive-ignore": true }, - "/v3/snapshot/options/{underlyingAsset}/{optionContract}": { + "/v3/trades/{optionsTicker}": { "get": { - "description": "Get the snapshot of an option contract for a stock equity.", - "operationId": "OptionContract", + "description": "Get trades for an options ticker symbol in a given time range.", + "operationId": "TradesOptions", "parameters": [ { - "description": "The underlying ticker symbol of the option contract.", - "example": "AAPL", + "description": "The options ticker symbol to get trades for.", + "example": "O:TSLA210903C00700000", "in": "path", - "name": "underlyingAsset", + "name": "optionsTicker", "required": true, "schema": { "type": "string" + }, + "x-massive-go-id": "Ticker" + }, + { + "description": "Query by trade timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.", + "in": "query", + "name": "timestamp", + "schema": { + "type": "string" + }, + "x-massive-filter-field": { + "range": true } }, { - "description": "The option contract identifier.", - "example": "O:AAPL230616C00150000", - "in": "path", - "name": "optionContract", - "required": true, + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.gt", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lte", + "schema": { + "type": "string" + } + }, + { + "description": "Range by timestamp.", + "in": "query", + "name": "timestamp.lt", + "schema": { + "type": "string" + } + }, + { + "description": "Order results based on the `sort` field.", + "in": "query", + "name": "order", + "schema": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "example": "asc", + "type": "string" + } + }, + { + "description": "Limit the number of results returned, default is 1000 and max is 50000.", + "in": "query", + "name": "limit", + "schema": { + "default": 1000, + "example": 10, + "maximum": 50000, + "minimum": 1, + "type": "integer" + } + }, + { + "description": "Sort field used for ordering.", + "in": "query", + "name": "sort", "schema": { + "default": "timestamp", + "enum": [ + "timestamp" + ], + "example": "timestamp", "type": "string" } } @@ -17998,54 +29369,27 @@ "content": { "application/json": { "example": { - "request_id": "d9ff18dac69f55c218f69e4753706acd", - "results": { - "break_even_price": 171.075, - "day": { - "change": -1.05, - "change_percent": -4.67, - "close": 21.4, - "high": 22.49, - "last_updated": 1636520400000000000, - "low": 21.35, - "open": 22.49, - "previous_close": 22.45, - "volume": 37, - "vwap": 21.6741 - }, - "details": { - "contract_type": "call", - "exercise_style": "american", - "expiration_date": "2023-06-16", - "shares_per_contract": 100, - "strike_price": 150, - "ticker": "O:AAPL230616C00150000" - }, - "greeks": { - "delta": 0.5520187372272933, - "gamma": 0.00706756515659829, - "theta": -0.018532772783847958, - "vega": 0.7274811132998142 - }, - "implied_volatility": 0.3048997097864957, - "last_quote": { - "ask": 21.25, - "ask_size": 110, - "bid": 20.9, - "bid_size": 172, - "last_updated": 1636573458756383500, - "midpoint": 21.075, - "timeframe": "REAL-TIME" + "next_url": "https://api.massive.com/v3/trades/O:AZO140621P00530000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", + "results": [ + { + "exchange": 46, + "participant_timestamp": 1401715883806000000, + "price": 6.91, + "sip_timestamp": 1401715883806000000, + "size": 1 }, - "open_interest": 8921, - "underlying_asset": { - "change_to_break_even": 23.123999999999995, - "last_updated": 1636573459862384600, - "price": 147.951, - "ticker": "AAPL", - "timeframe": "REAL-TIME" + { + "conditions": [ + 209 + ], + "exchange": 67, + "participant_timestamp": 1401716547786000000, + "price": 7.2, + "sip_timestamp": 1401716547786000000, + "size": 1 } - }, + ], "status": "OK" }, "schema": { @@ -18054,296 +29398,135 @@ "description": "If present, this value can be used to fetch the next page of data.", "type": "string" }, - "request_id": { - "type": "string" - }, "results": { - "properties": { - "break_even_price": { - "description": "The price the underlying asset for the contract to break even. For a call this value is (strike price + premium paid), where a put this value is (strike price - premium paid)", - "format": "double", - "type": "number" - }, - "day": { - "description": "The most recent daily bar for this contract.", - "properties": { - "change": { - "description": "The value of the price change for the contract from the previous trading day.", - "format": "double", - "type": "number" - }, - "change_percent": { - "description": "The percent of the price change for the contract from the previous trading day.", - "format": "double", - "type": "number" - }, - "close": { - "description": "The closing price for the contract of the day.", - "format": "double", - "type": "number" - }, - "high": { - "description": "The highest price for the contract of the day.", - "format": "double", - "type": "number" - }, - "last_updated": { - "description": "The nanosecond timestamp of when this information was updated.", - "format": "int64", - "type": "integer", - "x-polygon-go-type": { - "name": "INanoseconds", - "path": "github.com/polygon-io/ptime" - } - }, - "low": { - "description": "The lowest price for the contract of the day.", - "format": "double", - "type": "number" - }, - "open": { - "description": "The open price for the contract of the day.", - "format": "double", - "type": "number" - }, - "previous_close": { - "description": "The closing price for the contract of previous trading day.", - "format": "double", - "type": "number" - }, - "volume": { - "description": "The trading volume for the contract of the day.", - "format": "double", - "type": "number" - }, - "vwap": { - "description": "The trading volume weighted average price for the contract of the day.", - "format": "double", - "type": "number", - "x-polygon-go-id": "VWAP" - } - }, - "type": "object" - }, - "details": { - "properties": { - "contract_type": { - "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".", - "enum": [ - "put", - "call", - "other" - ], - "type": "string" - }, - "exercise_style": { - "description": "The exercise style of this contract. See \u003ca rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Option_style\"\u003ethis link\u003c/a\u003e for more details on exercise styles.", - "enum": [ - "american", - "european", - "bermudan" - ], - "type": "string" - }, - "expiration_date": { - "description": "The contract's expiration date in YYYY-MM-DD format.", - "format": "date", - "type": "string", - "x-polygon-go-type": { - "name": "IDaysPolygonDateString", - "path": "github.com/polygon-io/ptime" - } - }, - "shares_per_contract": { - "description": "The number of shares per contract for this contract.", - "type": "number" - }, - "strike_price": { - "description": "The strike price of the option contract.", - "format": "double", - "type": "number" - }, - "ticker": { - "description": "The ticker for the option contract.", - "type": "string" - } - }, - "type": "object" - }, - "greeks": { - "description": "The greeks for this contract. This is only returned if your current plan includes greeks.", - "properties": { - "delta": { - "description": "The change in the option's price per $0.01 increment in the price of the underlying asset.", - "format": "double", - "type": "number" - }, - "gamma": { - "description": "The change in delta per $0.01 change in the price of the underlying asset.", - "format": "double", - "type": "number" - }, - "theta": { - "description": "The change in the option's price per day.", - "format": "double", - "type": "number" - }, - "vega": { - "description": "The change in the option's price per 1% increment in volatility.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "implied_volatility": { - "description": "The market's forecast for the volatility of the underlying asset, based on this option's current price.", - "format": "double", - "type": "number" - }, - "last_quote": { - "description": "The most recent quote for this contract. This is only returned if your current plan includes quotes.", - "properties": { - "ask": { - "description": "The ask price.", - "format": "double", - "type": "number" - }, - "ask_size": { - "description": "The ask size.", - "format": "double", - "type": "number" - }, - "bid": { - "description": "The bid price.", - "format": "double", - "type": "number" - }, - "bid_size": { - "description": "The bid size.", - "format": "double", - "type": "number" - }, - "last_updated": { - "description": "The nanosecond timestamp of when this information was updated.", - "format": "int64", - "type": "integer", - "x-polygon-go-type": { - "name": "INanoseconds", - "path": "github.com/polygon-io/ptime" - } - }, - "midpoint": { - "description": "The average of the bid and ask price.", - "format": "double", - "type": "number" - }, - "timeframe": { - "description": "The time relevance of the data.", - "enum": [ - "DELAYED", - "REAL-TIME" - ], - "type": "string" + "items": { + "properties": { + "conditions": { + "description": "A list of condition codes.", + "items": { + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.", + "format": "int32", + "type": "integer" + }, + "type": "array", + "x-massive-go-type": { + "name": "Int32Array" } }, - "type": "object" - }, - "open_interest": { - "description": "The quantity of this contract held at the end of the last trading day.", - "format": "double", - "type": "number" - }, - "underlying_asset": { - "description": "Information on the underlying stock for this options contract. The market data returned depends on your current stocks plan.", - "properties": { - "change_to_break_even": { - "description": "The change in price for the contract to break even.", - "format": "double", - "type": "number" - }, - "last_updated": { - "description": "The nanosecond timestamp of when this information was updated.", - "format": "int64", - "type": "integer", - "x-polygon-go-type": { - "name": "INanoseconds", - "path": "github.com/polygon-io/ptime" - } - }, - "price": { - "description": "The price of the trade. This is the actual dollar value per whole share of this trade. A trade of 100 shares with a price of $2.00 would be worth a total dollar value of $200.00.", - "format": "double", - "type": "number" - }, - "ticker": { - "description": "The ticker symbol for the contract's underlying asset.", - "type": "string" - }, - "timeframe": { - "description": "The time relevance of the data.", - "enum": [ - "DELAYED", - "REAL-TIME" - ], - "type": "string" + "correction": { + "description": "The trade correction indicator.", + "type": "integer" + }, + "exchange": { + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", + "type": "integer" + }, + "participant_timestamp": { + "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the trade was actually generated at the exchange.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "INanoseconds", + "path": "github.com/massive-com/ptime" } }, - "type": "object" - } + "price": { + "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.", + "format": "double", + "type": "number" + }, + "sip_timestamp": { + "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this trade from the exchange which produced it.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "INanoseconds", + "path": "github.com/massive-com/ptime" + } + }, + "size": { + "description": "The size of a trade (also known as volume).", + "format": "double", + "type": "number" + } + }, + "required": [ + "exchange", + "price", + "sip_timestamp", + "size" + ], + "type": "object" }, - "type": "object" + "type": "array" }, "status": { "description": "The status of this request's response.", "type": "string" } }, + "required": [ + "status" + ], "type": "object" } + }, + "text/csv": { + "example": "conditions,exchange,participant_timestamp,price,sip_timestamp,size\n,46,1401715883806000000,6.91,1401715883806000000,1\n209,67,1401716547786000000,7.2,1401716547786000000,1\n", + "schema": { + "type": "string" + } } }, - "description": "Snapshot of the option contract." + "description": "A list of trades." } }, - "summary": "Option Contract", + "summary": "Trades", "tags": [ - "options:snapshot" - ], - "x-polygon-entitlement-allowed-timeframes": [ - { - "description": "Real Time Data", - "name": "realtime" - }, - { - "description": "15 minute delayed data", - "name": "delayed" - } + "options:trades" ], - "x-polygon-entitlement-data-type": { - "description": "Aggregate data", - "name": "aggregates" + "x-massive-entitlement-data-type": { + "description": "Trade data", + "name": "trades" }, - "x-polygon-entitlement-market-type": { + "x-massive-entitlement-market-type": { "description": "Options data", "name": "options" + }, + "x-massive-paginate": { + "limit": { + "default": 1000, + "example": 10, + "max": 50000 + }, + "order": { + "default": "desc" + }, + "sort": { + "default": "timestamp", + "enum": [ + "timestamp" + ] + } } - } + }, + "x-massive-ignore": true }, - "/v3/trades/{cryptoTicker}": { + "/v3/trades/{stockTicker}": { "get": { - "description": "Get trades for a crypto ticker symbol in a given time range.", - "operationId": "TradesCrypto", + "description": "Get trades for a ticker symbol in a given time range.", + "operationId": "Trades", "parameters": [ { "description": "The ticker symbol to get trades for.", - "example": "X:BTC-USD", + "example": "AAPL", "in": "path", - "name": "cryptoTicker", + "name": "stockTicker", "required": true, "schema": { "type": "string" - } + }, + "x-massive-go-id": "Ticker" }, { "description": "Query by trade timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.", @@ -18352,12 +29535,12 @@ "schema": { "type": "string" }, - "x-polygon-filter-field": { + "x-massive-filter-field": { "range": true } }, { - "description": "Search by timestamp.", + "description": "Range by timestamp.", "in": "query", "name": "timestamp.gte", "schema": { @@ -18365,7 +29548,7 @@ } }, { - "description": "Search by timestamp.", + "description": "Range by timestamp.", "in": "query", "name": "timestamp.gt", "schema": { @@ -18373,7 +29556,7 @@ } }, { - "description": "Search by timestamp.", + "description": "Range by timestamp.", "in": "query", "name": "timestamp.lte", "schema": { @@ -18381,7 +29564,7 @@ } }, { - "description": "Search by timestamp.", + "description": "Range by timestamp.", "in": "query", "name": "timestamp.lt", "schema": { @@ -18403,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, @@ -18433,28 +29616,36 @@ "content": { "application/json": { "example": { - "next_url": "https://api.polygon.io/v3/trades/X:BTC-USD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "next_url": "https://api.massive.com/v3/trades/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", "results": [ { "conditions": [ - 1 + 12, + 41 ], - "exchange": 1, - "id": "191450340", - "participant_timestamp": 1625097600103000000, - "price": 35060, - "size": 1.0434526 + "exchange": 11, + "id": "1", + "participant_timestamp": 1517562000015577000, + "price": 171.55, + "sequence_number": 1063, + "sip_timestamp": 1517562000016036600, + "size": 100, + "tape": 3 }, { "conditions": [ - 2 + 12, + 41 ], - "exchange": 1, - "id": "191450341", - "participant_timestamp": 1625097600368000000, - "price": 35059.99, - "size": 0.0058883 + "exchange": 11, + "id": "2", + "participant_timestamp": 1517562000015577600, + "price": 171.55, + "sequence_number": 1064, + "sip_timestamp": 1517562000016038100, + "size": 100, + "tape": 3 } ], "status": "OK" @@ -18471,41 +29662,92 @@ "conditions": { "description": "A list of condition codes.", "items": { - "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.", + "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.", "format": "int32", "type": "integer" }, - "type": "array" + "type": "array", + "x-massive-go-type": { + "name": "Int32Array" + } + }, + "correction": { + "description": "The trade correction indicator.", + "type": "integer" }, "exchange": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.", "type": "integer" }, "id": { - "description": "The Trade ID which uniquely identifies a trade on the exchange that the trade happened on.", + "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.", "type": "string" }, "participant_timestamp": { - "description": "The nanosecond Exchange Unix Timestamp. This is the timestamp of when the trade was generated at the exchange.", + "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the trade was actually generated at the exchange.", "format": "int64", "type": "integer", - "x-polygon-go-type": { + "x-massive-go-type": { "name": "INanoseconds", - "path": "github.com/polygon-io/ptime" + "path": "github.com/massive-com/ptime" } }, "price": { - "description": "The price of the trade in the base currency of the crypto pair.", + "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.", "format": "double", "type": "number" }, + "sequence_number": { + "description": "The sequence number represents the sequence in which trade events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11). Values reset after each trading session/day.", + "format": "int64", + "type": "integer" + }, + "sip_timestamp": { + "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this trade from the exchange which produced it.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "INanoseconds", + "path": "github.com/massive-com/ptime" + } + }, "size": { "description": "The size of a trade (also known as volume).", "format": "double", "type": "number" + }, + "tape": { + "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ", + "format": "int32", + "type": "integer" + }, + "trf_id": { + "description": "The ID for the Trade Reporting Facility where the trade took place.", + "type": "integer" + }, + "trf_timestamp": { + "description": "The nanosecond accuracy TRF (Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this trade.", + "format": "int64", + "type": "integer", + "x-massive-go-type": { + "name": "INanoseconds", + "path": "github.com/massive-com/ptime" + } } }, - "type": "object" + "required": [ + "exchange", + "id", + "price", + "sequence_number", + "sip_timestamp", + "participant_timestamp", + "size" + ], + "type": "object", + "x-massive-go-type": { + "name": "CommonTrade" + } }, "type": "array" }, @@ -18514,8 +29756,17 @@ "type": "string" } }, + "required": [ + "status" + ], "type": "object" } + }, + "text/csv": { + "example": "conditions,exchange,id,participant_timestamp,price,sequence_number,sip_timestamp,size,tape\n\"12,41\",11,1,1517562000015577088,171.55,1063,1517562000016036581,100,3\n\"12,41\",11,2,1517562000015577600,171.55,1064,1517562000016038175,100,3\n", + "schema": { + "type": "string" + } } }, "description": "A list of trades." @@ -18523,18 +29774,20 @@ }, "summary": "Trades", "tags": [ - "crypto:trades" + "stocks:trades" ], - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "description": "Trade data", "name": "trades" }, - "x-polygon-entitlement-market-type": { - "description": "Crypto data", - "name": "crypto" + "x-massive-entitlement-market-type": { + "description": "Stocks data", + "name": "stocks" }, - "x-polygon-paginate": { + "x-massive-paginate": { "limit": { + "default": 1000, + "example": 10, "max": 50000 }, "order": { @@ -18547,72 +29800,178 @@ ] } }, - "x-polygon-replaces": { + "x-massive-replaces": { "date": 1654056060000, "replaces": { - "name": "Historic Crypto Trades", - "path": "get_v1_historic_crypto__from___to___date" + "name": "Trades", + "path": "get_v2_ticks_stocks_trades__ticker___date" } } - }, - "x-polygon-ignore": true + } }, - "/v3/trades/{optionsTicker}": { + "/vX/reference/financials": { "get": { - "description": "Get trades for an options ticker symbol in a given time range.", - "operationId": "TradesOptions", + "description": "Get historical financial data for a stock ticker.\nThe financials data is extracted from XBRL from company SEC filings using the methodology outlined here.", + "operationId": "ListFinancials", "parameters": [ { - "description": "The options ticker symbol to get trades for.", - "example": "O:TSLA210903C00700000", - "in": "path", - "name": "optionsTicker", - "required": true, + "description": "Query by company ticker.", + "in": "query", + "name": "ticker", + "schema": { + "type": "string" + } + }, + { + "description": "Query by central index key (CIK) Number", + "in": "query", + "name": "cik", + "schema": { + "type": "string" + } + }, + { + "description": "Query by company name.", + "in": "query", + "name": "company_name", + "schema": { + "type": "string" + }, + "x-massive-filter-field": { + "search": true + } + }, + { + "description": "Query by standard industrial classification (SIC)", + "in": "query", + "name": "sic", + "schema": { + "type": "string" + } + }, + { + "description": "Query by the date when the filing with financials data was filed in YYYY-MM-DD format.\n\nBest used when querying over date ranges to find financials based on filings that happen in a time period.\n\nExamples:\n\nTo get financials based on filings that have happened after January 1, 2009 use the query param filing_date.gte=2009-01-01\n\nTo get financials based on filings that happened in the year 2009 use the query params filing_date.gte=2009-01-01&filing_date.lt=2010-01-01", + "in": "query", + "name": "filing_date", "schema": { + "format": "date", "type": "string" }, - "x-polygon-go-id": "Ticker" + "x-massive-filter-field": { + "range": true + } }, { - "description": "Query by trade timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.", + "description": "The period of report for the filing with financials data in YYYY-MM-DD format.", "in": "query", - "name": "timestamp", + "name": "period_of_report_date", "schema": { + "format": "date", "type": "string" }, - "x-polygon-filter-field": { + "x-massive-filter-field": { "range": true } }, { - "description": "Search by timestamp.", + "description": "Query by timeframe. Annual financials originate from 10-K filings, and quarterly financials originate from 10-Q filings. Note: Most companies do not file quarterly reports for Q4 and instead include those financials in their annual report, so some companies my not return quarterly financials for Q4", "in": "query", - "name": "timestamp.gte", + "name": "timeframe", + "schema": { + "enum": [ + "annual", + "quarterly", + "ttm" + ], + "type": "string" + } + }, + { + "description": "Whether or not to include the `xpath` and `formula` attributes for each financial data point.\nSee the `xpath` and `formula` response attributes for more info. False by default.", + "in": "query", + "name": "include_sources", + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "description": "Search by company_name.", + "in": "query", + "name": "company_name.search", "schema": { "type": "string" } }, { - "description": "Search by timestamp.", + "description": "Search by filing_date.", "in": "query", - "name": "timestamp.gt", + "name": "filing_date.gte", "schema": { + "format": "date", "type": "string" } }, { - "description": "Search by timestamp.", + "description": "Search by filing_date.", "in": "query", - "name": "timestamp.lte", + "name": "filing_date.gt", "schema": { + "format": "date", "type": "string" } }, { - "description": "Search by timestamp.", + "description": "Search by filing_date.", "in": "query", - "name": "timestamp.lt", + "name": "filing_date.lte", + "schema": { + "format": "date", + "type": "string" + } + }, + { + "description": "Search by filing_date.", + "in": "query", + "name": "filing_date.lt", + "schema": { + "format": "date", + "type": "string" + } + }, + { + "description": "Search by period_of_report_date.", + "in": "query", + "name": "period_of_report_date.gte", + "schema": { + "format": "date", + "type": "string" + } + }, + { + "description": "Search by period_of_report_date.", + "in": "query", + "name": "period_of_report_date.gt", + "schema": { + "format": "date", + "type": "string" + } + }, + { + "description": "Search by period_of_report_date.", + "in": "query", + "name": "period_of_report_date.lte", + "schema": { + "format": "date", + "type": "string" + } + }, + { + "description": "Search by period_of_report_date.", + "in": "query", + "name": "period_of_report_date.lt", "schema": { + "format": "date", "type": "string" } }, @@ -18621,7 +29980,6 @@ "in": "query", "name": "order", "schema": { - "default": "desc", "enum": [ "asc", "desc" @@ -18631,13 +29989,13 @@ } }, { - "description": "Limit the number of results returned, default is 10 and max is 50000.", + "description": "Limit the number of results returned, default is 10 and max is 100.", "in": "query", "name": "limit", "schema": { "default": 10, "example": 10, - "maximum": 50000, + "maximum": 100, "minimum": 1, "type": "integer" } @@ -18647,11 +30005,12 @@ "in": "query", "name": "sort", "schema": { - "default": "timestamp", + "default": "period_of_report_date", "enum": [ - "timestamp" + "filing_date", + "period_of_report_date" ], - "example": "timestamp", + "example": "filing_date", "type": "string" } } @@ -18661,85 +30020,438 @@ "content": { "application/json": { "example": { - "next_url": "https://api.polygon.io/v3/trades/O:AZO140621P00530000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", - "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", + "count": 1, + "next_url": "https://api.massive.com/vX/reference/financials?", + "request_id": "55eb92ed43b25568ab0cce159830ea34", "results": [ { - "exchange": 46, - "participant_timestamp": 1401715883806000000, - "price": 6.91, - "sip_timestamp": 1401715883806000000, - "size": 1 - }, - { - "conditions": [ - 209 - ], - "exchange": 67, - "participant_timestamp": 1401716547786000000, - "price": 7.2, - "sip_timestamp": 1401716547786000000, - "size": 1 + "cik": "0001650729", + "company_name": "SiteOne Landscape Supply, Inc.", + "end_date": "2022-04-03", + "filing_date": "2022-05-04", + "financials": { + "balance_sheet": { + "assets": { + "label": "Assets", + "order": 100, + "unit": "USD", + "value": 2407400000 + }, + "current_assets": { + "label": "Current Assets", + "order": 200, + "unit": "USD", + "value": 1385900000 + }, + "current_liabilities": { + "label": "Current Liabilities", + "order": 700, + "unit": "USD", + "value": 597500000 + }, + "equity": { + "label": "Equity", + "order": 1400, + "unit": "USD", + "value": 1099200000 + }, + "equity_attributable_to_noncontrolling_interest": { + "label": "Equity Attributable To Noncontrolling Interest", + "order": 1500, + "unit": "USD", + "value": 0 + }, + "equity_attributable_to_parent": { + "label": "Equity Attributable To Parent", + "order": 1600, + "unit": "USD", + "value": 1099200000 + }, + "liabilities": { + "label": "Liabilities", + "order": 600, + "unit": "USD", + "value": 1308200000 + }, + "liabilities_and_equity": { + "label": "Liabilities And Equity", + "order": 1900, + "unit": "USD", + "value": 2407400000 + }, + "noncurrent_assets": { + "label": "Noncurrent Assets", + "order": 300, + "unit": "USD", + "value": 1021500000 + }, + "noncurrent_liabilities": { + "label": "Noncurrent Liabilities", + "order": 800, + "unit": "USD", + "value": 710700000 + } + }, + "cash_flow_statement": { + "exchange_gains_losses": { + "label": "Exchange Gains/Losses", + "order": 1000, + "unit": "USD", + "value": 100000 + }, + "net_cash_flow": { + "label": "Net Cash Flow", + "order": 1100, + "unit": "USD", + "value": -8600000 + }, + "net_cash_flow_continuing": { + "label": "Net Cash Flow, Continuing", + "order": 1200, + "unit": "USD", + "value": -8700000 + }, + "net_cash_flow_from_financing_activities": { + "label": "Net Cash Flow From Financing Activities", + "order": 700, + "unit": "USD", + "value": 150600000 + }, + "net_cash_flow_from_financing_activities_continuing": { + "label": "Net Cash Flow From Financing Activities, Continuing", + "order": 800, + "unit": "USD", + "value": 150600000 + }, + "net_cash_flow_from_investing_activities": { + "label": "Net Cash Flow From Investing Activities", + "order": 400, + "unit": "USD", + "value": -41000000 + }, + "net_cash_flow_from_investing_activities_continuing": { + "label": "Net Cash Flow From Investing Activities, Continuing", + "order": 500, + "unit": "USD", + "value": -41000000 + }, + "net_cash_flow_from_operating_activities": { + "label": "Net Cash Flow From Operating Activities", + "order": 100, + "unit": "USD", + "value": -118300000 + }, + "net_cash_flow_from_operating_activities_continuing": { + "label": "Net Cash Flow From Operating Activities, Continuing", + "order": 200, + "unit": "USD", + "value": -118300000 + } + }, + "comprehensive_income": { + "comprehensive_income_loss": { + "label": "Comprehensive Income/Loss", + "order": 100, + "unit": "USD", + "value": 40500000 + }, + "comprehensive_income_loss_attributable_to_noncontrolling_interest": { + "label": "Comprehensive Income/Loss Attributable To Noncontrolling Interest", + "order": 200, + "unit": "USD", + "value": 0 + }, + "comprehensive_income_loss_attributable_to_parent": { + "label": "Comprehensive Income/Loss Attributable To Parent", + "order": 300, + "unit": "USD", + "value": 40500000 + }, + "other_comprehensive_income_loss": { + "label": "Other Comprehensive Income/Loss", + "order": 400, + "unit": "USD", + "value": 40500000 + }, + "other_comprehensive_income_loss_attributable_to_parent": { + "label": "Other Comprehensive Income/Loss Attributable To Parent", + "order": 600, + "unit": "USD", + "value": 8200000 + } + }, + "income_statement": { + "basic_earnings_per_share": { + "label": "Basic Earnings Per Share", + "order": 4200, + "unit": "USD / shares", + "value": 0.72 + }, + "benefits_costs_expenses": { + "label": "Benefits Costs and Expenses", + "order": 200, + "unit": "USD", + "value": 768400000 + }, + "cost_of_revenue": { + "label": "Cost Of Revenue", + "order": 300, + "unit": "USD", + "value": 536100000 + }, + "costs_and_expenses": { + "label": "Costs And Expenses", + "order": 600, + "unit": "USD", + "value": 768400000 + }, + "diluted_earnings_per_share": { + "label": "Diluted Earnings Per Share", + "order": 4300, + "unit": "USD / shares", + "value": 0.7 + }, + "gross_profit": { + "label": "Gross Profit", + "order": 800, + "unit": "USD", + "value": 269200000 + }, + "income_loss_from_continuing_operations_after_tax": { + "label": "Income/Loss From Continuing Operations After Tax", + "order": 1400, + "unit": "USD", + "value": 32300000 + }, + "income_loss_from_continuing_operations_before_tax": { + "label": "Income/Loss From Continuing Operations Before Tax", + "order": 1500, + "unit": "USD", + "value": 36900000 + }, + "income_tax_expense_benefit": { + "label": "Income Tax Expense/Benefit", + "order": 2200, + "unit": "USD", + "value": 4600000 + }, + "interest_expense_operating": { + "label": "Interest Expense, Operating", + "order": 2700, + "unit": "USD", + "value": 4300000 + }, + "net_income_loss": { + "label": "Net Income/Loss", + "order": 3200, + "unit": "USD", + "value": 32300000 + }, + "net_income_loss_attributable_to_noncontrolling_interest": { + "label": "Net Income/Loss Attributable To Noncontrolling Interest", + "order": 3300, + "unit": "USD", + "value": 0 + }, + "net_income_loss_attributable_to_parent": { + "label": "Net Income/Loss Attributable To Parent", + "order": 3500, + "unit": "USD", + "value": 32300000 + }, + "net_income_loss_available_to_common_stockholders_basic": { + "label": "Net Income/Loss Available To Common Stockholders, Basic", + "order": 3700, + "unit": "USD", + "value": 32300000 + }, + "operating_expenses": { + "label": "Operating Expenses", + "order": 1000, + "unit": "USD", + "value": 228000000 + }, + "operating_income_loss": { + "label": "Operating Income/Loss", + "order": 1100, + "unit": "USD", + "value": 41200000 + }, + "participating_securities_distributed_and_undistributed_earnings_loss_basic": { + "label": "Participating Securities, Distributed And Undistributed Earnings/Loss, Basic", + "order": 3800, + "unit": "USD", + "value": 0 + }, + "preferred_stock_dividends_and_other_adjustments": { + "label": "Preferred Stock Dividends And Other Adjustments", + "order": 3900, + "unit": "USD", + "value": 0 + }, + "revenues": { + "label": "Revenues", + "order": 100, + "unit": "USD", + "value": 805300000 + } + } + }, + "fiscal_period": "Q1", + "fiscal_year": "2022", + "source_filing_file_url": "https://api.massive.com/v1/reference/sec/filings/0001650729-22-000010/files/site-20220403_htm.xml", + "source_filing_url": "https://api.massive.com/v1/reference/sec/filings/0001650729-22-000010", + "start_date": "2022-01-03" } ], "status": "OK" }, "schema": { "properties": { + "count": { + "description": "The total number of results for this request.", + "type": "integer" + }, "next_url": { "description": "If present, this value can be used to fetch the next page of data.", "type": "string" }, + "request_id": { + "description": "A request id assigned by the server.", + "type": "string" + }, "results": { "items": { "properties": { - "conditions": { - "description": "A list of condition codes.", - "items": { - "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.", - "format": "int32", - "type": "integer" + "acceptance_datetime": { + "description": "The datetime (EST timezone) the filing was accepted by EDGAR in YYYYMMDDHHMMSS format." + }, + "cik": { + "description": "The CIK number for the company.", + "type": "string" + }, + "company_name": { + "description": "The company name.", + "type": "string" + }, + "end_date": { + "description": "The end date of the period that these financials cover in YYYYMMDD format.", + "type": "string" + }, + "filing_date": { + "description": "The date that the SEC filing which these financials were derived from was made available. Note that this is not necessarily the date when this information became public, as some companies may publish a press release before filing with the SEC." + }, + "financials": { + "properties": { + "balance_sheet": { + "description": "Balance sheet.\nThe keys in this object can be any of the fields listed in the Balance Sheet section of the financials API glossary of terms.", + "properties": { + "*": { + "description": "An individual financial data point.", + "properties": { + "derived_from": { + "description": "The list of report IDs (or errata) which were used to derive this data point.\nThis value is only returned for data points taken directly from XBRL when the `include_sources` query parameter is `true` and if source is SourceInterReportDerived.", + "items": { + "type": "string" + }, + "type": "array" + }, + "formula": { + "description": "The name of the formula used to derive this data point from other financial data points.\nInformation about the formulas can be found here.\nThis value is only returned for data points that are not explicitly expressed within the XBRL source file when the `include_sources` query parameter is `true` and if source is SourceIntraReportImpute.", + "type": "string" + }, + "label": { + "description": "A human readable label for the financial data point.", + "type": "string" + }, + "order": { + "description": "An indicator of what order within the statement that you would find this data point.", + "type": "integer" + }, + "source": { + "description": "The source where this data point came from. This will be one of: SourceDirectReport, SourceIntraReportImpute or SourceInterReportDerived." + }, + "unit": { + "description": "The unit of the financial data point.", + "type": "string" + }, + "value": { + "description": "The value of the financial data point.", + "type": "number" + }, + "xpath": { + "description": "The XPath 1.0 query that identifies the fact from within the XBRL source file.\nThis value is only returned for data points taken directly from XBRL when the `include_sources` query parameter is `true` and if source is SourceDirectReport.", + "type": "string" + } + }, + "required": [ + "label", + "order", + "value", + "unit" + ], + "type": "object" + } + }, + "type": "object" + }, + "cash_flow_statement": { + "description": "Cash flow statement.\nThe keys in this object can be any of the fields listed in the Cash Flow Statement section of the financials API glossary of terms.\nSee the attributes of the objects within `balance_sheet` for more details.", + "type": "object" + }, + "comprehensive_income": { + "description": "Comprehensive income.\nThe keys in this object can be any of the fields listed in the Comprehensive Income section of the financials API glossary of terms.\nSee the attributes of the objects within `balance_sheet` for more details.", + "type": "object" + }, + "income_statement": { + "description": "Income statement.\nThe keys in this object can be any of the fields listed in the Income Statement section of the financials API glossary of terms.\nSee the attributes of the objects within `balance_sheet` for more details.", + "type": "object" + } }, - "type": "array" + "type": "object" }, - "correction": { - "description": "The trade correction indicator.", - "type": "integer" + "fiscal_period": { + "description": "Fiscal period of the report according to the company (Q1, Q2, Q3, Q4, or FY).", + "type": "string" }, - "exchange": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/options/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", - "type": "integer" + "fiscal_year": { + "description": "Fiscal year of the report according to the company.", + "type": "string" }, - "participant_timestamp": { - "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the trade was actually generated at the exchange.", - "format": "int64", - "type": "integer", - "x-polygon-go-type": { - "name": "INanoseconds", - "path": "github.com/polygon-io/ptime" - } + "source_filing_file_url": { + "description": "The URL of the specific XBRL instance document within the SEC filing that these financials were derived from." }, - "price": { - "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.", - "format": "double", - "type": "number" + "source_filing_url": { + "description": "The URL of the SEC filing that these financials were derived from.", + "type": "string" }, - "sip_timestamp": { - "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this trade from the exchange which produced it.", - "format": "int64", - "type": "integer", - "x-polygon-go-type": { - "name": "INanoseconds", - "path": "github.com/polygon-io/ptime" - } + "start_date": { + "description": "The start date of the period that these financials cover in YYYYMMDD format.", + "type": "string" }, - "size": { - "description": "The size of a trade (also known as volume).", - "format": "double", - "type": "number" + "tickers": { + "description": "The list of ticker symbols for the company.", + "items": { + "type": "string" + }, + "type": "array" + }, + "timeframe": { + "description": "The timeframe of the report (quarterly, annual or ttm).", + "type": "string" } }, - "type": "object" + "required": [ + "cik", + "company_name", + "financials", + "timeframe", + "fiscal_period" + ], + "type": "object", + "x-massive-go-type": { + "name": "FinancialReport" + } }, "type": "array" }, @@ -18748,98 +30460,135 @@ "type": "string" } }, + "required": [ + "status", + "request_id", + "count", + "results" + ], "type": "object" } } }, - "description": "A list of trades." + "description": "FIXME" } }, - "summary": "Trades", + "summary": "Stock Financials vX", "tags": [ - "options:trades" + "reference:stocks" ], - "x-polygon-entitlement-data-type": { - "description": "Trade data", - "name": "trades" - }, - "x-polygon-entitlement-market-type": { - "description": "Options data", - "name": "options" + "x-massive-entitlement-data-type": { + "description": "Reference data", + "name": "reference" }, - "x-polygon-paginate": { + "x-massive-experimental": {}, + "x-massive-paginate": { "limit": { - "max": 50000 - }, - "order": { - "default": "desc" + "default": 10, + "max": 100 }, "sort": { - "default": "timestamp", + "default": "period_of_report_date", "enum": [ - "timestamp" + "filing_date", + "period_of_report_date" ] } } - }, - "x-polygon-ignore": true + } }, - "/v3/trades/{stockTicker}": { + "/vX/reference/ipos": { "get": { - "description": "Get trades for a ticker symbol in a given time range.", - "operationId": "Trades", + "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": "The ticker symbol to get trades for.", - "example": "AAPL", - "in": "path", - "name": "stockTicker", - "required": true, + "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.", + "in": "query", + "name": "ticker", "schema": { "type": "string" - }, - "x-polygon-go-id": "Ticker" + } }, { - "description": "Query by trade timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.", + "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": "timestamp", + "name": "us_code", + "schema": { + "type": "string" + } + }, + { + "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": "isin", + "schema": { + "type": "string" + } + }, + { + "description": "Specify a listing date. This is the first trading date for the newly listed entity.", + "in": "query", + "name": "listing_date", "schema": { + "format": "date", "type": "string" }, - "x-polygon-filter-field": { - "range": true + "x-massive-filter-field": { + "range": true, + "type": "string" } }, { - "description": "Search by timestamp.", + "description": "Specify an IPO status.", "in": "query", - "name": "timestamp.gte", + "name": "ipo_status", "schema": { + "enum": [ + "direct_listing_process", + "history", + "new", + "pending", + "postponed", + "rumor", + "withdrawn" + ], "type": "string" } }, { - "description": "Search by timestamp.", + "description": "Range by listing_date.", "in": "query", - "name": "timestamp.gt", + "name": "listing_date.gte", "schema": { + "format": "date", "type": "string" } }, { - "description": "Search by timestamp.", + "description": "Range by listing_date.", "in": "query", - "name": "timestamp.lte", + "name": "listing_date.gt", "schema": { + "format": "date", "type": "string" } }, { - "description": "Search by timestamp.", + "description": "Range by listing_date.", "in": "query", - "name": "timestamp.lt", + "name": "listing_date.lte", + "schema": { + "format": "date", + "type": "string" + } + }, + { + "description": "Range by listing_date.", + "in": "query", + "name": "listing_date.lt", "schema": { + "format": "date", "type": "string" } }, @@ -18858,13 +30607,13 @@ } }, { - "description": "Limit the number of results returned, default is 10 and max is 50000.", + "description": "Limit the number of results returned, default is 10 and max is 1000.", "in": "query", "name": "limit", "schema": { "default": 10, "example": 10, - "maximum": 50000, + "maximum": 1000, "minimum": 1, "type": "integer" } @@ -18874,11 +30623,29 @@ "in": "query", "name": "sort", "schema": { - "default": "timestamp", + "default": "listing_date", "enum": [ - "timestamp" + "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": "timestamp", + "example": "listing_date", "type": "string" } } @@ -18888,36 +30655,31 @@ "content": { "application/json": { "example": { - "next_url": "https://api.polygon.io/v3/trades/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", - "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3", + "next_url": "https://api.massive.com/vX/reference/ipos?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy", + "request_id": "6a7e466379af0a71039d60cc78e72282", "results": [ { - "conditions": [ - 12, - 41 - ], - "exchange": 11, - "id": "1", - "participant_timestamp": 1517562000015577000, - "price": 171.55, - "sequence_number": 1063, - "sip_timestamp": 1517562000016036600, - "size": 100, - "tape": 3 - }, - { - "conditions": [ - 12, - 41 - ], - "exchange": 11, - "id": "2", - "participant_timestamp": 1517562000015577600, - "price": 171.55, - "sequence_number": 1064, - "sip_timestamp": 1517562000016038100, - "size": 100, - "tape": 3 + "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" @@ -18928,83 +30690,137 @@ "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": { - "conditions": { - "description": "A list of condition codes.", - "items": { - "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.", - "format": "int32", - "type": "integer" - }, - "type": "array" + "currency_code": { + "description": "Underlying currency of the security.", + "example": "USD", + "type": "string" }, - "correction": { - "description": "The trade correction indicator.", - "type": "integer" + "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" }, - "exchange": { - "description": "The exchange ID. See \u003ca href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\"\u003eExchanges\u003c/a\u003e for Polygon.io's mapping of exchange IDs.", - "type": "integer" + "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" }, - "id": { - "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.", + "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" }, - "participant_timestamp": { - "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the trade was actually generated at the exchange.", - "format": "int64", - "type": "integer", - "x-polygon-go-type": { - "name": "INanoseconds", - "path": "github.com/polygon-io/ptime" - } + "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" }, - "price": { - "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.", - "format": "double", + "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" }, - "sequence_number": { - "description": "The sequence number represents the sequence in which trade events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11). Values reset after each trading session/day.", - "format": "int64", - "type": "integer" + "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" }, - "sip_timestamp": { - "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this trade from the exchange which produced it.", - "format": "int64", - "type": "integer", - "x-polygon-go-type": { - "name": "INanoseconds", - "path": "github.com/polygon-io/ptime" - } + "max_shares_offered": { + "description": "The upper limit of the shares that the company is offering to investors.", + "example": 1000, + "type": "number" }, - "size": { - "description": "The size of a trade (also known as volume).", - "format": "double", + "min_shares_offered": { + "description": "The lower limit of shares that the company is willing to sell in the IPO.", + "example": 1000, "type": "number" }, - "tape": { - "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ", - "format": "int32", - "type": "integer" + "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" }, - "trf_id": { - "description": "The ID for the Trade Reporting Facility where the trade took place.", - "type": "integer" + "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" }, - "trf_timestamp": { - "description": "The nanosecond accuracy TRF (Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this trade.", - "format": "int64", - "type": "integer", - "x-polygon-go-type": { - "name": "INanoseconds", - "path": "github.com/polygon-io/ptime" - } + "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" } }, - "type": "object" + "required": [ + "name", + "last_updated", + "primary_exchange", + "security_type", + "security_description", + "ipo_status" + ], + "type": "object", + "x-massive-go-type": { + "name": "IPOsResult" + } }, "type": "array" }, @@ -19017,245 +30833,150 @@ } } }, - "description": "A list of trades." + "description": "A list of IPO events." } }, - "summary": "Trades", + "summary": "IPOs", "tags": [ - "stocks:trades" + "reference:stocks:ipos" ], - "x-polygon-entitlement-data-type": { - "description": "Trade data", - "name": "trades" - }, - "x-polygon-entitlement-market-type": { - "description": "Stocks data", - "name": "stocks" + "x-massive-entitlement-data-type": { + "description": "Reference data", + "name": "reference" }, - "x-polygon-paginate": { + "x-massive-paginate": { "limit": { - "max": 50000 + "default": 10, + "max": 1000 }, "order": { "default": "desc" }, "sort": { - "default": "timestamp", + "default": "listing_date", "enum": [ - "timestamp" + "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" ] } - }, - "x-polygon-replaces": { - "date": 1654056060000, - "replaces": { - "name": "Trades", - "path": "get_v2_ticks_stocks_trades__ticker___date" - } } } }, - "/vX/reference/financials": { + "/vX/reference/tickers/taxonomies": { "get": { - "description": "Get historical financial data for a stock ticker.\nThe financials data is extracted from XBRL from company SEC filings using the methodology outlined \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"http://xbrl.squarespace.com/understanding-sec-xbrl-financi/\"\u003ehere\u003c/a\u003e.", - "operationId": "ListFinancials", + "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": [ { - "description": "Query by company ticker.", "in": "query", "name": "ticker", - "schema": { - "type": "string" - } - }, - { - "description": "Query by central index key (\u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"https://www.sec.gov/edgar/searchedgar/cik.htm\"\u003eCIK\u003c/a\u003e) Number", - "in": "query", - "name": "cik", - "schema": { - "type": "string" - } - }, - { - "description": "Query by company name.", - "in": "query", - "name": "company_name", "schema": { "type": "string" }, - "x-polygon-filter-field": { - "search": true - } - }, - { - "description": "Query by standard industrial classification (\u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"https://www.sec.gov/corpfin/division-of-corporation-finance-standard-industrial-classification-sic-code-list\"\u003eSIC\u003c/a\u003e)", - "in": "query", - "name": "sic", - "schema": { + "x-massive-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": "Query by the date when the filing with financials data was filed in YYYY-MM-DD format.\n\nBest used when querying over date ranges to find financials based on filings that happen in a time period.\n\nExamples:\n\nTo get financials based on filings that have happened after January 1, 2009 use the query param filing_date.gte=2009-01-01\n\nTo get financials based on filings that happened in the year 2009 use the query params filing_date.gte=2009-01-01\u0026filing_date.lt=2010-01-01", + "description": "Filter by taxonomy category. The current version of this API supports the following category: revenue_streams", "in": "query", - "name": "filing_date", + "name": "category", "schema": { - "format": "date", "type": "string" - }, - "x-polygon-filter-field": { - "range": true } }, { - "description": "The period of report for the filing with financials data in YYYY-MM-DD format.", + "description": "Filter by taxonomy tag. Each category has a set of associated tags.", "in": "query", - "name": "period_of_report_date", + "name": "tag", "schema": { - "format": "date", "type": "string" - }, - "x-polygon-filter-field": { - "range": true } }, { - "description": "Query by timeframe. Annual financials originate from 10-K filings, and quarterly financials originate from 10-Q filings. Note: Most companies do not file quarterly reports for Q4 and instead include those financials in their annual report, so some companies my not return quarterly financials for Q4", + "description": "Order results ascending or descending based on the ticker.", "in": "query", - "name": "timeframe", + "name": "order", "schema": { "enum": [ - "annual", - "quarterly" + "asc", + "desc" ], "type": "string" } }, { - "description": "Whether or not to include the `xpath` and `formula` attributes for each financial data point.\nSee the `xpath` and `formula` response attributes for more info. False by default.", - "in": "query", - "name": "include_sources", - "schema": { - "default": false, - "type": "boolean" - } - }, - { - "description": "Search by company_name.", - "in": "query", - "name": "company_name.search", - "schema": { - "type": "string" - } - }, - { - "description": "Search by filing_date.", - "in": "query", - "name": "filing_date.gte", - "schema": { - "format": "date", - "type": "string" - } - }, - { - "description": "Search by filing_date.", - "in": "query", - "name": "filing_date.gt", - "schema": { - "format": "date", - "type": "string" - } - }, - { - "description": "Search by filing_date.", - "in": "query", - "name": "filing_date.lte", - "schema": { - "format": "date", - "type": "string" - } - }, - { - "description": "Search by filing_date.", - "in": "query", - "name": "filing_date.lt", - "schema": { - "format": "date", - "type": "string" - } - }, - { - "description": "Search by period_of_report_date.", + "description": "Limit the number of results returned. The default is 10 and the max is 250.", "in": "query", - "name": "period_of_report_date.gte", + "name": "limit", "schema": { - "format": "date", - "type": "string" + "default": 10, + "maximum": 250, + "minimum": 1, + "type": "integer" } }, { - "description": "Search by period_of_report_date.", + "description": "Range by ticker.", "in": "query", - "name": "period_of_report_date.gt", + "name": "ticker.gte", "schema": { - "format": "date", "type": "string" } }, { - "description": "Search by period_of_report_date.", + "description": "Range by ticker.", "in": "query", - "name": "period_of_report_date.lte", + "name": "ticker.gt", "schema": { - "format": "date", "type": "string" } }, { - "description": "Search by period_of_report_date.", + "description": "Range by ticker.", "in": "query", - "name": "period_of_report_date.lt", + "name": "ticker.lte", "schema": { - "format": "date", "type": "string" } }, { - "description": "Order results based on the `sort` field.", + "description": "Range by ticker.", "in": "query", - "name": "order", + "name": "ticker.lt", "schema": { - "enum": [ - "asc", - "desc" - ], - "example": "asc", "type": "string" } }, { - "description": "Limit the number of results returned, default is 1 and max is 100.", - "in": "query", - "name": "limit", - "schema": { - "default": 1, - "example": 1, - "maximum": 100, - "minimum": 1, - "type": "integer" - } - }, - { - "description": "Sort field used for ordering.", + "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": "sort", + "name": "ticker.any_of", "schema": { - "default": "period_of_report_date", - "enum": [ - "filing_date", - "period_of_report_date" - ], - "example": "filing_date", "type": "string" } } @@ -19264,297 +30985,213 @@ "200": { "content": { "application/json": { - "count": 1, - "description": "FIXME", "example": { - "cik": "0000789019", - "company_name": "MICROSOFT CORPORATION", - "end_date": "2020-12-31", - "financials": { - "balance_sheet": { - "assets": { - "label": "Assets", - "order": 100, - "unit": "USD", - "value": 304137000000, - "xpath": "//*[local-name()='Assets' and @id='F_000165']" - }, - "equity": { - "formula": "BS-Impute-07", - "label": "Equity", - "order": 1400, - "unit": "USD", - "value": 130236000000 - }, - "liabilities": { - "label": "Liabilities", - "order": 600, - "unit": "USD", - "value": 173901000000, - "xpath": "//*[local-name()='Liabilities' and @id='F_000193']" - } + "request_id": "a4f9947955398c28905337f003bfee7c", + "results": [ + { + "category": "revenue_streams", + "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" }, - "cash_flow_statement": { - "exchange_gains_losses": { - "label": "Exchange Gains/Losses", - "order": 1000, - "unit": "USD", - "value": 14000000, - "xpath": "//*[local-name()='EffectOfExchangeRateOnCashAndCashEquivalents' and @id='F_000327']" - }, - "net_cash_flow": { - "formula": "CF-Impute-20", - "label": "Net Cash Flow", - "order": 1100, - "unit": "USD", - "value": -2773000000 - }, - "net_cash_flow_from_financing_activities": { - "label": "Net Cash Flow From Financing Activities", - "order": 700, - "unit": "USD", - "value": -13634000000, - "xpath": "//*[local-name()='NetCashProvidedByUsedInFinancingActivities' and @id='F_000295']" - } + { + "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": { + "next_url": { + "description": "If present, this value can be used to fetch the next page of data.", + "type": "string" }, - "comprehensive_income": { - "comprehensive_income_loss": { - "formula": "CI-Impute-04", - "label": "Comprehensive Income/Loss", - "order": 100, - "unit": "USD", - "value": 15720000000 - }, - "comprehensive_income_loss_attributable_to_parent": { - "label": "Comprehensive Income/Loss Attributable To Parent", - "order": 300, - "unit": "USD", - "value": 15720000000, - "xpath": "//*[local-name()='ComprehensiveIncomeNetOfTax' and @id='F_000135']" - }, - "other_comprehensive_income_loss": { - "formula": "CI-Impute-07", - "label": "Other Comprehensive Income/Loss", - "order": 400, - "unit": "USD", - "value": 15720000000 - } + "request_id": { + "type": "string" }, - "income_statement": { - "basic_earnings_per_share": { - "label": "Basic Earnings Per Share", - "order": 4200, - "unit": "USD / shares", - "value": 2.05, - "xpath": "//*[local-name()='EarningsPerShareBasic' and @id='F_000099']" - }, - "cost_of_revenue": { - "label": "Cost Of Revenue", - "order": 300, - "unit": "USD", - "value": 14194000000, - "xpath": "//*[local-name()='CostOfGoodsAndServicesSold' and @id='F_000059']" - }, - "gross_profit": { - "label": "Gross Profit", - "order": 800, - "unit": "USD", - "value": 28882000000, - "xpath": "//*[local-name()='GrossProfit' and @id='F_000063']" + "results": { + "items": { + "properties": { + "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. The reason is provided by our AI to help you determine whether or not you agree with its applicability for your uses.", + "type": "string" + }, + "tag": { + "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 identifying ticker symbol for the asset.", + "type": "string" + } + }, + "type": "object", + "x-massive-go-type": { + "name": "TaxonomyClassificationResult" + } }, - "operating_expenses": { - "formula": "IS-Impute-22", - "label": "Operating Expenses", - "order": 1000, - "unit": "USD", - "value": 10985000000 + "type": "array" + }, + "status": { + "type": "string" + } + }, + "required": [ + "status", + "request_id" + ], + "type": "object" + } + } + }, + "description": "Taxonomy classification data." + } + }, + "summary": "Ticker Taxonomies", + "tags": [ + "Internal", + "Public" + ], + "x-massive-entitlement-data-type": { + "description": "Reference data", + "name": "reference" + }, + "x-massive-experimental": {} + }, + "x-massive-draft": true + }, + "/vX/reference/tickers/{id}/events": { + "get": { + "description": "Get a timeline of events for the entity associated with the given ticker, CUSIP, or Composite FIGI.", + "operationId": "GetEvents", + "parameters": [ + { + "description": "Identifier of an asset. This can currently be a Ticker, CUSIP, or Composite FIGI.\nWhen given a ticker, we return events for the entity currently represented by that ticker.\nTo find events for entities previously associated with a ticker, find the relevant identifier using the \n[Ticker Details Endpoint](https://massive.com/docs/stocks/get_v3_reference_tickers__ticker)", + "example": "META", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "A comma-separated list of the types of event to include. Currently ticker_change is the only supported event_type.\nLeave blank to return all supported event_types.", + "in": "query", + "name": "types", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "request_id": "31d59dda-80e5-4721-8496-d0d32a654afe", + "results": { + "events": [ + { + "date": "2022-06-09", + "ticker_change": { + "ticker": "META" + }, + "type": "ticker_change" }, - "revenues": { - "label": "Revenues", - "order": 100, - "unit": "USD", - "value": 43076000000, - "xpath": "//*[local-name()='RevenueFromContractWithCustomerExcludingAssessedTax' and @id='F_000047']" + { + "date": "2012-05-18", + "ticker_change": { + "ticker": "FB" + }, + "type": "ticker_change" } - } + ], + "name": "Meta Platforms, Inc. Class A Common Stock" }, - "fiscal_period": "Q2", - "fiscal_year": "2021", - "source_filing_file_url": "https:/api.polygon.io/v1/reference/sec/filings/0001564590-21-002316/files/0001564590-21-002316:12:msft-10q_20201231_htm.xml", - "source_filing_url": "https://api.polygon.io/v1/reference/sec/filings/0001564590-21-002316", - "start_date": "2020-10-01" + "status": "OK" }, - "next_url": "https:/api.polygon.io/vX/reference/financials?", - "request_id": "28173f20a0751f3479afd9e2cc9246ea", "schema": { "properties": { - "count": { - "description": "The total number of results for this request.", - "type": "integer" - }, - "next_url": { - "description": "If present, this value can be used to fetch the next page of data.", - "type": "string" - }, "request_id": { "description": "A request id assigned by the server.", "type": "string" }, "results": { - "items": { - "properties": { - "cik": { - "description": "The CIK number for the company.", - "type": "string" - }, - "company_name": { - "description": "The company name.", - "type": "string" - }, - "end_date": { - "description": "The end date of the period that these financials cover in YYYYMMDD format.", - "type": "string" - }, - "filing_date": { - "description": "The date that the SEC filing which these financials were derived from was made available. Note that this is not necessarily the date when this information became public, as some companies may publish a press release before filing with the SEC." - }, - "financials": { - "properties": { - "balance_sheet": { - "description": "Balance sheet.\nNote that the keys in this object can be any of the balance sheet concepts defined in \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"http://www.xbrlsite.com/2016/fac/v3/Documentation/FundamentalAccountingConceptsList.html\"\u003ethis table of fundamental accounting concepts\u003c/a\u003e but converted to `snake_case`.", + "properties": { + "events": { + "items": { + "oneOf": [ + { "properties": { - "*": { - "description": "An individual financial data point.", + "date": { + "description": "The date the event took place", + "format": "date", + "type": "string" + }, + "event_type": { + "description": "The type of historical event for the asset", + "type": "string" + }, + "ticker_change": { "properties": { - "formula": { - "description": "The name of the formula used to derive this data point from other financial data points.\nInformation about the formulas can be found \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"http://xbrlsite.azurewebsites.net/2020/reporting-scheme/us-gaap/fac/documentation/ImputeRulesList.html\"\u003ehere\u003c/a\u003e.\nThis value is only returned for data points that are not explicitly expressed within the XBRL source file when the `include_sources` query parameter is `true`." - }, - "label": { - "description": "A human readable label for the financial data point.", - "type": "string" - }, - "order": { - "description": "An indicator of what order within the statement that you would find this data point.", - "type": "integer" - }, - "unit": { - "description": "The unit of the financial data point.", + "ticker": { "type": "string" - }, - "value": { - "description": "The value of the financial data point.", - "type": "number" - }, - "xpath": { - "description": "The \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/XPath\"\u003eXPath 1.0\u003c/a\u003e query that identifies the fact from within the XBRL source file.\nThis value is only returned for data points taken directly from XBRL when the `include_sources` query parameter is `true`." } }, - "required": [ - "label", - "order", - "value", - "unit" - ], "type": "object" } }, - "type": "object" - }, - "cash_flow_statement": { - "description": "Cash flow statement.\nNote that the keys in this object can be any of the cash flow statement concepts defined in \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"http://www.xbrlsite.com/2016/fac/v3/Documentation/FundamentalAccountingConceptsList.html\"\u003ethis table of fundamental accounting concepts\u003c/a\u003e but converted to `snake_case`.\nSee the attributes of the objects within `balance_sheet` for more details.", - "type": "object" - }, - "comprehensive_income": { - "description": "Comprehensive income.\nNote that the keys in this object can be any of the comprehensive income statement concepts defined in \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"http://www.xbrlsite.com/2016/fac/v3/Documentation/FundamentalAccountingConceptsList.html\"\u003ethis table of fundamental accounting concepts\u003c/a\u003e but converted to `snake_case`.\nSee the attributes of the objects within `balance_sheet` for more details.", - "type": "object" - }, - "income_statement": { - "description": "Income statement.\nNote that the keys in this object can be any of the income statement concepts defined in \u003ca rel=\"noopener noreferrer nofollow\" target=\"_blank\" href=\"http://www.xbrlsite.com/2016/fac/v3/Documentation/FundamentalAccountingConceptsList.html\"\u003ethis table of fundamental accounting concepts\u003c/a\u003e but converted to `snake_case`.\nSee the attributes of the objects within `balance_sheet` for more details.", + "required": [ + "event_type", + "date" + ], "type": "object" } - }, - "type": "object" - }, - "fiscal_period": { - "description": "Fiscal period of the report according to the company (Q1, Q2, Q3, Q4, or FY).", - "type": "string" - }, - "fiscal_year": { - "description": "Fiscal year of the report according to the company.", - "type": "string" - }, - "source_filing_file_url": { - "description": "The URL of the specific XBRL instance document within the SEC filing that these financials were derived from." - }, - "source_filing_url": { - "description": "The URL of the SEC filing that these financials were derived from.", - "type": "string" + ] }, - "start_date": { - "description": "The start date of the period that these financials cover in YYYYMMDD format.", - "type": "string" - } + "type": "array" }, - "required": [ - "reporting_period", - "cik", - "company_name", - "financials", - "fiscal_period", - "fiscal_year", - "filing_type", - "source_filing_url", - "source_filing_file_url" - ], - "type": "object", - "x-polygon-go-type": { - "name": "ResolvedFinancials", - "path": "github.com/polygon-io/go-app-api-financials/extract" + "name": { + "type": "string" } }, - "type": "array" + "type": "object", + "x-massive-go-type": { + "name": "EventsResults" + } }, "status": { "description": "The status of this request's response.", "type": "string" } }, - "required": [ - "status", - "request_id", - "count", - "results" - ], "type": "object" - }, - "status": "OK" + } } }, - "description": "FIXME" + "description": "Ticker Events." + }, + "401": { + "description": "Unauthorized - Check our API Key and account status" } }, - "summary": "Stock Financials vX", + "summary": "Ticker Events", "tags": [ - "reference:stocks" + "reference:tickers:get" ], - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "description": "Reference data", "name": "reference" }, - "x-polygon-experimental": {}, - "x-polygon-paginate": { - "limit": { - "default": 1, - "max": 100 - }, - "sort": { - "default": "period_of_report_date", - "enum": [ - "filing_date", - "period_of_report_date" - ] - } - } + "x-massive-experimental": {} } } }, @@ -19565,19 +31202,19 @@ ], "servers": [ { - "description": "Polygon Platform API", - "url": "https://api.polygon.io" + "description": "Massive Platform API", + "url": "https://api.massive.com" }, { - "description": "Polygon Platform API (Staging)", - "url": "https://api.staging.polygon.io" + "description": "Massive Platform API (Staging)", + "url": "https://api.staging.massive.com" } ], "tags": [ { "description": "Reference API", "name": "reference", - "x-polygon-sub-tags": [ + "x-massive-sub-tags": [ "tickers:list", "tickers:types", "tickers:get", @@ -19599,7 +31236,7 @@ { "description": "Stocks API", "name": "stocks", - "x-polygon-sub-tags": [ + "x-massive-sub-tags": [ "trades", "quotes", "last:trade", @@ -19612,7 +31249,7 @@ { "description": "Options API", "name": "options", - "x-polygon-sub-tags": [ + "x-massive-sub-tags": [ "trades", "quotes", "last:trade", @@ -19625,7 +31262,7 @@ { "description": "Forex API", "name": "fx", - "x-polygon-sub-tags": [ + "x-massive-sub-tags": [ "trades", "quotes", "conversion", @@ -19638,7 +31275,18 @@ { "description": "Crypto API", "name": "crypto", - "x-polygon-sub-tags": [ + "x-massive-sub-tags": [ + "trades", + "last:trade", + "open-close", + "aggregates", + "snapshot" + ] + }, + { + "description": "Indices API", + "name": "indices", + "x-massive-sub-tags": [ "trades", "last:trade", "open-close", @@ -19647,14 +31295,21 @@ ] } ], - "x-polygon-order": { + "x-massive-order": { "crypto": { "market": [ { + "launchpad": "shared", "paths": [ "/v2/aggs/ticker/{cryptoTicker}/range/{multiplier}/{timespan}/{from}/{to}" ] }, + { + "launchpad": "exclusive", + "paths": [ + "/v1/summaries" + ] + }, { "paths": [ "/v2/aggs/grouped/locale/global/market/crypto/{date}" @@ -19691,7 +31346,17 @@ "/v2/snapshot/locale/global/markets/crypto/tickers", "/v2/snapshot/locale/global/markets/crypto/{direction}", "/v2/snapshot/locale/global/markets/crypto/tickers/{ticker}", - "/v2/snapshot/locale/global/markets/crypto/tickers/{ticker}/book" + "/v2/snapshot/locale/global/markets/crypto/tickers/{ticker}/book", + "/v3/snapshot" + ] + }, + { + "group": "Technical Indicators", + "paths": [ + "/v1/indicators/sma/{cryptoTicker}", + "/v1/indicators/ema/{cryptoTicker}", + "/v1/indicators/macd/{cryptoTicker}", + "/v1/indicators/rsi/{cryptoTicker}" ] } ], @@ -19726,10 +31391,17 @@ "fx": { "market": [ { + "launchpad": "shared", "paths": [ "/v2/aggs/ticker/{forexTicker}/range/{multiplier}/{timespan}/{from}/{to}" ] }, + { + "launchpad": "exclusive", + "paths": [ + "/v1/summaries" + ] + }, { "paths": [ "/v2/aggs/grouped/locale/global/market/fx/{date}" @@ -19765,7 +31437,17 @@ "paths": [ "/v2/snapshot/locale/global/markets/forex/tickers", "/v2/snapshot/locale/global/markets/forex/{direction}", - "/v2/snapshot/locale/global/markets/forex/tickers/{ticker}" + "/v2/snapshot/locale/global/markets/forex/tickers/{ticker}", + "/v3/snapshot" + ] + }, + { + "group": "Technical Indicators", + "paths": [ + "/v1/indicators/sma/{fxTicker}", + "/v1/indicators/ema/{fxTicker}", + "/v1/indicators/macd/{fxTicker}", + "/v1/indicators/rsi/{fxTicker}" ] } ], @@ -19797,13 +31479,78 @@ } ] }, + "indices": { + "market": [ + { + "launchpad": "shared", + "paths": [ + "/v2/aggs/ticker/{indicesTicker}/range/{multiplier}/{timespan}/{from}/{to}" + ] + }, + { + "paths": [ + "/v2/aggs/ticker/{indicesTicker}/prev" + ] + }, + { + "paths": [ + "/v1/open-close/{indicesTicker}/{date}" + ] + }, + { + "group": "Technical Indicators", + "paths": [ + "/v1/indicators/sma/{indicesTicker}", + "/v1/indicators/ema/{indicesTicker}", + "/v1/indicators/macd/{indicesTicker}", + "/v1/indicators/rsi/{indicesTicker}" + ] + }, + { + "group": "Snapshots", + "paths": [ + "/v3/snapshot/indices", + "/v3/snapshot" + ] + } + ], + "reference": [ + { + "paths": [ + "/v3/reference/tickers" + ] + }, + { + "paths": [ + "/v3/reference/tickers/types" + ] + }, + { + "paths": [ + "/v1/marketstatus/upcoming" + ] + }, + { + "paths": [ + "/v1/marketstatus/now" + ] + } + ] + }, "options": { "market": [ { + "launchpad": "shared", "paths": [ "/v2/aggs/ticker/{optionsTicker}/range/{multiplier}/{timespan}/{from}/{to}" ] }, + { + "launchpad": "exclusive", + "paths": [ + "/v1/summaries" + ] + }, { "paths": [ "/v1/open-close/{optionsTicker}/{date}" @@ -19833,7 +31580,17 @@ "group": "Snapshots", "paths": [ "/v3/snapshot/options/{underlyingAsset}/{optionContract}", - "/v3/snapshot/options/{underlyingAsset}" + "/v3/snapshot/options/{underlyingAsset}", + "/v3/snapshot" + ] + }, + { + "group": "Technical Indicators", + "paths": [ + "/v1/indicators/sma/{optionsTicker}", + "/v1/indicators/ema/{optionsTicker}", + "/v1/indicators/macd/{optionsTicker}", + "/v1/indicators/rsi/{optionsTicker}" ] } ], @@ -19898,10 +31655,17 @@ "stocks": { "market": [ { + "launchpad": "shared", "paths": [ "/v2/aggs/ticker/{stocksTicker}/range/{multiplier}/{timespan}/{from}/{to}" ] }, + { + "launchpad": "exclusive", + "paths": [ + "/v1/summaries" + ] + }, { "paths": [ "/v2/aggs/grouped/locale/us/market/stocks/{date}" @@ -19952,7 +31716,17 @@ "paths": [ "/v2/snapshot/locale/us/markets/stocks/tickers", "/v2/snapshot/locale/us/markets/stocks/{direction}", - "/v2/snapshot/locale/us/markets/stocks/tickers/{stocksTicker}" + "/v2/snapshot/locale/us/markets/stocks/tickers/{stocksTicker}", + "/v3/snapshot" + ] + }, + { + "group": "Technical Indicators", + "paths": [ + "/v1/indicators/sma/{stockTicker}", + "/v1/indicators/ema/{stockTicker}", + "/v1/indicators/macd/{stockTicker}", + "/v1/indicators/rsi/{stockTicker}" ] } ], @@ -19972,6 +31746,11 @@ "/v3/reference/tickers/{ticker}" ] }, + { + "paths": [ + "/vX/reference/tickers/{id}/events" + ] + }, { "paths": [ "/v2/reference/news" @@ -19982,6 +31761,11 @@ "/v3/reference/tickers/types" ] }, + { + "paths": [ + "/vX/reference/tickers/taxonomies" + ] + }, { "paths": [ "/v1/marketstatus/upcoming" @@ -20025,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/.massive/rest.py b/.massive/rest.py new file mode 100644 index 00000000..4bfcd940 --- /dev/null +++ b/.massive/rest.py @@ -0,0 +1,8 @@ +import urllib.request +import json + +contents = urllib.request.urlopen("https://api.massive.com/openapi").read() +parsed = json.loads(contents) +formatted = json.dumps(parsed, indent=2) +with open(".massive/rest.json", "w") as f: + f.write(formatted) diff --git a/.polygon/websocket.json b/.massive/websocket.json similarity index 54% rename from .polygon/websocket.json rename to .massive/websocket.json index a7feaf84..ddaef95e 100644 --- a/.polygon/websocket.json +++ b/.massive/websocket.json @@ -1,21 +1,21 @@ { "openapi": "3.0.3", "info": { - "title": "Polygon Websocket Spec", + "title": "Massive Websocket Spec", "description": "The future of fintech.", "version": "2.0.0" }, "servers": [ { - "url": "wss://socket.polygon.io", + "url": "wss://socket.massive.com", "description": "Real-time" }, { - "url": "wss://delayed.polygon.io", + "url": "wss://delayed.massive.com", "description": "Delayed" } ], - "x-polygon-order": { + "x-massive-order": { "stocks": { "market": [ { @@ -47,6 +47,23 @@ "paths": [ "/stocks/LULD" ] + }, + { + "paths": [ + "/business/stocks/FMV" + ] + }, + { + "paths": [ + "/launchpad/stocks/AM" + ], + "launchpad": "exclusive" + }, + { + "paths": [ + "/launchpad/stocks/LV" + ], + "launchpad": "exclusive" } ] }, @@ -71,6 +88,23 @@ "paths": [ "/options/Q" ] + }, + { + "paths": [ + "/business/options/FMV" + ] + }, + { + "paths": [ + "/launchpad/options/AM" + ], + "launchpad": "exclusive" + }, + { + "paths": [ + "/launchpad/options/LV" + ], + "launchpad": "exclusive" } ] }, @@ -81,10 +115,32 @@ "/forex/CA" ] }, + { + "paths": [ + "/forex/CAS" + ] + }, { "paths": [ "/forex/C" ] + }, + { + "paths": [ + "/business/forex/FMV" + ] + }, + { + "paths": [ + "/launchpad/forex/AM" + ], + "launchpad": "exclusive" + }, + { + "paths": [ + "/launchpad/forex/LV" + ], + "launchpad": "exclusive" } ] }, @@ -95,6 +151,11 @@ "/crypto/XA" ] }, + { + "paths": [ + "/crypto/XAS" + ] + }, { "paths": [ "/crypto/XT" @@ -109,6 +170,42 @@ "paths": [ "/crypto/XL2" ] + }, + { + "paths": [ + "/business/crypto/FMV" + ] + }, + { + "paths": [ + "/launchpad/crypto/AM" + ], + "launchpad": "exclusive" + }, + { + "paths": [ + "/launchpad/crypto/LV" + ], + "launchpad": "exclusive" + } + ] + }, + "indices": { + "market": [ + { + "paths": [ + "/indices/AM" + ] + }, + { + "paths": [ + "/indices/A" + ] + }, + { + "paths": [ + "/indices/V" + ] } ] } @@ -122,7 +219,7 @@ { "name": "ticker", "in": "query", - "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n", + "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://massive.com/docs/stocks/get_v3_reference_tickers).\n", "required": true, "schema": { "type": "string", @@ -151,7 +248,7 @@ }, "x": { "type": "integer", - "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs." }, "i": { "type": "string", @@ -172,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 Massive.com's trade conditions glossary.\n", "items": { "type": "integer", "description": "The ID of the condition." @@ -180,11 +277,19 @@ }, "t": { "type": "integer", - "description": "The Timestamp in Unix MS." + "description": "The SIP timestamp in Unix MS." }, "q": { "type": "integer", "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n" + }, + "trfi": { + "type": "integer", + "description": "The ID for the Trade Reporting Facility where the trade took place." + }, + "trft": { + "type": "integer", + "description": "The TRF (Trade Reporting Facility) Timestamp in Unix MS. \nThis is the timestamp of when the trade reporting facility received this trade.\n" } } }, @@ -207,15 +312,15 @@ } } }, - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "name": "trades", "description": "Trade data" }, - "x-polygon-entitlement-market-type": { + "x-massive-entitlement-market-type": { "name": "stocks", "description": "Stocks data" }, - "x-polygon-entitlement-allowed-timeframes": [ + "x-massive-entitlement-allowed-timeframes": [ { "name": "delayed", "description": "15 minute delayed data" @@ -235,7 +340,7 @@ { "name": "ticker", "in": "query", - "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n", + "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://massive.com/docs/stocks/get_v3_reference_tickers).\n", "required": true, "schema": { "type": "string", @@ -294,7 +399,7 @@ }, "i": { "type": "array", - "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n", + "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://massive.com/glossary/us/stocks/conditions-indicators).\n", "items": { "type": "integer", "description": "The indicator code.\n" @@ -302,7 +407,11 @@ }, "t": { "type": "integer", - "description": "The Timestamp in Unix MS." + "description": "The SIP timestamp in Unix MS." + }, + "q": { + "type": "integer", + "description": "The sequence number represents the sequence in which quote events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11). Values reset after each trading session/day.\n" }, "z": { "type": "integer", @@ -324,21 +433,22 @@ 604 ], "t": 1536036818784, + "q": 50385480, "z": 3 } } } } }, - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "name": "nbbo", "description": "NBBO data" }, - "x-polygon-entitlement-market-type": { + "x-massive-entitlement-market-type": { "name": "stocks", "description": "Stocks data" }, - "x-polygon-entitlement-allowed-timeframes": [ + "x-massive-entitlement-allowed-timeframes": [ { "name": "realtime", "description": "Real Time Data" @@ -354,7 +464,7 @@ { "name": "ticker", "in": "query", - "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n", + "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://massive.com/docs/stocks/get_v3_reference_tickers).\n", "required": true, "schema": { "type": "string", @@ -429,11 +539,11 @@ }, "s": { "type": "integer", - "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." + "description": "The start timestamp of this aggregate window in Unix Milliseconds." }, "e": { "type": "integer", - "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." + "description": "The end timestamp of this aggregate window in Unix Milliseconds." }, "otc": { "type": "boolean", @@ -473,15 +583,15 @@ } } }, - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "name": "aggregates", "description": "Aggregate data" }, - "x-polygon-entitlement-market-type": { + "x-massive-entitlement-market-type": { "name": "stocks", "description": "Stocks data" }, - "x-polygon-entitlement-allowed-timeframes": [ + "x-massive-entitlement-allowed-timeframes": [ { "name": "delayed", "description": "15 minute delayed data" @@ -501,7 +611,7 @@ { "name": "ticker", "in": "query", - "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n", + "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://massive.com/docs/stocks/get_v3_reference_tickers).\n", "required": true, "schema": { "type": "string", @@ -576,11 +686,11 @@ }, "s": { "type": "integer", - "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." + "description": "The start timestamp of this aggregate window in Unix Milliseconds." }, "e": { "type": "integer", - "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." + "description": "The end timestamp of this aggregate window in Unix Milliseconds." }, "otc": { "type": "boolean", @@ -620,15 +730,15 @@ } } }, - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "name": "aggregates", "description": "Aggregate data" }, - "x-polygon-entitlement-market-type": { + "x-massive-entitlement-market-type": { "name": "stocks", "description": "Stocks data" }, - "x-polygon-entitlement-allowed-timeframes": [ + "x-massive-entitlement-allowed-timeframes": [ { "name": "delayed", "description": "15 minute delayed data" @@ -648,7 +758,7 @@ { "name": "ticker", "in": "query", - "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n", + "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://massive.com/docs/stocks/get_v3_reference_tickers).\n", "required": true, "schema": { "type": "string", @@ -722,15 +832,15 @@ } } }, - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "name": "limit-up-limit-down", "description": "Limit-Up Limit-Down data" }, - "x-polygon-entitlement-market-type": { + "x-massive-entitlement-market-type": { "name": "stocks", "description": "Stocks data" }, - "x-polygon-entitlement-allowed-timeframes": [ + "x-massive-entitlement-allowed-timeframes": [ { "name": "realtime", "description": "Real Time Data" @@ -746,7 +856,7 @@ { "name": "ticker", "in": "query", - "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n", + "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://massive.com/docs/stocks/get_v3_reference_tickers).\n", "required": true, "schema": { "type": "string", @@ -791,7 +901,7 @@ }, "x": { "type": "integer", - "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs." }, "o": { "type": "integer", @@ -824,15 +934,15 @@ } } }, - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "name": "imbalances", "description": "Imbalances data" }, - "x-polygon-entitlement-market-type": { + "x-massive-entitlement-market-type": { "name": "stocks", "description": "Stocks data" }, - "x-polygon-entitlement-allowed-timeframes": [ + "x-massive-entitlement-allowed-timeframes": [ { "name": "realtime", "description": "Real Time Data" @@ -840,97 +950,68 @@ ] } }, - "/options/T": { + "/business/stocks/FMV": { "get": { - "summary": "Trades", - "description": "Stream real-time trades for a given option contract.\n", + "summary": "Fair Market Value", + "description": "Real-time fair market value for a given stock ticker symbol.\n", "parameters": [ { "name": "ticker", "in": "query", - "description": "Specify an option contract or use * to subscribe to all option contracts.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n", + "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://massive.com/docs/stocks/get_v3_reference_tickers).\n", "required": true, "schema": { "type": "string", - "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" + "pattern": "/^([a-zA-Z]+)$/" }, "example": "*" } ], "responses": { "200": { - "description": "The WebSocket message for a trade event.", + "description": "The WebSocket message for a fair market value event.", "content": { "application/json": { "schema": { "type": "object", "properties": { "ev": { + "type": "string", "enum": [ - "T" + "FMV" ], "description": "The event type." }, - "sym": { - "type": "string", - "description": "The ticker symbol for the given option contract." - }, - "x": { - "type": "integer", - "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." - }, - "p": { - "type": "number", - "format": "double", - "description": "The price." - }, - "s": { - "type": "integer", - "description": "The trade size." + "fmv": { + "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.\n" }, - "c": { - "type": "array", - "description": "The trade conditions", - "items": { - "type": "integer", - "description": "The ID of the condition." - } + "sym": { + "description": "The ticker symbol for the given security." }, "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." - }, - "q": { - "type": "integer", - "description": "The sequence number represents the sequence in which trade events happened. These are increasing and unique per ticker symbol, but will not always be sequential (e.g., 1, 2, 6, 9, 10, 11)." + "description": "The nanosecond timestamp." } } }, "example": { - "ev": "T", - "sym": "O:AMC210827C00037000", - "x": 65, - "p": 1.54, - "s": 1, - "c": [ - 233 - ], - "t": 1629820676333, - "q": 651921857 + "ev": "FMV", + "fmv": 189.22, + "sym": "AAPL", + "t": 1678220098130 } } } } }, - "x-polygon-entitlement-data-type": { - "name": "trades", - "description": "Trade data" + "x-massive-entitlement-data-type": { + "name": "indicative-price", + "description": "Indicative Price" }, - "x-polygon-entitlement-market-type": { - "name": "options", - "description": "Options data" + "x-massive-entitlement-market-type": { + "name": "stocks", + "description": "Stocks data" }, - "x-polygon-entitlement-allowed-timeframes": [ + "x-massive-entitlement-allowed-timeframes": [ { "name": "delayed", "description": "15 minute delayed data" @@ -942,102 +1023,128 @@ ] } }, - "/options/Q": { + "/launchpad/stocks/AM": { "get": { - "summary": "Quotes", - "description": "Stream real-time quotes for a given option contract.\n", + "summary": "Aggregates (Per Minute)", + "description": "Stream real-time minute aggregates for a given stock ticker symbol.\n", "parameters": [ { "name": "ticker", "in": "query", - "description": "Specify an option contract. You're only allowed to subscribe to 1,000 option contracts per connection.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n", + "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://massive.com/docs/stocks/get_v3_reference_tickers).\n", "required": true, "schema": { "type": "string", - "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" + "pattern": "/^([a-zA-Z]+)$/" }, - "example": "O:SPY241220P00720000" + "example": "*" } ], "responses": { "200": { - "description": "The WebSocket message for a trade event.", + "description": "The WebSocket message for a minute aggregate event.", "content": { "application/json": { "schema": { "type": "object", "properties": { "ev": { - "enum": [ - "Q" - ], "description": "The event type." }, "sym": { "type": "string", - "description": "The ticker symbol for the given option contract." + "description": "The ticker symbol for the given stock." }, - "bx": { + "v": { "type": "integer", - "description": "The bid exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + "description": "The tick volume." }, - "ax": { + "av": { "type": "integer", - "description": "The ask exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + "description": "Today's accumulated volume." }, - "bp": { + "op": { "type": "number", "format": "double", - "description": "The bid price." + "description": "Today's official opening price." }, - "ap": { + "vw": { + "type": "number", + "format": "float", + "description": "The volume-weighted average value for the aggregate window." + }, + "o": { "type": "number", "format": "double", - "description": "The ask price." + "description": "The open price for the symbol in the given time period." }, - "bs": { - "type": "integer", - "description": "The bid size." + "c": { + "type": "number", + "format": "double", + "description": "The close price for the symbol in the given time period." }, - "as": { + "h": { + "type": "number", + "format": "double", + "description": "The highest price for the symbol in the given time period." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest price for the symbol in the given time period." + }, + "a": { + "type": "number", + "format": "float", + "description": "Today's volume weighted average price." + }, + "z": { "type": "integer", - "description": "The ask size." + "description": "The average trade size for this aggregate window." }, - "t": { + "s": { "type": "integer", - "description": "The Timestamp in Unix MS." + "description": "The start timestamp of this aggregate window in Unix Milliseconds." }, - "q": { + "e": { "type": "integer", - "description": "The sequence number represents the sequence in which trade events happened. These are increasing and unique per ticker symbol, but will not always be sequential (e.g., 1, 2, 6, 9, 10, 11)." + "description": "The end timestamp of this aggregate window in Unix Milliseconds." } } }, "example": { - "ev": "Q", - "sym": "O:SPY241220P00720000", - "bx": 302, - "ax": 302, - "bp": 9.71, - "ap": 9.81, - "bs": 17, - "as": 24, - "t": 1644506128351, - "q": 844090872 + "ev": "AM", + "sym": "GTE", + "v": 4110, + "av": 9470157, + "op": 0.4372, + "vw": 0.4488, + "o": 0.4488, + "c": 0.4486, + "h": 0.4489, + "l": 0.4486, + "a": 0.4352, + "z": 685, + "s": 1610144640000, + "e": 1610144700000 } } } } }, - "x-polygon-entitlement-data-type": { - "name": "nbbo", - "description": "NBBO data" + "x-massive-entitlement-data-type": { + "name": "aggregates", + "description": "Aggregate data" }, - "x-polygon-entitlement-market-type": { - "name": "options", - "description": "Options data" + "x-massive-entitlement-market-type": { + "name": "stocks", + "description": "Stocks data" }, - "x-polygon-entitlement-allowed-timeframes": [ + "x-massive-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, { "name": "realtime", "description": "Real Time Data" @@ -1045,142 +1152,1850 @@ ] } }, - "/options/A": { + "/launchpad/stocks/LV": { "get": { - "summary": "Aggregates (Per Second)", - "description": "Stream real-time second aggregates for a given option contract.\n", + "summary": "Value", + "description": "Real-time value for a given stock ticker symbol.\n", "parameters": [ { "name": "ticker", "in": "query", - "description": "Specify an option contract or use * to subscribe to all option contracts.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n", + "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://massive.com/docs/stocks/get_v3_reference_tickers).\n", "required": true, "schema": { "type": "string", - "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" + "pattern": "/^([a-zA-Z]+)$/" }, "example": "*" } ], "responses": { "200": { - "description": "The WebSocket message for a second aggregate event.", + "description": "The WebSocket message for a value event.", "content": { "application/json": { "schema": { - "allOf": [ - { - "type": "object", - "properties": { - "ev": { - "description": "The event type." - }, - "sym": { - "type": "string", - "description": "The ticker symbol for the given option contract." - }, - "v": { - "type": "integer", - "description": "The tick volume." - }, - "av": { - "type": "integer", - "description": "Today's accumulated volume." - }, - "op": { - "type": "number", - "format": "double", - "description": "Today's official opening price." - }, - "vw": { - "type": "number", - "format": "float", - "description": "The tick's volume weighted average price." - }, - "o": { - "type": "number", - "format": "double", - "description": "The opening tick price for this aggregate window." - }, - "c": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "LV" + ], + "description": "The event type." + }, + "val": { + "description": "The current value of the security." + }, + "sym": { + "description": "The ticker symbol for the given security." + }, + "t": { + "description": "The nanosecond timestamp." + } + } + }, + "example": { + "ev": "LV", + "val": 189.22, + "sym": "AAPL", + "t": 1678220098130 + } + } + } + } + }, + "x-massive-entitlement-data-type": { + "name": "indicative-price", + "description": "Indicative Price" + }, + "x-massive-entitlement-market-type": { + "name": "stocks", + "description": "Stocks data" + }, + "x-massive-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/options/T": { + "get": { + "summary": "Trades", + "description": "Stream real-time trades for a given option contract.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify an option contract or use * to subscribe to all option contracts.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://massive.com/docs/options/get_v3_reference_options_contracts).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" + }, + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a trade event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ev": { + "enum": [ + "T" + ], + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given option contract." + }, + "x": { + "type": "integer", + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs." + }, + "p": { + "type": "number", + "format": "double", + "description": "The price." + }, + "s": { + "type": "integer", + "description": "The trade size." + }, + "c": { + "type": "array", + "description": "The trade conditions", + "items": { + "type": "integer", + "description": "The ID of the condition." + } + }, + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." + }, + "q": { + "type": "integer", + "description": "The sequence number represents the sequence in which trade events happened. These are increasing and unique per ticker symbol, but will not always be sequential (e.g., 1, 2, 6, 9, 10, 11)." + } + } + }, + "example": { + "ev": "T", + "sym": "O:AMC210827C00037000", + "x": 65, + "p": 1.54, + "s": 1, + "c": [ + 233 + ], + "t": 1629820676333, + "q": 651921857 + } + } + } + } + }, + "x-massive-entitlement-data-type": { + "name": "trades", + "description": "Trade data" + }, + "x-massive-entitlement-market-type": { + "name": "options", + "description": "Options data" + }, + "x-massive-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/options/Q": { + "get": { + "summary": "Quotes", + "description": "Stream real-time quotes for a given option contract.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify an option contract. You're only allowed to subscribe to 1,000 option contracts per connection.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://massive.com/docs/options/get_v3_reference_options_contracts).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" + }, + "example": "O:SPY241220P00720000" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a trade event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ev": { + "enum": [ + "Q" + ], + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given option contract." + }, + "bx": { + "type": "integer", + "description": "The bid exchange ID. See Exchanges for Massive.com's mapping of exchange IDs." + }, + "ax": { + "type": "integer", + "description": "The ask exchange ID. See Exchanges for Massive.com's mapping of exchange IDs." + }, + "bp": { + "type": "number", + "format": "double", + "description": "The bid price." + }, + "ap": { + "type": "number", + "format": "double", + "description": "The ask price." + }, + "bs": { + "type": "integer", + "description": "The bid size." + }, + "as": { + "type": "integer", + "description": "The ask size." + }, + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." + }, + "q": { + "type": "integer", + "description": "The sequence number represents the sequence in which trade events happened. These are increasing and unique per ticker symbol, but will not always be sequential (e.g., 1, 2, 6, 9, 10, 11)." + } + } + }, + "example": { + "ev": "Q", + "sym": "O:SPY241220P00720000", + "bx": 302, + "ax": 302, + "bp": 9.71, + "ap": 9.81, + "bs": 17, + "as": 24, + "t": 1644506128351, + "q": 844090872 + } + } + } + } + }, + "x-massive-entitlement-data-type": { + "name": "nbbo", + "description": "NBBO data" + }, + "x-massive-entitlement-market-type": { + "name": "options", + "description": "Options data" + }, + "x-massive-entitlement-allowed-timeframes": [ + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/options/A": { + "get": { + "summary": "Aggregates (Per Second)", + "description": "Stream real-time second aggregates for a given option contract.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify an option contract or use * to subscribe to all option contracts.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://massive.com/docs/options/get_v3_reference_options_contracts).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" + }, + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a second aggregate event.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "ev": { + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given option contract." + }, + "v": { + "type": "integer", + "description": "The tick volume." + }, + "av": { + "type": "integer", + "description": "Today's accumulated volume." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening price." + }, + "vw": { + "type": "number", + "format": "float", + "description": "The tick's volume weighted average price." + }, + "o": { + "type": "number", + "format": "double", + "description": "The opening tick price for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The closing tick price for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The highest tick price for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest tick price for this aggregate window." + }, + "a": { + "type": "number", + "format": "float", + "description": "Today's volume weighted average price." + }, + "z": { + "type": "integer", + "description": "The average trade size for this aggregate window." + }, + "s": { + "type": "integer", + "description": "The start timestamp of this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The end timestamp of this aggregate window in Unix Milliseconds." + } + } + }, + { + "properties": { + "ev": { + "enum": [ + "A" + ], + "description": "The event type." + } + } + } + ] + }, + "example": { + "ev": "AM", + "sym": "O:ONEM220121C00025000", + "v": 2, + "av": 8, + "op": 2.2, + "vw": 2.05, + "o": 2.05, + "c": 2.05, + "h": 2.05, + "l": 2.05, + "a": 2.1312, + "z": 2, + "s": 1632419640000, + "e": 1632419700000 + } + } + } + } + }, + "x-massive-entitlement-data-type": { + "name": "aggregates", + "description": "Aggregate data" + }, + "x-massive-entitlement-market-type": { + "name": "options", + "description": "Options data" + }, + "x-massive-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/options/AM": { + "get": { + "summary": "Aggregates (Per Minute)", + "description": "Stream real-time minute aggregates for a given option contract.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify an option contract or use * to subscribe to all option contracts.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://massive.com/docs/options/get_v3_reference_options_contracts).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" + }, + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a minute aggregate event.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "ev": { + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given option contract." + }, + "v": { + "type": "integer", + "description": "The tick volume." + }, + "av": { + "type": "integer", + "description": "Today's accumulated volume." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening price." + }, + "vw": { + "type": "number", + "format": "float", + "description": "The tick's volume weighted average price." + }, + "o": { + "type": "number", + "format": "double", + "description": "The opening tick price for this aggregate window." + }, + "c": { "type": "number", "format": "double", "description": "The closing tick price for this aggregate window." }, - "h": { + "h": { + "type": "number", + "format": "double", + "description": "The highest tick price for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest tick price for this aggregate window." + }, + "a": { + "type": "number", + "format": "float", + "description": "Today's volume weighted average price." + }, + "z": { + "type": "integer", + "description": "The average trade size for this aggregate window." + }, + "s": { + "type": "integer", + "description": "The start timestamp of this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The end timestamp of this aggregate window in Unix Milliseconds." + } + } + }, + { + "properties": { + "ev": { + "enum": [ + "AM" + ], + "description": "The event type." + } + } + } + ] + }, + "example": { + "ev": "AM", + "sym": "O:ONEM220121C00025000", + "v": 2, + "av": 8, + "op": 2.2, + "vw": 2.05, + "o": 2.05, + "c": 2.05, + "h": 2.05, + "l": 2.05, + "a": 2.1312, + "z": 2, + "s": 1632419640000, + "e": 1632419700000 + } + } + } + } + }, + "x-massive-entitlement-data-type": { + "name": "aggregates", + "description": "Aggregate data" + }, + "x-massive-entitlement-market-type": { + "name": "options", + "description": "Options data" + }, + "x-massive-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/business/options/FMV": { + "get": { + "summary": "Fair Market Value", + "description": "Real-time fair market value for a given options ticker symbol.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify an option contract. You're only allowed to subscribe to 1,000 option contracts per connection.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://massive.com/docs/options/get_v3_reference_options_contracts).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" + }, + "example": "O:SPY241220P00720000" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a fair market value event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "FMV" + ], + "description": "The event type." + }, + "fmv": { + "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.\n" + }, + "sym": { + "description": "The ticker symbol for the given security." + }, + "t": { + "description": "The nanosecond timestamp." + } + } + }, + "example": { + "ev": "FMV", + "fmv": 7.2, + "sym": "O:TSLA210903C00700000", + "t": 1401715883806000000 + } + } + } + } + }, + "x-massive-entitlement-data-type": { + "name": "indicative-price", + "description": "Indicative Price" + }, + "x-massive-entitlement-market-type": { + "name": "options", + "description": "Options data" + }, + "x-massive-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/launchpad/options/AM": { + "get": { + "summary": "Aggregates (Per Minute)", + "description": "Stream real-time minute aggregates for a given option contract.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify an option contract. You're only allowed to subscribe to 1,000 option contracts per connection.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://massive.com/docs/options/get_v3_reference_options_contracts).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" + }, + "example": "O:SPY241220P00720000" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a minute aggregate event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ev": { + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given stock." + }, + "v": { + "type": "integer", + "description": "The tick volume." + }, + "av": { + "type": "integer", + "description": "Today's accumulated volume." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening price." + }, + "vw": { + "type": "number", + "format": "float", + "description": "The volume-weighted average value for the aggregate window." + }, + "o": { + "type": "number", + "format": "double", + "description": "The open price for the symbol in the given time period." + }, + "c": { + "type": "number", + "format": "double", + "description": "The close price for the symbol in the given time period." + }, + "h": { + "type": "number", + "format": "double", + "description": "The highest price for the symbol in the given time period." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest price for the symbol in the given time period." + }, + "a": { + "type": "number", + "format": "float", + "description": "Today's volume weighted average price." + }, + "z": { + "type": "integer", + "description": "The average trade size for this aggregate window." + }, + "s": { + "type": "integer", + "description": "The start timestamp of this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The end timestamp of this aggregate window in Unix Milliseconds." + } + } + }, + "example": { + "ev": "AM", + "sym": "O:ONEM220121C00025000", + "v": 2, + "av": 8, + "op": 2.2, + "vw": 2.05, + "o": 2.05, + "c": 2.05, + "h": 2.05, + "l": 2.05, + "a": 2.1312, + "z": 1, + "s": 1632419640000, + "e": 1632419700000 + } + } + } + } + }, + "x-massive-entitlement-data-type": { + "name": "aggregates", + "description": "Aggregate data" + }, + "x-massive-entitlement-market-type": { + "name": "options", + "description": "Options data" + }, + "x-massive-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/launchpad/options/LV": { + "get": { + "summary": "Value", + "description": "Real-time value for a given options ticker symbol.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify an option contract. You're only allowed to subscribe to 1,000 option contracts per connection.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://massive.com/docs/options/get_v3_reference_options_contracts).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" + }, + "example": "O:SPY241220P00720000" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a value event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "LV" + ], + "description": "The event type." + }, + "val": { + "description": "The current value of the security." + }, + "sym": { + "description": "The ticker symbol for the given security." + }, + "t": { + "description": "The nanosecond timestamp." + } + } + }, + "example": { + "ev": "LV", + "val": 7.2, + "sym": "O:TSLA210903C00700000", + "t": 1401715883806000000 + } + } + } + } + }, + "x-massive-entitlement-data-type": { + "name": "indicative-price", + "description": "Indicative Price" + }, + "x-massive-entitlement-market-type": { + "name": "options", + "description": "Options data" + }, + "x-massive-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/forex/C": { + "get": { + "summary": "Quotes", + "description": "Stream real-time forex quotes for a given forex pair.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://massive.com/docs/forex/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/" + }, + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a forex quote event.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "ev": { + "type": "string", + "description": "The event type." + }, + "p": { + "type": "string", + "description": "The current pair." + }, + "x": { + "type": "integer", + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs." + }, + "a": { "type": "number", "format": "double", - "description": "The highest tick price for this aggregate window." + "description": "The ask price." }, - "l": { + "b": { "type": "number", "format": "double", - "description": "The lowest tick price for this aggregate window." + "description": "The bid price." }, - "a": { + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." + } + } + }, + { + "properties": { + "ev": { + "enum": [ + "C" + ], + "description": "The event type." + } + } + } + ] + }, + "example": { + "ev": "C", + "p": "USD/CNH", + "x": "44", + "a": 6.83366, + "b": 6.83363, + "t": 1536036818784 + } + } + } + } + }, + "x-massive-entitlement-data-type": { + "name": "nbbo", + "description": "NBBO data" + }, + "x-massive-entitlement-market-type": { + "name": "fx", + "description": "Forex data" + }, + "x-massive-entitlement-allowed-timeframes": [ + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/forex/CA": { + "get": { + "summary": "Aggregates (Per Minute)", + "description": "Stream real-time per-minute forex aggregates for a given forex pair.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://massive.com/docs/forex/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/" + }, + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a forex per-minute aggregate event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "CA" + ], + "description": "The event type." + }, + "pair": { + "type": "string", + "description": "The currency pair." + }, + "o": { + "type": "number", + "format": "double", + "description": "The open price for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The close price for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The high price for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The low price for this aggregate window." + }, + "v": { + "type": "integer", + "description": "The volume of trades during this aggregate window." + }, + "s": { + "type": "integer", + "description": "The start timestamp of this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The end timestamp of this aggregate window in Unix Milliseconds." + } + } + }, + "example": { + "ev": "CA", + "pair": "USD/EUR", + "o": 0.8687, + "c": 0.86889, + "h": 0.86889, + "l": 0.8686, + "v": 20, + "s": 1539145740000 + } + } + } + } + }, + "x-massive-entitlement-data-type": { + "name": "aggregates", + "description": "Aggregate data" + }, + "x-massive-entitlement-market-type": { + "name": "fx", + "description": "Forex data" + }, + "x-massive-entitlement-allowed-timeframes": [ + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/forex/CAS": { + "get": { + "summary": "Aggregates (Per Second)", + "description": "Stream real-time per-second forex aggregates for a given forex pair.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://massive.com/docs/forex/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/" + }, + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a forex per-second aggregate event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "CAS" + ], + "description": "The event type." + }, + "pair": { + "type": "string", + "description": "The currency pair." + }, + "o": { + "type": "number", + "format": "double", + "description": "The open price for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The close price for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The high price for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The low price for this aggregate window." + }, + "v": { + "type": "integer", + "description": "The volume of trades during this aggregate window." + }, + "s": { + "type": "integer", + "description": "The start timestamp of this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The end timestamp of this aggregate window in Unix Milliseconds." + } + } + }, + "example": { + "ev": "CAS", + "pair": "USD/EUR", + "o": 0.8687, + "c": 0.86889, + "h": 0.86889, + "l": 0.8686, + "v": 20, + "s": 1539145740000 + } + } + } + } + }, + "x-massive-entitlement-data-type": { + "name": "aggregates", + "description": "Aggregate data" + }, + "x-massive-entitlement-market-type": { + "name": "fx", + "description": "Forex data" + }, + "x-massive-entitlement-allowed-timeframes": [ + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/business/forex/FMV": { + "get": { + "summary": "Fair Market Value", + "description": "Real-time fair market value for a given forex ticker symbol.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://massive.com/docs/forex/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/" + }, + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a fair market value event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "FMV" + ], + "description": "The event type." + }, + "fmv": { + "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.\n" + }, + "sym": { + "description": "The ticker symbol for the given security." + }, + "t": { + "description": "The nanosecond timestamp." + } + } + }, + "example": { + "ev": "FMV", + "fmv": 1.0631, + "sym": "C:EURUSD", + "t": 1678220098130 + } + } + } + } + }, + "x-massive-entitlement-data-type": { + "name": "indicative-price", + "description": "Indicative Price" + }, + "x-massive-entitlement-market-type": { + "name": "fx", + "description": "Forex data" + }, + "x-massive-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/launchpad/forex/AM": { + "get": { + "summary": "Aggregates (Per Minute)", + "description": "Stream real-time per-minute forex aggregates for a given forex pair.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://massive.com/docs/forex/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/" + }, + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a minute aggregate event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ev": { + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given stock." + }, + "v": { + "type": "integer", + "description": "The tick volume." + }, + "av": { + "type": "integer", + "description": "Today's accumulated volume." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening price." + }, + "vw": { + "type": "number", + "format": "float", + "description": "The volume-weighted average value for the aggregate window." + }, + "o": { + "type": "number", + "format": "double", + "description": "The open price for the symbol in the given time period." + }, + "c": { + "type": "number", + "format": "double", + "description": "The close price for the symbol in the given time period." + }, + "h": { + "type": "number", + "format": "double", + "description": "The highest price for the symbol in the given time period." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest price for the symbol in the given time period." + }, + "a": { + "type": "number", + "format": "float", + "description": "Today's volume weighted average price." + }, + "z": { + "type": "integer", + "description": "The average trade size for this aggregate window." + }, + "s": { + "type": "integer", + "description": "The start timestamp of this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The end timestamp of this aggregate window in Unix Milliseconds." + } + } + }, + "example": { + "ev": "AM", + "sym": "C:USD-EUR", + "v": 4110, + "av": 9470157, + "op": 0.9272, + "vw": 0.9288, + "o": 0.9288, + "c": 0.9286, + "h": 0.9289, + "l": 0.9206, + "a": 0.9352, + "z": 685, + "s": 1610144640000, + "e": 1610144700000 + } + } + } + } + }, + "x-massive-entitlement-data-type": { + "name": "aggregates", + "description": "Aggregate data" + }, + "x-massive-entitlement-market-type": { + "name": "fx", + "description": "Forex data" + }, + "x-massive-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/launchpad/forex/LV": { + "get": { + "summary": "Value", + "description": "Real-time value for a given forex ticker symbol.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://massive.com/docs/forex/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/" + }, + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a value event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "LV" + ], + "description": "The event type." + }, + "val": { + "description": "The current value of the security." + }, + "sym": { + "description": "The ticker symbol for the given security." + }, + "t": { + "description": "The nanosecond timestamp." + } + } + }, + "example": { + "ev": "LV", + "val": 1.0631, + "sym": "C:EURUSD", + "t": 1678220098130 + } + } + } + } + }, + "x-massive-entitlement-data-type": { + "name": "indicative-price", + "description": "Indicative Price" + }, + "x-massive-entitlement-market-type": { + "name": "fx", + "description": "Forex data" + }, + "x-massive-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/crypto/XT": { + "get": { + "summary": "Trades", + "description": "Stream real-time crypto trades for a given crypto pair.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://massive.com/docs/crypto/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/" + }, + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a crypto trade event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "XT" + ], + "description": "The event type." + }, + "pair": { + "type": "string", + "description": "The crypto pair." + }, + "p": { + "type": "number", + "format": "double", + "description": "The price." + }, + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." + }, + "s": { + "type": "number", + "format": "double", + "description": "The size." + }, + "c": { + "type": "array", + "description": "The conditions.\n0 (or empty array): empty\n1: sellside\n2: buyside\n", + "items": { + "type": "integer", + "description": "The ID of the condition." + } + }, + "i": { + "type": "integer", + "description": "The ID of the trade (optional)." + }, + "x": { + "type": "integer", + "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" + }, + "r": { + "type": "integer", + "description": "The timestamp that the tick was received by Massive." + } + } + }, + "example": { + "ev": "XT", + "pair": "BTC-USD", + "p": 33021.9, + "t": 1610462007425, + "s": 0.01616617, + "c": [ + 2 + ], + "i": 14272084, + "x": 3, + "r": 1610462007576 + } + } + } + } + }, + "x-massive-entitlement-data-type": { + "name": "trades", + "description": "Trade data" + }, + "x-massive-entitlement-market-type": { + "name": "crypto", + "description": "Crypto data" + }, + "x-massive-entitlement-allowed-timeframes": [ + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/crypto/XQ": { + "get": { + "summary": "Quotes", + "description": "Stream real-time crypto quotes for a given crypto pair.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://massive.com/docs/crypto/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/" + }, + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a crypto quote event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "XQ" + ], + "description": "The event type." + }, + "pair": { + "type": "string", + "description": "The crypto pair." + }, + "bp": { + "type": "number", + "format": "double", + "description": "The bid price." + }, + "bs": { + "type": "number", + "format": "double", + "description": "The bid size." + }, + "ap": { + "type": "number", + "format": "double", + "description": "The ask price." + }, + "as": { + "type": "number", + "format": "double", + "description": "The ask size." + }, + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." + }, + "x": { + "type": "integer", + "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" + }, + "r": { + "type": "integer", + "description": "The timestamp that the tick was received by Massive." + } + } + }, + "example": { + "ev": "XQ", + "pair": "BTC-USD", + "bp": 33052.79, + "bs": 0.48, + "ap": 33073.19, + "as": 0.601, + "t": 1610462411115, + "x": 1, + "r": 1610462411128 + } + } + } + } + }, + "x-massive-entitlement-data-type": { + "name": "nbbo", + "description": "NBBO data" + }, + "x-massive-entitlement-market-type": { + "name": "crypto", + "description": "Crypto data" + }, + "x-massive-entitlement-allowed-timeframes": [ + { + "name": "realtime", + "description": "Real Time Data" + } + ] + } + }, + "/crypto/XL2": { + "get": { + "summary": "Level 2 Book", + "description": "Stream real-time level 2 book data for a given crypto pair.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://massive.com/docs/crypto/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/" + }, + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a crypto level 2 book event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "XL2" + ], + "description": "The event type." + }, + "pair": { + "type": "string", + "description": "The crypto pair." + }, + "b": { + "type": "array", + "description": "An array of bid prices, where each entry contains two elements: the first is the bid price, and the second is the size, with a maximum depth of 100.", + "items": { + "type": "array", + "description": "An array where the first item is bid price and the second item is size.", + "items": { "type": "number", - "format": "float", - "description": "Today's volume weighted average price." - }, - "z": { - "type": "integer", - "description": "The average trade size for this aggregate window." - }, - "s": { - "type": "integer", - "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." - }, - "e": { - "type": "integer", - "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." + "format": "double" } } }, - { - "properties": { - "ev": { - "enum": [ - "A" - ], - "description": "The event type." + "a": { + "type": "array", + "description": "An array of ask prices, where each entry contains two elements: the first is the ask price, and the second is the size, with a maximum depth of 100.", + "items": { + "type": "array", + "description": "An array where the first item is ask price and the second item is size.", + "items": { + "type": "number", + "format": "double" } } + }, + "t": { + "type": "integer", + "description": "The Timestamp in Unix MS." + }, + "x": { + "type": "integer", + "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" + }, + "r": { + "type": "integer", + "description": "The timestamp that the tick was received by Massive." } + } + }, + "example": { + "ev": "XL2", + "pair": "BTC-USD", + "t": 1610462411115, + "r": 1610462411128, + "x": 1, + "b": [ + [ + 33712.71, + 0.18635 + ], + [ + 33712.7, + 0.134 + ] + ], + "a": [ + [ + 33718.23, + 3.5527483 + ], + [ + 33718.24, + 0.1 + ] ] + } + } + } + } + }, + "x-massive-entitlement-data-type": { + "name": "nbbo", + "description": "NBBO data" + }, + "x-massive-entitlement-market-type": { + "name": "crypto", + "description": "Crypto data" + }, + "x-massive-entitlement-allowed-timeframes": [ + { + "name": "realtime", + "description": "Real Time Data" + } + ], + "x-massive-deprecation": { + "date": 1719838800000 + } + } + }, + "/crypto/XA": { + "get": { + "summary": "Aggregates (Per Minute)", + "description": "Stream real-time per-minute crypto aggregates for a given crypto pair.\n", + "parameters": [ + { + "name": "ticker", + "in": "query", + "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://massive.com/docs/crypto/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/" + }, + "example": "*" + } + ], + "responses": { + "200": { + "description": "The WebSocket message for a crypto per-minute aggregate event.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "XA" + ], + "description": "The event type." + }, + "pair": { + "type": "string", + "description": "The crypto pair." + }, + "o": { + "type": "number", + "format": "double", + "description": "The open price for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The close price for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The high price for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The low price for this aggregate window." + }, + "v": { + "type": "integer", + "description": "The volume of trades during this aggregate window." + }, + "s": { + "type": "integer", + "description": "The start timestamp of this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The end timestamp of this aggregate window in Unix Milliseconds." + }, + "vw": { + "type": "number", + "format": "double", + "description": "The volume weighted average price." + }, + "z": { + "type": "integer", + "description": "The average trade size for this aggregate window." + } + } }, "example": { - "ev": "AM", - "sym": "O:ONEM220121C00025000", - "v": 2, - "av": 8, - "op": 2.2, - "vw": 2.05, - "o": 2.05, - "c": 2.05, - "h": 2.05, - "l": 2.05, - "a": 2.1312, - "z": 2, - "s": 1632419640000, - "e": 1632419700000 + "ev": "XA", + "pair": "BCD-USD", + "v": 951.6112, + "vw": 0.7756, + "z": 73, + "o": 0.772, + "c": 0.784, + "h": 0.784, + "l": 0.771, + "s": 1610463240000, + "e": 1610463300000 } } } } }, - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "name": "aggregates", "description": "Aggregate data" }, - "x-polygon-entitlement-market-type": { - "name": "options", - "description": "Options data" - }, - "x-polygon-entitlement-allowed-timeframes": [ - { - "name": "delayed", - "description": "15 minute delayed data" - }, + "x-massive-entitlement-market-type": { + "name": "crypto", + "description": "Crypto data" + }, + "x-massive-entitlement-allowed-timeframes": [ { "name": "realtime", "description": "Real Time Data" @@ -1188,142 +3003,111 @@ ] } }, - "/options/AM": { + "/crypto/XAS": { "get": { - "summary": "Aggregates (Per Minute)", - "description": "Stream real-time minute aggregates for a given option contract.\n", + "summary": "Aggregates (Per Second)", + "description": "Stream real-time per-second crypto aggregates for a given crypto pair.\n", "parameters": [ { "name": "ticker", "in": "query", - "description": "Specify an option contract or use * to subscribe to all option contracts.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n", + "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://massive.com/docs/crypto/get_v3_reference_tickers).\n", "required": true, "schema": { "type": "string", - "pattern": "/^(([a-zA-Z]+|[0-9])+)$/" + "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/" }, "example": "*" } ], "responses": { "200": { - "description": "The WebSocket message for a minute aggregate event.", + "description": "The WebSocket message for a crypto per-second aggregate event.", "content": { "application/json": { "schema": { - "allOf": [ - { - "type": "object", - "properties": { - "ev": { - "description": "The event type." - }, - "sym": { - "type": "string", - "description": "The ticker symbol for the given option contract." - }, - "v": { - "type": "integer", - "description": "The tick volume." - }, - "av": { - "type": "integer", - "description": "Today's accumulated volume." - }, - "op": { - "type": "number", - "format": "double", - "description": "Today's official opening price." - }, - "vw": { - "type": "number", - "format": "float", - "description": "The tick's volume weighted average price." - }, - "o": { - "type": "number", - "format": "double", - "description": "The opening tick price for this aggregate window." - }, - "c": { - "type": "number", - "format": "double", - "description": "The closing tick price for this aggregate window." - }, - "h": { - "type": "number", - "format": "double", - "description": "The highest tick price for this aggregate window." - }, - "l": { - "type": "number", - "format": "double", - "description": "The lowest tick price for this aggregate window." - }, - "a": { - "type": "number", - "format": "float", - "description": "Today's volume weighted average price." - }, - "z": { - "type": "integer", - "description": "The average trade size for this aggregate window." - }, - "s": { - "type": "integer", - "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." - }, - "e": { - "type": "integer", - "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." - } - } + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "XAS" + ], + "description": "The event type." }, - { - "properties": { - "ev": { - "enum": [ - "AM" - ], - "description": "The event type." - } - } + "pair": { + "type": "string", + "description": "The crypto pair." + }, + "o": { + "type": "number", + "format": "double", + "description": "The open price for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The close price for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The high price for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The low price for this aggregate window." + }, + "v": { + "type": "integer", + "description": "The volume of trades during this aggregate window." + }, + "s": { + "type": "integer", + "description": "The start timestamp of this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The end timestamp of this aggregate window in Unix Milliseconds." + }, + "vw": { + "type": "number", + "format": "double", + "description": "The volume weighted average price." + }, + "z": { + "type": "integer", + "description": "The average trade size for this aggregate window." } - ] + } }, "example": { - "ev": "AM", - "sym": "O:ONEM220121C00025000", - "v": 2, - "av": 8, - "op": 2.2, - "vw": 2.05, - "o": 2.05, - "c": 2.05, - "h": 2.05, - "l": 2.05, - "a": 2.1312, - "z": 2, - "s": 1632419640000, - "e": 1632419700000 + "ev": "XAS", + "pair": "BCD-USD", + "v": 951.6112, + "vw": 0.7756, + "z": 73, + "o": 0.772, + "c": 0.784, + "h": 0.784, + "l": 0.771, + "s": 1610463240000, + "e": 1610463300000 } } } } }, - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "name": "aggregates", "description": "Aggregate data" }, - "x-polygon-entitlement-market-type": { - "name": "options", - "description": "Options data" + "x-massive-entitlement-market-type": { + "name": "crypto", + "description": "Crypto data" }, - "x-polygon-entitlement-allowed-timeframes": [ - { - "name": "delayed", - "description": "15 minute delayed data" - }, + "x-massive-entitlement-allowed-timeframes": [ { "name": "realtime", "description": "Real Time Data" @@ -1331,94 +3115,72 @@ ] } }, - "/forex/C": { + "/business/crypto/FMV": { "get": { - "summary": "Quotes", - "description": "Stream real-time forex quotes for a given forex pair.\n", + "summary": "Fair Market Value", + "description": "Real-time fair market value for a given crypto ticker symbol.\n", "parameters": [ { "name": "ticker", "in": "query", - "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://polygon.io/docs/forex/get_v3_reference_tickers).\n", + "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://massive.com/docs/crypto/get_v3_reference_tickers).\n", "required": true, "schema": { "type": "string", - "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/" + "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/" }, "example": "*" } ], "responses": { "200": { - "description": "The WebSocket message for a forex quote event.", + "description": "The WebSocket message for a fair market value event.", "content": { "application/json": { "schema": { - "allOf": [ - { - "type": "object", - "properties": { - "ev": { - "type": "string", - "description": "The event type." - }, - "p": { - "type": "string", - "description": "The current pair." - }, - "x": { - "type": "integer", - "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." - }, - "a": { - "type": "number", - "format": "double", - "description": "The ask price." - }, - "b": { - "type": "number", - "format": "double", - "description": "The bid price." - }, - "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." - } - } + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "FMV" + ], + "description": "The event type." }, - { - "properties": { - "ev": { - "enum": [ - "C" - ], - "description": "The event type." - } - } + "fmv": { + "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.\n" + }, + "sym": { + "description": "The ticker symbol for the given security." + }, + "t": { + "description": "The nanosecond timestamp." } - ] + } }, "example": { - "ev": "C", - "p": "USD/CNH", - "x": "44", - "a": 6.83366, - "b": 6.83363, - "t": 1536036818784 + "ev": "FMV", + "fmv": 33021.9, + "sym": "X:BTC-USD", + "t": 1610462007425 } } } } }, - "x-polygon-entitlement-data-type": { - "name": "nbbo", - "description": "NBBO data" + "x-massive-entitlement-data-type": { + "name": "indicative-price", + "description": "Indicative Price" }, - "x-polygon-entitlement-market-type": { - "name": "fx", - "description": "Forex data" + "x-massive-entitlement-market-type": { + "name": "crypto", + "description": "Crypto data" }, - "x-polygon-entitlement-allowed-timeframes": [ + "x-massive-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, { "name": "realtime", "description": "Real Time Data" @@ -1426,99 +3188,128 @@ ] } }, - "/forex/CA": { + "/launchpad/crypto/AM": { "get": { "summary": "Aggregates (Per Minute)", - "description": "Stream real-time per-minute forex aggregates for a given forex pair.\n", + "description": "Stream real-time per-minute crypto aggregates for a given crypto pair.\n", "parameters": [ { "name": "ticker", "in": "query", - "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://polygon.io/docs/forex/get_v3_reference_tickers).\n", + "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://massive.com/docs/crypto/get_v3_reference_tickers).\n", "required": true, "schema": { "type": "string", - "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/" + "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/" }, "example": "*" } ], "responses": { "200": { - "description": "The WebSocket message for a forex per-minute aggregate event.", + "description": "The WebSocket message for a minute aggregate event.", "content": { "application/json": { "schema": { "type": "object", "properties": { "ev": { - "type": "string", - "enum": [ - "CA" - ], "description": "The event type." }, - "pair": { - "type": "string", - "description": "The currency pair." + "sym": { + "type": "string", + "description": "The ticker symbol for the given stock." + }, + "v": { + "type": "integer", + "description": "The tick volume." + }, + "av": { + "type": "integer", + "description": "Today's accumulated volume." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening price." + }, + "vw": { + "type": "number", + "format": "float", + "description": "The volume-weighted average value for the aggregate window." }, "o": { "type": "number", "format": "double", - "description": "The open price for this aggregate window." + "description": "The open price for the symbol in the given time period." }, "c": { "type": "number", "format": "double", - "description": "The close price for this aggregate window." + "description": "The close price for the symbol in the given time period." }, "h": { "type": "number", "format": "double", - "description": "The high price for this aggregate window." + "description": "The highest price for the symbol in the given time period." }, "l": { "type": "number", "format": "double", - "description": "The low price for this aggregate window." + "description": "The lowest price for the symbol in the given time period." }, - "v": { + "a": { + "type": "number", + "format": "float", + "description": "Today's volume weighted average price." + }, + "z": { "type": "integer", - "description": "The volume of trades during this aggregate window." + "description": "The average trade size for this aggregate window." }, "s": { "type": "integer", - "description": "The start time for this aggregate window in Unix Milliseconds." + "description": "The start timestamp of this aggregate window in Unix Milliseconds." }, "e": { "type": "integer", - "description": "The end time for this aggregate window in Unix Milliseconds." + "description": "The end timestamp of this aggregate window in Unix Milliseconds." } } }, "example": { - "ev": "CA", - "pair": "USD/EUR", - "o": 0.8687, - "c": 0.86889, - "h": 0.86889, - "l": 0.8686, - "v": 20, - "s": 1539145740000 + "ev": "AM", + "sym": "X:BTC-USD", + "v": 951.6112, + "av": 738.6112, + "op": 26503.8, + "vw": 26503.8, + "o": 27503.8, + "c": 27203.8, + "h": 27893.8, + "l": 26503.8, + "a": 26503.8, + "z": 10, + "s": 1610463240000, + "e": 1610463300000 } } } } }, - "x-polygon-entitlement-data-type": { + "x-massive-entitlement-data-type": { "name": "aggregates", "description": "Aggregate data" }, - "x-polygon-entitlement-market-type": { - "name": "fx", - "description": "Forex data" + "x-massive-entitlement-market-type": { + "name": "crypto", + "description": "Crypto data" }, - "x-polygon-entitlement-allowed-timeframes": [ + "x-massive-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, { "name": "realtime", "description": "Real Time Data" @@ -1526,15 +3317,15 @@ ] } }, - "/crypto/XT": { + "/launchpad/crypto/LV": { "get": { - "summary": "Trades", - "description": "Stream real-time crypto trades for a given crypto pair.\n", + "summary": "Value", + "description": "Real-time value for a given crypto ticker symbol.\n", "parameters": [ { "name": "ticker", "in": "query", - "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://polygon.io/docs/crypto/get_v3_reference_tickers).\n", + "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://massive.com/docs/crypto/get_v3_reference_tickers).\n", "required": true, "schema": { "type": "string", @@ -1545,7 +3336,7 @@ ], "responses": { "200": { - "description": "The WebSocket message for a crypto trade event.", + "description": "The WebSocket message for a value event.", "content": { "application/json": { "schema": { @@ -1554,76 +3345,44 @@ "ev": { "type": "string", "enum": [ - "XT" + "LV" ], "description": "The event type." }, - "pair": { - "type": "string", - "description": "The crypto pair." + "val": { + "description": "The current value of the security." }, - "p": { - "type": "number", - "format": "double", - "description": "The price." + "sym": { + "description": "The ticker symbol for the given security." }, "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." - }, - "s": { - "type": "number", - "format": "double", - "description": "The size." - }, - "c": { - "type": "array", - "description": "The conditions.\n0 (or empty array): empty\n1: sellside\n2: buyside\n", - "items": { - "type": "integer", - "description": "The ID of the condition." - } - }, - "i": { - "type": "integer", - "description": "The ID of the trade (optional)." - }, - "x": { - "type": "integer", - "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" - }, - "r": { - "type": "integer", - "description": "The timestamp that the tick was received by Polygon." + "description": "The nanosecond timestamp." } } }, "example": { - "ev": "XT", - "pair": "BTC-USD", - "p": 33021.9, - "t": 1610462007425, - "s": 0.01616617, - "c": [ - 2 - ], - "i": 14272084, - "x": 3, - "r": 1610462007576 + "ev": "LV", + "val": 33021.9, + "sym": "X:BTC-USD", + "t": 1610462007425 } } } } }, - "x-polygon-entitlement-data-type": { - "name": "trades", - "description": "Trade data" + "x-massive-entitlement-data-type": { + "name": "indicative-price", + "description": "Indicative Price" }, - "x-polygon-entitlement-market-type": { + "x-massive-entitlement-market-type": { "name": "crypto", "description": "Crypto data" }, - "x-polygon-entitlement-allowed-timeframes": [ + "x-massive-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, { "name": "realtime", "description": "Real Time Data" @@ -1631,100 +3390,115 @@ ] } }, - "/crypto/XQ": { + "/indices/A": { "get": { - "summary": "Quotes", - "description": "Stream real-time crypto quotes for a given crypto pair.\n", + "summary": "Aggregates (Per Second)", + "description": "Stream real-time second aggregates for a given index ticker symbol.\n", "parameters": [ { "name": "ticker", "in": "query", - "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://polygon.io/docs/crypto/get_v3_reference_tickers).\n", + "description": "Specify an index ticker using \"I:\" prefix or use * to subscribe to all index tickers.\nYou can also use a comma separated list to subscribe to multiple index tickers.\nYou can retrieve available index tickers from our [Index Tickers API](https://massive.com/docs/indices/get_v3_reference_tickers).\n", "required": true, "schema": { "type": "string", - "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/" + "pattern": "/^(I:[a-zA-Z0-9]+)$/" }, "example": "*" } ], "responses": { "200": { - "description": "The WebSocket message for a crypto quote event.", + "description": "The WebSocket message for a second aggregate event.", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "ev": { - "type": "string", - "enum": [ - "XQ" - ], - "description": "The event type." - }, - "pair": { - "type": "string", - "description": "The crypto pair." - }, - "bp": { - "type": "number", - "format": "double", - "description": "The bid price." - }, - "bs": { - "type": "number", - "format": "double", - "description": "The bid size." - }, - "ap": { - "type": "number", - "format": "double", - "description": "The ask price." - }, - "as": { - "type": "number", - "format": "double", - "description": "The ask size." - }, - "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." - }, - "x": { - "type": "integer", - "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" + "allOf": [ + { + "type": "object", + "properties": { + "ev": { + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The symbol representing the given index." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening value." + }, + "o": { + "type": "number", + "format": "double", + "description": "The opening index value for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The closing index value for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The highest index value for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest index value for this aggregate window." + }, + "s": { + "type": "integer", + "description": "The start timestamp of this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The end timestamp of this aggregate window in Unix Milliseconds." + } + } }, - "r": { - "type": "integer", - "description": "The timestamp that the tick was received by Polygon." + { + "properties": { + "ev": { + "enum": [ + "A" + ], + "description": "The event type." + } + } } - } + ] }, "example": { - "ev": "XQ", - "pair": "BTC-USD", - "bp": 33052.79, - "bs": 0.48, - "ap": 33073.19, - "as": 0.601, - "t": 1610462411115, - "x": 1, - "r": 1610462411128 + "ev": "A", + "sym": "I:SPX", + "op": 3985.67, + "o": 3985.67, + "c": 3985.67, + "h": 3985.67, + "l": 3985.67, + "s": 1678220675805, + "e": 1678220675805 } } } } }, - "x-polygon-entitlement-data-type": { - "name": "nbbo", - "description": "NBBO data" + "x-massive-entitlement-data-type": { + "name": "aggregates", + "description": "Aggregate data" }, - "x-polygon-entitlement-market-type": { - "name": "crypto", - "description": "Crypto data" + "x-massive-entitlement-market-type": { + "name": "indices", + "description": "Indices data" }, - "x-polygon-entitlement-allowed-timeframes": [ + "x-massive-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, { "name": "realtime", "description": "Real Time Data" @@ -1732,120 +3506,115 @@ ] } }, - "/crypto/XL2": { + "/indices/AM": { "get": { - "summary": "Level 2 Book", - "description": "Stream real-time level 2 book data for a given crypto pair.\n", + "summary": "Aggregates (Per Minute)", + "description": "Stream real-time minute aggregates for a given index ticker symbol.\n", "parameters": [ { "name": "ticker", "in": "query", - "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://polygon.io/docs/crypto/get_v3_reference_tickers).\n", + "description": "Specify an index ticker using \"I:\" prefix or use * to subscribe to all index tickers.\nYou can also use a comma separated list to subscribe to multiple index tickers.\nYou can retrieve available index tickers from our [Index Tickers API](https://massive.com/docs/indices/get_v3_reference_tickers).\n", "required": true, "schema": { "type": "string", - "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/" + "pattern": "/^(I:[a-zA-Z0-9]+)$/" }, "example": "*" } ], "responses": { "200": { - "description": "The WebSocket message for a crypto level 2 book event.", + "description": "The WebSocket message for a minute aggregate event.", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "ev": { - "type": "string", - "enum": [ - "XL2" - ], - "description": "The event type." - }, - "pair": { - "type": "string", - "description": "The crypto pair." - }, - "b": { - "type": "array", - "description": "An array of bid prices with a maximum depth of 100.", - "items": { - "type": "array", - "description": "An array where the first item is bid price and the second item is size.", - "items": { + "allOf": [ + { + "type": "object", + "properties": { + "ev": { + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The symbol representing the given index." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening value." + }, + "o": { + "type": "number", + "format": "double", + "description": "The opening index value for this aggregate window." + }, + "c": { "type": "number", - "format": "double" + "format": "double", + "description": "The closing index value for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The highest index value for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest index value for this aggregate window." + }, + "s": { + "type": "integer", + "description": "The start timestamp of this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The end timestamp of this aggregate window in Unix Milliseconds." } } }, - "a": { - "type": "array", - "description": "An array of ask prices with a maximum depth of 100.", - "items": { - "type": "array", - "description": "An array where the first item is ask price and the second item is size.", - "items": { - "type": "number", - "format": "double" + { + "properties": { + "ev": { + "enum": [ + "AM" + ], + "description": "The event type." } } - }, - "t": { - "type": "integer", - "description": "The Timestamp in Unix MS." - }, - "x": { - "type": "integer", - "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" - }, - "r": { - "type": "integer", - "description": "The timestamp that the tick was received by Polygon." } - } + ] }, "example": { - "ev": "XL2", - "pair": "BTC-USD", - "t": 1610462411115, - "r": 1610462411128, - "x": 1, - "b": [ - [ - 33712.71, - 0.18635 - ], - [ - 33712.7, - 0.134 - ] - ], - "a": [ - [ - 33718.23, - 3.5527483 - ], - [ - 33718.24, - 0.1 - ] - ] + "ev": "AM", + "sym": "I:SPX", + "op": 3985.67, + "o": 3985.67, + "c": 3985.67, + "h": 3985.67, + "l": 3985.67, + "s": 1678220675805, + "e": 1678220675805 } } } } }, - "x-polygon-entitlement-data-type": { - "name": "nbbo", - "description": "NBBO data" + "x-massive-entitlement-data-type": { + "name": "aggregates", + "description": "Aggregate data" }, - "x-polygon-entitlement-market-type": { - "name": "crypto", - "description": "Crypto data" + "x-massive-entitlement-market-type": { + "name": "indices", + "description": "Indices data" }, - "x-polygon-entitlement-allowed-timeframes": [ + "x-massive-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, { "name": "realtime", "description": "Real Time Data" @@ -1853,26 +3622,26 @@ ] } }, - "/crypto/XA": { + "/indices/V": { "get": { - "summary": "Aggregates (Per Minute)", - "description": "Stream real-time per-minute crypto aggregates for a given crypto pair.\n", + "summary": "Value", + "description": "Real-time value for a given index ticker symbol.\n", "parameters": [ { "name": "ticker", "in": "query", - "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://polygon.io/docs/crypto/get_v3_reference_tickers).\n", + "description": "Specify an index ticker using \"I:\" prefix or use * to subscribe to all index tickers.\nYou can also use a comma separated list to subscribe to multiple index tickers.\nYou can retrieve available index tickers from our [Index Tickers API](https://massive.com/docs/indices/get_v3_reference_tickers).\n", "required": true, "schema": { "type": "string", - "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/" + "pattern": "/^(I:[a-zA-Z0-9]+)$/" }, - "example": "*" + "example": "I:SPX" } ], "responses": { "200": { - "description": "The WebSocket message for a crypto per-minute aggregate event.", + "description": "The WebSocket message for a value event.", "content": { "application/json": { "schema": { @@ -1881,83 +3650,44 @@ "ev": { "type": "string", "enum": [ - "XA" + "V" ], "description": "The event type." }, - "pair": { - "type": "string", - "description": "The crypto pair." - }, - "o": { - "type": "number", - "format": "double", - "description": "The open price for this aggregate window." - }, - "c": { - "type": "number", - "format": "double", - "description": "The close price for this aggregate window." - }, - "h": { - "type": "number", - "format": "double", - "description": "The high price for this aggregate window." - }, - "l": { - "type": "number", - "format": "double", - "description": "The low price for this aggregate window." - }, - "v": { - "type": "integer", - "description": "The volume of trades during this aggregate window." - }, - "s": { - "type": "integer", - "description": "The start time for this aggregate window in Unix Milliseconds." - }, - "e": { - "type": "integer", - "description": "The end time for this aggregate window in Unix Milliseconds." + "val": { + "description": "The value of the index." }, - "vw": { - "type": "number", - "format": "double", - "description": "The volume weighted average price." + "T": { + "description": "The assigned ticker of the index." }, - "z": { - "type": "integer", - "description": "The average trade size for this aggregate window." + "t": { + "description": "The Timestamp in Unix MS." } } }, "example": { - "ev": "XA", - "pair": "BCD-USD", - "v": 951.6112, - "vw": 0.7756, - "z": 73, - "o": 0.772, - "c": 0.784, - "h": 0.784, - "l": 0.771, - "s": 1610463240000, - "e": 1610463300000 + "ev": "V", + "val": 3988.5, + "T": "I:SPX", + "t": 1678220098130 } } } } }, - "x-polygon-entitlement-data-type": { - "name": "aggregates", - "description": "Aggregate data" + "x-massive-entitlement-data-type": { + "name": "value", + "description": "Value data" }, - "x-polygon-entitlement-market-type": { - "name": "crypto", - "description": "Crypto data" + "x-massive-entitlement-market-type": { + "name": "indices", + "description": "Indices data" }, - "x-polygon-entitlement-allowed-timeframes": [ + "x-massive-entitlement-allowed-timeframes": [ + { + "name": "delayed", + "description": "15 minute delayed data" + }, { "name": "realtime", "description": "Real Time Data" @@ -2192,11 +3922,11 @@ }, "AggsStartTime": { "type": "integer", - "description": "The start time for this aggregate window in Unix Milliseconds." + "description": "The start timestamp of this aggregate window in Unix Milliseconds." }, "AggsEndTime": { "type": "integer", - "description": "The end time for this aggregate window in Unix Milliseconds." + "description": "The end timestamp of this aggregate window in Unix Milliseconds." }, "StockTradeEvent": { "type": "object", @@ -2213,7 +3943,7 @@ }, "x": { "type": "integer", - "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs." }, "i": { "type": "string", @@ -2234,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 Massive.com's trade conditions glossary.\n", "items": { "type": "integer", "description": "The ID of the condition." @@ -2242,11 +3972,19 @@ }, "t": { "type": "integer", - "description": "The Timestamp in Unix MS." + "description": "The SIP timestamp in Unix MS." }, "q": { "type": "integer", "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n" + }, + "trfi": { + "type": "integer", + "description": "The ID for the Trade Reporting Facility where the trade took place." + }, + "trft": { + "type": "integer", + "description": "The TRF (Trade Reporting Facility) Timestamp in Unix MS. \nThis is the timestamp of when the trade reporting facility received this trade.\n" } } }, @@ -2295,7 +4033,7 @@ }, "i": { "type": "array", - "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n", + "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://massive.com/glossary/us/stocks/conditions-indicators).\n", "items": { "type": "integer", "description": "The indicator code.\n" @@ -2303,7 +4041,11 @@ }, "t": { "type": "integer", - "description": "The Timestamp in Unix MS." + "description": "The SIP timestamp in Unix MS." + }, + "q": { + "type": "integer", + "description": "The sequence number represents the sequence in which quote events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11). Values reset after each trading session/day.\n" }, "z": { "type": "integer", @@ -2370,11 +4112,11 @@ }, "s": { "type": "integer", - "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." + "description": "The start timestamp of this aggregate window in Unix Milliseconds." }, "e": { "type": "integer", - "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." + "description": "The end timestamp of this aggregate window in Unix Milliseconds." }, "otc": { "type": "boolean", @@ -2443,11 +4185,11 @@ }, "s": { "type": "integer", - "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." + "description": "The start timestamp of this aggregate window in Unix Milliseconds." }, "e": { "type": "integer", - "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." + "description": "The end timestamp of this aggregate window in Unix Milliseconds." }, "otc": { "type": "boolean", @@ -2528,11 +4270,11 @@ }, "s": { "type": "integer", - "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." + "description": "The start timestamp of this aggregate window in Unix Milliseconds." }, "e": { "type": "integer", - "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." + "description": "The end timestamp of this aggregate window in Unix Milliseconds." }, "otc": { "type": "boolean", @@ -2627,7 +4369,7 @@ }, "x": { "type": "integer", - "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs." }, "o": { "type": "integer", @@ -2654,7 +4396,7 @@ }, "StockExchangeID": { "type": "integer", - "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs." }, "OptionTradeEvent": { "type": "object", @@ -2671,7 +4413,7 @@ }, "x": { "type": "integer", - "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs." }, "p": { "type": "number", @@ -2715,11 +4457,11 @@ }, "bx": { "type": "integer", - "description": "The bid exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + "description": "The bid exchange ID. See Exchanges for Massive.com's mapping of exchange IDs." }, "ax": { "type": "integer", - "description": "The ask exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + "description": "The ask exchange ID. See Exchanges for Massive.com's mapping of exchange IDs." }, "bp": { "type": "number", @@ -2808,11 +4550,11 @@ }, "s": { "type": "integer", - "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." + "description": "The start timestamp of this aggregate window in Unix Milliseconds." }, "e": { "type": "integer", - "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." + "description": "The end timestamp of this aggregate window in Unix Milliseconds." } } }, @@ -2877,11 +4619,11 @@ }, "s": { "type": "integer", - "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." + "description": "The start timestamp of this aggregate window in Unix Milliseconds." }, "e": { "type": "integer", - "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." + "description": "The end timestamp of this aggregate window in Unix Milliseconds." } } }, @@ -2958,11 +4700,11 @@ }, "s": { "type": "integer", - "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds." + "description": "The start timestamp of this aggregate window in Unix Milliseconds." }, "e": { "type": "integer", - "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds." + "description": "The end timestamp of this aggregate window in Unix Milliseconds." } } }, @@ -2995,7 +4737,7 @@ }, "x": { "type": "integer", - "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs." }, "a": { "type": "number", @@ -3028,7 +4770,7 @@ }, "x": { "type": "integer", - "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs." + "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs." }, "a": { "type": "number", @@ -3058,7 +4800,7 @@ } ] }, - "ForexAggregateEvent": { + "ForexMinuteAggregateEvent": { "type": "object", "properties": { "ev": { @@ -3098,11 +4840,59 @@ }, "s": { "type": "integer", - "description": "The start time for this aggregate window in Unix Milliseconds." + "description": "The start timestamp of this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The end timestamp of this aggregate window in Unix Milliseconds." + } + } + }, + "ForexSecondAggregateEvent": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "CAS" + ], + "description": "The event type." + }, + "pair": { + "type": "string", + "description": "The currency pair." + }, + "o": { + "type": "number", + "format": "double", + "description": "The open price for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The close price for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The high price for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The low price for this aggregate window." + }, + "v": { + "type": "integer", + "description": "The volume of trades during this aggregate window." + }, + "s": { + "type": "integer", + "description": "The start timestamp of this aggregate window in Unix Milliseconds." }, "e": { "type": "integer", - "description": "The end time for this aggregate window in Unix Milliseconds." + "description": "The end timestamp of this aggregate window in Unix Milliseconds." } } }, @@ -3146,11 +4936,11 @@ }, "x": { "type": "integer", - "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" + "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" }, "r": { "type": "integer", - "description": "The timestamp that the tick was received by Polygon." + "description": "The timestamp that the tick was received by Massive." } } }, @@ -3196,15 +4986,15 @@ }, "x": { "type": "integer", - "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" + "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" }, "r": { "type": "integer", - "description": "The timestamp that the tick was received by Polygon." + "description": "The timestamp that the tick was received by Massive." } } }, - "CryptoAggregateEvent": { + "CryptoMinuteAggregateEvent": { "type": "object", "properties": { "ev": { @@ -3244,11 +5034,68 @@ }, "s": { "type": "integer", - "description": "The start time for this aggregate window in Unix Milliseconds." + "description": "The start timestamp of this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The end timestamp of this aggregate window in Unix Milliseconds." + }, + "vw": { + "type": "number", + "format": "double", + "description": "The volume weighted average price." + }, + "z": { + "type": "integer", + "description": "The average trade size for this aggregate window." + } + } + }, + "CryptoSecondAggregateEvent": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "XAS" + ], + "description": "The event type." + }, + "pair": { + "type": "string", + "description": "The crypto pair." + }, + "o": { + "type": "number", + "format": "double", + "description": "The open price for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The close price for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The high price for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The low price for this aggregate window." + }, + "v": { + "type": "integer", + "description": "The volume of trades during this aggregate window." + }, + "s": { + "type": "integer", + "description": "The start timestamp of this aggregate window in Unix Milliseconds." }, "e": { "type": "integer", - "description": "The end time for this aggregate window in Unix Milliseconds." + "description": "The end timestamp of this aggregate window in Unix Milliseconds." }, "vw": { "type": "number", @@ -3277,7 +5124,7 @@ }, "b": { "type": "array", - "description": "An array of bid prices with a maximum depth of 100.", + "description": "An array of bid prices, where each entry contains two elements: the first is the bid price, and the second is the size, with a maximum depth of 100.", "items": { "type": "array", "description": "An array where the first item is bid price and the second item is size.", @@ -3289,7 +5136,7 @@ }, "a": { "type": "array", - "description": "An array of ask prices with a maximum depth of 100.", + "description": "An array of ask prices, where each entry contains two elements: the first is the ask price, and the second is the size, with a maximum depth of 100.", "items": { "type": "array", "description": "An array where the first item is ask price and the second item is size.", @@ -3305,11 +5152,11 @@ }, "x": { "type": "integer", - "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" + "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" }, "r": { "type": "integer", - "description": "The timestamp that the tick was received by Polygon." + "description": "The timestamp that the tick was received by Massive." } } }, @@ -3319,18 +5166,311 @@ }, "CryptoExchangeID": { "type": "integer", - "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" + "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n" }, "CryptoReceivedTimestamp": { "type": "integer", - "description": "The timestamp that the tick was received by Polygon." + "description": "The timestamp that the tick was received by Massive." + }, + "IndicesBaseAggregateEvent": { + "type": "object", + "properties": { + "ev": { + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The symbol representing the given index." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening value." + }, + "o": { + "type": "number", + "format": "double", + "description": "The opening index value for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The closing index value for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The highest index value for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest index value for this aggregate window." + }, + "s": { + "type": "integer", + "description": "The start timestamp of this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The end timestamp of this aggregate window in Unix Milliseconds." + } + } + }, + "IndicesMinuteAggregateEvent": { + "allOf": [ + { + "type": "object", + "properties": { + "ev": { + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The symbol representing the given index." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening value." + }, + "o": { + "type": "number", + "format": "double", + "description": "The opening index value for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The closing index value for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The highest index value for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest index value for this aggregate window." + }, + "s": { + "type": "integer", + "description": "The start timestamp of this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The end timestamp of this aggregate window in Unix Milliseconds." + } + } + }, + { + "properties": { + "ev": { + "enum": [ + "AM" + ], + "description": "The event type." + } + } + } + ] + }, + "IndicesSecondAggregateEvent": { + "allOf": [ + { + "type": "object", + "properties": { + "ev": { + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The symbol representing the given index." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening value." + }, + "o": { + "type": "number", + "format": "double", + "description": "The opening index value for this aggregate window." + }, + "c": { + "type": "number", + "format": "double", + "description": "The closing index value for this aggregate window." + }, + "h": { + "type": "number", + "format": "double", + "description": "The highest index value for this aggregate window." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest index value for this aggregate window." + }, + "s": { + "type": "integer", + "description": "The start timestamp of this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The end timestamp of this aggregate window in Unix Milliseconds." + } + } + }, + { + "properties": { + "ev": { + "enum": [ + "A" + ], + "description": "The event type." + } + } + } + ] + }, + "IndicesValueEvent": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "V" + ], + "description": "The event type." + }, + "val": { + "description": "The value of the index." + }, + "T": { + "description": "The assigned ticker of the index." + }, + "t": { + "description": "The Timestamp in Unix MS." + } + } + }, + "LaunchpadWebsocketMinuteAggregateEvent": { + "type": "object", + "properties": { + "ev": { + "description": "The event type." + }, + "sym": { + "type": "string", + "description": "The ticker symbol for the given stock." + }, + "v": { + "type": "integer", + "description": "The tick volume." + }, + "av": { + "type": "integer", + "description": "Today's accumulated volume." + }, + "op": { + "type": "number", + "format": "double", + "description": "Today's official opening price." + }, + "vw": { + "type": "number", + "format": "float", + "description": "The volume-weighted average value for the aggregate window." + }, + "o": { + "type": "number", + "format": "double", + "description": "The open price for the symbol in the given time period." + }, + "c": { + "type": "number", + "format": "double", + "description": "The close price for the symbol in the given time period." + }, + "h": { + "type": "number", + "format": "double", + "description": "The highest price for the symbol in the given time period." + }, + "l": { + "type": "number", + "format": "double", + "description": "The lowest price for the symbol in the given time period." + }, + "a": { + "type": "number", + "format": "float", + "description": "Today's volume weighted average price." + }, + "z": { + "type": "integer", + "description": "The average trade size for this aggregate window." + }, + "s": { + "type": "integer", + "description": "The start timestamp of this aggregate window in Unix Milliseconds." + }, + "e": { + "type": "integer", + "description": "The end timestamp of this aggregate window in Unix Milliseconds." + } + } + }, + "LaunchpadWebsocketValueEvent": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "LV" + ], + "description": "The event type." + }, + "val": { + "description": "The current value of the security." + }, + "sym": { + "description": "The ticker symbol for the given security." + }, + "t": { + "description": "The nanosecond timestamp." + } + } + }, + "BusinessWebsocketFairMarketValue": { + "type": "object", + "properties": { + "ev": { + "type": "string", + "enum": [ + "FMV" + ], + "description": "The event type." + }, + "fmv": { + "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.\n" + }, + "sym": { + "description": "The ticker symbol for the given security." + }, + "t": { + "description": "The nanosecond timestamp." + } + } } }, "parameters": { "StocksTickerParam": { "name": "ticker", "in": "query", - "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n", + "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://massive.com/docs/stocks/get_v3_reference_tickers).\n", "required": true, "schema": { "type": "string", @@ -3341,7 +5481,7 @@ "OptionsTickerParam": { "name": "ticker", "in": "query", - "description": "Specify an option contract or use * to subscribe to all option contracts.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n", + "description": "Specify an option contract or use * to subscribe to all option contracts.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://massive.com/docs/options/get_v3_reference_options_contracts).\n", "required": true, "schema": { "type": "string", @@ -3352,7 +5492,7 @@ "OptionsTickerWithoutWildcardParam": { "name": "ticker", "in": "query", - "description": "Specify an option contract. You're only allowed to subscribe to 1,000 option contracts per connection.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n", + "description": "Specify an option contract. You're only allowed to subscribe to 1,000 option contracts per connection.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://massive.com/docs/options/get_v3_reference_options_contracts).\n", "required": true, "schema": { "type": "string", @@ -3363,7 +5503,7 @@ "ForexTickerParam": { "name": "ticker", "in": "query", - "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://polygon.io/docs/forex/get_v3_reference_tickers).\n", + "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://massive.com/docs/forex/get_v3_reference_tickers).\n", "required": true, "schema": { "type": "string", @@ -3374,13 +5514,35 @@ "CryptoTickerParam": { "name": "ticker", "in": "query", - "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://polygon.io/docs/crypto/get_v3_reference_tickers).\n", + "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://massive.com/docs/crypto/get_v3_reference_tickers).\n", "required": true, "schema": { "type": "string", "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/" }, "example": "*" + }, + "IndicesIndexParam": { + "name": "ticker", + "in": "query", + "description": "Specify an index ticker using \"I:\" prefix or use * to subscribe to all index tickers.\nYou can also use a comma separated list to subscribe to multiple index tickers.\nYou can retrieve available index tickers from our [Index Tickers API](https://massive.com/docs/indices/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(I:[a-zA-Z0-9]+)$/" + }, + "example": "*" + }, + "IndicesIndexParamWithoutWildcard": { + "name": "ticker", + "in": "query", + "description": "Specify an index ticker using \"I:\" prefix or use * to subscribe to all index tickers.\nYou can also use a comma separated list to subscribe to multiple index tickers.\nYou can retrieve available index tickers from our [Index Tickers API](https://massive.com/docs/indices/get_v3_reference_tickers).\n", + "required": true, + "schema": { + "type": "string", + "pattern": "/^(I:[a-zA-Z0-9]+)$/" + }, + "example": "I:SPX" } } } diff --git a/Makefile b/Makefile index 485f002b..b3732930 100644 --- a/Makefile +++ b/Makefile @@ -22,22 +22,22 @@ help: ## Check code style style: - poetry run black $(if $(CI),--check,) polygon test_* examples + poetry run black $(if $(CI),--check,) massive test_* examples ## Check static types static: - poetry run mypy polygon test_* examples + poetry run mypy massive test_* examples ## Check code style and static types lint: style static ## Update the REST API spec rest-spec: - curl https://api.polygon.io/specs/rest.json > .polygon/rest.json + poetry run python .massive/rest.py ## Update the WebSocket API spec ws-spec: - curl https://api.polygon.io/specs/websocket.json > .polygon/websocket.json + curl https://api.massive.com/specs/websocket.json > .massive/websocket.json test_rest: poetry run python -m unittest discover -s test_rest diff --git a/README.md b/README.md index bf0cb001..565532e6 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,221 @@ -[![PyPI version](https://badge.fury.io/py/polygon-api-client.svg)](https://badge.fury.io/py/polygon-api-client) -[![Docs](https://readthedocs.org/projects/polygon-api-client/badge/?version=latest)](https://polygon-api-client.readthedocs.io/en/latest/) +# Massive (formerly Polygon.io) Python Client - WebSocket & RESTful APIs -# Polygon Python Client - WebSocket & RESTful APIs +Welcome to the official Python client library for the [Massive](https://massive.com/) REST and WebSocket API. To get started, please see the [Getting Started](https://massive.com/docs/stocks/getting-started) section in our documentation, view the [examples](./examples/) directory for code snippets. -Python client for the [Polygon.io API](https://polygon.io). +**Note:** Polygon.io has rebranded as [Massive.com](https://massive.com) on Oct 30, 2025. Existing API keys, accounts, and integrations continue to work exactly as before. The only change in this SDK is that it now defaults to the new API base at `api.massive.com`, while `api.polygon.io` remains supported for an extended period. -## Install +For details, see our [rebrand announcement blog post](https://massive.com/blog/polygon-is-now-massive/) or open an issue / contact [support@massive.com](mailto:support@massive.com) if you have questions. + +## Prerequisites -`pip install polygon-api-client` +Before installing the Massive Python client, ensure your environment has Python 3.9 or higher. + +## Install -Requires Python >= 3.8. +Please use pip to install or update to the latest stable version. +``` +pip install -U massive +``` ## Getting started -See the [Getting Started](https://polygon-api-client.readthedocs.io/en/latest/Getting-Started.html) -section in our docs or view the [examples](./examples) directory. + +To get started, please see the [Getting Started](https://massive.com/docs/stocks/getting-started) section in our docs, view the [examples](./examples) directory for code snippets. + +The free tier of our API comes with usage limitations, potentially leading to rate limit errors if these are exceeded. For uninterrupted access and to support larger data requirements, we recommend reviewing our [subscription plans](https://massive.com/pricing), which are tailored for a wide range of needs from development to high-demand applications. Refer to our pricing page for detailed information on limits and features to ensure a seamless experience, especially for real-time data processing. + +## REST API Client +Import the RESTClient. +```python +from massive import RESTClient +``` +Create a new client with your [API key](https://massive.com/dashboard/api-keys) +```python +client = RESTClient(api_key="") +``` +### Using the Client +Request data using client methods. +```python +ticker = "AAPL" + +# List Aggregates (Bars) +aggs = [] +for a in client.list_aggs(ticker=ticker, multiplier=1, timespan="minute", from_="2023-01-01", to="2023-06-13", limit=50000): + aggs.append(a) + +print(aggs) + +# Get Last Trade +trade = client.get_last_trade(ticker=ticker) +print(trade) + +# List Trades +trades = client.list_trades(ticker=ticker, timestamp="2022-01-04") +for trade in trades: + print(trade) + +# Get Last Quote +quote = client.get_last_quote(ticker=ticker) +print(quote) + +# List Quotes +quotes = client.list_quotes(ticker=ticker, timestamp="2022-01-04") +for quote in quotes: + print(quote) +``` + +### Pagination Behavior + +By default, the client paginates results for endpoints like `list_trades` and `list_quotes` behind the scenes for you. Understanding how pagination interacts with the `limit` parameter is key. + +#### Default (Pagination Enabled) + +Pagination is enabled by default (`pagination=True`): + +* `limit` controls the page size, not the total number of results. +* The client automatically fetches all pages, yielding results until none remain. + +Here's an example: + +```python +client = RESTClient(api_key="") +trades = [t for t in client.list_trades(ticker="TSLA", limit=100)] +``` + +This fetches all TSLA trades, 100 per page. + +#### Disabling Pagination + +To return a fixed number of results and stop, disable pagination: + +```python +client = RESTClient(api_key="", pagination=False) +trades = [t for t in client.list_trades(ticker="TSLA", limit=100)] +``` + +This returns at most 100 total trades, no additional pages. + +### Performance Tip + +If you're fetching large datasets, always use the maximum supported limit for the API endpoint. This reduces the number of API calls and improves overall performance. + +### Additional Filter Parameters + +Many of the APIs in this client library support the use of additional filter parameters to refine your queries. Please refer to the specific API documentation for details on which filter parameters are supported for each endpoint. These filters can be applied using the following operators: + +- `.gt`: greater than +- `.gte`: greater than or equal to +- `.lt`: less than +- `.lte`: less than or equal to + +Here's a sample code snippet that demonstrates how to use these filter parameters when requesting an Options Chain using the `list_snapshot_options_chain` method. In this example, the filter parameters ensure that the returned options chain data will only include options with an expiration date that is greater than or equal to "2024-03-16" and a strike price that falls between 29 and 30 (inclusive). + +```python +options_chain = [] +for o in client.list_snapshot_options_chain( + "HCP", + params={ + "expiration_date.gte": "2024-03-16", + "strike_price.gte": 29, + "strike_price.lte": 30, + }, +): + options_chain.append(o) + +print(options_chain) +print(len(options_chain)) +``` + +Also, please refer to the API documentation to get a full understanding of how the API works and the supported arguments. All required arguments are annotated with red asterisks " * " and argument examples are set. + +## Debugging with RESTClient + +Sometimes you may find it useful to see the actual request and response details while working with the API. The `RESTClient` allows for this through its `trace=True` option. + +### How to Enable Debug Mode + +You can activate the debug mode as follows: + +```python +client = RESTClient(trace=True, verbose=True) +``` + +### What Does Debug Mode Do? + +When debug mode is enabled, the client will print out useful debugging information for each API request. You need to enable `verbose=True` too so that you log the trace or already have your own logger configured. This includes: the request URL, the headers sent in the request, and the headers received in the response. + +### Example Output + +For instance, if you made a request for `TSLA` data for the date `2023-08-01`, you would see debug output similar to the following: + +``` +Request URL: https://api.massive.com/v2/aggs/ticker/TSLA/range/1/minute/2023-08-01/2023-08-01?limit=50000 +Request Headers: {'Authorization': 'Bearer REDACTED', 'Accept-Encoding': 'gzip', 'User-Agent': 'Massive.com PythonClient/1.12.4'} +Response Headers: {'Server': 'nginx/1.19.2', 'Date': 'Tue, 05 Sep 2023 23:07:02 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Content-Encoding': 'gzip', 'Vary': 'Accept-Encoding', 'X-Request-Id': '727c82feed3790b44084c3f4cae1d7d4', 'Strict-Transport-Security': 'max-age=15724800; includeSubDomains'} +``` + +This can be an invaluable tool for debugging issues or understanding how the client interacts with the API. + +## WebSocket Client + +Import classes +```python +from massive import WebSocketClient +from massive.websocket.models import WebSocketMessage +from typing import List +``` +### Using the client +Create a new client with your [API key](https://massive.com/dashboard/api-keys) and subscription options. +```python +# Note: Multiple subscriptions can be added to the array +# For example, if you want to subscribe to AAPL and META, +# you can do so by adding "T.META" to the subscriptions array. ["T.AAPL", "T.META"] +# If you want to subscribe to all tickers, place an asterisk in place of the symbol. ["T.*"] +ws = WebSocketClient(api_key=, subscriptions=["T.AAPL"]) +``` +Create a handler function and run the WebSocket. +```python +def handle_msg(msg: List[WebSocketMessage]): + for m in msg: + print(m) + +ws.run(handle_msg=handle_msg) +``` +Check out more detailed examples [here](https://github.com/massive-com/client-python/tree/master/examples/websocket). ## Contributing If you found a bug or have an idea for a new feature, please first discuss it with us by -[submitting a new issue](https://github.com/polygon-io/client-python/issues/new/choose). +[submitting a new issue](https://github.com/massive-com/client-python/issues/new/choose). +We will respond to issues within at most 3 weeks. We're also open to volunteers if you want to submit a PR for any open issues but please discuss it with us beforehand. PRs that aren't linked to an existing issue or -discussed with us ahead of time will generally be declined. If you have more general -feedback or want to discuss using this client with other users, feel free to reach out -on our [Slack channel](https://polygon-io.slack.com/archives/C03FRFN7UF3). +discussed with us ahead of time will generally be declined. + +### Development + +If you plan to contribute by developing new features then you will need to install certain dependencies. + +#### Poetry + +Poetry is a packaging and dependency manager for Python. +Installation instructions can be found [on their website](https://python-poetry.org/docs/#installation). +Once installed run `poetry install` to install the required dependencies. This step should be run after incorporating new upstream changes. + +#### Makefile + +Our Makefile has the common operations needed when developing on this repo. Running tests and linting can both be +run through our Makefile. Just run `make help` to see the list of available commands. + +If you're using `pyenv` to manage active Python versions then you might need to launch a Poetry shell before running +Make commands in order to actually use your chosen Python version. This is because Poetry uses the system Python version +by default. + +```shell +poetry shell # start shell +poetry install # install deps + +make test # run your make commands +``` ## Release planning This client will attempt to follow the release cadence of our API. diff --git a/docs/requirements.txt b/docs/requirements.txt index b72deef5..e8c712fd 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1,2 @@ -sphinx-autodoc-typehints~=1.18.1 +sphinx-autodoc-typehints~=1.19.2 websockets~=10.3 diff --git a/docs/source/Aggs.rst b/docs/source/Aggs.rst index 8493cdcb..b8e3fcc8 100644 --- a/docs/source/Aggs.rst +++ b/docs/source/Aggs.rst @@ -3,6 +3,17 @@ Aggs ========== +=========== +List aggs +=========== + +- `Stocks aggs`_ +- `Options aggs`_ +- `Forex aggs`_ +- `Crypto aggs`_ + +.. automethod:: massive.RESTClient.list_aggs + =========== Get aggs =========== @@ -12,7 +23,7 @@ Get aggs - `Forex aggs`_ - `Crypto aggs`_ -.. automethod:: polygon.RESTClient.get_aggs +.. automethod:: massive.RESTClient.get_aggs ============================ Get grouped daily aggs @@ -22,7 +33,7 @@ Get grouped daily aggs - `Forex grouped daily aggs`_ - `Crypto grouped daily aggs`_ -.. automethod:: polygon.RESTClient.get_grouped_daily_aggs +.. automethod:: massive.RESTClient.get_grouped_daily_aggs ============================ Get daily open close agg @@ -32,7 +43,7 @@ Get daily open close agg - `Options daily open/close agg`_ - `Crypto daily open/close agg`_ -.. automethod:: polygon.RESTClient.get_daily_open_close_agg +.. automethod:: massive.RESTClient.get_daily_open_close_agg ============================ Get previous close agg @@ -43,19 +54,19 @@ Get previous close agg - `Forex previous close agg`_ - `Crypto previous close agg`_ -.. automethod:: polygon.RESTClient.get_previous_close_agg - -.. _Stocks aggs: https://polygon.io/docs/stocks/get_v2_aggs_ticker__stocksticker__range__multiplier___timespan___from___to -.. _Options aggs: https://polygon.io/docs/options/get_v2_aggs_ticker__optionsticker__range__multiplier___timespan___from___to -.. _Forex aggs: https://polygon.io/docs/forex/get_v2_aggs_ticker__forexticker__range__multiplier___timespan___from___to -.. _Crypto aggs: https://polygon.io/docs/crypto/get_v2_aggs_ticker__cryptoticker__range__multiplier___timespan___from___to -.. _Stocks grouped daily aggs: https://polygon.io/docs/stocks/get_v2_aggs_grouped_locale_us_market_stocks__date -.. _Forex grouped daily aggs: https://polygon.io/docs/forex/get_v2_aggs_grouped_locale_global_market_fx__date -.. _Crypto grouped daily aggs: https://polygon.io/docs/crypto/get_v2_aggs_grouped_locale_global_market_crypto__date -.. _Stocks daily open/close agg: https://polygon.io/docs/stocks/get_v1_open-close__stocksticker___date -.. _Options daily open/close agg: https://polygon.io/docs/options/get_v1_open-close__optionsticker___date -.. _Crypto daily open/close agg: https://polygon.io/docs/crypto/get_v1_open-close_crypto__from___to___date -.. _Stocks previous close agg: https://polygon.io/docs/stocks/get_v2_aggs_ticker__stocksticker__prev -.. _Options previous close agg: https://polygon.io/docs/options/get_v2_aggs_ticker__optionsticker__prev -.. _Forex previous close agg: https://polygon.io/docs/forex/get_v2_aggs_ticker__forexticker__prev -.. _Crypto previous close agg: https://polygon.io/docs/crypto/get_v2_aggs_ticker__cryptoticker__prev \ No newline at end of file +.. automethod:: massive.RESTClient.get_previous_close_agg + +.. _Stocks aggs: https://massive.com/docs/stocks/get_v2_aggs_ticker__stocksticker__range__multiplier___timespan___from___to +.. _Options aggs: https://massive.com/docs/options/get_v2_aggs_ticker__optionsticker__range__multiplier___timespan___from___to +.. _Forex aggs: https://massive.com/docs/forex/get_v2_aggs_ticker__forexticker__range__multiplier___timespan___from___to +.. _Crypto aggs: https://massive.com/docs/crypto/get_v2_aggs_ticker__cryptoticker__range__multiplier___timespan___from___to +.. _Stocks grouped daily aggs: https://massive.com/docs/stocks/get_v2_aggs_grouped_locale_us_market_stocks__date +.. _Forex grouped daily aggs: https://massive.com/docs/forex/get_v2_aggs_grouped_locale_global_market_fx__date +.. _Crypto grouped daily aggs: https://massive.com/docs/crypto/get_v2_aggs_grouped_locale_global_market_crypto__date +.. _Stocks daily open/close agg: https://massive.com/docs/stocks/get_v1_open-close__stocksticker___date +.. _Options daily open/close agg: https://massive.com/docs/options/get_v1_open-close__optionsticker___date +.. _Crypto daily open/close agg: https://massive.com/docs/crypto/get_v1_open-close_crypto__from___to___date +.. _Stocks previous close agg: https://massive.com/docs/stocks/get_v2_aggs_ticker__stocksticker__prev +.. _Options previous close agg: https://massive.com/docs/options/get_v2_aggs_ticker__optionsticker__prev +.. _Forex previous close agg: https://massive.com/docs/forex/get_v2_aggs_ticker__forexticker__prev +.. _Crypto previous close agg: https://massive.com/docs/crypto/get_v2_aggs_ticker__cryptoticker__prev \ No newline at end of file diff --git a/docs/source/Contracts.rst b/docs/source/Contracts.rst index 9278168f..c58c11e5 100644 --- a/docs/source/Contracts.rst +++ b/docs/source/Contracts.rst @@ -9,7 +9,7 @@ Get option contract - `Options Contract`_ -.. automethod:: polygon.RESTClient.get_options_contract +.. automethod:: massive.RESTClient.get_options_contract ================================= List Options Contracts @@ -17,8 +17,8 @@ List Options Contracts - `Options Contracts`_ -.. automethod:: polygon.RESTClient.list_options_contracts +.. automethod:: massive.RESTClient.list_options_contracts -.. _Options Contract: https://polygon.io/docs/options/get_v3_reference_options_contracts__options_ticker -.. _Options Contracts: https://polygon.io/docs/options/get_v3_reference_options_contracts \ No newline at end of file +.. _Options Contract: https://massive.com/docs/options/get_v3_reference_options_contracts__options_ticker +.. _Options Contracts: https://massive.com/docs/options/get_v3_reference_options_contracts \ No newline at end of file diff --git a/docs/source/Enums.rst b/docs/source/Enums.rst index 8f2233a4..47ca8b47 100644 --- a/docs/source/Enums.rst +++ b/docs/source/Enums.rst @@ -6,97 +6,97 @@ Enums ============================================================== Sort ============================================================== -.. autoclass:: polygon.rest.models.Sort +.. autoclass:: massive.rest.models.Sort :members: :undoc-members: ============================================================== Order ============================================================== -.. autoclass:: polygon.rest.models.Order +.. autoclass:: massive.rest.models.Order :members: :undoc-members: ============================================================== Locale ============================================================== -.. autoclass:: polygon.rest.models.Locale +.. autoclass:: massive.rest.models.Locale :members: :undoc-members: ============================================================== Market ============================================================== -.. autoclass:: polygon.rest.models.Market +.. autoclass:: massive.rest.models.Market :members: :undoc-members: ============================================================== AssetClass ============================================================== -.. autoclass:: polygon.rest.models.AssetClass +.. autoclass:: massive.rest.models.AssetClass :members: :undoc-members: ============================================================== DividendType ============================================================== -.. autoclass:: polygon.rest.models.DividendType +.. autoclass:: massive.rest.models.DividendType :members: :undoc-members: ============================================================== Frequency ============================================================== -.. autoclass:: polygon.rest.models.Frequency +.. autoclass:: massive.rest.models.Frequency :members: :undoc-members: ============================================================== DataType ============================================================== -.. autoclass:: polygon.rest.models.DataType +.. autoclass:: massive.rest.models.DataType :members: :undoc-members: ============================================================== SIP ============================================================== -.. autoclass:: polygon.rest.models.SIP +.. autoclass:: massive.rest.models.SIP :members: :undoc-members: ============================================================== ExchangeType ============================================================== -.. autoclass:: polygon.rest.models.ExchangeType +.. autoclass:: massive.rest.models.ExchangeType :members: :undoc-members: ============================================================== Direction ============================================================== -.. autoclass:: polygon.rest.models.Direction +.. autoclass:: massive.rest.models.Direction :members: :undoc-members: ============================================================== SnapshotMarketType ============================================================== -.. autoclass:: polygon.rest.models.SnapshotMarketType +.. autoclass:: massive.rest.models.SnapshotMarketType :members: :undoc-members: ============================================================== Timeframe ============================================================== -.. autoclass:: polygon.rest.models.Timeframe +.. autoclass:: massive.rest.models.Timeframe :members: :undoc-members: ============================================================== Precision ============================================================== -.. autoclass:: polygon.rest.models.Precision +.. autoclass:: massive.rest.models.Precision :members: :undoc-members: diff --git a/docs/source/Exceptions.rst b/docs/source/Exceptions.rst index a57f633b..6a9cc402 100644 --- a/docs/source/Exceptions.rst +++ b/docs/source/Exceptions.rst @@ -6,21 +6,14 @@ Exceptions ============================================================== AuthError ============================================================== -.. autoclass:: polygon.exceptions.AuthError +.. autoclass:: massive.exceptions.AuthError :members: :undoc-members: ============================================================== BadResponse ============================================================== -.. autoclass:: polygon.exceptions.BadResponse - :members: - :undoc-members: - -============================================================== -NoResultsError -============================================================== -.. autoclass:: polygon.exceptions.NoResultsError +.. autoclass:: massive.exceptions.BadResponse :members: :undoc-members: diff --git a/docs/source/Getting-Started.rst b/docs/source/Getting-Started.rst index 15b9321e..120b4b25 100644 --- a/docs/source/Getting-Started.rst +++ b/docs/source/Getting-Started.rst @@ -2,26 +2,26 @@ Getting Started =============== Requirements: - - `Polygon.io API key `_ + - `Massive.com API key `_ - `Python >= 3.8 `_ - - `This package `_ + - `This package `_ .. code-block:: shell - pip install polygon-api-client + pip install massive-api-client HTTP client usage ----------------- -.. automethod:: polygon.RESTClient.__init__ +.. automethod:: massive.RESTClient.__init__ -You can pass your API key via the environment variable :code:`POLYGON_API_KEY` or as the first parameter to the :code:`RESTClient` constructor: +You can pass your API key via the environment variable :code:`MASSIVE_API_KEY` or as the first parameter to the :code:`RESTClient` constructor: .. code-block:: python - from polygon import RESTClient + from massive import RESTClient - client = RESTClient() # POLYGON_API_KEY is used + client = RESTClient() # MASSIVE_API_KEY is used client = RESTClient("api_key") # api_key is used For non-paginated endpoints call :code:`get_*`: @@ -41,7 +41,7 @@ For endpoints that have a set of parameters you can use the provided :doc:`enums .. code-block:: python - from polygon.rest.models import Sort + from massive.rest.models import Sort client.list_trades(..., sort=Sort.ASC) @@ -53,10 +53,14 @@ If it is a paginated :code:`list_*` response it's up to you to handle the "next_ .. literalinclude:: ../../examples/rest/raw-list.py +To provide your own JSON processing library (exposing loads/dumps functions) pass :code:`custom_json=my_module`: + +.. literalinclude:: ../../examples/websocket/custom-json-get.py + WebSocket client usage ---------------------- -.. automethod:: polygon.WebSocketClient.__init__ +.. automethod:: massive.WebSocketClient.__init__ The simplest way to use the websocket client is to just provide a callback: @@ -80,3 +84,6 @@ To handle raw string or byte messages yourself pass :code:`raw=True`: .. literalinclude:: ../../examples/websocket/raw.py +To provide your own JSON processing library (exposing loads/dumps functions) pass :code:`custom_json=my_module`: + +.. literalinclude:: ../../examples/websocket/custom-json.py diff --git a/docs/source/Models.rst b/docs/source/Models.rst index 1b41c235..393c8d74 100644 --- a/docs/source/Models.rst +++ b/docs/source/Models.rst @@ -3,187 +3,217 @@ Models ============================================================== +============================================================== +Universal Snapshot +============================================================== +.. autoclass:: massive.rest.models.UniversalSnapshot + +============================================================== +Universal Snapshot Session +============================================================== +.. autoclass:: massive.rest.models.UniversalSnapshotSession + +============================================================== +Universal Snapshot Last Quote +============================================================== +.. autoclass:: massive.rest.models.UniversalSnapshotLastQuote + +============================================================== +Universal Snapshot Last Trade +============================================================== +.. autoclass:: massive.rest.models.UniversalSnapshotLastTrade + +============================================================== +Universal Snapshot Details +============================================================== +.. autoclass:: massive.rest.models.UniversalSnapshotDetails + +============================================================== +Universal Snapshot Underlying Asset +============================================================== +.. autoclass:: massive.rest.models.UniversalSnapshotUnderlyingAsset + ============================================================== Agg ============================================================== -.. autoclass:: polygon.rest.models.Agg +.. autoclass:: massive.rest.models.Agg ============================================================== Grouped Daily Agg ============================================================== -.. autoclass:: polygon.rest.models.GroupedDailyAgg +.. autoclass:: massive.rest.models.GroupedDailyAgg ============================================================== Daily Open Close Agg ============================================================== -.. autoclass:: polygon.rest.models.DailyOpenCloseAgg +.. autoclass:: massive.rest.models.DailyOpenCloseAgg ============================================================== Previous Close Agg ============================================================== -.. autoclass:: polygon.rest.models.PreviousCloseAgg +.. autoclass:: massive.rest.models.PreviousCloseAgg ============================================================== Trade ============================================================== -.. autoclass:: polygon.rest.models.Trade +.. autoclass:: massive.rest.models.Trade ============================================================== Last Trade ============================================================== -.. autoclass:: polygon.rest.models.LastTrade +.. autoclass:: massive.rest.models.LastTrade ============================================================== Crypto Trade ============================================================== -.. autoclass:: polygon.rest.models.CryptoTrade +.. autoclass:: massive.rest.models.CryptoTrade ============================================================== Quote ============================================================== -.. autoclass:: polygon.rest.models.Quote +.. autoclass:: massive.rest.models.Quote ============================================================== Last Quote ============================================================== -.. autoclass:: polygon.rest.models.LastQuote +.. autoclass:: massive.rest.models.LastQuote ============================================================== Snapshot Min ============================================================== -.. autoclass:: polygon.rest.models.MinuteSnapshot +.. autoclass:: massive.rest.models.MinuteSnapshot ============================================================== Snapshot ============================================================== -.. autoclass:: polygon.rest.models.TickerSnapshot +.. autoclass:: massive.rest.models.TickerSnapshot ============================================================== Day Option Contract Snapshot ============================================================== -.. autoclass:: polygon.rest.models.DayOptionContractSnapshot +.. autoclass:: massive.rest.models.DayOptionContractSnapshot ============================================================== Option Details ============================================================== -.. autoclass:: polygon.rest.models.OptionDetails +.. autoclass:: massive.rest.models.OptionDetails ============================================================== Option Greeks ============================================================== -.. autoclass:: polygon.rest.models.Greeks +.. autoclass:: massive.rest.models.Greeks ============================================================== Underlying Asset ============================================================== -.. autoclass:: polygon.rest.models.UnderlyingAsset +.. autoclass:: massive.rest.models.UnderlyingAsset ============================================================== Option Contract Snapshot ============================================================== -.. autoclass:: polygon.rest.models.OptionContractSnapshot +.. autoclass:: massive.rest.models.OptionContractSnapshot ============================================================== Order Book Quote ============================================================== -.. autoclass:: polygon.rest.models.OrderBookQuote +.. autoclass:: massive.rest.models.OrderBookQuote ============================================================== Snapshot Ticker Full Book ============================================================== -.. autoclass:: polygon.rest.models.SnapshotTickerFullBook +.. autoclass:: massive.rest.models.SnapshotTickerFullBook ============================================================== Ticker ============================================================== -.. autoclass:: polygon.rest.models.Ticker +.. autoclass:: massive.rest.models.Ticker ============================================================== Address ============================================================== -.. autoclass:: polygon.rest.models.CompanyAddress +.. autoclass:: massive.rest.models.CompanyAddress ============================================================== Branding ============================================================== -.. autoclass:: polygon.rest.models.Branding +.. autoclass:: massive.rest.models.Branding ============================================================== Publisher ============================================================== -.. autoclass:: polygon.rest.models.Publisher +.. autoclass:: massive.rest.models.Publisher ============================================================== Ticker Details ============================================================== -.. autoclass:: polygon.rest.models.TickerDetails +.. autoclass:: massive.rest.models.TickerDetails ============================================================== Ticker News ============================================================== -.. autoclass:: polygon.rest.models.TickerNews +.. autoclass:: massive.rest.models.TickerNews ============================================================== Ticker Types ============================================================== -.. autoclass:: polygon.rest.models.TickerTypes +.. autoclass:: massive.rest.models.TickerTypes ============================================================== Market Holiday ============================================================== -.. autoclass:: polygon.rest.models.MarketHoliday +.. autoclass:: massive.rest.models.MarketHoliday ============================================================== Market Currencies ============================================================== -.. autoclass:: polygon.rest.models.MarketCurrencies +.. autoclass:: massive.rest.models.MarketCurrencies ============================================================== Market Exchanges ============================================================== -.. autoclass:: polygon.rest.models.MarketExchanges +.. autoclass:: massive.rest.models.MarketExchanges ============================================================== Market Status ============================================================== -.. autoclass:: polygon.rest.models.MarketStatus +.. autoclass:: massive.rest.models.MarketStatus ============================================================== Split ============================================================== -.. autoclass:: polygon.rest.models.Split +.. autoclass:: massive.rest.models.Split ============================================================== Dividend ============================================================== -.. autoclass:: polygon.rest.models.Dividend +.. autoclass:: massive.rest.models.Dividend ============================================================== Sip Mapping ============================================================== -.. autoclass:: polygon.rest.models.SipMapping +.. autoclass:: massive.rest.models.SipMapping ============================================================== Consolidated ============================================================== -.. autoclass:: polygon.rest.models.Consolidated +.. autoclass:: massive.rest.models.Consolidated ============================================================== Market Center ============================================================== -.. autoclass:: polygon.rest.models.MarketCenter +.. autoclass:: massive.rest.models.MarketCenter ============================================================== Update Rules ============================================================== -.. autoclass:: polygon.rest.models.UpdateRules +.. autoclass:: massive.rest.models.UpdateRules ============================================================== Condition ============================================================== -.. autoclass:: polygon.rest.models.Condition +.. autoclass:: massive.rest.models.Condition ============================================================== Exchange ============================================================== -.. autoclass:: polygon.rest.models.Exchange +.. autoclass:: massive.rest.models.Exchange diff --git a/docs/source/Quotes.rst b/docs/source/Quotes.rst index 2ef22574..92fbf128 100644 --- a/docs/source/Quotes.rst +++ b/docs/source/Quotes.rst @@ -11,7 +11,7 @@ List quotes - `Options quotes`_ - `Forex quotes`_ -.. automethod:: polygon.RESTClient.list_quotes +.. automethod:: massive.RESTClient.list_quotes ================================= Get last quote @@ -19,7 +19,7 @@ Get last quote - `Stocks last quote`_ -.. automethod:: polygon.RESTClient.get_last_quote +.. automethod:: massive.RESTClient.get_last_quote ================================= Get last forex quote @@ -27,7 +27,7 @@ Get last forex quote - `Forex last quote for a currency pair`_ -.. automethod:: polygon.RESTClient.get_last_forex_quote +.. automethod:: massive.RESTClient.get_last_forex_quote ================================= Get real-time currency conversion @@ -35,11 +35,11 @@ Get real-time currency conversion - `Forex real-time currency conversion`_ -.. automethod:: polygon.RESTClient.get_real_time_currency_conversion +.. automethod:: massive.RESTClient.get_real_time_currency_conversion -.. _Stocks quotes: https://polygon.io/docs/stocks/get_v3_quotes__stockticker -.. _Options quotes: https://polygon.io/docs/options/get_v3_quotes__optionsticker -.. _Forex quotes: https://polygon.io/docs/forex/get_v3_quotes__fxticker -.. _Stocks last quote: https://polygon.io/docs/stocks/get_v2_last_nbbo__stocksticker -.. _Forex last quote for a currency pair: https://polygon.io/docs/forex/get_v1_last_quote_currencies__from___to -.. _Forex real-time currency conversion: https://polygon.io/docs/forex/get_v1_conversion__from___to +.. _Stocks quotes: https://massive.com/docs/stocks/get_v3_quotes__stockticker +.. _Options quotes: https://massive.com/docs/options/get_v3_quotes__optionsticker +.. _Forex quotes: https://massive.com/docs/forex/get_v3_quotes__fxticker +.. _Stocks last quote: https://massive.com/docs/stocks/get_v2_last_nbbo__stocksticker +.. _Forex last quote for a currency pair: https://massive.com/docs/forex/get_v1_last_quote_currencies__from___to +.. _Forex real-time currency conversion: https://massive.com/docs/forex/get_v1_conversion__from___to diff --git a/docs/source/Reference.rst b/docs/source/Reference.rst index 3b7bd3d3..a497ece4 100644 --- a/docs/source/Reference.rst +++ b/docs/source/Reference.rst @@ -12,7 +12,7 @@ Get market holidays - `Forex market holidays`_ - `Crypto market holidays`_ -.. automethod:: polygon.RESTClient.get_market_holidays +.. automethod:: massive.RESTClient.get_market_holidays ==================== Get market status @@ -23,7 +23,7 @@ Get market status - `Forex market status`_ - `Crypto market status`_ -.. automethod:: polygon.RESTClient.get_market_status +.. automethod:: massive.RESTClient.get_market_status ==================== List tickers @@ -34,7 +34,7 @@ List tickers - `Forex tickers`_ - `Crypto tickers`_ -.. automethod:: polygon.RESTClient.list_tickers +.. automethod:: massive.RESTClient.list_tickers ==================== Get ticker details @@ -43,7 +43,7 @@ Get ticker details - `Stocks ticker details`_ - `Options ticker details`_ -.. automethod:: polygon.RESTClient.get_ticker_details +.. automethod:: massive.RESTClient.get_ticker_details ==================== List ticker news @@ -52,7 +52,7 @@ List ticker news - `Stocks ticker news`_ - `Options ticker news`_ -.. automethod:: polygon.RESTClient.list_ticker_news +.. automethod:: massive.RESTClient.list_ticker_news ==================== Get ticker types @@ -61,7 +61,7 @@ Get ticker types - `Stocks ticker types`_ - `Options ticker types`_ -.. automethod:: polygon.RESTClient.get_ticker_types +.. automethod:: massive.RESTClient.get_ticker_types ==================== List splits @@ -69,7 +69,7 @@ List splits - `Stocks splits`_ -.. automethod:: polygon.RESTClient.list_splits +.. automethod:: massive.RESTClient.list_splits ==================== List dividends @@ -77,7 +77,7 @@ List dividends - `Stocks dividends`_ -.. automethod:: polygon.RESTClient.list_dividends +.. automethod:: massive.RESTClient.list_dividends ==================== List conditions @@ -88,7 +88,7 @@ List conditions - `Forex conditions`_ - `Crypto conditions`_ -.. automethod:: polygon.RESTClient.list_conditions +.. automethod:: massive.RESTClient.list_conditions ==================== Get exchanges @@ -99,33 +99,33 @@ Get exchanges - `Forex exchanges`_ - `Crypto exchanges`_ -.. automethod:: polygon.RESTClient.get_exchanges - -.. _Stocks market holidays: https://polygon.io/docs/stocks/get_v1_marketstatus_upcoming -.. _Options market holidays: https://polygon.io/docs/options/get_v1_marketstatus_upcoming -.. _Forex market holidays: https://polygon.io/docs/forex/get_v1_marketstatus_upcoming -.. _Crypto market holidays: https://polygon.io/docs/crypto/get_v1_marketstatus_upcoming -.. _Stocks market status: https://polygon.io/docs/stocks/get_v1_marketstatus_now -.. _Options market status: https://polygon.io/docs/options/get_v1_marketstatus_now -.. _Forex market status: https://polygon.io/docs/forex/get_v1_marketstatus_now -.. _Crypto market status: https://polygon.io/docs/crypto/get_v1_marketstatus_now -.. _Stocks tickers: https://polygon.io/docs/stocks/get_v3_reference_tickers -.. _Options tickers: https://polygon.io/docs/options/get_v3_reference_tickers -.. _Forex tickers: https://polygon.io/docs/forex/get_v3_reference_tickers -.. _Crypto tickers: https://polygon.io/docs/crypto/get_v3_reference_tickers -.. _Stocks ticker details: https://polygon.io/docs/stocks/get_v3_reference_tickers__ticker -.. _Options ticker details: https://polygon.io/docs/options/get_v3_reference_tickers__ticker -.. _Stocks ticker news: https://polygon.io/docs/stocks/get_v2_reference_news -.. _Options ticker news: https://polygon.io/docs/options/get_v2_reference_news -.. _Stocks ticker types: https://polygon.io/docs/stocks/get_v3_reference_tickers_types -.. _Options ticker types: https://polygon.io/docs/options/get_v3_reference_tickers_types -.. _Stocks splits: https://polygon.io/docs/stocks/get_v3_reference_splits -.. _Stocks dividends: https://polygon.io/docs/stocks/get_v3_reference_dividends -.. _Stocks conditions: https://polygon.io/docs/stocks/get_v3_reference_conditions -.. _Options conditions: https://polygon.io/docs/options/get_v3_reference_conditions -.. _Forex conditions: https://polygon.io/docs/forex/get_v3_reference_conditions -.. _Crypto conditions: https://polygon.io/docs/crypto/get_v3_reference_conditions -.. _Stocks exchanges: https://polygon.io/docs/stocks/get_v3_reference_exchanges -.. _Options exchanges: https://polygon.io/docs/options/get_v3_reference_exchanges -.. _Forex exchanges: https://polygon.io/docs/forex/get_v3_reference_exchanges -.. _Crypto exchanges: https://polygon.io/docs/crypto/get_v3_reference_exchanges \ No newline at end of file +.. automethod:: massive.RESTClient.get_exchanges + +.. _Stocks market holidays: https://massive.com/docs/stocks/get_v1_marketstatus_upcoming +.. _Options market holidays: https://massive.com/docs/options/get_v1_marketstatus_upcoming +.. _Forex market holidays: https://massive.com/docs/forex/get_v1_marketstatus_upcoming +.. _Crypto market holidays: https://massive.com/docs/crypto/get_v1_marketstatus_upcoming +.. _Stocks market status: https://massive.com/docs/stocks/get_v1_marketstatus_now +.. _Options market status: https://massive.com/docs/options/get_v1_marketstatus_now +.. _Forex market status: https://massive.com/docs/forex/get_v1_marketstatus_now +.. _Crypto market status: https://massive.com/docs/crypto/get_v1_marketstatus_now +.. _Stocks tickers: https://massive.com/docs/stocks/get_v3_reference_tickers +.. _Options tickers: https://massive.com/docs/options/get_v3_reference_tickers +.. _Forex tickers: https://massive.com/docs/forex/get_v3_reference_tickers +.. _Crypto tickers: https://massive.com/docs/crypto/get_v3_reference_tickers +.. _Stocks ticker details: https://massive.com/docs/stocks/get_v3_reference_tickers__ticker +.. _Options ticker details: https://massive.com/docs/options/get_v3_reference_tickers__ticker +.. _Stocks ticker news: https://massive.com/docs/stocks/get_v2_reference_news +.. _Options ticker news: https://massive.com/docs/options/get_v2_reference_news +.. _Stocks ticker types: https://massive.com/docs/stocks/get_v3_reference_tickers_types +.. _Options ticker types: https://massive.com/docs/options/get_v3_reference_tickers_types +.. _Stocks splits: https://massive.com/docs/stocks/get_v3_reference_splits +.. _Stocks dividends: https://massive.com/docs/stocks/get_v3_reference_dividends +.. _Stocks conditions: https://massive.com/docs/stocks/get_v3_reference_conditions +.. _Options conditions: https://massive.com/docs/options/get_v3_reference_conditions +.. _Forex conditions: https://massive.com/docs/forex/get_v3_reference_conditions +.. _Crypto conditions: https://massive.com/docs/crypto/get_v3_reference_conditions +.. _Stocks exchanges: https://massive.com/docs/stocks/get_v3_reference_exchanges +.. _Options exchanges: https://massive.com/docs/options/get_v3_reference_exchanges +.. _Forex exchanges: https://massive.com/docs/forex/get_v3_reference_exchanges +.. _Crypto exchanges: https://massive.com/docs/crypto/get_v3_reference_exchanges \ No newline at end of file diff --git a/docs/source/Snapshot.rst b/docs/source/Snapshot.rst index 0214cc9d..7268e209 100644 --- a/docs/source/Snapshot.rst +++ b/docs/source/Snapshot.rst @@ -4,14 +4,25 @@ Snapshot ================================= ================================= -Get all snapshots +Get snapshots for all asset types ================================= - `Stocks snapshot all tickers`_ +- `Options snapshot all tickers`_ - `Forex snapshot all tickers`_ - `Crypto snapshot all tickers`_ -.. automethod:: polygon.RESTClient.get_snapshot_all +.. automethod:: massive.RESTClient.list_universal_snapshots + +================================= +Get all snapshots +================================= + +- `Stocks snapshot all tickers (deprecated)`_ +- `Forex snapshot all tickers (deprecated)`_ +- `Crypto snapshot all tickers (deprecated)`_ + +.. automethod:: massive.RESTClient.get_snapshot_all ================================= Get gainers/losers snapshot @@ -21,7 +32,7 @@ Get gainers/losers snapshot - `Forex snapshot gainers/losers`_ - `Crypto snapshot gainers/losers`_ -.. automethod:: polygon.RESTClient.get_snapshot_direction +.. automethod:: massive.RESTClient.get_snapshot_direction ================================= Get ticker snapshot @@ -31,7 +42,7 @@ Get ticker snapshot - `Forex snapshot ticker`_ - `Crypto snapshot ticker`_ -.. automethod:: polygon.RESTClient.get_snapshot_ticker +.. automethod:: massive.RESTClient.get_snapshot_ticker ================================= Get options snapshot @@ -39,7 +50,7 @@ Get options snapshot - `Options snapshot option contract`_ -.. automethod:: polygon.RESTClient.get_snapshot_option +.. automethod:: massive.RESTClient.get_snapshot_option ================================= Get crypto L2 book snapshot @@ -47,16 +58,21 @@ Get crypto L2 book snapshot - `Crypto snapshot ticker full book (L2)`_ -.. automethod:: polygon.RESTClient.get_snapshot_crypto_book - -.. _Stocks snapshot all tickers: https://polygon.io/docs/stocks/get_v2_snapshot_locale_us_markets_stocks_tickers -.. _Forex snapshot all tickers: https://polygon.io/docs/forex/get_v2_snapshot_locale_global_markets_forex_tickers -.. _Crypto snapshot all tickers: https://polygon.io/docs/crypto/get_v2_snapshot_locale_global_markets_crypto_tickers -.. _Stocks snapshot gainers/losers: https://polygon.io/docs/stocks/get_v2_snapshot_locale_us_markets_stocks__direction -.. _Forex snapshot gainers/losers: https://polygon.io/docs/forex/get_v2_snapshot_locale_global_markets_forex__direction -.. _Crypto snapshot gainers/losers: https://polygon.io/docs/crypto/get_v2_snapshot_locale_global_markets_crypto__direction -.. _Stocks snapshot ticker: https://polygon.io/docs/stocks/get_v2_snapshot_locale_us_markets_stocks_tickers__stocksticker -.. _Forex snapshot ticker: https://polygon.io/docs/forex/get_v2_snapshot_locale_global_markets_forex_tickers__ticker -.. _Crypto snapshot ticker: https://polygon.io/docs/crypto/get_v2_snapshot_locale_global_markets_crypto_tickers__ticker -.. _Options snapshot option contract: https://polygon.io/docs/options/get_v3_snapshot_options__underlyingasset___optioncontract -.. _Crypto snapshot ticker full book (L2): https://polygon.io/docs/crypto/get_v2_snapshot_locale_global_markets_crypto_tickers__ticker__book \ No newline at end of file +.. automethod:: massive.RESTClient.get_snapshot_crypto_book + +.. _Stocks snapshot all tickers: https://massive.com/docs/stocks/get_v3_snapshot +.. _Options snapshot all tickers: https://massive.com/docs/options/get_v3_snapshot +.. _Forex snapshot all tickers: https://massive.com/docs/forex/get_v3_snapshot +.. _Crypto snapshot all tickers:: https://massive.com/docs/crypto/get_v3_snapshot +.. _Stocks snapshot all tickers (deprecated): https://massive.com/docs/stocks/get_v2_snapshot_locale_us_markets_stocks_tickers +.. _Options snapshot all tickers (deprecated): https://massive.com/docs/options/get_v2_snapshot_locale_us_markets_stocks_tickers +.. _Forex snapshot all tickers (deprecated): https://massive.com/docs/forex/get_v2_snapshot_locale_global_markets_forex_tickers +.. _Crypto snapshot all tickers (deprecated):: https://massive.com/docs/crypto/get_v2_snapshot_locale_global_markets_crypto_tickers +.. _Stocks snapshot gainers/losers: https://massive.com/docs/stocks/get_v2_snapshot_locale_us_markets_stocks__direction +.. _Forex snapshot gainers/losers: https://massive.com/docs/forex/get_v2_snapshot_locale_global_markets_forex__direction +.. _Crypto snapshot gainers/losers: https://massive.com/docs/crypto/get_v2_snapshot_locale_global_markets_crypto__direction +.. _Stocks snapshot ticker: https://massive.com/docs/stocks/get_v2_snapshot_locale_us_markets_stocks_tickers__stocksticker +.. _Forex snapshot ticker: https://massive.com/docs/forex/get_v2_snapshot_locale_global_markets_forex_tickers__ticker +.. _Crypto snapshot ticker: https://massive.com/docs/crypto/get_v2_snapshot_locale_global_markets_crypto_tickers__ticker +.. _Options snapshot option contract: https://massive.com/docs/options/get_v3_snapshot_options__underlyingasset___optioncontract +.. _Crypto snapshot ticker full book (L2): https://massive.com/docs/crypto/get_v2_snapshot_locale_global_markets_crypto_tickers__ticker__book \ No newline at end of file diff --git a/docs/source/Trades.rst b/docs/source/Trades.rst index 5d6e6992..817b97a3 100644 --- a/docs/source/Trades.rst +++ b/docs/source/Trades.rst @@ -11,7 +11,7 @@ List trades - `Options trades`_ - `Crypto trades`_ -.. automethod:: polygon.RESTClient.list_trades +.. automethod:: massive.RESTClient.list_trades ================================================================== Get last trade @@ -20,7 +20,7 @@ Get last trade - `Stocks last trade`_ - `Options last trade`_ -.. automethod:: polygon.RESTClient.get_last_trade +.. automethod:: massive.RESTClient.get_last_trade ================================================================== Get last crypto trade @@ -28,11 +28,11 @@ Get last crypto trade - `Crypto last trade for crypto pair`_ -.. automethod:: polygon.RESTClient.get_last_crypto_trade +.. automethod:: massive.RESTClient.get_last_crypto_trade -.. _Stocks trades: https://polygon.io/docs/stocks/get_v3_trades__stockticker -.. _Options trades: https://polygon.io/docs/options/get_v3_trades__optionsticker -.. _Crypto trades: https://polygon.io/docs/crypto/get_v3_trades__cryptoticker -.. _Stocks last trade: https://polygon.io/docs/stocks/get_v2_last_trade__stocksticker -.. _Options last trade: https://polygon.io/docs/options/get_v2_last_trade__optionsticker -.. _Crypto last trade for crypto pair: https://polygon.io/docs/crypto/get_v1_last_crypto__from___to \ No newline at end of file +.. _Stocks trades: https://massive.com/docs/stocks/get_v3_trades__stockticker +.. _Options trades: https://massive.com/docs/options/get_v3_trades__optionsticker +.. _Crypto trades: https://massive.com/docs/crypto/get_v3_trades__cryptoticker +.. _Stocks last trade: https://massive.com/docs/stocks/get_v2_last_trade__stocksticker +.. _Options last trade: https://massive.com/docs/options/get_v2_last_trade__optionsticker +.. _Crypto last trade for crypto pair: https://massive.com/docs/crypto/get_v1_last_crypto__from___to \ No newline at end of file diff --git a/docs/source/WebSocket-Enums.rst b/docs/source/WebSocket-Enums.rst index dc2fd199..7e4b5f93 100644 --- a/docs/source/WebSocket-Enums.rst +++ b/docs/source/WebSocket-Enums.rst @@ -6,20 +6,20 @@ WebSocket Enums ============================================================== Feed ============================================================== -.. autoclass:: polygon.websocket.models.Feed +.. autoclass:: massive.websocket.models.Feed :members: :undoc-members: ============================================================== Market ============================================================== -.. autoclass:: polygon.websocket.models.Market +.. autoclass:: massive.websocket.models.Market :members: :undoc-members: ============================================================== EventType ============================================================== -.. autoclass:: polygon.websocket.models.EventType +.. autoclass:: massive.websocket.models.EventType :members: :undoc-members: \ No newline at end of file diff --git a/docs/source/WebSocket.rst b/docs/source/WebSocket.rst index 5f508122..c624d9d2 100644 --- a/docs/source/WebSocket.rst +++ b/docs/source/WebSocket.rst @@ -11,35 +11,35 @@ WebSocket =========== Init client =========== -.. automethod:: polygon.WebSocketClient.__init__ +.. automethod:: massive.WebSocketClient.__init__ :noindex: ============================ Connect ============================ -.. automethod:: polygon.WebSocketClient.connect +.. automethod:: massive.WebSocketClient.connect ============================ Run ============================ -.. automethod:: polygon.WebSocketClient.run +.. automethod:: massive.WebSocketClient.run ============================ Subscribe ============================ -.. automethod:: polygon.WebSocketClient.subscribe +.. automethod:: massive.WebSocketClient.subscribe ============================ Unsubscribe ============================ -.. automethod:: polygon.WebSocketClient.unsubscribe +.. automethod:: massive.WebSocketClient.unsubscribe ============================ Close ============================ -.. automethod:: polygon.WebSocketClient.close +.. automethod:: massive.WebSocketClient.close -.. _Stocks getting started: https://polygon.io/docs/stocks/ws_getting-started -.. _Options getting started: https://polygon.io/docs/options/ws_getting-started -.. _Forex getting started: https://polygon.io/docs/forex/ws_getting-started -.. _Crypto getting started: https://polygon.io/docs/crypto/ws_getting-started \ No newline at end of file +.. _Stocks getting started: https://massive.com/docs/stocks/ws_getting-started +.. _Options getting started: https://massive.com/docs/options/ws_getting-started +.. _Forex getting started: https://massive.com/docs/forex/ws_getting-started +.. _Crypto getting started: https://massive.com/docs/crypto/ws_getting-started \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 235ee004..4ebf65d2 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -14,13 +14,13 @@ import sys sys.path.insert(0, os.path.abspath('../..')) print('docs path', sys.path[0]) -os.environ['POLYGON_API_KEY'] = 'POLYGON_API_KEY' +os.environ['MASSIVE_API_KEY'] = 'MASSIVE_API_KEY' # -- Project information ----------------------------------------------------- -project = 'polygon-api-client' -copyright = '2022, Polygon.io' -author = 'Polygon.io' +project = 'massive-api-client' +copyright = '2022, Massive.com' +author = 'Massive.com' # The full version, including alpha/beta/rc tags release = '0.3.0' diff --git a/docs/source/index.rst b/docs/source/index.rst index b445b803..7bb2b316 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,7 +1,7 @@ -Welcome to polygon-api-client's documentation! +Welcome to massive-api-client's documentation! ============================================== -This documentation is for the Python client only. For details about the responses see `the official docs `_. +This documentation is for the Python client only. For details about the responses see `the official docs `_. .. toctree:: :maxdepth: 1 diff --git a/docs/source/vX.rst b/docs/source/vX.rst index 69a25311..f6a9125b 100644 --- a/docs/source/vX.rst +++ b/docs/source/vX.rst @@ -14,6 +14,6 @@ List stock financials - `Stocks financials vX`_ -.. automethod:: polygon.rest.VXClient.list_stock_financials +.. automethod:: massive.rest.VXClient.list_stock_financials -.. _Stocks financials vX: https://polygon.io/docs/stocks/get_vx_reference_financials +.. _Stocks financials vX: https://massive.com/docs/stocks/get_vx_reference_financials diff --git a/examples/launchpad/README.md b/examples/launchpad/README.md new file mode 100644 index 00000000..5a0c3bd3 --- /dev/null +++ b/examples/launchpad/README.md @@ -0,0 +1,49 @@ +# Launchpad + +Users of the Launchpad product will need to pass in certain headers in order to make API requests. + + ```python + +# import RESTClient +from massive import RESTClient +from massive.rest.models.request import RequestOptionBuilder + +# 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 +) +# get response +res = c.get_aggs("AAPL", 1, "day", "2022-04-04", "2022-04-04", options=options) + +# do something with response + + ``` +Launchpad users can also provide the optional User Agent value describing their Edge User's origination request. + + ```python + +# import RESTClient +from massive import RESTClient +from massive.rest.models.request import RequestOptionBuilder + +# 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 +).update_edge_header( + edge_user="EDGE_USER" # optional + ) + +# get response +res = c.get_aggs("AAPL", 1, "day", "2022-04-04", "2022-04-04", options=options) + +# do something with response + + ``` \ No newline at end of file diff --git a/examples/launchpad/launchpad.py b/examples/launchpad/launchpad.py new file mode 100644 index 00000000..6bd2306c --- /dev/null +++ b/examples/launchpad/launchpad.py @@ -0,0 +1,31 @@ +from massive import RESTClient +from massive.rest.models.request import RequestOptionBuilder + + +def get_list_trades_launchpad(): + client = RESTClient() + + """ + set headers example: + options = RequestOptionBuilder() + .edge_headers(edge_id="EDGE_ID", edge_ip_address="EDGE_ID_ADDRESS", edge_user="EDGE_USER") + + update headers example: + options = options.update_edge_header(edge_ip_address="NEW_IP") + """ + options = RequestOptionBuilder().edge_headers( + edge_id="EDGE_ID", edge_ip_address="EDGE_ID_ADDRESS", edge_user="EDGE_USER" + ) + + trades = [] + for t in client.list_trades("AAA", "2022-04-04", limit=5, options=options): + trades.append(t) + print(trades) + + +def main(): + get_list_trades_launchpad() + + +if __name__ == "__main__": + main() diff --git a/examples/rest/bulk_aggs_downloader.py b/examples/rest/bulk_aggs_downloader.py new file mode 100644 index 00000000..89df0765 --- /dev/null +++ b/examples/rest/bulk_aggs_downloader.py @@ -0,0 +1,97 @@ +import datetime +import concurrent.futures +import logging +from massive import RESTClient +import signal +import sys +import pickle +import lz4.frame # type: ignore + +""" +This script performs the following tasks: + +1. Downloads aggregated market data (referred to as 'aggs') for specific stock symbols using the Massive API. +2. Handles data for multiple dates and performs these operations in parallel to improve efficiency. +3. Saves the downloaded data in a compressed format (LZ4) using Python's pickle serialization. +4. Utilizes logging to track its progress and any potential errors. +5. Designed to be interruptible: listens for a Ctrl+C keyboard interrupt and exits gracefully when detected. + +Usage: +1. pip install lz4 +2. Set your Massive API key in the environment variable 'MASSIVE_API_KEY'. +3. Specify the date range and stock symbols you are interested in within the script. +4. Run the script. + +The script will create compressed '.pickle.lz4' files containing the aggs for each specified stock symbol and date. + +Note: This script is designed to be compatible with a data reader script, such as 'bulk_aggs_reader.py'. +""" + +# Set up logging +logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(message)s") + + +def signal_handler(sig, frame): + print("You pressed Ctrl+C!") + sys.exit(0) + + +signal.signal(signal.SIGINT, signal_handler) + + +def get_aggs_for_symbol_and_date(symbol_date_pair): + """Retrieve aggs for a given symbol and date""" + symbol, date = symbol_date_pair + aggs = [] + client = RESTClient(trace=True) # Uses MASSIVE_API_KEY environment variable + + for a in client.list_aggs( + symbol, + 1, + "minute", + date, + date, + limit=50000, + ): + aggs.append(a) + + print(len(aggs)) + + filename = f"{symbol}-aggs-{date}.pickle.lz4" + with open(filename, "wb") as file: + try: + compressed_data = lz4.frame.compress(pickle.dumps(aggs)) + file.write(compressed_data) + except TypeError as e: + print(f"Serialization Error: {e}") + + logging.info(f"Downloaded aggs for {date} and saved to {filename}") + + +def weekdays_between(start_date, end_date): + """Generate all weekdays between start_date and end_date""" + day = start_date + while day <= end_date: + if day.weekday() < 5: # 0-4 denotes Monday to Friday + yield day + day += datetime.timedelta(days=1) + + +def main(): + start_date = datetime.date(2023, 8, 1) + end_date = datetime.date(2023, 8, 31) + + symbols = ["TSLA", "AAPL", "HCP", "GOOG"] # The array of symbols you want + + dates = list(weekdays_between(start_date, end_date)) + + # Generate a list of (symbol, date) pairs + symbol_date_pairs = [(symbol, date) for symbol in symbols for date in dates] + + # Use ThreadPoolExecutor to download data in parallel + with concurrent.futures.ThreadPoolExecutor(max_workers=50) as executor: + executor.map(get_aggs_for_symbol_and_date, symbol_date_pairs) + + +if __name__ == "__main__": + main() diff --git a/examples/rest/bulk_aggs_reader.py b/examples/rest/bulk_aggs_reader.py new file mode 100644 index 00000000..fcc91915 --- /dev/null +++ b/examples/rest/bulk_aggs_reader.py @@ -0,0 +1,57 @@ +import lz4.frame # type: ignore +import pickle +import datetime + +""" +This script performs the following tasks: + +1. Reads aggregated market data ('aggs') for a specific stock symbol for multiple dates. +2. Data is read from compressed (LZ4) and pickled files, which should have been generated by a separate data downloading script. +3. Displays the read data to the console. +4. Handles exceptions gracefully: informs the user if a file for a specific date was not found or if any other error occurred. + +Usage: +1. pip install lz4 +2. Ensure that the compressed '.pickle.lz4' files for the specified stock symbol and date range exist in the same directory as this script. +3. Modify the date range and stock symbol in the script as per your requirements. +4. Run the script. + +The script will read and display the market data for each specified date and stock symbol. + +Note: This script is designed to be compatible with files generated by a data downloading script, such as 'bulk_aggs_downloader.py'. +""" + + +def read_trades_for_date(symbol, date): + """Reads trades for a given symbol and date, then prints them.""" + + # Construct the filename, similar to your writer script + filename = f"{symbol}-aggs-{date}.pickle.lz4" + + try: + with open(filename, "rb") as file: + compressed_data = file.read() + trades = pickle.loads(lz4.frame.decompress(compressed_data)) + print(trades) + return trades + except FileNotFoundError: + print(f"No file found for {date}") + except Exception as e: + print(f"An error occurred: {e}") + + +def main(): + start_date = datetime.date(2023, 8, 1) + end_date = datetime.date(2023, 8, 31) + symbol = "HCP" + + # Loop through each weekday between the start and end dates and read the trades + day = start_date + while day <= end_date: + if day.weekday() < 5: # 0-4 denotes Monday to Friday + read_trades_for_date(symbol, day) + day += datetime.timedelta(days=1) + + +if __name__ == "__main__": + main() diff --git a/examples/rest/crypto-aggregates_bars.py b/examples/rest/crypto-aggregates_bars.py new file mode 100644 index 00000000..443ce21d --- /dev/null +++ b/examples/rest/crypto-aggregates_bars.py @@ -0,0 +1,30 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/crypto/get_v2_aggs_ticker__cryptoticker__range__multiplier___timespan___from___to +# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#massive.RESTClient.list_aggs + +# API key injected below for easy use. If not provided, the script will attempt +# to use the environment variable "MASSIVE_API_KEY". +# +# setx MASSIVE_API_KEY "" <- windows +# export MASSIVE_API_KEY="" <- mac/linux +# +# Note: To persist the environment variable you need to add the above command +# to the shell startup script (e.g. .bashrc or .bash_profile. +# +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +aggs = [] +for a in client.list_aggs( + "X:BTCUSD", + 1, + "day", + "2023-01-30", + "2023-02-03", + limit=50000, +): + aggs.append(a) + +print(aggs) diff --git a/examples/rest/crypto-conditions.py b/examples/rest/crypto-conditions.py new file mode 100644 index 00000000..339d53f0 --- /dev/null +++ b/examples/rest/crypto-conditions.py @@ -0,0 +1,13 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/crypto/get_v3_reference_conditions +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-conditions + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +conditions = [] +for c in client.list_conditions("crypto", limit=1000): + conditions.append(c) +print(conditions) diff --git a/examples/rest/crypto-daily_open_close.py b/examples/rest/crypto-daily_open_close.py new file mode 100644 index 00000000..5c29db0c --- /dev/null +++ b/examples/rest/crypto-daily_open_close.py @@ -0,0 +1,16 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/crypto/get_v1_open-close_crypto__from___to___date +# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#get-daily-open-close-agg + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +# make request +request = client.get_daily_open_close_agg( + "X:BTCUSD", + "2023-01-09", +) + +print(request) diff --git a/examples/rest/crypto-exchanges.py b/examples/rest/crypto-exchanges.py new file mode 100644 index 00000000..8a592d55 --- /dev/null +++ b/examples/rest/crypto-exchanges.py @@ -0,0 +1,25 @@ +from massive import RESTClient +from massive.rest.models import ( + Exchange, +) + +# docs +# https://massive.com/docs/crypto/get_v3_reference_exchanges +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-exchanges + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +exchanges = client.get_exchanges("crypto") +print(exchanges) + +# loop over exchanges +for exchange in exchanges: + # verify this is an exchange + if isinstance(exchange, Exchange): + # print exchange info + print( + "{:<15}{} ({})".format( + exchange.asset_class, exchange.name, exchange.operating_mic + ) + ) diff --git a/examples/rest/crypto-grouped_daily_bars.py b/examples/rest/crypto-grouped_daily_bars.py new file mode 100644 index 00000000..4ebd3d36 --- /dev/null +++ b/examples/rest/crypto-grouped_daily_bars.py @@ -0,0 +1,20 @@ +from massive import RESTClient +import pprint + +# docs +# https://massive.com/docs/crypto/get_v2_aggs_grouped_locale_global_market_crypto__date +# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#get-grouped-daily-aggs + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +grouped = client.get_grouped_daily_aggs( + "2023-01-09", locale="global", market_type="crypto" +) + +# print(grouped) + +# pprint (short for "pretty-print") is a module that provides a more human- +# readable output format for data structures. +pp = pprint.PrettyPrinter(indent=2) +pp.pprint(grouped) diff --git a/examples/rest/crypto-last_trade_for_a_crypto_pair.py b/examples/rest/crypto-last_trade_for_a_crypto_pair.py new file mode 100644 index 00000000..ef75efaa --- /dev/null +++ b/examples/rest/crypto-last_trade_for_a_crypto_pair.py @@ -0,0 +1,12 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/crypto/get_v1_last_crypto__from___to +# https://massive-api-client.readthedocs.io/en/latest/Trades.html#get-last-crypto-trade + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +trade = client.get_last_crypto_trade("BTC", "USD") + +print(trade) diff --git a/examples/rest/crypto-market_holidays.py b/examples/rest/crypto-market_holidays.py new file mode 100644 index 00000000..740bbc71 --- /dev/null +++ b/examples/rest/crypto-market_holidays.py @@ -0,0 +1,20 @@ +from massive import RESTClient +from massive.rest.models import ( + MarketHoliday, +) + +# docs +# https://massive.com/docs/crypto/get_v1_marketstatus_upcoming +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-market-holidays + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +holidays = client.get_market_holidays() +# print(holidays) + +# print date, name, and exchange +for holiday in holidays: + # verify this is an exchange + if isinstance(holiday, MarketHoliday): + print("{:<15}{:<15} ({})".format(holiday.date, holiday.name, holiday.exchange)) diff --git a/examples/rest/crypto-market_status.py b/examples/rest/crypto-market_status.py new file mode 100644 index 00000000..d58d6180 --- /dev/null +++ b/examples/rest/crypto-market_status.py @@ -0,0 +1,11 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/crypto/get_v1_marketstatus_now +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-market-status + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +result = client.get_market_status() +print(result) diff --git a/examples/rest/crypto-previous_close.py b/examples/rest/crypto-previous_close.py new file mode 100644 index 00000000..b4fd4cea --- /dev/null +++ b/examples/rest/crypto-previous_close.py @@ -0,0 +1,14 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/crypto/get_v2_aggs_ticker__cryptoticker__prev +# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#get-previous-close-agg + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +aggs = client.get_previous_close_agg( + "X:BTCUSD", +) + +print(aggs) diff --git a/examples/rest/crypto-snapshots_all_tickers.py b/examples/rest/crypto-snapshots_all_tickers.py new file mode 100644 index 00000000..5c5c8e70 --- /dev/null +++ b/examples/rest/crypto-snapshots_all_tickers.py @@ -0,0 +1,41 @@ +from massive import RESTClient +from massive.rest.models import ( + TickerSnapshot, + Agg, +) + +# docs +# https://massive.com/docs/crypto/get_v2_snapshot_locale_global_markets_crypto_tickers +# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html#get-all-snapshots + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +snapshot = client.get_snapshot_all("crypto") # all tickers + +# print raw values +print(snapshot) + +# crunch some numbers +for item in snapshot: + # verify this is an TickerSnapshot + if isinstance(item, TickerSnapshot): + # verify this is an Agg + if isinstance(item.prev_day, Agg): + # verify this is a float + if isinstance(item.prev_day.open, float) and isinstance( + item.prev_day.close, float + ): + percent_change = ( + (item.prev_day.close - item.prev_day.open) + / item.prev_day.open + * 100 + ) + print( + "{:<15}{:<15}{:<15}{:.2f} %".format( + item.ticker, + item.prev_day.open, + item.prev_day.close, + percent_change, + ) + ) diff --git a/examples/rest/crypto-snapshots_gainers_losers.py b/examples/rest/crypto-snapshots_gainers_losers.py new file mode 100644 index 00000000..5ced0e6d --- /dev/null +++ b/examples/rest/crypto-snapshots_gainers_losers.py @@ -0,0 +1,37 @@ +from massive import RESTClient +from massive.rest.models import ( + TickerSnapshot, +) + +# docs +# https://massive.com/docs/crypto/get_v2_snapshot_locale_global_markets_crypto__direction +# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html#get-gainers-losers-snapshot + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +# get gainers +gainers = client.get_snapshot_direction("crypto", "gainers") +# print(gainers) + +# print ticker with % change +for gainer in gainers: + # verify this is a TickerSnapshot + if isinstance(gainer, TickerSnapshot): + # verify this is a float + if isinstance(gainer.todays_change_percent, float): + print("{:<15}{:.2f} %".format(gainer.ticker, gainer.todays_change_percent)) + +print() + +# get losers +losers = client.get_snapshot_direction("crypto", "losers") +# print(losers) + +# print ticker with % change +for loser in losers: + # verify this is a TickerSnapshot + if isinstance(loser, TickerSnapshot): + # verify this is a float + if isinstance(loser.todays_change_percent, float): + print("{:<15}{:.2f} %".format(loser.ticker, loser.todays_change_percent)) diff --git a/examples/rest/crypto-snapshots_ticker.py b/examples/rest/crypto-snapshots_ticker.py new file mode 100644 index 00000000..36e639d2 --- /dev/null +++ b/examples/rest/crypto-snapshots_ticker.py @@ -0,0 +1,11 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/crypto/get_v2_snapshot_locale_global_markets_crypto_tickers__ticker +# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html#get-ticker-snapshot + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +ticker = client.get_snapshot_ticker("crypto", "X:BTCUSD") +print(ticker) diff --git a/examples/rest/crypto-snapshots_ticker_full_book_l2.py b/examples/rest/crypto-snapshots_ticker_full_book_l2.py new file mode 100644 index 00000000..b8b9157c --- /dev/null +++ b/examples/rest/crypto-snapshots_ticker_full_book_l2.py @@ -0,0 +1,13 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/crypto/get_v2_snapshot_locale_global_markets_crypto_tickers__ticker__book +# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html#get-crypto-l2-book-snapshot + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +snapshot = client.get_snapshot_crypto_book("X:BTCUSD") + +# print raw values +print(snapshot) diff --git a/examples/rest/crypto-technical_indicators_ema.py b/examples/rest/crypto-technical_indicators_ema.py new file mode 100644 index 00000000..1eb50c20 --- /dev/null +++ b/examples/rest/crypto-technical_indicators_ema.py @@ -0,0 +1,17 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/crypto/get_v1_indicators_ema__cryptoticker +# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +ema = client.get_ema( + ticker="X:BTCUSD", + timespan="day", + window=50, + series_type="close", +) + +print(ema) diff --git a/examples/rest/crypto-technical_indicators_macd.py b/examples/rest/crypto-technical_indicators_macd.py new file mode 100644 index 00000000..17c25bb7 --- /dev/null +++ b/examples/rest/crypto-technical_indicators_macd.py @@ -0,0 +1,19 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/crypto/get_v1_indicators_macd__cryptoticker +# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +macd = client.get_macd( + ticker="X:BTCUSD", + timespan="day", + short_window=12, + long_window=26, + signal_window=9, + series_type="close", +) + +print(macd) diff --git a/examples/rest/crypto-technical_indicators_rsi.py b/examples/rest/crypto-technical_indicators_rsi.py new file mode 100644 index 00000000..d490d879 --- /dev/null +++ b/examples/rest/crypto-technical_indicators_rsi.py @@ -0,0 +1,17 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/crypto/get_v1_indicators_rsi__cryptoticker +# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +rsi = client.get_rsi( + ticker="X:BTCUSD", + timespan="day", + window=14, + series_type="close", +) + +print(rsi) diff --git a/examples/rest/crypto-technical_indicators_sma.py b/examples/rest/crypto-technical_indicators_sma.py new file mode 100644 index 00000000..255291c0 --- /dev/null +++ b/examples/rest/crypto-technical_indicators_sma.py @@ -0,0 +1,17 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/crypto/get_v1_indicators_sma__cryptoticker +# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +sma = client.get_sma( + ticker="X:BTCUSD", + timespan="day", + window=50, + series_type="close", +) + +print(sma) diff --git a/examples/rest/crypto-tickers.py b/examples/rest/crypto-tickers.py new file mode 100644 index 00000000..9052e487 --- /dev/null +++ b/examples/rest/crypto-tickers.py @@ -0,0 +1,13 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/crypto/get_v3_reference_tickers +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-tickers + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +tickers = [] +for t in client.list_tickers(market="crypto", limit=1000): + tickers.append(t) +print(tickers) diff --git a/examples/rest/crypto-trades.py b/examples/rest/crypto-trades.py new file mode 100644 index 00000000..d76182af --- /dev/null +++ b/examples/rest/crypto-trades.py @@ -0,0 +1,15 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/crypto/get_v3_trades__cryptoticker +# https://massive-api-client.readthedocs.io/en/latest/Trades.html#massive.RESTClient.list_trades + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +trades = [] +for t in client.list_trades("X:BTC-USD", "2023-02-01", limit=50000): + trades.append(t) + +# prints each trade that took place +print(trades) diff --git a/examples/rest/custom-json-get.py b/examples/rest/custom-json-get.py new file mode 100644 index 00000000..5ea5c400 --- /dev/null +++ b/examples/rest/custom-json-get.py @@ -0,0 +1,9 @@ +from massive import RESTClient + +# type: ignore +import orjson + +client = RESTClient(custom_json=orjson) + +aggs = client.get_aggs("AAPL", 1, "day", "2022-04-04", "2022-04-04") +print(aggs) diff --git a/examples/rest/demo_correlation_matrix.py b/examples/rest/demo_correlation_matrix.py new file mode 100644 index 00000000..f3ae4298 --- /dev/null +++ b/examples/rest/demo_correlation_matrix.py @@ -0,0 +1,140 @@ +""" +This script computes and visualizes the correlation matrix of a selected set of +stocks using Massive's API. This script is for educational purposes only and is +not intended to provide investment advice. The examples provided analyze the +correlation between different stocks from diverse sectors, as well as within +specific sectors. + +Blog: https://massive.com/blog/finding-correlation-between-stocks/ +Video: https://www.youtube.com/watch?v=q0TgaUGWPFc + +Before running this script, there are 4 prerequisites: + +1) Dependencies: Ensure that the following Python libraries are installed in + your environment: + - pandas + - numpy + - seaborn + - matplotlib.pyplot + - massive's python-client library + + You can likely run: + pip install pandas numpy seaborn matplotlib massive-api-client + +2) API Key: You will need a Massive API key to fetch the stock data. This can + be set manually in the script below, or you can set an environment variable + 'MASSIVE_API_KEY'. + + setx MASSIVE_API_KEY "" <- windows + export MASSIVE_API_KEY="" <- mac/linux + +3) Select Stocks: You need to select the stocks you're interested in analyzing. + Update the 'symbols' variable in this script with your chosen stock symbols. + +4) Select Date Range: You need to specify the date range for the historical + data that you want to fetch. Update the 'start_date' and 'end_date' + variables in this script accordingly. + +Understanding stock correlation is important when building a diverse portfolio, +as it can help manage risk and inform investment strategies. It's always +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 +import matplotlib.pyplot as plt # type: ignore +from massive import RESTClient + +# Less likely to be correlated due to being in different sectors and are +# exposed to different market forces, economic trends, and price risks. +# symbols = ["TSLA", "PFE", "XOM", "HD", "JPM", "AAPL", "KO", "UNH", "LMT", "AMZN"] + +# Here we have two groups, one with 5 technology stocks and another with 5 oil +# stocks. These two groups are likely to be highly correlated within their +# respective sectors but are expected to be less correlated between sectors. +# symbols = ["AAPL", "MSFT", "GOOG", "ADBE", "CRM", "XOM", "CVX", "COP", "PSX", "OXY"] + +# Likely to be highly correlated due to being in the technology sector, +# specifically in the sub-industry of Semiconductors: +symbols = ["INTC", "AMD", "NVDA", "TXN", "QCOM", "MU", "AVGO", "ADI", "MCHP", "NXPI"] + +# Date range you are interested in +start_date = "2022-04-01" +end_date = "2023-05-10" + + +def fetch_stock_data(symbols, start_date, end_date): + stocks = [] + + # client = RESTClient("XXXXXX") # hardcoded api_key is used + client = RESTClient() # MASSIVE_API_KEY environment variable is used + + try: + for symbol in symbols: + aggs = client.get_aggs( + symbol, + 1, + "day", + start_date, + end_date, + ) + df = pd.DataFrame(aggs, columns=["timestamp", "close"]) + + # Filter out rows with invalid timestamps + df = df[df["timestamp"] > 0] + + df["timestamp"] = pd.to_datetime(df["timestamp"], unit="ms") + df.set_index("timestamp", inplace=True) + + df.rename(columns={"close": symbol}, inplace=True) + stocks.append(df) + finally: + pass + + merged_stocks = pd.concat(stocks, axis=1) + return merged_stocks + + +def calculate_daily_returns(stock_data): + daily_returns = stock_data.pct_change().dropna() + return daily_returns + + +def compute_correlation_matrix(daily_returns): + correlation_matrix = daily_returns.corr() + return correlation_matrix + + +def plot_correlation_heatmap(correlation_matrix): + plt.figure(figsize=(8, 8)) + ax = sns.heatmap( + correlation_matrix, + annot=True, + cmap="coolwarm", + vmin=-1, + vmax=1, + square=True, + linewidths=0.5, + cbar_kws={"shrink": 0.8}, + ) + ax.xaxis.tick_top() + ax.xaxis.set_label_position("top") + plt.title("Correlation Matrix Heatmap", y=1.08) + plt.show() + + +def main(): + stock_data = fetch_stock_data(symbols, start_date, end_date) + daily_returns = calculate_daily_returns(stock_data) + correlation_matrix = compute_correlation_matrix(daily_returns) + + print("Correlation Matrix:") + print(correlation_matrix) + + plot_correlation_heatmap(correlation_matrix) + + +if __name__ == "__main__": + main() diff --git a/examples/rest/economy-treasury_yields.py b/examples/rest/economy-treasury_yields.py new file mode 100644 index 00000000..fe4d79f7 --- /dev/null +++ b/examples/rest/economy-treasury_yields.py @@ -0,0 +1,13 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/rest/economy/treasury-yields + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +yields = [] +for date in client.list_treasury_yields(): + yields.append(date) + +print(yields) diff --git a/examples/rest/financials.py b/examples/rest/financials.py index ecf67e56..4dc21668 100644 --- a/examples/rest/financials.py +++ b/examples/rest/financials.py @@ -1,11 +1,11 @@ -from polygon import RESTClient +from massive import RESTClient client = RESTClient() financials = client.get_ticker_details("NFLX") print(financials) -for (i, n) in enumerate(client.list_ticker_news("INTC", limit=5)): +for i, n in enumerate(client.list_ticker_news("INTC", limit=5)): print(i, n) if i == 5: break diff --git a/examples/rest/forex-aggregates_bars.py b/examples/rest/forex-aggregates_bars.py new file mode 100644 index 00000000..7e9c770f --- /dev/null +++ b/examples/rest/forex-aggregates_bars.py @@ -0,0 +1,30 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/forex/get_v2_aggs_ticker__forexticker__range__multiplier___timespan___from___to +# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#massive.RESTClient.list_aggs + +# API key injected below for easy use. If not provided, the script will attempt +# to use the environment variable "MASSIVE_API_KEY". +# +# setx MASSIVE_API_KEY "" <- windows +# export MASSIVE_API_KEY="" <- mac/linux +# +# Note: To persist the environment variable you need to add the above command +# to the shell startup script (e.g. .bashrc or .bash_profile. +# +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +aggs = [] +for a in client.list_aggs( + "C:EURUSD", + 1, + "day", + "2023-01-30", + "2023-02-03", + limit=50000, +): + aggs.append(a) + +print(aggs) diff --git a/examples/rest/forex-conditions.py b/examples/rest/forex-conditions.py new file mode 100644 index 00000000..9fed0838 --- /dev/null +++ b/examples/rest/forex-conditions.py @@ -0,0 +1,13 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/forex/get_v3_reference_conditions +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-conditions + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +conditions = [] +for c in client.list_conditions("fx", limit=1000): + conditions.append(c) +print(conditions) diff --git a/examples/rest/forex-exchanges.py b/examples/rest/forex-exchanges.py new file mode 100644 index 00000000..a816a053 --- /dev/null +++ b/examples/rest/forex-exchanges.py @@ -0,0 +1,25 @@ +from massive import RESTClient +from massive.rest.models import ( + Exchange, +) + +# docs +# https://massive.com/docs/options/get_v3_reference_exchanges +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-exchanges + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +exchanges = client.get_exchanges("fx") +print(exchanges) + +# loop over exchanges +for exchange in exchanges: + # verify this is an exchange + if isinstance(exchange, Exchange): + # print exchange info + print( + "{:<15}{} ({})".format( + exchange.asset_class, exchange.name, exchange.operating_mic + ) + ) diff --git a/examples/rest/forex-grouped_daily_bars.py b/examples/rest/forex-grouped_daily_bars.py new file mode 100644 index 00000000..452faa4b --- /dev/null +++ b/examples/rest/forex-grouped_daily_bars.py @@ -0,0 +1,22 @@ +from massive import RESTClient +import pprint + +# docs +# https://massive.com/docs/forex/get_v2_aggs_grouped_locale_global_market_fx__date +# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#get-grouped-daily-aggs + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +grouped = client.get_grouped_daily_aggs( + "2023-03-27", + locale="global", + market_type="fx", +) + +# print(grouped) + +# pprint (short for "pretty-print") is a module that provides a more human- +# readable output format for data structures. +pp = pprint.PrettyPrinter(indent=2) +pp.pprint(grouped) diff --git a/examples/rest/forex-last_quote_for_a_currency_pair.py b/examples/rest/forex-last_quote_for_a_currency_pair.py new file mode 100644 index 00000000..bf349732 --- /dev/null +++ b/examples/rest/forex-last_quote_for_a_currency_pair.py @@ -0,0 +1,15 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/forex/get_v1_last_quote_currencies__from___to +# https://massive-api-client.readthedocs.io/en/latest/Quotes.html#get-last-forex-quote + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +quote = client.get_last_forex_quote( + "AUD", + "USD", +) + +print(quote) diff --git a/examples/rest/forex-market_holidays.py b/examples/rest/forex-market_holidays.py new file mode 100644 index 00000000..df3b8bb4 --- /dev/null +++ b/examples/rest/forex-market_holidays.py @@ -0,0 +1,20 @@ +from massive import RESTClient +from massive.rest.models import ( + MarketHoliday, +) + +# docs +# https://massive.com/docs/forex/get_v1_marketstatus_upcoming +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-market-holidays + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +holidays = client.get_market_holidays() +# print(holidays) + +# print date, name, and exchange +for holiday in holidays: + # verify this is an exchange + if isinstance(holiday, MarketHoliday): + print("{:<15}{:<15} ({})".format(holiday.date, holiday.name, holiday.exchange)) diff --git a/examples/rest/forex-market_status.py b/examples/rest/forex-market_status.py new file mode 100644 index 00000000..f5d6a451 --- /dev/null +++ b/examples/rest/forex-market_status.py @@ -0,0 +1,11 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/forex/get_v1_marketstatus_now +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-market-status + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +result = client.get_market_status() +print(result) diff --git a/examples/rest/forex-previous_close.py b/examples/rest/forex-previous_close.py new file mode 100644 index 00000000..e6896afe --- /dev/null +++ b/examples/rest/forex-previous_close.py @@ -0,0 +1,14 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/forex/get_v2_aggs_ticker__forexticker__prev +# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#get-previous-close-agg + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +aggs = client.get_previous_close_agg( + "C:EURUSD", +) + +print(aggs) diff --git a/examples/rest/forex-quotes.py b/examples/rest/forex-quotes.py new file mode 100644 index 00000000..36e8a7de --- /dev/null +++ b/examples/rest/forex-quotes.py @@ -0,0 +1,13 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/forex/get_v3_quotes__fxticker +# https://massive-api-client.readthedocs.io/en/latest/Quotes.html#list-quotes + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +quotes = [] +for t in client.list_quotes("C:EUR-USD", "2023-02-01", limit=50000): + quotes.append(t) +print(quotes) diff --git a/examples/rest/forex-real-time_currency_conversion.py b/examples/rest/forex-real-time_currency_conversion.py new file mode 100644 index 00000000..77590dac --- /dev/null +++ b/examples/rest/forex-real-time_currency_conversion.py @@ -0,0 +1,15 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/forex/get_v1_conversion__from___to +# https://massive-api-client.readthedocs.io/en/latest/Quotes.html#get-real-time-currency-conversion + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +rate = client.get_real_time_currency_conversion( + "AUD", + "USD", +) + +print(rate) diff --git a/examples/rest/forex-snapshots_all_tickers.py b/examples/rest/forex-snapshots_all_tickers.py new file mode 100644 index 00000000..b61f5eda --- /dev/null +++ b/examples/rest/forex-snapshots_all_tickers.py @@ -0,0 +1,41 @@ +from massive import RESTClient +from massive.rest.models import ( + TickerSnapshot, + Agg, +) + +# docs +# https://massive.com/docs/forex/get_v2_snapshot_locale_global_markets_forex_tickers +# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html#get-all-snapshots + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +snapshot = client.get_snapshot_all("forex") # all tickers + +# print raw values +print(snapshot) + +# crunch some numbers +for item in snapshot: + # verify this is an TickerSnapshot + if isinstance(item, TickerSnapshot): + # verify this is an Agg + if isinstance(item.prev_day, Agg): + # verify this is a float + if isinstance(item.prev_day.open, float) and isinstance( + item.prev_day.close, float + ): + percent_change = ( + (item.prev_day.close - item.prev_day.open) + / item.prev_day.open + * 100 + ) + print( + "{:<15}{:<15}{:<15}{:.2f} %".format( + item.ticker, + item.prev_day.open, + item.prev_day.close, + percent_change, + ) + ) diff --git a/examples/rest/forex-snapshots_gainers_losers.py b/examples/rest/forex-snapshots_gainers_losers.py new file mode 100644 index 00000000..9fc7e36a --- /dev/null +++ b/examples/rest/forex-snapshots_gainers_losers.py @@ -0,0 +1,37 @@ +from massive import RESTClient +from massive.rest.models import ( + TickerSnapshot, +) + +# docs +# https://massive.com/docs/forex/get_v2_snapshot_locale_global_markets_forex__direction +# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html#get-gainers-losers-snapshot + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +# get gainers +gainers = client.get_snapshot_direction("forex", "gainers") +# print(gainers) + +# print ticker with % change +for gainer in gainers: + # verify this is a TickerSnapshot + if isinstance(gainer, TickerSnapshot): + # verify this is a float + if isinstance(gainer.todays_change_percent, float): + print("{:<15}{:.2f} %".format(gainer.ticker, gainer.todays_change_percent)) + +print() + +# get losers +losers = client.get_snapshot_direction("forex", "losers") +# print(losers) + +# print ticker with % change +for loser in losers: + # verify this is a TickerSnapshot + if isinstance(loser, TickerSnapshot): + # verify this is a float + if isinstance(loser.todays_change_percent, float): + print("{:<15}{:.2f} %".format(loser.ticker, loser.todays_change_percent)) diff --git a/examples/rest/forex-snapshots_ticker.py b/examples/rest/forex-snapshots_ticker.py new file mode 100644 index 00000000..f8cb5562 --- /dev/null +++ b/examples/rest/forex-snapshots_ticker.py @@ -0,0 +1,11 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/forex/get_v2_snapshot_locale_global_markets_forex_tickers__ticker +# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html#get-ticker-snapshot + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +ticker = client.get_snapshot_ticker("forex", "C:EURUSD") +print(ticker) diff --git a/examples/rest/forex-technical_indicators_ema.py b/examples/rest/forex-technical_indicators_ema.py new file mode 100644 index 00000000..2521e36d --- /dev/null +++ b/examples/rest/forex-technical_indicators_ema.py @@ -0,0 +1,17 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/forex/get_v1_indicators_ema__fxticker +# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +ema = client.get_ema( + ticker="C:EURUSD", + timespan="day", + window=50, + series_type="close", +) + +print(ema) diff --git a/examples/rest/forex-technical_indicators_macd.py b/examples/rest/forex-technical_indicators_macd.py new file mode 100644 index 00000000..8c07521c --- /dev/null +++ b/examples/rest/forex-technical_indicators_macd.py @@ -0,0 +1,19 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/forex/get_v1_indicators_macd__fxticker +# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +macd = client.get_macd( + ticker="C:EURUSD", + timespan="day", + short_window=12, + long_window=26, + signal_window=9, + series_type="close", +) + +print(macd) diff --git a/examples/rest/forex-technical_indicators_rsi.py b/examples/rest/forex-technical_indicators_rsi.py new file mode 100644 index 00000000..5ec4d6f2 --- /dev/null +++ b/examples/rest/forex-technical_indicators_rsi.py @@ -0,0 +1,17 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/forex/get_v1_indicators_rsi__fxticker +# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +rsi = client.get_rsi( + ticker="C:EURUSD", + timespan="day", + window=14, + series_type="close", +) + +print(rsi) diff --git a/examples/rest/forex-technical_indicators_sma.py b/examples/rest/forex-technical_indicators_sma.py new file mode 100644 index 00000000..51ede4d2 --- /dev/null +++ b/examples/rest/forex-technical_indicators_sma.py @@ -0,0 +1,17 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/forex/get_v1_indicators_sma__fxticker +# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +sma = client.get_sma( + ticker="C:EURUSD", + timespan="day", + window=50, + series_type="close", +) + +print(sma) diff --git a/examples/rest/forex-tickers.py b/examples/rest/forex-tickers.py new file mode 100644 index 00000000..10c49b6f --- /dev/null +++ b/examples/rest/forex-tickers.py @@ -0,0 +1,13 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/forex/get_v3_reference_tickers +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-tickers + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +tickers = [] +for t in client.list_tickers(market="fx", limit=1000): + tickers.append(t) +print(tickers) diff --git a/examples/rest/indices-aggregates_bars.py b/examples/rest/indices-aggregates_bars.py new file mode 100644 index 00000000..ddb9f9cd --- /dev/null +++ b/examples/rest/indices-aggregates_bars.py @@ -0,0 +1,30 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/indices/get_v2_aggs_ticker__indicesticker__range__multiplier___timespan___from___to +# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#massive.RESTClient.list_aggs + +# API key injected below for easy use. If not provided, the script will attempt +# to use the environment variable "MASSIVE_API_KEY". +# +# setx MASSIVE_API_KEY "" <- windows +# export MASSIVE_API_KEY="" <- mac/linux +# +# Note: To persist the environment variable you need to add the above command +# to the shell startup script (e.g. .bashrc or .bash_profile. +# +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +aggs = [] +for a in client.list_aggs( + "I:SPX", + 1, + "day", + "2023-03-10", + "2023-05-12", + limit=50000, +): + aggs.append(a) + +print(aggs) diff --git a/examples/rest/indices-daily_open_close.py b/examples/rest/indices-daily_open_close.py new file mode 100644 index 00000000..85c0d405 --- /dev/null +++ b/examples/rest/indices-daily_open_close.py @@ -0,0 +1,16 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/indices/get_v1_open-close__indicesticker___date +# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#get-daily-open-close-agg + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +# make request +request = client.get_daily_open_close_agg( + "I:SPX", + "2023-03-28", +) + +print(request) diff --git a/examples/rest/indices-market_holidays.py b/examples/rest/indices-market_holidays.py new file mode 100644 index 00000000..49fe6fd2 --- /dev/null +++ b/examples/rest/indices-market_holidays.py @@ -0,0 +1,20 @@ +from massive import RESTClient +from massive.rest.models import ( + MarketHoliday, +) + +# docs +# https://massive.com/docs/indices/get_v1_marketstatus_upcoming +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-market-holidays + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +holidays = client.get_market_holidays() +# print(holidays) + +# print date, name, and exchange +for holiday in holidays: + # verify this is an exchange + if isinstance(holiday, MarketHoliday): + print("{:<15}{:<15} ({})".format(holiday.date, holiday.name, holiday.exchange)) diff --git a/examples/rest/indices-market_status.py b/examples/rest/indices-market_status.py new file mode 100644 index 00000000..10296a94 --- /dev/null +++ b/examples/rest/indices-market_status.py @@ -0,0 +1,11 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/indices/get_v1_marketstatus_now +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-market-status + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +result = client.get_market_status() +print(result) diff --git a/examples/rest/indices-previous_close.py b/examples/rest/indices-previous_close.py new file mode 100644 index 00000000..18d7ceb5 --- /dev/null +++ b/examples/rest/indices-previous_close.py @@ -0,0 +1,14 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/indices/get_v2_aggs_ticker__indicesticker__prev +# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#get-previous-close-agg + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +aggs = client.get_previous_close_agg( + "I:SPX", +) + +print(aggs) diff --git a/examples/rest/indices-snapshots.py b/examples/rest/indices-snapshots.py new file mode 100644 index 00000000..5e85343f --- /dev/null +++ b/examples/rest/indices-snapshots.py @@ -0,0 +1,14 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/indices/get_v3_snapshot_indices +# https://github.com/massive-com/client-python/blob/master/massive/rest/snapshot.py# + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +tickers = ["I:SPX", "I:DJI", "I:VIX"] +snapshot = client.get_snapshot_indices(tickers) + +# print raw values +print(snapshot) diff --git a/examples/rest/indices-technical_indicators_ema.py b/examples/rest/indices-technical_indicators_ema.py new file mode 100644 index 00000000..35bc82ce --- /dev/null +++ b/examples/rest/indices-technical_indicators_ema.py @@ -0,0 +1,17 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/indices/get_v1_indicators_ema__indicesticker +# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +ema = client.get_ema( + ticker="I:SPX", + timespan="day", + window=50, + series_type="close", +) + +print(ema) diff --git a/examples/rest/indices-technical_indicators_macd.py b/examples/rest/indices-technical_indicators_macd.py new file mode 100644 index 00000000..c64524b7 --- /dev/null +++ b/examples/rest/indices-technical_indicators_macd.py @@ -0,0 +1,19 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/indices/get_v1_indicators_macd__indicesticker +# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +macd = client.get_macd( + ticker="I:SPX", + timespan="day", + short_window=12, + long_window=26, + signal_window=9, + series_type="close", +) + +print(macd) diff --git a/examples/rest/indices-technical_indicators_rsi.py b/examples/rest/indices-technical_indicators_rsi.py new file mode 100644 index 00000000..c8e3bce1 --- /dev/null +++ b/examples/rest/indices-technical_indicators_rsi.py @@ -0,0 +1,17 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/indices/get_v1_indicators_rsi__indicesticker +# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +rsi = client.get_rsi( + ticker="I:SPX", + timespan="day", + window=14, + series_type="close", +) + +print(rsi) diff --git a/examples/rest/indices-technical_indicators_sma.py b/examples/rest/indices-technical_indicators_sma.py new file mode 100644 index 00000000..709ec54b --- /dev/null +++ b/examples/rest/indices-technical_indicators_sma.py @@ -0,0 +1,17 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/indices/get_v1_indicators_sma__indicesticker +# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +sma = client.get_sma( + ticker="I:SPX", + timespan="day", + window=50, + series_type="close", +) + +print(sma) diff --git a/examples/rest/indices-ticker_types.py b/examples/rest/indices-ticker_types.py new file mode 100644 index 00000000..dfe62a1b --- /dev/null +++ b/examples/rest/indices-ticker_types.py @@ -0,0 +1,27 @@ +from typing import Optional, Union, List +from urllib3 import HTTPResponse +from massive import RESTClient +from massive.rest.models import ( + TickerTypes, +) + +# docs +# https://massive.com/docs/indices/get_v3_reference_tickers_types +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-ticker-types + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +types: Optional[Union[List[TickerTypes], HTTPResponse]] = None + +try: + types = client.get_ticker_types("indices") +except TypeError as e: + if "not NoneType" in str(e): + print("None found") + types = None + else: + raise + +if types is not None: + print(types) diff --git a/examples/rest/indices-tickers.py b/examples/rest/indices-tickers.py new file mode 100644 index 00000000..0270a9be --- /dev/null +++ b/examples/rest/indices-tickers.py @@ -0,0 +1,13 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/indices/get_v3_reference_tickers +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-tickers + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +tickers = [] +for t in client.list_tickers(market="indices", limit=1000): + tickers.append(t) +print(tickers) diff --git a/examples/rest/options-aggregates_bars.py b/examples/rest/options-aggregates_bars.py new file mode 100644 index 00000000..71c5343f --- /dev/null +++ b/examples/rest/options-aggregates_bars.py @@ -0,0 +1,30 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/options/get_v2_aggs_ticker__optionsticker__range__multiplier___timespan___from___to +# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#massive.RESTClient.list_aggs + +# API key injected below for easy use. If not provided, the script will attempt +# to use the environment variable "MASSIVE_API_KEY". +# +# setx MASSIVE_API_KEY "" <- windows +# export MASSIVE_API_KEY="" <- mac/linux +# +# Note: To persist the environment variable you need to add the above command +# to the shell startup script (e.g. .bashrc or .bash_profile. +# +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +aggs = [] +for a in client.list_aggs( + "O:SPY251219C00650000", + 1, + "day", + "2023-01-30", + "2023-02-03", + limit=50000, +): + aggs.append(a) + +print(aggs) diff --git a/examples/rest/options-conditions.py b/examples/rest/options-conditions.py new file mode 100644 index 00000000..30e40905 --- /dev/null +++ b/examples/rest/options-conditions.py @@ -0,0 +1,13 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/options/get_v3_reference_conditions +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-conditions + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +conditions = [] +for c in client.list_conditions("options", limit=1000): + conditions.append(c) +print(conditions) diff --git a/examples/rest/options-contract.py b/examples/rest/options-contract.py new file mode 100644 index 00000000..84093aa1 --- /dev/null +++ b/examples/rest/options-contract.py @@ -0,0 +1,13 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/options/get_v3_reference_options_contracts__options_ticker +# https://massive-api-client.readthedocs.io/en/latest/Contracts.html + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +contract = client.get_options_contract("O:EVRI240119C00002500") + +# print raw values +print(contract) diff --git a/examples/rest/options-contracts.py b/examples/rest/options-contracts.py new file mode 100644 index 00000000..08995c10 --- /dev/null +++ b/examples/rest/options-contracts.py @@ -0,0 +1,13 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/options/get_v3_reference_options_contracts +# https://massive-api-client.readthedocs.io/en/latest/Contracts.html#list-options-contracts + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +contracts = [] +for c in client.list_options_contracts("HCP"): + contracts.append(c) +print(contracts) diff --git a/examples/rest/options-daily_open_close.py b/examples/rest/options-daily_open_close.py new file mode 100644 index 00000000..7a756613 --- /dev/null +++ b/examples/rest/options-daily_open_close.py @@ -0,0 +1,16 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/options/get_v1_open-close__optionsticker___date +# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#get-daily-open-close-agg + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +# make request +request = client.get_daily_open_close_agg( + "O:SPY251219C00650000", + "2023-02-22", +) + +print(request) diff --git a/examples/rest/options-exchanges.py b/examples/rest/options-exchanges.py new file mode 100644 index 00000000..9678e19a --- /dev/null +++ b/examples/rest/options-exchanges.py @@ -0,0 +1,25 @@ +from massive import RESTClient +from massive.rest.models import ( + Exchange, +) + +# docs +# https://massive.com/docs/options/get_v3_reference_exchanges +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-exchanges + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +exchanges = client.get_exchanges("options") +print(exchanges) + +# loop over exchanges +for exchange in exchanges: + # verify this is an exchange + if isinstance(exchange, Exchange): + # print exchange info + print( + "{:<15}{} ({})".format( + exchange.asset_class, exchange.name, exchange.operating_mic + ) + ) diff --git a/examples/rest/options-last_trade.py b/examples/rest/options-last_trade.py new file mode 100644 index 00000000..d24cc79d --- /dev/null +++ b/examples/rest/options-last_trade.py @@ -0,0 +1,14 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/options/get_v2_last_trade__optionsticker +# https://massive-api-client.readthedocs.io/en/latest/Trades.html#get-last-trade + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +trade = client.get_last_trade( + "O:TSLA210903C00700000", +) + +print(trade) diff --git a/examples/rest/options-market_holidays.py b/examples/rest/options-market_holidays.py new file mode 100644 index 00000000..134aff86 --- /dev/null +++ b/examples/rest/options-market_holidays.py @@ -0,0 +1,20 @@ +from massive import RESTClient +from massive.rest.models import ( + MarketHoliday, +) + +# docs +# https://massive.com/docs/options/get_v1_marketstatus_upcoming +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-market-holidays + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +holidays = client.get_market_holidays() +# print(holidays) + +# print date, name, and exchange +for holiday in holidays: + # verify this is an exchange + if isinstance(holiday, MarketHoliday): + print("{:<15}{:<15} ({})".format(holiday.date, holiday.name, holiday.exchange)) diff --git a/examples/rest/options-market_status.py b/examples/rest/options-market_status.py new file mode 100644 index 00000000..8a8e7bfc --- /dev/null +++ b/examples/rest/options-market_status.py @@ -0,0 +1,11 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/options/get_v1_marketstatus_now +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-market-status + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +result = client.get_market_status() +print(result) diff --git a/examples/rest/options-previous_close.py b/examples/rest/options-previous_close.py new file mode 100644 index 00000000..720dc9d0 --- /dev/null +++ b/examples/rest/options-previous_close.py @@ -0,0 +1,14 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/options/get_v2_aggs_ticker__optionsticker__prev +# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#get-previous-close-agg + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +aggs = client.get_previous_close_agg( + "O:SPY251219C00650000", +) + +print(aggs) diff --git a/examples/rest/options-quotes.py b/examples/rest/options-quotes.py new file mode 100644 index 00000000..1cdf9b8a --- /dev/null +++ b/examples/rest/options-quotes.py @@ -0,0 +1,13 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/options/get_v3_quotes__optionsticker +# https://massive-api-client.readthedocs.io/en/latest/Quotes.html#list-quotes + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +quotes = [] +for t in client.list_quotes("O:SPY241220P00720000", limit=50000): + quotes.append(t) +print(quotes) diff --git a/examples/rest/options-snapshots_option_contract.py b/examples/rest/options-snapshots_option_contract.py new file mode 100644 index 00000000..bffc9ff4 --- /dev/null +++ b/examples/rest/options-snapshots_option_contract.py @@ -0,0 +1,13 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/options/get_v3_snapshot_options__underlyingasset___optioncontract +# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +snapshot = client.get_snapshot_option("AAPL", "O:AAPL230616C00150000") + +# print raw values +print(snapshot) diff --git a/examples/rest/options-snapshots_options_chain.py b/examples/rest/options-snapshots_options_chain.py new file mode 100644 index 00000000..8b0c5f02 --- /dev/null +++ b/examples/rest/options-snapshots_options_chain.py @@ -0,0 +1,19 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/options/get_v3_snapshot_options__underlyingasset +# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html#get-all-snapshots + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +options_chain = [] +for o in client.list_snapshot_options_chain( + "HCP", + params={ + "expiration_date.gte": "2024-03-16", + "strike_price.gte": 20, + }, +): + options_chain.append(o) +print(options_chain) diff --git a/examples/rest/options-technical_indicators_ema.py b/examples/rest/options-technical_indicators_ema.py new file mode 100644 index 00000000..82dd99d7 --- /dev/null +++ b/examples/rest/options-technical_indicators_ema.py @@ -0,0 +1,14 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/options/get_v1_indicators_ema__optionsticker +# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +ema = client.get_ema( + ticker="O:SPY241220P00720000", timespan="day", window=50, series_type="close" +) + +print(ema) diff --git a/examples/rest/options-technical_indicators_macd.py b/examples/rest/options-technical_indicators_macd.py new file mode 100644 index 00000000..a49f78a1 --- /dev/null +++ b/examples/rest/options-technical_indicators_macd.py @@ -0,0 +1,19 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/options/get_v1_indicators_macd__optionsticker +# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +macd = client.get_macd( + ticker="O:SPY241220P00720000", + timespan="day", + short_window=12, + long_window=26, + signal_window=9, + series_type="close", +) + +print(macd) diff --git a/examples/rest/options-technical_indicators_rsi.py b/examples/rest/options-technical_indicators_rsi.py new file mode 100644 index 00000000..0a92caec --- /dev/null +++ b/examples/rest/options-technical_indicators_rsi.py @@ -0,0 +1,14 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/options/get_v1_indicators_rsi__optionsticker +# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +rsi = client.get_rsi( + ticker="O:SPY241220P00720000", timespan="day", window=14, series_type="close" +) + +print(rsi) diff --git a/examples/rest/options-technical_indicators_sma.py b/examples/rest/options-technical_indicators_sma.py new file mode 100644 index 00000000..a6f0870e --- /dev/null +++ b/examples/rest/options-technical_indicators_sma.py @@ -0,0 +1,14 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/options/get_v1_indicators_sma__optionsticker +# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +sma = client.get_sma( + ticker="O:SPY241220P00720000", timespan="day", window=50, series_type="close" +) + +print(sma) diff --git a/examples/rest/options-ticker_details.py b/examples/rest/options-ticker_details.py new file mode 100644 index 00000000..fe742286 --- /dev/null +++ b/examples/rest/options-ticker_details.py @@ -0,0 +1,11 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/options/get_v3_reference_tickers__ticker +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-ticker-details + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +details = client.get_ticker_details("TSLA") +print(details) diff --git a/examples/rest/options-ticker_news.py b/examples/rest/options-ticker_news.py new file mode 100644 index 00000000..76b36c03 --- /dev/null +++ b/examples/rest/options-ticker_news.py @@ -0,0 +1,24 @@ +from massive import RESTClient +from massive.rest.models import ( + TickerNews, +) + +# docs +# https://massive.com/docs/options/get_v2_reference_news +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-ticker-news + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +news = [] +for n in client.list_ticker_news("AAPL", order="desc", limit=1000): + news.append(n) + +# print date + title +for index, item in enumerate(news): + # verify this is an agg + if isinstance(item, TickerNews): + print("{:<25}{:<15}".format(item.published_utc, item.title)) + + if index == 20: + break diff --git a/examples/rest/options-tickers.py b/examples/rest/options-tickers.py new file mode 100644 index 00000000..4a5e1104 --- /dev/null +++ b/examples/rest/options-tickers.py @@ -0,0 +1,13 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/options/get_v3_reference_tickers +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-tickers + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +tickers = [] +for t in client.list_tickers(limit=1000): + tickers.append(t) +print(tickers) diff --git a/examples/rest/options-trades.py b/examples/rest/options-trades.py new file mode 100644 index 00000000..8ff559ec --- /dev/null +++ b/examples/rest/options-trades.py @@ -0,0 +1,15 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/options/get_v3_trades__optionsticker +# https://massive-api-client.readthedocs.io/en/latest/Trades.html#massive.RESTClient.list_trades + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +trades = [] +for t in client.list_trades("O:TSLA210903C00700000", limit=50000): + trades.append(t) + +# prints each trade that took place +print(trades) diff --git a/examples/rest/raw-get.py b/examples/rest/raw-get.py index 89800015..8eab428b 100644 --- a/examples/rest/raw-get.py +++ b/examples/rest/raw-get.py @@ -1,4 +1,4 @@ -from polygon import RESTClient +from massive import RESTClient from typing import cast from urllib3 import HTTPResponse @@ -16,7 +16,7 @@ ), ) print(aggs.geturl()) -# https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/2022-04-01/2022-04-04 +# https://api.massive.com/v2/aggs/ticker/AAPL/range/1/day/2022-04-01/2022-04-04 print(aggs.status) # 200 print(aggs.data) diff --git a/examples/rest/raw-list.py b/examples/rest/raw-list.py index 5a5a5642..05455a1f 100644 --- a/examples/rest/raw-list.py +++ b/examples/rest/raw-list.py @@ -1,4 +1,4 @@ -from polygon import RESTClient +from massive import RESTClient from typing import cast from urllib3 import HTTPResponse @@ -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'{ @@ -79,5 +79,5 @@ # ], # "status": "OK", # "request_id": "618bb99e7a632ed9f55454a541404b44", -# "next_url": "https://api.polygon.io/v3/trades/AAA?cursor=YXA9NSZhcz0mbGltaXQ9NSZvcmRlcj1kZXNjJnNvcnQ9dGltZXN0YW1wJnRpbWVzdGFtcC5ndGU9MjAyMi0wNC0yMFQwNCUzQTAwJTNBMDBaJnRpbWVzdGFtcC5sdGU9MjAyMi0wNC0yMFQyMCUzQTEwJTNBMDAuMDAzODY5OTUyWg" +# "next_url": "https://api.massive.com/v3/trades/AAA?cursor=YXA9NSZhcz0mbGltaXQ9NSZvcmRlcj1kZXNjJnNvcnQ9dGltZXN0YW1wJnRpbWVzdGFtcC5ndGU9MjAyMi0wNC0yMFQwNCUzQTAwJTNBMDBaJnRpbWVzdGFtcC5sdGU9MjAyMi0wNC0yMFQyMCUzQTEwJTNBMDAuMDAzODY5OTUyWg" # }' diff --git a/examples/rest/simple-get.py b/examples/rest/simple-get.py index 43ad4387..377943cc 100644 --- a/examples/rest/simple-get.py +++ b/examples/rest/simple-get.py @@ -1,6 +1,13 @@ -from polygon import RESTClient +from massive import RESTClient +from massive.rest import models client = RESTClient() -aggs = client.get_aggs("AAPL", 1, "day", "2022-04-04", "2022-04-04") +aggs = client.get_aggs( + "AAPL", + 1, + "day", + "2022-04-04", + "2022-04-04", +) print(aggs) diff --git a/examples/rest/simple-list.py b/examples/rest/simple-list.py index dc93f315..c83d3a89 100644 --- a/examples/rest/simple-list.py +++ b/examples/rest/simple-list.py @@ -1,4 +1,4 @@ -from polygon import RESTClient +from massive import RESTClient client = RESTClient() diff --git a/examples/rest/stocks-aggregates_bars.py b/examples/rest/stocks-aggregates_bars.py new file mode 100644 index 00000000..3f2d0e59 --- /dev/null +++ b/examples/rest/stocks-aggregates_bars.py @@ -0,0 +1,30 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/stocks/get_v2_aggs_ticker__stocksticker__range__multiplier___timespan___from___to +# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#massive.RESTClient.list_aggs + +# API key injected below for easy use. If not provided, the script will attempt +# to use the environment variable "MASSIVE_API_KEY". +# +# setx MASSIVE_API_KEY "" <- windows +# export MASSIVE_API_KEY="" <- mac/linux +# +# Note: To persist the environment variable you need to add the above command +# to the shell startup script (e.g. .bashrc or .bash_profile. +# +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +aggs = [] +for a in client.list_aggs( + "AAPL", + 1, + "minute", + "2022-01-01", + "2023-02-03", + limit=50000, +): + aggs.append(a) + +print(aggs) diff --git a/examples/rest/stocks-aggregates_bars_extra.py b/examples/rest/stocks-aggregates_bars_extra.py new file mode 100644 index 00000000..feeb3218 --- /dev/null +++ b/examples/rest/stocks-aggregates_bars_extra.py @@ -0,0 +1,78 @@ +# This code retrieves stock market data for a specific stock using the +# Massive REST API and writes it to a CSV file. It uses the "massive" +# library to communicate with the API and the "csv" library to write +# the data to a CSV file. The script retrieves data for the stock "AAPL" +# for the dates "2023-01-30" to "2023-02-03" in 1 hour intervals. The +# resulting data includes the open, high, low, close, volume, vwap, +# timestamp, transactions, and otc values for each hour. The output is +# then printed to the console. +from massive import RESTClient +from massive.rest.models import ( + Agg, +) +import csv +import datetime +import io + +# docs +# https://massive.com/docs/stocks/get_v2_aggs_ticker__stocksticker__range__multiplier___timespan___from___to +# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#massive.RESTClient.list_aggs + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +aggs = [] +for a in client.list_aggs( + "AAPL", + 1, + "hour", + "2023-01-30", + "2023-02-03", + limit=50000, +): + aggs.append(a) + +print(aggs) + +# headers +headers = [ + "timestamp", + "open", + "high", + "low", + "close", + "volume", + "vwap", + "transactions", + "otc", +] + +# creating the csv string +csv_string = io.StringIO() +writer = csv.DictWriter(csv_string, fieldnames=headers) + +# writing headers +writer.writeheader() + +# writing data +for agg in aggs: + # verify this is an agg + if isinstance(agg, Agg): + # verify this is an int + if isinstance(agg.timestamp, int): + writer.writerow( + { + "timestamp": datetime.datetime.fromtimestamp(agg.timestamp / 1000), + "open": agg.open, + "high": agg.high, + "low": agg.low, + "close": agg.close, + "volume": agg.volume, + "vwap": agg.vwap, + "transactions": agg.transactions, + "otc": agg.otc, + } + ) + +# printing the csv string +print(csv_string.getvalue()) diff --git a/examples/rest/stocks-aggregates_bars_highcharts.py b/examples/rest/stocks-aggregates_bars_highcharts.py new file mode 100644 index 00000000..4695ed9d --- /dev/null +++ b/examples/rest/stocks-aggregates_bars_highcharts.py @@ -0,0 +1,136 @@ +from massive import RESTClient +from massive.rest.models import ( + Agg, +) +import datetime +import http.server +import socketserver +import traceback +import json + +# This program retrieves stock price data for the AAPL stock from the Massive +# API using a REST client, and formats the data in a format expected by the +# Highcharts JavaScript library. The program creates a web server that serves +# an HTML page that includes a candlestick chart of the AAPL stock prices using +# Highcharts. The chart displays data for the time range from January 1, 2019, +# to February 16, 2023. The chart data is updated by retrieving the latest data +# from the Massive API every time the HTML page is loaded or refreshed. The +# server listens on port 8888 and exits gracefully when a KeyboardInterrupt is +# received. +# +# Connect to http://localhost:8888 in your browser to view candlestick chart. + +PORT = 8888 + +# https://www.highcharts.com/blog/products/stock/ +# JavaScript StockChart with Date-Time Axis +html = """ + + + + + + + + + + + +
+ + + + +""" + +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +aggs = [] +for a in client.list_aggs( + "AAPL", + 1, + "day", + "2019-01-01", + "2023-02-16", + limit=50000, +): + aggs.append(a) + +# print(aggs) + +data = [] + +# writing data +for agg in aggs: + # verify this is an agg + if isinstance(agg, Agg): + # verify this is an int + if isinstance(agg.timestamp, int): + new_record = { + "date": agg.timestamp, + "open": agg.open, + "high": agg.high, + "low": agg.low, + "close": agg.close, + "volume": agg.volume, + } + + data.append(new_record) + +values = [[v for k, v in d.items()] for d in data] + +# json_data = json.dumps(data) +# print(json_data) + + +class handler(http.server.SimpleHTTPRequestHandler): + def do_GET(self): + if self.path == "/data": + self.send_response(200) + self.send_header("Content-type", "application/json") + self.end_headers() + json_data = json.dumps(values) + self.wfile.write(json_data.encode()) + else: + self.send_response(200) + self.send_header("Content-type", "text/html") + self.end_headers() + self.wfile.write(html.encode()) + + +# handle ctrl-c KeyboardInterrupt to exit the program gracefully +try: + while True: + # run http server + with socketserver.TCPServer(("", PORT), handler) as httpd: + print("serving at port", PORT) + httpd.serve_forever() + pass +except KeyboardInterrupt: + print("\nExiting gracefully...") + # traceback.print_exc() diff --git a/examples/rest/stocks-conditions.py b/examples/rest/stocks-conditions.py new file mode 100644 index 00000000..99740665 --- /dev/null +++ b/examples/rest/stocks-conditions.py @@ -0,0 +1,13 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/stocks/get_v3_reference_conditions +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-conditions + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +conditions = [] +for c in client.list_conditions(limit=1000): + conditions.append(c) +print(conditions) diff --git a/examples/rest/stocks-daily_open_close.py b/examples/rest/stocks-daily_open_close.py new file mode 100644 index 00000000..0e811597 --- /dev/null +++ b/examples/rest/stocks-daily_open_close.py @@ -0,0 +1,16 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/stocks/get_v1_open-close__stocksticker___date +# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#get-daily-open-close-agg + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +# make request +request = client.get_daily_open_close_agg( + "AAPL", + "2023-02-07", +) + +print(request) diff --git a/examples/rest/stocks-dividends.py b/examples/rest/stocks-dividends.py new file mode 100644 index 00000000..0c312195 --- /dev/null +++ b/examples/rest/stocks-dividends.py @@ -0,0 +1,13 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/stocks/get_v3_reference_dividends +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-dividends + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +dividends = [] +for d in client.list_dividends("MSFT", limit=1000): + dividends.append(d) +print(dividends) diff --git a/examples/rest/stocks-exchanges.py b/examples/rest/stocks-exchanges.py new file mode 100644 index 00000000..a8208163 --- /dev/null +++ b/examples/rest/stocks-exchanges.py @@ -0,0 +1,25 @@ +from massive import RESTClient +from massive.rest.models import ( + Exchange, +) + +# docs +# https://massive.com/docs/stocks/get_v3_reference_exchanges +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-exchanges + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +exchanges = client.get_exchanges() +print(exchanges) + +# loop over exchanges +for exchange in exchanges: + # verify this is an exchange + if isinstance(exchange, Exchange): + # print exchange info + print( + "{:<15}{} ({})".format( + exchange.asset_class, exchange.name, exchange.operating_mic + ) + ) diff --git a/examples/rest/stocks-grouped_daily_bars.py b/examples/rest/stocks-grouped_daily_bars.py new file mode 100644 index 00000000..e5e75722 --- /dev/null +++ b/examples/rest/stocks-grouped_daily_bars.py @@ -0,0 +1,20 @@ +from massive import RESTClient +import pprint + +# docs +# https://massive.com/docs/stocks/get_v2_aggs_grouped_locale_us_market_stocks__date +# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#get-grouped-daily-aggs + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +grouped = client.get_grouped_daily_aggs( + "2023-02-16", +) + +# print(grouped) + +# pprint (short for "pretty-print") is a module that provides a more human- +# readable output format for data structures. +pp = pprint.PrettyPrinter(indent=2) +pp.pprint(grouped) diff --git a/examples/rest/stocks-ipos.py b/examples/rest/stocks-ipos.py new file mode 100644 index 00000000..abaf8b04 --- /dev/null +++ b/examples/rest/stocks-ipos.py @@ -0,0 +1,13 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/rest/stocks/corporate-actions/ipos + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_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-last_quote.py b/examples/rest/stocks-last_quote.py new file mode 100644 index 00000000..78da1600 --- /dev/null +++ b/examples/rest/stocks-last_quote.py @@ -0,0 +1,14 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/stocks/get_v2_last_nbbo__stocksticker +# https://massive-api-client.readthedocs.io/en/latest/Quotes.html#get-last-quote + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +quote = client.get_last_quote( + "AAPL", +) + +print(quote) diff --git a/examples/rest/stocks-last_trade.py b/examples/rest/stocks-last_trade.py new file mode 100644 index 00000000..77f19451 --- /dev/null +++ b/examples/rest/stocks-last_trade.py @@ -0,0 +1,14 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/stocks/get_v2_last_trade__stocksticker +# https://massive-api-client.readthedocs.io/en/latest/Trades.html#get-last-trade + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +trade = client.get_last_trade( + "AAPL", +) + +print(trade) diff --git a/examples/rest/stocks-market_holidays.py b/examples/rest/stocks-market_holidays.py new file mode 100644 index 00000000..8e55248d --- /dev/null +++ b/examples/rest/stocks-market_holidays.py @@ -0,0 +1,20 @@ +from massive import RESTClient +from massive.rest.models import ( + MarketHoliday, +) + +# docs +# https://massive.com/docs/stocks/get_v1_marketstatus_upcoming +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-market-holidays + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +holidays = client.get_market_holidays() +# print(holidays) + +# print date, name, and exchange +for holiday in holidays: + # verify this is an exchange + if isinstance(holiday, MarketHoliday): + print("{:<15}{:<15} ({})".format(holiday.date, holiday.name, holiday.exchange)) diff --git a/examples/rest/stocks-market_status.py b/examples/rest/stocks-market_status.py new file mode 100644 index 00000000..dc143f57 --- /dev/null +++ b/examples/rest/stocks-market_status.py @@ -0,0 +1,11 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/stocks/get_v1_marketstatus_now +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-market-status + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +result = client.get_market_status() +print(result) diff --git a/examples/rest/stocks-previous_close.py b/examples/rest/stocks-previous_close.py new file mode 100644 index 00000000..a1d0fab0 --- /dev/null +++ b/examples/rest/stocks-previous_close.py @@ -0,0 +1,14 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/stocks/get_v2_aggs_ticker__stocksticker__prev +# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#get-previous-close-agg + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +aggs = client.get_previous_close_agg( + "AAPL", +) + +print(aggs) diff --git a/examples/rest/stocks-quotes.py b/examples/rest/stocks-quotes.py new file mode 100644 index 00000000..80f61c2b --- /dev/null +++ b/examples/rest/stocks-quotes.py @@ -0,0 +1,21 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/stocks/get_v3_quotes__stockticker +# https://massive-api-client.readthedocs.io/en/latest/Quotes.html#list-quotes + +# NBBO (National Best Bid and Offer) is a term used in the financial industry +# to describe the best bid and offer prices for a particular stock or security +# being traded on all the available stock exchanges in the United States. It +# provides information on the highest price a buyer is willing to pay (best +# bid) and the lowest price a seller is willing to accept (best offer) for a +# particular security. This information is used by traders to make informed +# investment decisions and execute trades at the best available price. + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +quotes = [] +for t in client.list_quotes("IBIO", "2023-02-01", limit=50000): + quotes.append(t) +print(quotes) diff --git a/examples/rest/stocks-related_companies.py b/examples/rest/stocks-related_companies.py new file mode 100644 index 00000000..f0dc6fea --- /dev/null +++ b/examples/rest/stocks-related_companies.py @@ -0,0 +1,10 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/stocks/get_v1_related-companies__ticker + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_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..075f079c --- /dev/null +++ b/examples/rest/stocks-short_interest.py @@ -0,0 +1,13 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/rest/stocks/fundamentals/short-interest + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +items = [] +for item in client.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..31aa03ae --- /dev/null +++ b/examples/rest/stocks-short_volume.py @@ -0,0 +1,13 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/rest/stocks/fundamentals/short-volume + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +items = [] +for item in client.list_short_volume(ticker="RDDT"): + items.append(item) + +print(items) diff --git a/examples/rest/stocks-snapshots_all.py b/examples/rest/stocks-snapshots_all.py new file mode 100644 index 00000000..f351f918 --- /dev/null +++ b/examples/rest/stocks-snapshots_all.py @@ -0,0 +1,45 @@ +from massive import RESTClient +from massive.rest.models import ( + TickerSnapshot, + Agg, +) + +# docs +# https://massive.com/docs/stocks/get_v2_snapshot_locale_us_markets_stocks_tickers +# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html#get-all-snapshots + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +# tickers we are interested in +tickers = ["TSLA", "AAPL", "MSFT", "META"] + +# snapshot = client.get_snapshot_all("stocks") # all tickers +snapshot = client.get_snapshot_all("stocks", tickers) + +# print raw values +print(snapshot) + +# crunch some numbers +for item in snapshot: + # verify this is an TickerSnapshot + if isinstance(item, TickerSnapshot): + # verify this is an Agg + if isinstance(item.prev_day, Agg): + # verify this is a float + if isinstance(item.prev_day.open, float) and isinstance( + item.prev_day.close, float + ): + percent_change = ( + (item.prev_day.close - item.prev_day.open) + / item.prev_day.open + * 100 + ) + print( + "{:<15}{:<15}{:<15}{:.2f} %".format( + item.ticker, + item.prev_day.open, + item.prev_day.close, + percent_change, + ) + ) diff --git a/examples/rest/stocks-snapshots_gainers_losers.py b/examples/rest/stocks-snapshots_gainers_losers.py new file mode 100644 index 00000000..80fadc14 --- /dev/null +++ b/examples/rest/stocks-snapshots_gainers_losers.py @@ -0,0 +1,37 @@ +from massive import RESTClient +from massive.rest.models import ( + TickerSnapshot, +) + +# docs +# https://massive.com/docs/stocks/get_v2_snapshot_locale_us_markets_stocks__direction +# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html#get-gainers-losers-snapshot + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +# get gainers +gainers = client.get_snapshot_direction("stocks", "gainers") +# print(gainers) + +# print ticker with % change +for gainer in gainers: + # verify this is a TickerSnapshot + if isinstance(gainer, TickerSnapshot): + # verify this is a float + if isinstance(gainer.todays_change_percent, float): + print("{:<15}{:.2f} %".format(gainer.ticker, gainer.todays_change_percent)) + +print() + +# get losers +losers = client.get_snapshot_direction("stocks", "losers") +# print(losers) + +# print ticker with % change +for loser in losers: + # verify this is a TickerSnapshot + if isinstance(loser, TickerSnapshot): + # verify this is a float + if isinstance(loser.todays_change_percent, float): + print("{:<15}{:.2f} %".format(loser.ticker, loser.todays_change_percent)) diff --git a/examples/rest/stocks-snapshots_ticker.py b/examples/rest/stocks-snapshots_ticker.py new file mode 100644 index 00000000..f12107ec --- /dev/null +++ b/examples/rest/stocks-snapshots_ticker.py @@ -0,0 +1,11 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/stocks/get_v2_snapshot_locale_us_markets_stocks_tickers__stocksticker +# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html#get-ticker-snapshot + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +ticker = client.get_snapshot_ticker("stocks", "AAPL") +print(ticker) diff --git a/examples/rest/stocks-stock_financials.py b/examples/rest/stocks-stock_financials.py new file mode 100644 index 00000000..2eb0c957 --- /dev/null +++ b/examples/rest/stocks-stock_financials.py @@ -0,0 +1,20 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/stocks/get_vx_reference_financials +# https://massive-api-client.readthedocs.io/en/latest/vX.html#list-stock-financials + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +financials = [] +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/rest/stocks-stock_splits.py b/examples/rest/stocks-stock_splits.py new file mode 100644 index 00000000..4a43cad2 --- /dev/null +++ b/examples/rest/stocks-stock_splits.py @@ -0,0 +1,13 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/stocks/get_v3_reference_splits +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-splits + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +splits = [] +for s in client.list_splits("TSLA", limit=1000): + splits.append(s) +print(splits) diff --git a/examples/rest/stocks-technical_indicators_ema.py b/examples/rest/stocks-technical_indicators_ema.py new file mode 100644 index 00000000..b71abe46 --- /dev/null +++ b/examples/rest/stocks-technical_indicators_ema.py @@ -0,0 +1,17 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/stocks/get_v1_indicators_ema__stockticker +# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +ema = client.get_ema( + ticker="AAPL", + timespan="day", + window=50, + series_type="close", +) + +print(ema) diff --git a/examples/rest/stocks-technical_indicators_macd.py b/examples/rest/stocks-technical_indicators_macd.py new file mode 100644 index 00000000..4b9bd323 --- /dev/null +++ b/examples/rest/stocks-technical_indicators_macd.py @@ -0,0 +1,19 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/stocks/get_v1_indicators_macd__stockticker +# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +macd = client.get_macd( + ticker="AAPL", + timespan="day", + short_window=12, + long_window=26, + signal_window=9, + series_type="close", +) + +print(macd) diff --git a/examples/rest/stocks-technical_indicators_rsi.py b/examples/rest/stocks-technical_indicators_rsi.py new file mode 100644 index 00000000..20ac8758 --- /dev/null +++ b/examples/rest/stocks-technical_indicators_rsi.py @@ -0,0 +1,17 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/stocks/get_v1_indicators_rsi__stockticker +# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +rsi = client.get_rsi( + ticker="AAPL", + timespan="day", + window=14, + series_type="close", +) + +print(rsi) diff --git a/examples/rest/stocks-technical_indicators_sma.py b/examples/rest/stocks-technical_indicators_sma.py new file mode 100644 index 00000000..a08fec13 --- /dev/null +++ b/examples/rest/stocks-technical_indicators_sma.py @@ -0,0 +1,17 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/stocks/get_v1_indicators_sma__stockticker +# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +sma = client.get_sma( + ticker="AAPL", + timespan="day", + window=50, + series_type="close", +) + +print(sma) diff --git a/examples/rest/stocks-ticker_details.py b/examples/rest/stocks-ticker_details.py new file mode 100644 index 00000000..ac3b6b1e --- /dev/null +++ b/examples/rest/stocks-ticker_details.py @@ -0,0 +1,11 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/stocks/get_v3_reference_tickers__ticker +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-ticker-details + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +details = client.get_ticker_details("AAPL") +print(details) diff --git a/examples/rest/stocks-ticker_events.py b/examples/rest/stocks-ticker_events.py new file mode 100644 index 00000000..b8337f43 --- /dev/null +++ b/examples/rest/stocks-ticker_events.py @@ -0,0 +1,11 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/stocks/get_vx_reference_tickers__id__events +# https://github.com/massive-com/client-python/blob/master/massive/rest/reference.py + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +events = client.get_ticker_events("META") +print(events) diff --git a/examples/rest/stocks-ticker_news.py b/examples/rest/stocks-ticker_news.py new file mode 100644 index 00000000..cea11857 --- /dev/null +++ b/examples/rest/stocks-ticker_news.py @@ -0,0 +1,26 @@ +from massive import RESTClient +from massive.rest.models import ( + TickerNews, +) + +# docs +# https://massive.com/docs/stocks/get_v2_reference_news +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-ticker-news + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +news = [] +for n in client.list_ticker_news("BBBY", order="desc", limit=1000): + news.append(n) + +# print(news) + +# print date + title +for index, item in enumerate(news): + # verify this is an agg + if isinstance(item, TickerNews): + print("{:<25}{:<15}".format(item.published_utc, item.title)) + + if index == 20: + break diff --git a/examples/rest/stocks-ticker_types.py b/examples/rest/stocks-ticker_types.py new file mode 100644 index 00000000..7748868c --- /dev/null +++ b/examples/rest/stocks-ticker_types.py @@ -0,0 +1,11 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/stocks/get_v3_reference_tickers_types +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-ticker-types + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +types = client.get_ticker_types() +print(types) diff --git a/examples/rest/stocks-tickers.py b/examples/rest/stocks-tickers.py new file mode 100644 index 00000000..c441fab2 --- /dev/null +++ b/examples/rest/stocks-tickers.py @@ -0,0 +1,13 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/stocks/get_v3_reference_tickers +# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-tickers + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +tickers = [] +for t in client.list_tickers(market="stocks", type="CS", active=True, limit=1000): + tickers.append(t) +print(tickers) diff --git a/examples/rest/stocks-trades.py b/examples/rest/stocks-trades.py new file mode 100644 index 00000000..9d1de07c --- /dev/null +++ b/examples/rest/stocks-trades.py @@ -0,0 +1,21 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/stocks/get_v3_trades__stockticker +# https://massive-api-client.readthedocs.io/en/latest/Trades.html#massive.RESTClient.list_trades + +# Trade data refers to the tick records of individual transactions that have +# taken place in a financial market, such as the price, size, and time of +# each trade. It provides a high-frequency, granular view of market activity, +# and is used by traders, investors, and researchers to gain insights into +# market behavior and inform their investment decisions. + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +trades = [] +for t in client.list_trades("IBIO", "2023-02-01", limit=50000): + trades.append(t) + +# prints each trade that took place +print(trades) diff --git a/examples/rest/stocks-trades_extra.py b/examples/rest/stocks-trades_extra.py new file mode 100644 index 00000000..0aa27142 --- /dev/null +++ b/examples/rest/stocks-trades_extra.py @@ -0,0 +1,27 @@ +# This code retrieves trade records and counts the amount of money that changes hands. +from massive import RESTClient +from massive.rest.models import ( + Trade, +) + +# docs +# https://massive.com/docs/stocks/get_v3_trades__stockticker +# https://massive-api-client.readthedocs.io/en/latest/Trades.html#massive.RESTClient.list_trades + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +# used to track money across trades +money = float(0) + +# loop through and count price * volume +for t in client.list_trades("DIS", "2023-02-07", limit=50000): + # verify this is an Trade + if isinstance(t, Trade): + # verify these are float + if isinstance(t.price, float) and isinstance(t.size, int): + money += t.price * t.size + +# format the number so it's human readable +formatted_number = "{:,.2f}".format(money) +print("Roughly " + formatted_number + " changed hands for DIS on 2023-02-07.") diff --git a/examples/rest/universal-snapshot.py b/examples/rest/universal-snapshot.py new file mode 100644 index 00000000..ba37c62d --- /dev/null +++ b/examples/rest/universal-snapshot.py @@ -0,0 +1,47 @@ +from typing import cast, Iterator, Union +from urllib3 import HTTPResponse +from massive import RESTClient +from massive.rest.models import UniversalSnapshot, SnapshotMarketType + +# docs +# https://massive.com/docs/stocks/get_v3_snapshot +# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html + +# client = RESTClient("XXXXXX") # hardcoded api_key is used +client = RESTClient() # MASSIVE_API_KEY environment variable is used + + +def print_snapshots(iterator: Union[Iterator[UniversalSnapshot], HTTPResponse]): + snapshots = [s for s in iterator] + + print(f"count: {len(snapshots)}") + + for item in snapshots: + print(item) + + +# it = client.list_universal_snapshots() # all tickers for all assets types in lexicographical order + +it = client.list_universal_snapshots( + ticker_any_of=[ + "AAPL", + "O:AAPL230519C00055000", + "DOES_NOT_EXIST", + "X:1INCHUSD", + "C:AEDAUD", + ] +) +print_snapshots(it) + +it = client.list_universal_snapshots(type="stocks", ticker_gt="A", ticker_lt="AAPL") +print_snapshots(it) + +it = client.list_universal_snapshots(type="stocks", ticker_gte="AAPL", ticker_lte="ABB") +print_snapshots(it) + +it = client.list_universal_snapshots( + type="options", + ticker_gte="O:AAPL230804C00050000", + ticker_lte="O:AAPL230804C00070000", +) +print_snapshots(it) diff --git a/examples/tools/async_websocket_rest_handler/async_websocket_rest_handler.py b/examples/tools/async_websocket_rest_handler/async_websocket_rest_handler.py new file mode 100644 index 00000000..c19975f1 --- /dev/null +++ b/examples/tools/async_websocket_rest_handler/async_websocket_rest_handler.py @@ -0,0 +1,109 @@ +import asyncio +import logging +import os +import re +from concurrent.futures import ThreadPoolExecutor +from typing import Optional, Union +from massive import RESTClient, WebSocketClient +from massive.websocket.models import Market, Feed + + +class ApiCallHandler: + def __init__(self): + self.api_call_queue = asyncio.Queue() + self.executor = ThreadPoolExecutor() # Thread pool for running synchronous code + self.client = RESTClient() # Assumes MASSIVE_API_KEY is set in the environment + + async def enqueue_api_call(self, options_ticker): + await self.api_call_queue.put(options_ticker) + + async def start_processing_api_calls(self): + while True: + options_ticker = await self.api_call_queue.get() + try: + # TODO: + # Here, you can process the rest api requets as needed + # Example: Get the options contract for this + contract = await asyncio.get_running_loop().run_in_executor( + self.executor, self.get_options_contract, options_ticker + ) + print(contract) # Or process the contract data as needed + except Exception as e: + logging.error(f"Error processing API call for {options_ticker}: {e}") + finally: + self.api_call_queue.task_done() + + def get_options_contract(self, options_ticker): + return self.client.get_options_contract(options_ticker) + + +class MessageHandler: + def __init__(self, api_call_handler): + self.handler_queue = asyncio.Queue() + self.api_call_handler = api_call_handler + + async def add(self, message_response: Optional[Union[str, bytes]]) -> None: + await self.handler_queue.put(message_response) + + async def start_handling(self) -> None: + while True: + message_response = await self.handler_queue.get() + logging.info(f"Received message: {message_response}") + try: + # TODO: + # Here, you can process the websocket messages as needed + # Example: Extract ticker symbol and enqueue REST API call + # to get the options contract for this trade (non-blocking) + for trade in message_response: + ticker = self.extract_symbol(trade.symbol) + if ticker == "NVDA": + asyncio.create_task( + self.api_call_handler.enqueue_api_call(trade.symbol) + ) + except Exception as e: + logging.error(f"Error handling message: {e}") + finally: + self.handler_queue.task_done() + + def extract_symbol(self, input_string): + match = re.search(r"O:([A-Z]+)", input_string) + if match: + return match.group(1) + else: + return None + + +class MyClient: + def __init__(self, feed, market, subscriptions): + api_key = os.getenv("MASSIVE_API_KEY") + self.massive_websocket_client = WebSocketClient( + api_key=api_key, + feed=feed, + market=market, + verbose=True, + subscriptions=subscriptions, + ) + self.api_call_handler = ApiCallHandler() + self.message_handler = MessageHandler(self.api_call_handler) + + async def start_event_stream(self): + try: + await asyncio.gather( + self.massive_websocket_client.connect(self.message_handler.add), + self.message_handler.start_handling(), + self.api_call_handler.start_processing_api_calls(), + ) + except Exception as e: + logging.error(f"Error in event stream: {e}") + + +async def main(): + logging.basicConfig(level=logging.INFO) + my_client = MyClient( + feed=Feed.RealTime, market=Market.Options, subscriptions=["T.*"] + ) + await my_client.start_event_stream() + + +# Entry point for the asyncio program +asyncio.run(main()) diff --git a/examples/tools/async_websocket_rest_handler/readme.md b/examples/tools/async_websocket_rest_handler/readme.md new file mode 100644 index 00000000..f68f535f --- /dev/null +++ b/examples/tools/async_websocket_rest_handler/readme.md @@ -0,0 +1,16 @@ +# Pattern for Non-Blocking WebSocket and REST Calls in Python + +This script demonstrates a non-blocking pattern for handling WebSocket streams and REST API calls in Python using asyncio. It focuses on efficient, concurrent processing of real-time financial data and asynchronous fetching of additional information, ensuring that real-time data streams are managed without delays or blockages. The tutorial provides both theoretical insights and a practical, adaptable example, ideal for applications in financial data processing and similar real-time data handling scenarios. + +Please see the [tutorial](https://massive.com/blog/pattern-for-non-blocking-websocket-and-rest-calls-in-python) for more details. + +### Prerequisites + +- Python 3.x +- Massive.com account and Options API key + +### Running the Example + +``` +python3 async_websocket_rest_handler.py +``` \ No newline at end of file diff --git a/examples/tools/docker/Dockerfile b/examples/tools/docker/Dockerfile new file mode 100644 index 00000000..b79a7af1 --- /dev/null +++ b/examples/tools/docker/Dockerfile @@ -0,0 +1,19 @@ +# Use an official Python runtime as a parent image +FROM python:3.8-slim + +# Set the working directory in the container +WORKDIR /usr/src/app + +# Copy the current directory contents into the container at /usr/src/app +COPY . . + +# Install any needed packages specified in requirements.txt +RUN pip install --no-cache-dir massive + +# Set the environment variable for the Massive API key +# Note: Replace "" with your actual API key or use Docker's --env flag when running the container to set it dynamically +# Warning: Not recommended for production or shared environments +ENV MASSIVE_API_KEY= + +# Run the script when the container launches +CMD ["python", "./app.py"] diff --git a/examples/tools/docker/app.py b/examples/tools/docker/app.py new file mode 100644 index 00000000..321bb4b9 --- /dev/null +++ b/examples/tools/docker/app.py @@ -0,0 +1,20 @@ +from massive import RESTClient + +# docs +# https://massive.com/docs/stocks/get_v2_aggs_ticker__stocksticker__range__multiplier___timespan___from___to +# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#massive.RESTClient.list_aggs + +client = RESTClient() # MASSIVE_API_KEY environment variable is used + +aggs = [] +for a in client.list_aggs( + "AAPL", + 1, + "hour", + "2024-01-30", + "2024-01-30", + limit=50000, +): + aggs.append(a) + +print(aggs) diff --git a/examples/tools/docker/readme.md b/examples/tools/docker/readme.md new file mode 100644 index 00000000..ff3f24e4 --- /dev/null +++ b/examples/tools/docker/readme.md @@ -0,0 +1,41 @@ +# Dockerized Python Application with Massive API Client + +This Docker setup provides a ready-to-use environment for running Python scripts that utilize the `massive-api-client` for financial data processing. It encapsulates the Python environment and the `massive-api-client` library in a Docker container, making it easy to deploy and run the application consistently across any system with Docker installed. This approach is particularly useful for developers looking to integrate Massive's financial data APIs into their applications without worrying about environment inconsistencies. + +### Prerequisites + +- [Docker](https://www.docker.com/) installed on your machine +- [Massive.com](https://massive.com/) account and API key + +### Setup and Configuration + +1. Clone the repository or download the Dockerfile and your Python script into a directory. +2. Use Docker's `--env` flag when running the container to set the `MASSIVE_API_KEY` environment variable dynamically, or replace `` in the Dockerfile with your Massive API key (not recommended for production or shared environments). +3. Ensure your Python script (e.g., `app.py`) is in the same directory as the Dockerfile. + +### Building the Docker Image + +Any modifications to the Python script will require rebuilding the Docker image to reflect the changes in the containerized environment. Use the docker build command each time your script is updated to ensure the latest version is used in your Docker container. + +Navigate to the directory containing your Dockerfile and execute the following command to build your Docker image: + +``` +docker build -t massive-client-app . +``` + +This command creates a Docker image named `massive-client-app` based on the instructions in your Dockerfile. + +### Running the Docker Container + +Run your Docker container using the following command: + +``` +docker run --env MASSIVE_API_KEY="" massive-client-app +``` + +Replace `` with your actual Massive API key. This command starts a Docker container based on the `massive-client-app` image, sets the `MASSIVE_API_KEY` environment variable to your provided API key, and runs your Python script inside the container. + +### Additional Notes + +- The Docker setup provided here is a very basic example. Depending on your specific requirements, you might need to customize the Dockerfile, such as adding volume mounts for persistent data or exposing ports for network communication. +- For more details on using the Massive API and the `massive-api-client` library, please refer to the [Massive documentation](https://massive.com/docs), the [massive-com/client-python](https://github.com/massive-com/client-python) repo, or the [massive-api-client documentation](https://massive-api-client.readthedocs.io/en/latest/). \ No newline at end of file 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..0ea4ce4f --- /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://massive.com/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..fcb42572 --- /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://massive.com/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..5465e29f --- /dev/null +++ b/examples/tools/flatfiles-stock-trades/readme.md @@ -0,0 +1,86 @@ +# Massive.com Flat Files Stock Trades Analysis Scripts + +This repository contains Python scripts for analyzing stock market trading data using Flat Files from Massive.com. 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://massive.com/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://massive.com/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..35d59a4e --- /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://massive.com/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..3e89cdfc --- /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://massive.com/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..874ad568 --- /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://massive.com/blog/hunting-anomalies-in-stock-market/) tutorial, hosted on Massive.com'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 Massive.com's historical data via Flat Files +- An active Massive.com 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 (massive-api-client, pandas, pickle, and argparse) are installed. + +2. **Set up your API key:** Make sure you have an active paid Massive.com 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 s3massive https://files.massive.com YOUR_ACCESS_KEY YOUR_SECRET_KEY + mc cp --recursive s3massive/flatfiles/us_stocks_sip/day_aggs_v1/2024/08/ ./aggregates_day/ + mc cp --recursive s3massive/flatfiles/us_stocks_sip/day_aggs_v1/2024/09/ ./aggregates_day/ + mc cp --recursive s3massive/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://massive.com/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..8d8e49c2 --- /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 massive import RESTClient +from massive.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 + ) # MASSIVE_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..75327a35 --- /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 Massive.com'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://massive.com/blog/related-companies-api) for more details. + +### Prerequisites + +- Python 3.8+ +- Have Massive.com's [python client](https://github.com/massive-com/client-python) installed +- An active Massive.com 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://massive.com/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..774bb353 --- /dev/null +++ b/examples/tools/related-companies/related-companies-demo.py @@ -0,0 +1,40 @@ +from massive 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/examples/tools/treemap/market-wide-treemap.png b/examples/tools/treemap/market-wide-treemap.png new file mode 100644 index 00000000..3e072d92 Binary files /dev/null and b/examples/tools/treemap/market-wide-treemap.png differ diff --git a/examples/tools/treemap/polygon_sic_code_data_gatherer.py b/examples/tools/treemap/polygon_sic_code_data_gatherer.py new file mode 100644 index 00000000..04307e3c --- /dev/null +++ b/examples/tools/treemap/polygon_sic_code_data_gatherer.py @@ -0,0 +1,130 @@ +import json +import concurrent.futures +from massive import RESTClient + +# Initialize Massive API client +client = RESTClient( + trace=True +) # Assuming you have MASSIVE_API_KEY environment variable set up + +# Initialize the data structure to hold SIC code groups +sic_code_groups = {} + + +# https://en.wikipedia.org/wiki/Standard_Industrial_Classification +# https://www.investopedia.com/terms/s/sic_code.asp +def sic_code_to_group(sic_code): + """ + Maps a given SIC code to the industry group. + """ + sic_code = int(sic_code) + if 100 <= sic_code <= 999: + return "Agriculture, Forestry and Fishing" + elif 1000 <= sic_code <= 1499: + return "Mining" + elif 1500 <= sic_code <= 1799: + return "Construction" + # Note: 1800-1999 not used + elif 2000 <= sic_code <= 3999: + return "Manufacturing" + elif 4000 <= sic_code <= 4999: + return "Transportation and Public Utilities" + elif 5000 <= sic_code <= 5199: + return "Wholesale Trade" + elif 5200 <= sic_code <= 5999: + return "Retail Trade" + elif 6000 <= sic_code <= 6799: + return "Finance, Insurance and Real Estate" + elif 7000 <= sic_code <= 8999: + return "Services" + elif 9100 <= sic_code <= 9729: + return "Public Administration" + elif 9900 <= sic_code <= 9999: + return "Nonclassifiable" + else: + return None + + +def process_ticker(ticker_snapshot): + ticker = ticker_snapshot.ticker + + try: + details = client.get_ticker_details(ticker) + + # Check if the type is 'CS' (common stock), if not, return early without processing this ticker + # if getattr(details, 'type', None) != 'CS' or getattr(details, 'market_cap', None) != None: + if ( + getattr(details, "type", None) != "CS" + or getattr(details, "market_cap", None) is None + ): + return + + sic_code = details.sic_code + sic_description = getattr( + details, "sic_description", None + ) # Use getattr to avoid AttributeError if sic_description is not present + market_cap = getattr(details, "market_cap", None) + + # if sic_code: + # sic_code = str(sic_code)[:1] # Extract first 1 digits + + if sic_code: + sic_group = sic_code_to_group(sic_code) + if sic_group is None: + return + + # Check if the sic_code is already in the groups, if not create a new entry with sic_description and empty companies list + # if sic_code not in sic_code_groups: + # sic_code_groups[sic_code] = {"sic_description": sic_description, "companies": []} + + if sic_group not in sic_code_groups: + sic_code_groups[sic_group] = { + "sic_description": sic_group, + "companies": [], + } + + # Append the company details to the corresponding SIC code entry + # sic_code_groups[sic_code]["companies"].append({ + # "ticker": ticker, + # "market_cap": market_cap + # }) + + sic_code_groups[sic_group]["companies"].append( + {"ticker": ticker, "market_cap": market_cap} + ) + + except Exception as e: + print(f"Error processing ticker {ticker}: {e}") + + +# Get snapshot data +snapshot = client.get_snapshot_all("stocks") + +# Execute the data processing in parallel, limited to 100 workers +with concurrent.futures.ThreadPoolExecutor(max_workers=100) as executor: + executor.map(process_ticker, snapshot) + +# Modify the SIC Code Groups Dictionary to include the weights +for sic_code, group_data in sic_code_groups.items(): + companies = group_data["companies"] + total_market_cap = sum( + company["market_cap"] for company in companies if company["market_cap"] + ) + + # If total_market_cap is 0, we will skip weight calculation to avoid division by zero + if total_market_cap == 0: + continue + + for company in companies: + if company[ + "market_cap" + ]: # Avoid dividing by zero if a company's market cap is None or 0 + company["weight"] = company["market_cap"] / total_market_cap + else: + company["weight"] = 0 # You can also set to a default value if preferred + +# Save the enhanced data structure to a JSON file +with open("sic_code_groups.json", "w") as f: + json.dump(sic_code_groups, f) + +print("Data collection complete and saved to 'sic_code_groups.json'") diff --git a/examples/tools/treemap/readme.md b/examples/tools/treemap/readme.md new file mode 100644 index 00000000..8c55ec3f --- /dev/null +++ b/examples/tools/treemap/readme.md @@ -0,0 +1,60 @@ +# Mapping Market Movements with Massive.com and D3.js Treemap + +This repository offers a tutorial on how to create a Treemap visualization of the current stock market conditions. Using D3.js Treemap, Massive.com's [Snapshot API](https://massive.com/docs/stocks/get_v2_snapshot_locale_us_markets_stocks_tickers), and the [python-client library](https://github.com/massive-com/client-python), we'll guide you through building an interactive visualization. The Snapshot API allows us to fetch the most recent market data for all US-traded stocks, transforming them into color-coded nested rectangles within the Treemap. This presents an insightful and interactive snapshot of the market's current status. + +![Treemap Visualization](./market-wide-treemap.png) + +Please see the [tutorial](https://massive.com/blog/market-movements-with-treemap) for more details. + +## Structure + +The repo consists of: + +- `massive_sic_code_data_gatherer.py`: Builds ticker to SIC code mapping for treemap groups. +- `sic_code_groups.json`: Pre-built JSON file containing grouped ticker to SIC code data. +- `treemap_server.py`: Simple server to host the treemap visualization (requires sic_code_groups.json). + +For those interested in the underlying mechanics, the `massive_sic_code_data_gatherer.py` script retrieves a snapshot of all ticker symbols, processes each one to obtain its SIC code via the Ticker Details API, and then saves these classifications into the file named `sic_code_groups.json`. + +The logic of this SIC code-to-group enables us to transform a large dataset into a neatly structured visualization. This structured approach facilitates easy identification of market conditions, providing a snapshot of the market's overall health. You don't need to do anything since it is pre-built but we added the script if you wanted to modify anything. + +## Getting Started + +Setting up and visualizing the stock market's current conditions is straightforward. All you'll need to do is clone the repository, secure an API key from Massive.com, install the required Python library, launch the visualization server example, and then dive into the visualization through your web browser. + +### Prerequisites + +- Python 3.x +- Massive.com account and API key + +### Setup + +1. Clone the repository: + ``` + git clone https://github.com/massive-com/client-python.git + ``` + +2. Install the necessary Python packages. + ``` + pip install -U massive-api-client + ``` + +3. Store your Massive.com API key securely, or set it as an environment variable: + ``` + export MASSIVE_API_KEY=YOUR_API_KEY_HERE + ``` + +### Running the Treemap Server + +Change into the treemap example directory and execute the `treemap_server.py` script: +``` +cd examples/tools/treemap +python3 treemap_server.py +``` + +Upon successful execution, the server will start, and you can view the treemap visualization by navigating to: +``` +http://localhost:8889 +``` + +That’s it. You'll now see a Treemap that organizes over 4,000+ US-traded stocks into 10 distinct categories. Use the dropdown box in the top left corner to select different categories and delve deeper into the data. \ No newline at end of file diff --git a/examples/tools/treemap/sic_code_groups.json b/examples/tools/treemap/sic_code_groups.json new file mode 100644 index 00000000..01f8b632 --- /dev/null +++ b/examples/tools/treemap/sic_code_groups.json @@ -0,0 +1 @@ +{"Finance, Insurance and Real Estate": {"sic_description": "Finance, Insurance and Real Estate", "companies": [{"ticker": "TBMC", "market_cap": 93351825.0, "weight": 1.2493789150691097e-05}, {"ticker": "STAG", "market_cap": 6047500977.539999, "weight": 0.0008093703803003641}, {"ticker": "TRMK", "market_cap": 1295296714.95, "weight": 0.00017335669703477278}, {"ticker": "AMAO", "market_cap": 35285404.35, "weight": 4.72244010275941e-06}, {"ticker": "MLP", "market_cap": 251395776.03, "weight": 3.364568201096425e-05}, {"ticker": "LC", "market_cap": 614121778.0, "weight": 8.219130163957187e-05}, {"ticker": "SIGI", "market_cap": 6333021880.5, "weight": 0.0008475832160933139}, {"ticker": "ENER", "market_cap": 110974629.12, "weight": 1.4852346135722834e-05}, {"ticker": "IPVF", "market_cap": 84073374.25, "weight": 1.1252002958342188e-05}, {"ticker": "STRS", "market_cap": 212645946.85, "weight": 2.8459578842652145e-05}, {"ticker": "ADC", "market_cap": 5237990359.309999, "weight": 0.0007010291134915876}, {"ticker": "NAVI", "market_cap": 2011902839.88, "weight": 0.00026926404355927003}, {"ticker": "HUM", "market_cap": 59808549157.5, "weight": 0.008004507706009483}, {"ticker": "XELB", "market_cap": 20988973.14, "weight": 2.809069934098009e-06}, {"ticker": "FMBH", "market_cap": 625121672.4912, "weight": 8.366347813374218e-05}, {"ticker": "UNTY", "market_cap": 237218241.23000002, "weight": 3.1748224404026355e-05}, {"ticker": "VAQC", "market_cap": 169883831.7, "weight": 2.273648933345751e-05}, {"ticker": "FOR", "market_cap": 1316210430.375, "weight": 0.00017615569481416817}, {"ticker": "INAQ", "market_cap": 93441289.92, "weight": 1.2505762733927026e-05}, {"ticker": "KVAC", "market_cap": 197340304.25, "weight": 2.6411140352454063e-05}, {"ticker": "BSVN", "market_cap": 204347278.08, "weight": 2.7348922271730208e-05}, {"ticker": "THG", "market_cap": 3948658065.44, "weight": 0.0005284706677966196}, {"ticker": "GHLD", "market_cap": 677250046.0, "weight": 9.064010561143122e-05}, {"ticker": "CHMI", "market_cap": 89297434.87, "weight": 1.195116777806273e-05}, {"ticker": "AMSF", "market_cap": 967439906.16, "weight": 0.00012947781367453096}, {"ticker": "BSRR", "market_cap": 280974629.25, "weight": 3.7604382930308035e-05}, {"ticker": "CVII", "market_cap": 967255522.305, "weight": 0.00012945313656717754}, {"ticker": "SBSI", "market_cap": 850005451.2, "weight": 0.00011376091345006753}, {"ticker": "PRK", "market_cap": 1515837402.0, "weight": 0.00020287287246199395}, {"ticker": "BLK", "market_cap": 94305515108.12, "weight": 0.012621426753126302}, {"ticker": "ISPO", "market_cap": 43286254.83, "weight": 5.79323801081665e-06}, {"ticker": "RKT", "market_cap": 956369790.8000001, "weight": 0.00012799623913454025}, {"ticker": "CIVB", "market_cap": 243162429.28, "weight": 3.25437678459329e-05}, {"ticker": "DOUG", "market_cap": 185684708.305, "weight": 2.4851207719508965e-05}, {"ticker": "WT", "market_cap": 1051519884.495, "weight": 0.0001407307004939602}, {"ticker": "GCMG", "market_cap": 318421980.53000003, "weight": 4.261616830401854e-05}, {"ticker": "DLB", "market_cap": 7600609660.68, "weight": 0.0010172314736990062}, {"ticker": "OFG", "market_cap": 1385186144.34, "weight": 0.00018538709470160568}, {"ticker": "INDB", "market_cap": 2100846039.6000001, "weight": 0.00028116780209521173}, {"ticker": "SSB", "market_cap": 4944982239.400001, "weight": 0.0006618142221962547}, {"ticker": "GGE", "market_cap": 60814662.120000005, "weight": 8.139161347920096e-06}, {"ticker": "PNBK", "market_cap": 27954561.3, "weight": 3.7413129811042173e-06}, {"ticker": "EXPI", "market_cap": 2254520982.294, "weight": 0.0003017349664946584}, {"ticker": "SHUA", "market_cap": 58625893.199999996, "weight": 7.846226342245958e-06}, {"ticker": "FHN", "market_cap": 5827260639.69, "weight": 0.0007798944022616395}, {"ticker": "KKR", "market_cap": 50826108266.56, "weight": 0.006802338144247296}, {"ticker": "WPC", "market_cap": 11136978033.02, "weight": 0.0014905231399646483}, {"ticker": "BMO", "market_cap": 57086566945.39, "weight": 0.007640209827204926}, {"ticker": "NIC", "market_cap": 1013259564.0999999, "weight": 0.00013561011098376028}, {"ticker": "BLAC", "market_cap": 94336801.0, "weight": 1.2625613916436073e-05}, {"ticker": "FLIC", "market_cap": 248300426.0, "weight": 3.3231414259665275e-05}, {"ticker": "KCGI", "market_cap": 364665000.0, "weight": 4.880512641972204e-05}, {"ticker": "IRT", "market_cap": 3031313429.14, "weight": 0.0004056973801351345}, {"ticker": "EGP", "market_cap": 7394565013.76, "weight": 0.0009896553832021457}, {"ticker": "BCOW", "market_cap": 42777785.15, "weight": 5.725186711643448e-06}, {"ticker": "MGLD", "market_cap": 45347741.849999994, "weight": 6.069138178432725e-06}, {"ticker": "NHI", "market_cap": 2240815992.42, "weight": 0.00029990075217910413}, {"ticker": "TRTX", "market_cap": 458563771.8532, "weight": 6.13721164817024e-05}, {"ticker": "BFS", "market_cap": 819669981.16, "weight": 0.00010970095033240092}, {"ticker": "GBNY", "market_cap": 20078283.220000003, "weight": 2.6871872837894614e-06}, {"ticker": "LAMR", "market_cap": 8122670087.775001, "weight": 0.001087101697447119}, {"ticker": "SEPA", "market_cap": 63495803.28, "weight": 8.497993243668028e-06}, {"ticker": "CNO", "market_cap": 2587624704.7999997, "weight": 0.0003463160732303893}, {"ticker": "SPNT", "market_cap": 1710811273.6000001, "weight": 0.00022896730009278017}, {"ticker": "FCNCA", "market_cap": 19137695212.68, "weight": 0.0025613032077028415}, {"ticker": "OVBC", "market_cap": 114684245.2, "weight": 1.5348824497378143e-05}, {"ticker": "FVCB", "market_cap": 200096143.52, "weight": 2.67799695078838e-05}, {"ticker": "MFA", "market_cap": 867813011.455, "weight": 0.00011614419736673651}, {"ticker": "BNL", "market_cap": 2648023478.2400002, "weight": 0.0003543995739045296}, {"ticker": "CMA", "market_cap": 5159050875.45, "weight": 0.0006904642073742062}, {"ticker": "BRT", "market_cap": 310347059.24999994, "weight": 4.1535457092633554e-05}, {"ticker": "CFG", "market_cap": 12015169790.400002, "weight": 0.00160805638209013}, {"ticker": "VINO", "market_cap": 2028670.4000000001, "weight": 2.71508138526999e-07}, {"ticker": "GSBC", "market_cap": 565867470.4200001, "weight": 7.573316175299639e-05}, {"ticker": "BX", "market_cap": 77607155162.87999, "weight": 0.010386593226109832}, {"ticker": "FHI", "market_cap": 2896962755.96, "weight": 0.00038771648921024553}, {"ticker": "PIPR", "market_cap": 2496101919.0099998, "weight": 0.00033406707447600903}, {"ticker": "COLB", "market_cap": 3930517253.66, "weight": 0.0005260427829919926}, {"ticker": "BPOP", "market_cap": 4401234267.66, "weight": 0.0005890414348400835}, {"ticker": "HFWA", "market_cap": 558311454.0, "weight": 7.472189843842658e-05}, {"ticker": "SKT", "market_cap": 2340261141.0, "weight": 0.00031321004440148614}, {"ticker": "MAQC", "market_cap": 72926383.89, "weight": 9.760139813485338e-06}, {"ticker": "KYCH", "market_cap": 63871436.7, "weight": 8.548266334177325e-06}, {"ticker": "SITC", "market_cap": 2469828767.0694, "weight": 0.00033055079377480233}, {"ticker": "BWAQ", "market_cap": 71700391.56, "weight": 9.596058504187053e-06}, {"ticker": "SJT", "market_cap": 309249361.46, "weight": 4.1388546148584633e-05}, {"ticker": "CMCT", "market_cap": 97299384.07, "weight": 1.3022112733872015e-05}, {"ticker": "GHIX", "market_cap": 683156250.0, "weight": 9.143056543861692e-05}, {"ticker": "MYFW", "market_cap": 158308990.2, "weight": 2.1187364512880416e-05}, {"ticker": "FUNC", "market_cap": 108725360.39999999, "weight": 1.455131410843333e-05}, {"ticker": "FBP", "market_cap": 2374043768.545, "weight": 0.0003177313596034499}, {"ticker": "ATMC", "market_cap": 95852862.0, "weight": 1.2828516714250534e-05}, {"ticker": "HOMB", "market_cap": 4213693224.0, "weight": 0.0005639417835307642}, {"ticker": "GLRE", "market_cap": 390461183.91, "weight": 5.225757186108316e-05}, {"ticker": "IOR", "market_cap": 47061394.059999995, "weight": 6.298485696698766e-06}, {"ticker": "MITT", "market_cap": 102713769.68, "weight": 1.374674979578137e-05}, {"ticker": "HBAN", "market_cap": 14203726677.54, "weight": 0.001900963010238214}, {"ticker": "LNC", "market_cap": 3919488785.705, "weight": 0.0005245667823537091}, {"ticker": "RIOT", "market_cap": 1651334382.3734, "weight": 0.0002210071799952488}, {"ticker": "USIO", "market_cap": 54356420.39309999, "weight": 7.2748192697648594e-06}, {"ticker": "CLPR", "market_cap": 78227920.36, "weight": 1.0469673653138492e-05}, {"ticker": "CDP", "market_cap": 2599552632.6000004, "weight": 0.0003479124535361613}, {"ticker": "SCU", "market_cap": 306335379.58500004, "weight": 4.0998551896890204e-05}, {"ticker": "CLOE", "market_cap": 63292067.28, "weight": 8.470726132110165e-06}, {"ticker": "BFAC", "market_cap": 217246573.44, "weight": 2.9075306050733217e-05}, {"ticker": "CVBF", "market_cap": 2203030900.83, "weight": 0.0002948437651586039}, {"ticker": "ALLY", "market_cap": 7394184097.52, "weight": 0.0009896044030827252}, {"ticker": "LGST", "market_cap": 171607788.1, "weight": 2.2967215918252016e-05}, {"ticker": "NEWT", "market_cap": 346872713.40000004, "weight": 4.6423886660466496e-05}, {"ticker": "LPLA", "market_cap": 17548781416.954998, "weight": 0.0023486501187845216}, {"ticker": "NETC", "market_cap": 182079467.67, "weight": 2.4368698498814095e-05}, {"ticker": "CXW", "market_cap": 1246816422.475, "weight": 0.00016686831234442005}, {"ticker": "CURO", "market_cap": 42487454.68, "weight": 5.6863301849906375e-06}, {"ticker": "UNIT", "market_cap": 1053810186.66, "weight": 0.00014103722425330695}, {"ticker": "LIVB", "market_cap": 72636013.14, "weight": 9.721277895938166e-06}, {"ticker": "DIST", "market_cap": 99204000.0, "weight": 1.327701797908246e-05}, {"ticker": "TCBI", "market_cap": 2724285858.04, "weight": 0.0003646061884335024}, {"ticker": "FHLT", "market_cap": 69540715.35000001, "weight": 9.30701713620626e-06}, {"ticker": "BRDG", "market_cap": 290453467.46000004, "weight": 3.887298808065464e-05}, {"ticker": "GMRE", "market_cap": 569103705.24, "weight": 7.616628489208021e-05}, {"ticker": "STT", "market_cap": 20314913601.600002, "weight": 0.0027188568316998314}, {"ticker": "PEGR", "market_cap": 183037772.17499998, "weight": 2.4496953671411173e-05}, {"ticker": "AFRM", "market_cap": 5252657383.35, "weight": 0.0007029920821408228}, {"ticker": "AMAL", "market_cap": 504659383.13, "weight": 6.754134614662387e-05}, {"ticker": "JHG", "market_cap": 3945971297.1, "weight": 0.0005281110827843639}, {"ticker": "AJG", "market_cap": 49128902820.0, "weight": 0.006575191786961564}, {"ticker": "LCW", "market_cap": 306187500.0, "weight": 4.097876035714599e-05}, {"ticker": "PJT", "market_cap": 1842830396.67, "weight": 0.00024663614681854815}, {"ticker": "NNN", "market_cap": 6378014181.420001, "weight": 0.000853604783653444}, {"ticker": "SKYH", "market_cap": 68593014.0, "weight": 9.180181042271027e-06}, {"ticker": "DUET", "market_cap": 81215824.8, "weight": 1.086956136905378e-05}, {"ticker": "ESS", "market_cap": 13387995381.36, "weight": 0.0017917891958206288}, {"ticker": "WRAC", "market_cap": 87312391.9, "weight": 1.168549853889958e-05}, {"ticker": "SLQT", "market_cap": 194524031.95999998, "weight": 2.6034223112944347e-05}, {"ticker": "GNW", "market_cap": 2692852736.7250004, "weight": 0.00036039932059714564}, {"ticker": "IVT", "market_cap": 1564701031.95, "weight": 0.00020941256131898947}, {"ticker": "WNEB", "market_cap": 146847979.95000002, "weight": 1.96534743557527e-05}, {"ticker": "FFWM", "market_cap": 318122754.6414, "weight": 4.2576121254476695e-05}, {"ticker": "TRC", "market_cap": 423614454.4, "weight": 5.669465674033312e-05}, {"ticker": "BSIG", "market_cap": 755448220.8, "weight": 0.00010110579825236337}, {"ticker": "DOMA", "market_cap": 65975252.65, "weight": 8.829831615746923e-06}, {"ticker": "PRPC", "market_cap": 213638234.20000002, "weight": 2.8592382126656483e-05}, {"ticker": "CHCO", "market_cap": 1364855272.25, "weight": 0.00018266610205746478}, {"ticker": "GL", "market_cap": 10293624460.800001, "weight": 0.0013776524841333476}, {"ticker": "NFYS", "market_cap": 454537499.99999994, "weight": 6.083325833300263e-05}, {"ticker": "ALCC", "market_cap": 660008765.0, "weight": 8.833260996791471e-05}, {"ticker": "INTE", "market_cap": 63300967.52, "weight": 8.471917300273728e-06}, {"ticker": "MCBC", "market_cap": 306222978.90999997, "weight": 4.098350869517619e-05}, {"ticker": "PEPL", "market_cap": 54740326.6, "weight": 7.326199552931796e-06}, {"ticker": "ARGO", "market_cap": 1049613276.1800001, "weight": 0.00014047552859688627}, {"ticker": "BHG", "market_cap": 47114266.510800004, "weight": 6.305561908140542e-06}, {"ticker": "BKU", "market_cap": 1582062857.48, "weight": 0.00021173619010121097}, {"ticker": "SVII", "market_cap": 329053336.91, "weight": 4.4039021311954646e-05}, {"ticker": "OCFC", "market_cap": 825958822.2, "weight": 0.00011054262058315365}, {"ticker": "BK", "market_cap": 31832733379.5, "weight": 0.004260350120992701}, {"ticker": "TREE", "market_cap": 175439280.525, "weight": 2.3480005662752675e-05}, {"ticker": "TCBC", "market_cap": 68463339.11999999, "weight": 9.16282593851316e-06}, {"ticker": "HBCP", "market_cap": 260946662.24, "weight": 3.492392974216804e-05}, {"ticker": "MKTX", "market_cap": 7959544629.63, "weight": 0.001065269718488234}, {"ticker": "PFTA", "market_cap": 108349082.45, "weight": 1.4500954756922482e-05}, {"ticker": "SAGA", "market_cap": 49939412.13, "weight": 6.683666714193165e-06}, {"ticker": "RYAN", "market_cap": 5666603661.24, "weight": 0.0007583927935427803}, {"ticker": "NSA", "market_cap": 2707477703.96, "weight": 0.00036235666055241543}, {"ticker": "CRT", "market_cap": 110700000.0, "weight": 1.481559100726209e-05}, {"ticker": "BRK.B", "market_cap": 741207269259.58, "weight": 0.09919985323360003}, {"ticker": "PPHP", "market_cap": 28411606.66, "weight": 3.802481880160467e-06}, {"ticker": "FMAO", "market_cap": 239831822.45, "weight": 3.2098014380718137e-05}, {"ticker": "SBFG", "market_cap": 94209381.12, "weight": 1.2608560611754281e-05}, {"ticker": "GDNR", "market_cap": 40840448.5, "weight": 5.465902272169381e-06}, {"ticker": "RDN", "market_cap": 4009558017.6785, "weight": 0.0005366212439910858}, {"ticker": "APXI", "market_cap": 119233840.51, "weight": 1.5957721908051295e-05}, {"ticker": "NETD", "market_cap": 388112500.0, "weight": 5.1943234551093114e-05}, {"ticker": "MBI", "market_cap": 359909154.99, "weight": 4.81686254751684e-05}, {"ticker": "PGR", "market_cap": 82469845000.0, "weight": 0.011037393802640455}, {"ticker": "JXN", "market_cap": 2962714757.27, "weight": 0.00039651644186894396}, {"ticker": "BHRB", "market_cap": 342389243.90000004, "weight": 4.582383923132888e-05}, {"ticker": "MMI", "market_cap": 1086896414.7, "weight": 0.0001454653364720391}, {"ticker": "OPRT", "market_cap": 228778576.32, "weight": 3.0618697542735464e-05}, {"ticker": "OXBR", "market_cap": 8805351.0, "weight": 1.1784686458119805e-06}, {"ticker": "OPOF", "market_cap": 90416063.885, "weight": 1.2100880063293954e-05}, {"ticker": "ABCB", "market_cap": 2565067584.8, "weight": 0.00034329712956081634}, {"ticker": "EQC", "market_cap": 2015748495.0900002, "weight": 0.0002697787287873306}, {"ticker": "ARRW", "market_cap": 121919446.9026, "weight": 1.6317151410483546e-05}, {"ticker": "CNS", "market_cap": 2939438506.69, "weight": 0.00039340125299111356}, {"ticker": "CATY", "market_cap": 2421433550.1899996, "weight": 0.00032407379522021387}, {"ticker": "ESAC", "market_cap": 109329553.8, "weight": 1.4632176640535291e-05}, {"ticker": "TRCA", "market_cap": 124633866.0, "weight": 1.6680437075970265e-05}, {"ticker": "CDAQ", "market_cap": 279312417.2, "weight": 3.738191993211343e-05}, {"ticker": "LTC", "market_cap": 1298990699.41, "weight": 0.00017385108333058618}, {"ticker": "OSI", "market_cap": 91722684.75999999, "weight": 1.227575233506948e-05}, {"ticker": "RILY", "market_cap": 1166924804.43, "weight": 0.0001561759768623684}, {"ticker": "BYTS", "market_cap": 116284623.88, "weight": 1.5563011994935705e-05}, {"ticker": "GNL", "market_cap": 2005949049.72, "weight": 0.0002684672150140702}, {"ticker": "FNCB", "market_cap": 115517051.28, "weight": 1.546028352420417e-05}, {"ticker": "HNNA", "market_cap": 50739075.14, "weight": 6.790690021327728e-06}, {"ticker": "AHT", "market_cap": 75023023.19999999, "weight": 1.004074460577719e-05}, {"ticker": "FXNC", "market_cap": 110741760.19999999, "weight": 1.482118000494575e-05}, {"ticker": "CLDT", "market_cap": 468543204.43, "weight": 6.270771893466008e-05}, {"ticker": "UBSI", "market_cap": 3637848921.04, "weight": 0.0004868733673020625}, {"ticker": "INN", "market_cap": 635778521.58, "weight": 8.50897429713734e-05}, {"ticker": "HTBI", "market_cap": 350990566.33000004, "weight": 4.6975001609327705e-05}, {"ticker": "BOH", "market_cap": 1866802367.48, "weight": 0.0002498444477684938}, {"ticker": "SLNH", "market_cap": 7495830.3, "weight": 1.0032082744773504e-06}, {"ticker": "VBTX", "market_cap": 950896694.22, "weight": 0.00012726374445999172}, {"ticker": "NWBI", "market_cap": 1298281625.5049999, "weight": 0.00017375618406256083}, {"ticker": "WSR", "market_cap": 453609804.36, "weight": 6.070909971347725e-05}, {"ticker": "CAC", "market_cap": 399571605.2097, "weight": 5.347686974617985e-05}, {"ticker": "PNFP", "market_cap": 4895666952.12, "weight": 0.0006552140855499483}, {"ticker": "CARV", "market_cap": 10327447.4, "weight": 1.3821791944662353e-06}, {"ticker": "BREZ", "market_cap": 48389420.8, "weight": 6.47622283334328e-06}, {"ticker": "LADR", "market_cap": 1221081539.86, "weight": 0.00016342407119316674}, {"ticker": "ALL", "market_cap": 28859432278.82, "weight": 0.0038624168504496374}, {"ticker": "PLMR", "market_cap": 1213460992.46, "weight": 0.00016240417134194858}, {"ticker": "WHLR", "market_cap": 2569845.3400000003, "weight": 3.4393656286683284e-07}, {"ticker": "SNV", "market_cap": 3828116060.9100003, "weight": 0.000512337867089194}, {"ticker": "MC", "market_cap": 2900048556.2400002, "weight": 0.00038812947886587856}, {"ticker": "CIM", "market_cap": 1136010616.26, "weight": 0.00015203856070836424}, {"ticker": "OCAX", "market_cap": 81194246.71000001, "weight": 1.0866673454364007e-05}, {"ticker": "SMBC", "market_cap": 442122018.0, "weight": 5.917162596199971e-05}, {"ticker": "BRP", "market_cap": 1440469422.0, "weight": 0.00019278596038680416}, {"ticker": "MMC", "market_cap": 93969757404.96, "weight": 0.01257649044953501}, {"ticker": "ESSA", "market_cap": 154561906.29999998, "weight": 2.0685871626409804e-05}, {"ticker": "REXR", "market_cap": 9721341583.69, "weight": 0.0013010607131512246}, {"ticker": "FTHM", "market_cap": 71760751.92, "weight": 9.604136863778841e-06}, {"ticker": "CVLY", "market_cap": 176556090.70000002, "weight": 2.3629474522604065e-05}, {"ticker": "PTRS", "market_cap": 133093269.80000001, "weight": 1.78126057016801e-05}, {"ticker": "WELL", "market_cap": 41913309502.4, "weight": 0.005609489172071817}, {"ticker": "TPHS", "market_cap": 15241520.0, "weight": 2.0398566092954406e-06}, {"ticker": "MIGI", "market_cap": 9927343.843, "weight": 1.3286311306806637e-06}, {"ticker": "NEN", "market_cap": 238413404.78000003, "weight": 3.190817972781667e-05}, {"ticker": "CIA", "market_cap": 139920941.1, "weight": 1.872639057532799e-05}, {"ticker": "FFNW", "market_cap": 115041809.01, "weight": 1.5396679232409385e-05}, {"ticker": "AGNC", "market_cap": 5296631351.904, "weight": 0.0007088773606689372}, {"ticker": "FRGE", "market_cap": 338986575.365, "weight": 4.5368441351041255e-05}, {"ticker": "FIAC", "market_cap": 123804670.71000001, "weight": 1.656946130106703e-05}, {"ticker": "NTRS", "market_cap": 13676766238.669998, "weight": 0.0018304369909129628}, {"ticker": "AMBC", "market_cap": 551349655.66, "weight": 7.37901626039146e-05}, {"ticker": "MCAF", "market_cap": 35962227.35, "weight": 4.8130230544514435e-06}, {"ticker": "CUZ", "market_cap": 2888268126.04, "weight": 0.0003865528389766933}, {"ticker": "GPAC", "market_cap": 124148468.33999999, "weight": 1.6615473632370966e-05}, {"ticker": "RBB", "market_cap": 231170937.9797, "weight": 3.093888048665208e-05}, {"ticker": "AKR", "market_cap": 1297105786.28, "weight": 0.0001735988150196711}, {"ticker": "WRB", "market_cap": 16269085413.583199, "weight": 0.0021773813509472634}, {"ticker": "MSSA", "market_cap": 96046271.64, "weight": 1.2854401792146665e-05}, {"ticker": "TMP", "market_cap": 711698244.6999999, "weight": 9.525049786866787e-05}, {"ticker": "GYRO", "market_cap": 15553313.200000001, "weight": 2.081585611373539e-06}, {"ticker": "UNH", "market_cap": 469933123117.48, "weight": 0.06289373941168858}, {"ticker": "BWB", "market_cap": 262414101.46, "weight": 3.5120325219237014e-05}, {"ticker": "FSBC", "market_cap": 346700302.13, "weight": 4.640081191013801e-05}, {"ticker": "BOWN", "market_cap": 93498300.0, "weight": 1.2513392707084852e-05}, {"ticker": "BPRN", "market_cap": 180821367.52, "weight": 2.4200320023036546e-05}, {"ticker": "BTWN", "market_cap": 310766832.64, "weight": 4.159163767855923e-05}, {"ticker": "NLY", "market_cap": 8598888593.2317, "weight": 0.001150836644212576}, {"ticker": "ZLS", "market_cap": 127972841.62, "weight": 1.7127310582466555e-05}, {"ticker": "EXR", "market_cap": 24497510406.9, "weight": 0.0032786368101605885}, {"ticker": "RRBI", "market_cap": 321047880.71999997, "weight": 4.296760699634854e-05}, {"ticker": "NSTB", "market_cap": 123393387.74000001, "weight": 1.6514417034836028e-05}, {"ticker": "MBWM", "market_cap": 487113948.56, "weight": 6.519314395480997e-05}, {"ticker": "BNS", "market_cap": 51413485555.905, "weight": 0.006880950083595894}, {"ticker": "CMTG", "market_cap": 1475193736.64, "weight": 0.00019743330676181523}, {"ticker": "TSBK", "market_cap": 216626856.24, "weight": 2.899236588293407e-05}, {"ticker": "BFC", "market_cap": 802824404.93, "weight": 0.00010744641403876645}, {"ticker": "BHAC", "market_cap": 114191101.11999999, "weight": 1.5282824307703954e-05}, {"ticker": "SF", "market_cap": 6085697679.0, "weight": 0.0008144824553379239}, {"ticker": "OPI", "market_cap": 189818656.298, "weight": 2.540447675934257e-05}, {"ticker": "PINE", "market_cap": 230278532.99, "weight": 3.0819445009323856e-05}, {"ticker": "ACR", "market_cap": 73243318.875, "weight": 9.802556968983557e-06}, {"ticker": "FRAF", "market_cap": 123907622.72, "weight": 1.658323993587765e-05}, {"ticker": "FPI", "market_cap": 500066355.2, "weight": 6.692663590908265e-05}, {"ticker": "GROW", "market_cap": 41167729.1436, "weight": 5.509704044167314e-06}, {"ticker": "AMT", "market_cap": 73349571229.34999, "weight": 0.009816777307064931}, {"ticker": "DHIL", "market_cap": 490016217.6, "weight": 6.558157061325334e-05}, {"ticker": "BUSE", "market_cap": 1037633435.91, "weight": 0.00013887220055919296}, {"ticker": "BRSP", "market_cap": 748064290.785, "weight": 0.00010011756620964895}, {"ticker": "PPBI", "market_cap": 1994842192.4639997, "weight": 0.00026698072310367323}, {"ticker": "VEL", "market_cap": 369906801.9, "weight": 4.950666565270749e-05}, {"ticker": "LUXH", "market_cap": 187464521.54, "weight": 2.5089409932328042e-05}, {"ticker": "UPST", "market_cap": 2233928332.54, "weight": 0.0002989789387032305}, {"ticker": "EBTC", "market_cap": 330556059.0, "weight": 4.424013888994035e-05}, {"ticker": "L", "market_cap": 14013107511.0, "weight": 0.0018754513967820096}, {"ticker": "AACI", "market_cap": 86379484.3, "weight": 1.1560642374047126e-05}, {"ticker": "MCB", "market_cap": 378787840.96000004, "weight": 5.069526404866485e-05}, {"ticker": "ARYD", "market_cap": 86090814.66, "weight": 1.1522008125425142e-05}, {"ticker": "CWK", "market_cap": 1515094375.27, "weight": 0.0002027734291003034}, {"ticker": "BHF", "market_cap": 2998702069.44, "weight": 0.00040133282216308475}, {"ticker": "NYMT", "market_cap": 738142727.5908, "weight": 9.87897087350512e-05}, {"ticker": "LKFN", "market_cap": 1183788992.175, "weight": 0.0001584330040376132}, {"ticker": "BYFC", "market_cap": 66071758.059, "weight": 8.842747466422014e-06}, {"ticker": "BHR", "market_cap": 178183511.10000002, "weight": 2.3847281162561383e-05}, {"ticker": "PLBC", "market_cap": 203111912.0, "weight": 2.71835864218158e-05}, {"ticker": "STWD", "market_cap": 5698800729.759999, "weight": 0.0007627019046432781}, {"ticker": "PB", "market_cap": 4832329728.24, "weight": 0.0006467373158612267}, {"ticker": "TRNO", "market_cap": 4665960321.61, "weight": 0.0006244711814009651}, {"ticker": "JPM", "market_cap": 413506873495.17, "weight": 0.0553419034904797}, {"ticker": "FR", "market_cap": 6066491530.44, "weight": 0.0008119119906415402}, {"ticker": "PRSR", "market_cap": 111033042.56, "weight": 1.486016392828261e-05}, {"ticker": "TCBK", "market_cap": 1023845759.1, "weight": 0.0001370269197953513}, {"ticker": "UNB", "market_cap": 102761834.4, "weight": 1.37531825621174e-05}, {"ticker": "FRBN", "market_cap": 172198125.0, "weight": 2.304622395860337e-05}, {"ticker": "RLJ", "market_cap": 1517315820.745, "weight": 0.00020307073738939582}, {"ticker": "RBKB", "market_cap": 73707915.05, "weight": 9.864736435219675e-06}, {"ticker": "GBLI", "market_cap": 466531701.0, "weight": 6.243850834632599e-05}, {"ticker": "LOCC", "market_cap": 259015000.0, "weight": 3.466540474025285e-05}, {"ticker": "PACI", "market_cap": 143304872.52, "weight": 1.9179280764265153e-05}, {"ticker": "KNSL", "market_cap": 9646814265.75, "weight": 0.0012910863115119544}, {"ticker": "LIBY", "market_cap": 78640971.3, "weight": 1.052495453653691e-05}, {"ticker": "AFG", "market_cap": 9363006504.5, "weight": 0.0012531027549142425}, {"ticker": "PRA", "market_cap": 937166544.0, "weight": 0.00012542616279668736}, {"ticker": "DHCA", "market_cap": 130391326.25999999, "weight": 1.7450989708786206e-05}, {"ticker": "HST", "market_cap": 11177747008.4016, "weight": 0.0014959794765955327}, {"ticker": "AQU", "market_cap": 48582110.5, "weight": 6.502011557702016e-06}, {"ticker": "ONB", "market_cap": 4086005385.0, "weight": 0.0005468526164194262}, {"ticker": "BOC", "market_cap": 484601446.44, "weight": 6.485688195106293e-05}, {"ticker": "PGSS", "market_cap": 116272704.92, "weight": 1.5561416814840024e-05}, {"ticker": "BMRC", "market_cap": 287582441.28, "weight": 3.848874282632742e-05}, {"ticker": "NNI", "market_cap": 3244553069.94, "weight": 0.0004342364163106384}, {"ticker": "CCBG", "market_cap": 506180776.86, "weight": 6.774496265307999e-05}, {"ticker": "OBK", "market_cap": 870744980.5600001, "weight": 0.00011653659894853966}, {"ticker": "ORI", "market_cap": 7567227109.975, "weight": 0.0010127637029851446}, {"ticker": "PKBK", "market_cap": 192759536.585, "weight": 2.5798070973737435e-05}, {"ticker": "PDM", "market_cap": 638273811.0, "weight": 8.542370130462966e-05}, {"ticker": "ATLC", "market_cap": 432643538.56, "weight": 5.79030688278192e-05}, {"ticker": "SRBK", "market_cap": 81197722.19999999, "weight": 1.0867138598342233e-05}, {"ticker": "HWBK", "market_cap": 114142622.445, "weight": 1.5276336139489196e-05}, {"ticker": "GAQ", "market_cap": 163360784.04, "weight": 2.1863473920165387e-05}, {"ticker": "CFR", "market_cap": 5649887310.21, "weight": 0.0007561555521697513}, {"ticker": "AIZ", "market_cap": 7668140993.940001, "weight": 0.0010262695641575}, {"ticker": "IVCB", "market_cap": 300621656.96000004, "weight": 4.0233852912780536e-05}, {"ticker": "SLAM", "market_cap": 428274107.955, "weight": 5.7318283852405525e-05}, {"ticker": "BHB", "market_cap": 358137957.72999996, "weight": 4.79315763857615e-05}, {"ticker": "ITIC", "market_cap": 269224715.2, "weight": 3.60318271856352e-05}, {"ticker": "BAC", "market_cap": 203824435592.69998, "weight": 0.027278947380555345}, {"ticker": "MET", "market_cap": 44775416375.3, "weight": 0.005992540706380401}, {"ticker": "WNNR", "market_cap": 146613386.74499997, "weight": 1.962207745441247e-05}, {"ticker": "IVZ", "market_cap": 6074322165.759999, "weight": 0.0008129600077167717}, {"ticker": "PUCK", "market_cap": 176910699.57, "weight": 2.3676933781732044e-05}, {"ticker": "C", "market_cap": 76084505142.84, "weight": 0.010182808583434927}, {"ticker": "BXP", "market_cap": 8611863740.1, "weight": 0.0011525731796169108}, {"ticker": "GLBZ", "market_cap": 18499650.12, "weight": 2.4759101170313195e-06}, {"ticker": "NMIH", "market_cap": 2196484621.25, "weight": 0.0002939676404894397}, {"ticker": "SWKH", "market_cap": 198614915.70569998, "weight": 2.6581728627258235e-05}, {"ticker": "TWO", "market_cap": 1141492639.6899998, "weight": 0.00015277225011243927}, {"ticker": "FITB", "market_cap": 16222174635.525, "weight": 0.0021711030230200483}, {"ticker": "FULT", "market_cap": 1942925968.76, "weight": 0.00026003248880340237}, {"ticker": "PLAO", "market_cap": 249161595.81, "weight": 3.3346669360774235e-05}, {"ticker": "BVH", "market_cap": 564912014.0, "weight": 7.560528775530909e-05}, {"ticker": "SEIC", "market_cap": 7603970259.75, "weight": 0.001017681241190971}, {"ticker": "PX", "market_cap": 1269541799.075, "weight": 0.00016990977472194135}, {"ticker": "ASCB", "market_cap": 79384777.60000001, "weight": 1.0624502232376342e-05}, {"ticker": "ATMV", "market_cap": 97037885.0, "weight": 1.298711487235531e-05}, {"ticker": "EARN", "market_cap": 86730464.38000001, "weight": 1.1607615972213127e-05}, {"ticker": "AFL", "market_cap": 44952707710.26, "weight": 0.006016268582693851}, {"ticker": "WD", "market_cap": 2285444504.28, "weight": 0.0003058736318446914}, {"ticker": "LAZ", "market_cap": 2520162928.1400003, "weight": 0.00033728729191496195}, {"ticker": "SKWD", "market_cap": 1067117834.475, "weight": 0.00014281826009157007}, {"ticker": "GBBK", "market_cap": 75586658.8, "weight": 1.011617906401326e-05}, {"ticker": "ARR", "market_cap": 879644004.32, "weight": 0.00011772760433600187}, {"ticker": "LNKB", "market_cap": 108617976.99000001, "weight": 1.4536942394941686e-05}, {"ticker": "SBT", "market_cap": 303603558.06, "weight": 4.063293716862249e-05}, {"ticker": "STC", "market_cap": 1143079645.3999999, "weight": 0.00015298464783173059}, {"ticker": "ESGR", "market_cap": 3808901513.9500003, "weight": 0.0005097662783886593}, {"ticker": "PFC", "market_cap": 595264915.42, "weight": 7.96675838106159e-05}, {"ticker": "CACC", "market_cap": 5495082460.56, "weight": 0.000735437166096083}, {"ticker": "AAMC", "market_cap": 11999674.4, "weight": 1.6059825486062613e-06}, {"ticker": "WFC", "market_cap": 141594915141.90002, "weight": 0.01895042774571249}, {"ticker": "RBCAA", "market_cap": 838586654.29, "weight": 0.00011223267293684667}, {"ticker": "PWP", "market_cap": 410850988.8, "weight": 5.498645180659456e-05}, {"ticker": "ARTE", "market_cap": 76075900.05, "weight": 1.0181656916442182e-05}, {"ticker": "COOP", "market_cap": 3601799658.48, "weight": 0.00048204869584585327}, {"ticker": "HBNC", "market_cap": 445508010.4, "weight": 5.96247919832472e-05}, {"ticker": "CLOV", "market_cap": 504256118.08000004, "weight": 6.748737496280885e-05}, {"ticker": "HT", "market_cap": 396036045.5, "weight": 5.300368630769142e-05}, {"ticker": "BWFG", "market_cap": 191169746.56, "weight": 2.558530061422682e-05}, {"ticker": "PRLH", "market_cap": 268250000.0, "weight": 3.5901375679295893e-05}, {"ticker": "RCFA", "market_cap": 205282886.07999998, "weight": 2.7474139845995083e-05}, {"ticker": "LXP", "market_cap": 2514948991.155, "weight": 0.00033658948199709923}, {"ticker": "TBCP", "market_cap": 123589741.81, "weight": 1.6540696182024207e-05}, {"ticker": "SFST", "market_cap": 214348664.51999998, "weight": 2.8687462931175705e-05}, {"ticker": "FSEA", "market_cap": 34680117.28, "weight": 4.64143119877473e-06}, {"ticker": "FTII", "market_cap": 163759918.25, "weight": 2.1916892250900407e-05}, {"ticker": "CARE", "market_cap": 278885783.8466, "weight": 3.732482123948443e-05}, {"ticker": "RHE", "market_cap": 3992019.3600000003, "weight": 5.342739487880052e-07}, {"ticker": "SWSS", "market_cap": 77058754.5, "weight": 1.0313197743459956e-05}, {"ticker": "MBCN", "market_cap": 214210486.72, "weight": 2.866896983477929e-05}, {"ticker": "BYNO", "market_cap": 111292025.76, "weight": 1.489482507705363e-05}, {"ticker": "HOUS", "market_cap": 618715613.5999999, "weight": 8.280611997203978e-05}, {"ticker": "REFI", "market_cap": 262076444.2849, "weight": 3.507513469884904e-05}, {"ticker": "CBRE", "market_cap": 21896257890.97, "weight": 0.002930496851871244}, {"ticker": "DLR", "market_cap": 35341612900.545, "weight": 0.004729962802813481}, {"ticker": "CBRG", "market_cap": 106116572.6, "weight": 1.4202165661554062e-05}, {"ticker": "EFSC", "market_cap": 1364520526.0, "weight": 0.00018262130112222345}, {"ticker": "BACA", "market_cap": 97440435.17, "weight": 1.3040990379840621e-05}, {"ticker": "BTM", "market_cap": 32132596.6, "weight": 4.30048246817471e-06}, {"ticker": "CTO", "market_cap": 360899344.8, "weight": 4.8301148033836136e-05}, {"ticker": "MTG", "market_cap": 4724633584.235, "weight": 0.0006323237474543859}, {"ticker": "BCAL", "market_cap": 268953371.235, "weight": 3.599551172757081e-05}, {"ticker": "AMK", "market_cap": 1779318310.68, "weight": 0.00023813597437007572}, {"ticker": "ELME", "market_cap": 1172882361.72, "weight": 0.00015697330958333472}, {"ticker": "PEBK", "market_cap": 121320338.3, "weight": 1.6236969404837167e-05}, {"ticker": "SAFT", "market_cap": 1012579993.685, "weight": 0.0001355191603303793}, {"ticker": "HAIA", "market_cap": 78059560.64999999, "weight": 1.0447141145410747e-05}, {"ticker": "UVSP", "market_cap": 500423726.76, "weight": 6.697446491423702e-05}, {"ticker": "SGII", "market_cap": 74782350.09, "weight": 1.0008533997247782e-05}, {"ticker": "TPG", "market_cap": 2359113989.25, "weight": 0.00031573322497053743}, {"ticker": "FISI", "market_cap": 254899790.0, "weight": 3.4114643509277283e-05}, {"ticker": "CHMG", "market_cap": 187612686.0, "weight": 2.510923959846329e-05}, {"ticker": "CPT", "market_cap": 9902967306.75, "weight": 0.0013253686845085435}, {"ticker": "COHN", "market_cap": 10011834.067200001, "weight": 1.3399389229648472e-06}, {"ticker": "FINW", "market_cap": 108690460.285, "weight": 1.4546643233727402e-05}, {"ticker": "PLD", "market_cap": 99518414640.0, "weight": 0.013319097822921084}, {"ticker": "SFE", "market_cap": 16686280.7, "weight": 2.233216895063875e-06}, {"ticker": "ECPG", "market_cap": 1113428022.08, "weight": 0.00014901620768890752}, {"ticker": "GOCO", "market_cap": 136400072.4, "weight": 1.8255173315621844e-05}, {"ticker": "TCBS", "market_cap": 41147575.0, "weight": 5.507006704070844e-06}, {"ticker": "KFFB", "market_cap": 40352707.85, "weight": 5.400625253307447e-06}, {"ticker": "RYN", "market_cap": 4062558489.2, "weight": 0.0005437145891514705}, {"ticker": "TPL", "market_cap": 13464327142.08, "weight": 0.0018020050959804456}, {"ticker": "GDST", "market_cap": 81355837.5, "weight": 1.0888300040228328e-05}, {"ticker": "PBBK", "market_cap": 34952978.1, "weight": 4.677949665902338e-06}, {"ticker": "FAF", "market_cap": 5478013421.6, "weight": 0.0007331527225539115}, {"ticker": "IDCC", "market_cap": 2128940079.5200002, "weight": 0.00028492778226862106}, {"ticker": "TRTL", "market_cap": 451950000.0, "weight": 6.048695894970282e-05}, {"ticker": "IHT", "market_cap": 12428564.28, "weight": 1.6633832446246326e-06}, {"ticker": "VII", "market_cap": 96062570.04, "weight": 1.285658309683025e-05}, {"ticker": "CVCY", "market_cap": 164074583.25, "weight": 2.1959005601797425e-05}, {"ticker": "SOFI", "market_cap": 6969088896.615, "weight": 0.0009327115698780422}, {"ticker": "VBFC", "market_cap": 69684629.7, "weight": 9.32627798670017e-06}, {"ticker": "OPHC", "market_cap": 23200700.8, "weight": 3.1050776344594253e-06}, {"ticker": "CITE", "market_cap": 107217105.39999999, "weight": 1.4349456030613473e-05}, {"ticker": "RCAC", "market_cap": 81187977.78, "weight": 1.0865834448917457e-05}, {"ticker": "AAIC", "market_cap": 121802990.4, "weight": 1.6301565395012383e-05}, {"ticker": "MCAA", "market_cap": 201208425.6, "weight": 2.692883234782948e-05}, {"ticker": "WMC", "market_cap": 51058277.95999999, "weight": 6.833410693680795e-06}, {"ticker": "TROO", "market_cap": 373880632.64000005, "weight": 5.003850531825335e-05}, {"ticker": "FUSB", "market_cap": 50229240.75000001, "weight": 6.722456075495056e-06}, {"ticker": "PMT", "market_cap": 1002950316.48, "weight": 0.00013423036756614052}, {"ticker": "CCI", "market_cap": 38742672728.24, "weight": 0.005185145380937766}, {"ticker": "MPW", "market_cap": 3081760000.0, "weight": 0.00041244892269683847}, {"ticker": "BRD", "market_cap": 138176255.5932, "weight": 1.849288969994365e-05}, {"ticker": "EGBN", "market_cap": 596025284.55, "weight": 7.976934820126294e-05}, {"ticker": "MTR", "market_cap": 25251644.5, "weight": 3.3795667314614203e-06}, {"ticker": "WRLD", "market_cap": 759484231.416, "weight": 0.00010164595979335366}, {"ticker": "TCI", "market_cap": 258229155.24, "weight": 3.4560230805660616e-05}, {"ticker": "TGVC", "market_cap": 45778268.05, "weight": 6.126757872173563e-06}, {"ticker": "JNVR", "market_cap": 10594777.38, "weight": 1.4179574387992033e-06}, {"ticker": "WHG", "market_cap": 88154073.6, "weight": 1.1798145438858901e-05}, {"ticker": "BOKF", "market_cap": 5034104426.799999, "weight": 0.0006737419356397141}, {"ticker": "UBCP", "market_cap": 64072226.26, "weight": 8.575139107433766e-06}, {"ticker": "BFST", "market_cap": 471908408.16, "weight": 6.315810269364647e-05}, {"ticker": "FOA", "market_cap": 109720382.5, "weight": 1.4684483399099881e-05}, {"ticker": "RDZN", "market_cap": 268811768.48, "weight": 3.5976560250573685e-05}, {"ticker": "LBC", "market_cap": 420852423.805, "weight": 5.6324998965761625e-05}, {"ticker": "BRAC", "market_cap": 82352989.2753, "weight": 1.1021754357075754e-05}, {"ticker": "CUBE", "market_cap": 8276327725.44, "weight": 0.0011076665458191759}, {"ticker": "ARES", "market_cap": 18780270796.0, "weight": 0.0025134671284477365}, {"ticker": "UMBF", "market_cap": 2841299460.48, "weight": 0.0003802667636461257}, {"ticker": "CIO", "market_cap": 153763036.35, "weight": 2.0578954458865166e-05}, {"ticker": "UNM", "market_cap": 9329341275.34, "weight": 0.001248597151785062}, {"ticker": "RVSB", "market_cap": 116804212.07000001, "weight": 1.5632551345570245e-05}, {"ticker": "ROSE", "market_cap": 62717375.98, "weight": 8.393812028621169e-06}, {"ticker": "COIN", "market_cap": 16946242633.800001, "weight": 0.002268009033172617}, {"ticker": "SHBI", "market_cap": 334376886.90000004, "weight": 4.475150134229389e-05}, {"ticker": "MOFG", "market_cap": 323584087.49, "weight": 4.330704152402849e-05}, {"ticker": "VIRT", "market_cap": 1594144838.85, "weight": 0.00021335318824516108}, {"ticker": "PROV", "market_cap": 90750751.0, "weight": 1.2145673084172368e-05}, {"ticker": "KEY", "market_cap": 9452781112.199999, "weight": 0.0012651177853615831}, {"ticker": "MCVT", "market_cap": 20752078.75, "weight": 2.7773650524886607e-06}, {"ticker": "OBT", "market_cap": 227505751.2, "weight": 3.044834834308154e-05}, {"ticker": "HOPE", "market_cap": 1024355524.77, "weight": 0.00013709514454400768}, {"ticker": "FRHC", "market_cap": 5039678103.03, "weight": 0.0006744878914430617}, {"ticker": "TROW", "market_cap": 22705392871.77, "weight": 0.003038787845052831}, {"ticker": "AOMR", "market_cap": 202140084.6, "weight": 2.7053521405663576e-05}, {"ticker": "GPMT", "market_cap": 230295060.065, "weight": 3.082165691884279e-05}, {"ticker": "SPFI", "market_cap": 443185931.5208, "weight": 5.931401537113493e-05}, {"ticker": "FSNB", "market_cap": 177561878.58, "weight": 2.376408465693235e-05}, {"ticker": "PHYT", "market_cap": 153784090.26000002, "weight": 2.0581772219657073e-05}, {"ticker": "COOL", "market_cap": 114202520.48, "weight": 1.5284352623578616e-05}, {"ticker": "HBT", "market_cap": 570047624.4, "weight": 7.629261479468616e-05}, {"ticker": "SELF", "market_cap": 53435038.86, "weight": 7.151505701959497e-06}, {"ticker": "ACIC", "market_cap": 325982709.86, "weight": 4.362806237330391e-05}, {"ticker": "DGICB", "market_cap": 454050455.29999995, "weight": 6.07680744569642e-05}, {"ticker": "CFFN", "market_cap": 617607904.415, "weight": 8.26578691478307e-05}, {"ticker": "HSPO", "market_cap": 97449735.0, "weight": 1.3042235027335806e-05}, {"ticker": "NRAC", "market_cap": 92080118.3071, "weight": 1.2323589636299007e-05}, {"ticker": "HMNF", "market_cap": 86561212.97999999, "weight": 1.1584964124699064e-05}, {"ticker": "OPY", "market_cap": 391035014.7768, "weight": 5.233437080805561e-05}, {"ticker": "OCN", "market_cap": 166015298.0, "weight": 2.221874215100936e-05}, {"ticker": "CULL", "market_cap": 76999881.77, "weight": 1.0305318481588582e-05}, {"ticker": "ONL", "market_cap": 263068006.23999998, "weight": 3.520784089925665e-05}, {"ticker": "AFBI", "market_cap": 96389717.0, "weight": 1.2900366977215336e-05}, {"ticker": "STRW", "market_cap": 38086916.448, "weight": 5.097381904438404e-06}, {"ticker": "COF", "market_cap": 35161272768.82, "weight": 0.004705826889228717}, {"ticker": "SCRM", "market_cap": 979696875.0000001, "weight": 0.0001311182313558516}, {"ticker": "MS", "market_cap": 129939319203.6, "weight": 0.017390495113664087}, {"ticker": "CNFR", "market_cap": 14667457.2, "weight": 1.963026621424766e-06}, {"ticker": "GSHD", "market_cap": 1758904767.4299998, "weight": 0.00023540391738903634}, {"ticker": "BGC", "market_cap": 2616170116.0899997, "weight": 0.0003501364629215069}, {"ticker": "CMPO", "market_cap": 121391232.7086, "weight": 1.6246457594200487e-05}, {"ticker": "MOH", "market_cap": 18869669500.0, "weight": 0.002525431849631506}, {"ticker": "JWSM", "market_cap": 301329672.78, "weight": 4.032861057145976e-05}, {"ticker": "RC", "market_cap": 1649209696.26, "weight": 0.0002207228215447073}, {"ticker": "GDOT", "market_cap": 696208210.6, "weight": 9.317738124794392e-05}, {"ticker": "EVGR", "market_cap": 163684350.0, "weight": 2.1906778535587537e-05}, {"ticker": "FSRX", "market_cap": 98984453.6, "weight": 1.3247634874570113e-05}, {"ticker": "IBOC", "market_cap": 2641422268.98, "weight": 0.00035351609769360354}, {"ticker": "CHAA", "market_cap": 106960597.59, "weight": 1.4315126176926677e-05}, {"ticker": "IBKR", "market_cap": 9192072595.550001, "weight": 0.0012302257279560153}, {"ticker": "BAFN", "market_cap": 44218811.35, "weight": 5.918047188698093e-06}, {"ticker": "WTM", "market_cap": 3856040712.0, "weight": 0.000516075177022075}, {"ticker": "GBCI", "market_cap": 3132342061.25, "weight": 0.00041921859868404967}, {"ticker": "BITE", "market_cap": 89142732.77, "weight": 1.1930463143540918e-05}, {"ticker": "SVC", "market_cap": 1206237108.96, "weight": 0.00016143735920626557}, {"ticker": "FBNC", "market_cap": 1134717376.3600001, "weight": 0.0001518654792862082}, {"ticker": "DCOM", "market_cap": 750136113.72, "weight": 0.00010039484968972506}, {"ticker": "QCRH", "market_cap": 795407781.275, "weight": 0.00010645380642605403}, {"ticker": "CB", "market_cap": 84670960802.94, "weight": 0.011331981259695383}, {"ticker": "GREE", "market_cap": 30502505.04, "weight": 4.08231833215529e-06}, {"ticker": "CBOE", "market_cap": 16736028371.550001, "weight": 0.0022398749000796694}, {"ticker": "AVHI", "market_cap": 33674184.33, "weight": 4.5068016489289426e-06}, {"ticker": "JAQC", "market_cap": 61734941.839999996, "weight": 8.262327454006794e-06}, {"ticker": "NBHC", "market_cap": 1106328597.22, "weight": 0.00014806605253883936}, {"ticker": "CI", "market_cap": 83889649663.05, "weight": 0.011227414084464777}, {"ticker": "OCTO", "market_cap": 1461423.3355999999, "weight": 1.9559033810946996e-07}, {"ticker": "JLL", "market_cap": 6225383854.08, "weight": 0.0008331774258831279}, {"ticker": "DEI", "market_cap": 1978343166.45, "weight": 0.0002647725675350951}, {"ticker": "MFIN", "market_cap": 152087199.39, "weight": 2.0354667963885818e-05}, {"ticker": "CFB", "market_cap": 492416990.1, "weight": 6.590287922627485e-05}, {"ticker": "KRG", "market_cap": 4514698068.719999, "weight": 0.000604226920573004}, {"ticker": "FRPH", "market_cap": 513525995.84, "weight": 6.872801378466498e-05}, {"ticker": "TCBX", "market_cap": 220842535.11, "weight": 2.9556573416410826e-05}, {"ticker": "PCB", "market_cap": 218883183.4, "weight": 2.9294342580143982e-05}, {"ticker": "AUBN", "market_cap": 76908485.69999999, "weight": 1.0293086441906638e-05}, {"ticker": "JRVR", "market_cap": 556960383.9449999, "weight": 7.454107728795647e-05}, {"ticker": "MTRY", "market_cap": 48388978.8, "weight": 6.476163678047659e-06}, {"ticker": "FEXD", "market_cap": 73463911.92, "weight": 9.832080151763742e-06}, {"ticker": "WMPN", "market_cap": 136099064.66, "weight": 1.8214887791088327e-05}, {"ticker": "VNO", "market_cap": 4042388117.19, "weight": 0.0005410150771174643}, {"ticker": "DECA", "market_cap": 118073475.0, "weight": 1.5802423797707182e-05}, {"ticker": "LARK", "market_cap": 93973806.0, "weight": 1.257703229531881e-05}, {"ticker": "CUBI", "market_cap": 1009462531.8599999, "weight": 0.00013510193323570943}, {"ticker": "BOAC", "market_cap": 226321198.92, "weight": 3.0289813184028243e-05}, {"ticker": "NICK", "market_cap": 33872000.0, "weight": 4.5332764100992e-06}, {"ticker": "NBST", "market_cap": 94438601.85, "weight": 1.2639238485160477e-05}, {"ticker": "SFNC", "market_cap": 2066902179.19, "weight": 0.0002766249082104587}, {"ticker": "FNB", "market_cap": 3764027758.32, "weight": 0.0005037605763979284}, {"ticker": "WBS", "market_cap": 6604477931.599999, "weight": 0.00088391367525812}, {"ticker": "BFIN", "market_cap": 106739909.1858, "weight": 1.4285590231699283e-05}, {"ticker": "MGYR", "market_cap": 64788903.05, "weight": 8.671055911453978e-06}, {"ticker": "ACGL", "market_cap": 29854988753.149998, "weight": 0.003995657659377416}, {"ticker": "IXAQ", "market_cap": 113509558.9, "weight": 1.5191609756794279e-05}, {"ticker": "SUI", "market_cap": 14303193180.24, "weight": 0.0019142751604001463}, {"ticker": "CRD.B", "market_cap": 417862487.88, "weight": 5.592483936501438e-05}, {"ticker": "BKKT", "market_cap": 103677501.16, "weight": 1.3875731290347795e-05}, {"ticker": "TWOA", "market_cap": 108773574.0, "weight": 1.4557766800200159e-05}, {"ticker": "RDFN", "market_cap": 774461422.845, "weight": 0.00010365043985342172}, {"ticker": "EVR", "market_cap": 4954897792.440001, "weight": 0.0006631412752987972}, {"ticker": "CONX", "market_cap": 224018272.66, "weight": 2.9981599872483135e-05}, {"ticker": "HNVR", "market_cap": 129188437.9, "weight": 1.7290000531106387e-05}, {"ticker": "HMN", "market_cap": 1178504479.935, "weight": 0.00015772574864447218}, {"ticker": "CSTR", "market_cap": 298727222.98, "weight": 3.998031037404576e-05}, {"ticker": "ISRL", "market_cap": 210252711.85000002, "weight": 2.8139279014790675e-05}, {"ticker": "APGB", "market_cap": 374103655.52000004, "weight": 5.006835369924108e-05}, {"ticker": "WAFD", "market_cap": 1615649018.88, "weight": 0.0002162312111563717}, {"ticker": "AFCG", "market_cap": 225239243.97, "weight": 3.014500919100672e-05}, {"ticker": "EFC", "market_cap": 811444050.72, "weight": 0.00010860002873300412}, {"ticker": "HIW", "market_cap": 2045880080.6399999, "weight": 0.00027381140492020435}, {"ticker": "USB", "market_cap": 48265929322.0, "weight": 0.006459695288348426}, {"ticker": "CRVL", "market_cap": 3361309084.17, "weight": 0.00044986251707368946}, {"ticker": "SBXC", "market_cap": 176467500.0, "weight": 2.3617617941048084e-05}, {"ticker": "INVH", "market_cap": 19172099684.8416, "weight": 0.002565907747796491}, {"ticker": "CSTA", "market_cap": 132111065.96999998, "weight": 1.7681151950722135e-05}, {"ticker": "UE", "market_cap": 1735184129.5, "weight": 0.00023222925370337938}, {"ticker": "MITA", "market_cap": 102444058.64, "weight": 1.3710652881067879e-05}, {"ticker": "OPBK", "market_cap": 134952490.76, "weight": 1.8061435487908547e-05}, {"ticker": "INTG", "market_cap": 63966116.11, "weight": 8.560937801344162e-06}, {"ticker": "AMG", "market_cap": 4446929713.05, "weight": 0.0005951571080992789}, {"ticker": "JMSB", "market_cap": 254835529.51999998, "weight": 3.4106043175134456e-05}, {"ticker": "OUT", "market_cap": 1504364374.57, "weight": 0.0002013373739794467}, {"ticker": "ACT", "market_cap": 4386229698.0199995, "weight": 0.0005870332906031709}, {"ticker": "FBMS", "market_cap": 811331166.0, "weight": 0.00010858492074888045}, {"ticker": "DAVE", "market_cap": 67234705.56, "weight": 8.998391138849599e-06}, {"ticker": "APO", "market_cap": 49710691607.94, "weight": 0.006653055786371951}, {"ticker": "RNST", "market_cap": 1452260645.81, "weight": 0.00019436404484429333}, {"ticker": "BCBP", "market_cap": 182994464.70000002, "weight": 2.4491157593388077e-05}, {"ticker": "JUN", "market_cap": 129818274.2, "weight": 1.737429499381937e-05}, {"ticker": "SSBK", "market_cap": 198741690.0, "weight": 2.659869552964833e-05}, {"ticker": "KINS", "market_cap": 17908999.740000002, "weight": 2.3968601219241476e-06}, {"ticker": "SRCE", "market_cap": 1029114319.485, "weight": 0.0001377320402638357}, {"ticker": "PDLB", "market_cap": 175315485.555, "weight": 2.3463437499751083e-05}, {"ticker": "BANR", "market_cap": 1431508352.8, "weight": 0.0001915866511162082}, {"ticker": "WSBF", "market_cap": 221282271.8, "weight": 2.9615425800782346e-05}, {"ticker": "ACAC", "market_cap": 63341188.423999995, "weight": 8.47730028549149e-06}, {"ticker": "FRXB", "market_cap": 136874651.4, "weight": 1.831868883833761e-05}, {"ticker": "AACT", "market_cap": 642500000.0, "weight": 8.59893154667199e-05}, {"ticker": "WSBC", "market_cap": 1431109899.882, "weight": 0.00019153332396653575}, {"ticker": "GS", "market_cap": 101006274764.955, "weight": 0.013518226342228646}, {"ticker": "STBA", "market_cap": 1034826301.0799999, "weight": 0.0001384965062363066}, {"ticker": "CZFS", "market_cap": 216071392.59, "weight": 2.8918025121797658e-05}, {"ticker": "ACBA", "market_cap": 40533667.74, "weight": 5.424844112557304e-06}, {"ticker": "AXP", "market_cap": 107213682585.76001, "weight": 0.014348997936522476}, {"ticker": "LCNB", "market_cap": 153300189.35, "weight": 2.0517009094358045e-05}, {"ticker": "SPG", "market_cap": 34061420064.0, "weight": 0.004558627541054877}, {"ticker": "BSBK", "market_cap": 97804955.82, "weight": 1.3089776187104407e-05}, {"ticker": "KRNY", "market_cap": 440710247.835, "weight": 5.898268098132315e-05}, {"ticker": "NDAQ", "market_cap": 23720744204.8, "weight": 0.0031746779089990894}, {"ticker": "CCNE", "market_cap": 374983487.76, "weight": 5.018610649619539e-05}, {"ticker": "CALB", "market_cap": 166510384.857, "weight": 2.228500235323504e-05}, {"ticker": "VERY", "market_cap": 162137500.0, "weight": 2.169975507624171e-05}, {"ticker": "KRNL", "market_cap": 147150421.44, "weight": 1.9693951766949327e-05}, {"ticker": "MCAG", "market_cap": 33992853.059999995, "weight": 4.549450841074232e-06}, {"ticker": "MSBI", "market_cap": 439196130.09999996, "weight": 5.878003826137191e-05}, {"ticker": "HWEL", "market_cap": 107196762.4, "weight": 1.434673341482431e-05}, {"ticker": "NTST", "market_cap": 1007240055.7, "weight": 0.00013480448700436392}, {"ticker": "SKGR", "market_cap": 281388000.0, "weight": 3.7659706615641054e-05}, {"ticker": "ALTU", "market_cap": 89583300.30000001, "weight": 1.1989426723807944e-05}, {"ticker": "AIV", "market_cap": 957928952.1600001, "weight": 0.00012820491029103608}, {"ticker": "TGAA", "market_cap": 105905054.685, "weight": 1.4173857053429863e-05}, {"ticker": "IIPR", "market_cap": 2016495305.5300002, "weight": 0.0002698786785437804}, {"ticker": "MPB", "market_cap": 332126447.03999996, "weight": 4.4450312574884666e-05}, {"ticker": "ICE", "market_cap": 61849684668.44, "weight": 0.008277684119022003}, {"ticker": "PLTN", "market_cap": 52858107.190000005, "weight": 7.074291757407947e-06}, {"ticker": "LSBK", "market_cap": 56909760.0, "weight": 7.616546779416836e-06}, {"ticker": "FCAP", "market_cap": 92143150.0, "weight": 1.2332025515093061e-05}, {"ticker": "NCPL", "market_cap": 3669877.348, "weight": 4.91159908173294e-07}, {"ticker": "EMLD", "market_cap": 360112893.79999995, "weight": 4.8195892962804044e-05}, {"ticker": "FCBC", "market_cap": 554647767.12, "weight": 7.423156703469802e-05}, {"ticker": "SUAC", "market_cap": 168161188.88, "weight": 2.2505938552312825e-05}, {"ticker": "AX", "market_cap": 2143513668.1499999, "weight": 0.00028687824594206425}, {"ticker": "OVLY", "market_cap": 204971109.75, "weight": 2.743241310172205e-05}, {"ticker": "MCAC", "market_cap": 123711940.00000001, "weight": 1.6557050639159418e-05}, {"ticker": "PRU", "market_cap": 32844240000.0, "weight": 0.004395725625874957}, {"ticker": "CRBG", "market_cap": 12152443227.000399, "weight": 0.0016264284425493243}, {"ticker": "PTHR", "market_cap": 180452443.35000002, "weight": 2.4150944868425764e-05}, {"ticker": "ROSS", "market_cap": 161463505.52, "weight": 2.1609550680967707e-05}, {"ticker": "CNDA", "market_cap": 360275414.52, "weight": 4.82176440063246e-05}, {"ticker": "ASRV", "market_cap": 44582902.0, "weight": 5.966775446692385e-06}, {"ticker": "REG", "market_cap": 10379064206.45, "weight": 0.0013890873561054784}, {"ticker": "PCH", "market_cap": 3611989765.6000004, "weight": 0.00048341249403383984}, {"ticker": "AVB", "market_cap": 23756362542.24, "weight": 0.0031794449073718964}, {"ticker": "SEVN", "market_cap": 150102338.85999998, "weight": 2.0089023141673196e-05}, {"ticker": "RENE", "market_cap": 310931250.0, "weight": 4.1613642559862336e-05}, {"ticker": "GIPR", "market_cap": 10280485.6, "weight": 1.3758940379913948e-06}, {"ticker": "MARPS", "market_cap": 10400000.0, "weight": 1.391889308722003e-06}, {"ticker": "CHCT", "market_cap": 751621822.5, "weight": 0.0001005936902826824}, {"ticker": "ALCY", "market_cap": 154645265.0, "weight": 2.0697027980575094e-05}, {"ticker": "PPYA", "market_cap": 200528087.06, "weight": 2.6837778892047025e-05}, {"ticker": "KMPR", "market_cap": 2495314296.1949997, "weight": 0.0003339616625745182}, {"ticker": "TURN", "market_cap": 41058578.9178, "weight": 5.4950958679811975e-06}, {"ticker": "PGRE", "market_cap": 942023668.83, "weight": 0.00012607621857764942}, {"ticker": "NREF", "market_cap": 258289143.95700002, "weight": 3.4568259426221795e-05}, {"ticker": "WAL", "market_cap": 4668679889.195, "weight": 0.0006248351561169179}, {"ticker": "FORL", "market_cap": 71651525.4, "weight": 9.589518476719524e-06}, {"ticker": "DOC", "market_cap": 2755340545.7799997, "weight": 0.000368762408419176}, {"ticker": "FNWB", "market_cap": 119914440.89999999, "weight": 1.604881040866216e-05}, {"ticker": "ALTI", "market_cap": 397262834.59999996, "weight": 5.316787425310936e-05}, {"ticker": "AMH", "market_cap": 11962334015.94, "weight": 0.0016009850792450414}, {"ticker": "ESQ", "market_cap": 370139256.5, "weight": 4.953777633275588e-05}, {"ticker": "ACAB", "market_cap": 115371550.60000001, "weight": 1.5440810366424963e-05}, {"ticker": "TRUP", "market_cap": 1078146866.84, "weight": 0.00014429433626795394}, {"ticker": "SMMF", "market_cap": 329096257.21, "weight": 4.404476557221398e-05}, {"ticker": "MDRR", "market_cap": 11702891.464, "weight": 1.5662624528726528e-06}, {"ticker": "RLI", "market_cap": 6165061661.160001, "weight": 0.0008251041744019728}, {"ticker": "EQBK", "market_cap": 369660153.91499996, "weight": 4.947365539373255e-05}, {"ticker": "PRI", "market_cap": 6857575274.549999, "weight": 0.0009177870873463941}, {"ticker": "GODN", "market_cap": 92356880.0, "weight": 1.2360630178742402e-05}, {"ticker": "CHCI", "market_cap": 45672612.045, "weight": 6.112617346811854e-06}, {"ticker": "USCB", "market_cap": 208151875.05, "weight": 2.7858112449282047e-05}, {"ticker": "OPFI", "market_cap": 39275983.0, "weight": 5.256521233389149e-06}, {"ticker": "MHLD", "market_cap": 161045216.775, "weight": 2.155356879326345e-05}, {"ticker": "SASR", "market_cap": 910481778.855, "weight": 0.00012185479363216016}, {"ticker": "BHLB", "market_cap": 880621050.48, "weight": 0.00011785836780756263}, {"ticker": "TMTC", "market_cap": 84900200.0, "weight": 1.136266160464998e-05}, {"ticker": "LCAA", "market_cap": 308278521.0, "weight": 4.12586132200511e-05}, {"ticker": "NFNT", "market_cap": 371910000.0, "weight": 4.9774764692961555e-05}, {"ticker": "TWLV", "market_cap": 135574709.62, "weight": 1.814471046665078e-05}, {"ticker": "FRLA", "market_cap": 73829541.96000001, "weight": 9.881014434804474e-06}, {"ticker": "FCF", "market_cap": 1239115201.5, "weight": 0.00016583761550411158}, {"ticker": "KW", "market_cap": 1920805733.86, "weight": 0.0002570720158741976}, {"ticker": "CBU", "market_cap": 2236350205.36, "weight": 0.00029930307128835}, {"ticker": "CLBK", "market_cap": 1627909563.6423, "weight": 0.00021787210742307868}, {"ticker": "AXR", "market_cap": 89401400.64, "weight": 1.1965082089960428e-05}, {"ticker": "MAA", "market_cap": 14787638670.84, "weight": 0.0019791111699217546}, {"ticker": "AEI", "market_cap": 12559761.840000002, "weight": 1.6809421370375572e-06}, {"ticker": "CME", "market_cap": 72449919783.98999, "weight": 0.009696371996644462}, {"ticker": "CXAC", "market_cap": 389921875.0, "weight": 5.218539317782089e-05}, {"ticker": "KNSW", "market_cap": 109247739.97, "weight": 1.4621227044835042e-05}, {"ticker": "NECB", "market_cap": 222004180.54, "weight": 2.9712042825501476e-05}, {"ticker": "TBNK", "market_cap": 75920224.38, "weight": 1.0160821983682457e-05}, {"ticker": "AON", "market_cap": 65351508697.02, "weight": 0.008746352525407224}, {"ticker": "ALEX", "market_cap": 1178703750.0, "weight": 0.00015775241805533968}, {"ticker": "NTIP", "market_cap": 53931931.2, "weight": 7.218007541924099e-06}, {"ticker": "MARX", "market_cap": 97751840.0, "weight": 1.3082667404221523e-05}, {"ticker": "AGM.A", "market_cap": 1307811332.24, "weight": 0.00017503159722791686}, {"ticker": "BDN", "market_cap": 675483319.425, "weight": 9.040365485843338e-05}, {"ticker": "AEAE", "market_cap": 77011793.78, "weight": 1.0306912731527466e-05}, {"ticker": "BRX", "market_cap": 5996827177.95, "weight": 0.0008025884264655909}, {"ticker": "MTB", "market_cap": 20078922023.0928, "weight": 0.0026872727783274655}, {"ticker": "UCBI", "market_cap": 2911313077.695, "weight": 0.00038963707184482894}, {"ticker": "WTFC", "market_cap": 4434810631.650001, "weight": 0.0005935351446538759}, {"ticker": "CMCA", "market_cap": 108682575.38999999, "weight": 1.4545587954780198e-05}, {"ticker": "CATC", "market_cap": 457973413.16999996, "weight": 6.129310552598534e-05}, {"ticker": "LOB", "market_cap": 1197406186.5149999, "weight": 0.00016025546819305894}, {"ticker": "BENF", "market_cap": 523948388.0, "weight": 7.012289995955075e-05}, {"ticker": "RMAX", "market_cap": 208189341.52499998, "weight": 2.786312679408858e-05}, {"ticker": "CBL", "market_cap": 681476990.46, "weight": 9.120582088089621e-05}, {"ticker": "GCBC", "market_cap": 411197896.2, "weight": 5.503288033555384e-05}, {"ticker": "FLFV", "market_cap": 136591533.48749998, "weight": 1.828079760799949e-05}, {"ticker": "LPRO", "market_cap": 827384467.815, "weight": 0.00011073342259176373}, {"ticker": "VCXB", "market_cap": 162738333.0, "weight": 2.178016786749434e-05}, {"ticker": "ZION", "market_cap": 4872493424.37, "weight": 0.0006521126446345062}, {"ticker": "OWL", "market_cap": 5800154899.44, "weight": 0.0007762666916790461}, {"ticker": "UDR", "market_cap": 11572992165.5, "weight": 0.001548877313950284}, {"ticker": "ROCL", "market_cap": 61685976.6, "weight": 8.25577416611689e-06}, {"ticker": "HALL", "market_cap": 3491485.44, "weight": 4.6728473610524407e-07}, {"ticker": "DMYY", "market_cap": 82541937.5, "weight": 1.1047042339177863e-05}, {"ticker": "GLLI", "market_cap": 88228986.375, "weight": 1.1808171428340556e-05}, {"ticker": "NSTS", "market_cap": 48370687.2, "weight": 6.473715612424639e-06}, {"ticker": "PECO", "market_cap": 3842501999.9999995, "weight": 0.0005142632165906647}, {"ticker": "QFTA", "market_cap": 107963210.3426, "weight": 1.4449311366458627e-05}, {"ticker": "MDV", "market_cap": 120261067.46, "weight": 1.609520135125669e-05}, {"ticker": "ASCA", "market_cap": 58554316.800000004, "weight": 7.836646878215498e-06}, {"ticker": "NODK", "market_cap": 268712799.6, "weight": 3.5963314699999825e-05}, {"ticker": "VLY", "market_cap": 3949398207.1800003, "weight": 0.0005285697250442009}, {"ticker": "LFT", "market_cap": 107047746.024, "weight": 1.4326789732076337e-05}, {"ticker": "SLM", "market_cap": 2948094388.3199997, "weight": 0.0003945597173274943}, {"ticker": "AAT", "market_cap": 1115511453.1000001, "weight": 0.00014929504474296503}, {"ticker": "ARL", "market_cap": 242442165.43, "weight": 3.2447370965906556e-05}, {"ticker": "FRME", "market_cap": 1626955961.76, "weight": 0.00021774448162839116}, {"ticker": "VABK", "market_cap": 143486358.67999998, "weight": 1.920357005712909e-05}, {"ticker": "UWMC", "market_cap": 427862864.40999997, "weight": 5.7263244862639514e-05}, {"ticker": "MDWT", "market_cap": 98109699.0, "weight": 1.3130561646157096e-05}, {"ticker": "JGGC", "market_cap": 37189809.08, "weight": 4.977317081910045e-06}, {"ticker": "KRC", "market_cap": 3509478344.6, "weight": 0.0004696928256769359}, {"ticker": "IRRX", "market_cap": 133651342.3954, "weight": 1.788729563235587e-05}, {"ticker": "PBT", "market_cap": 900481938.72, "weight": 0.00012051645992323365}, {"ticker": "FCCO", "market_cap": 132055469.01, "weight": 1.7673711103200848e-05}, {"ticker": "FSFG", "market_cap": 101409653.17, "weight": 1.357221269697398e-05}, {"ticker": "AHH", "market_cap": 691698362.92, "weight": 9.257380348162114e-05}, {"ticker": "CLST", "market_cap": 58201156.5, "weight": 7.789381489192896e-06}, {"ticker": "AGO", "market_cap": 3449206974.4, "weight": 0.00046162637608045457}, {"ticker": "JOE", "market_cap": 3101890205.6, "weight": 0.00041514305903885923}, {"ticker": "BY", "market_cap": 829070026.1250001, "weight": 0.00011095901014858264}, {"ticker": "HGTY", "market_cap": 659781497.65, "weight": 8.830219352611791e-05}, {"ticker": "HFBL", "market_cap": 44587584.730000004, "weight": 5.967402162252254e-06}, {"ticker": "ESRT", "market_cap": 1219240203.3436, "weight": 0.00016317763498057672}, {"ticker": "BXMT", "market_cap": 3509985825.36, "weight": 0.00046976074462349617}, {"ticker": "BVFL", "market_cap": 114315795.30000001, "weight": 1.5299512816934906e-05}, {"ticker": "STEL", "market_cap": 1140796421.6, "weight": 0.0001526790714089768}, {"ticker": "CWBC", "market_cap": 114437572.71, "weight": 1.5315810958764024e-05}, {"ticker": "APAM", "market_cap": 2419987569.415, "weight": 0.0003238802716450851}, {"ticker": "BMTX", "market_cap": 24808916.549999997, "weight": 3.3203140102809e-06}, {"ticker": "CCVI", "market_cap": 431686438.15, "weight": 5.777497480589108e-05}, {"ticker": "IPXX", "market_cap": 319375000.0, "weight": 4.274371615125863e-05}, {"ticker": "AMNB", "market_cap": 398285437.22, "weight": 5.330473479674871e-05}, {"ticker": "HMST", "market_cap": 131558210.0, "weight": 1.7607160189769624e-05}, {"ticker": "SBR", "market_cap": 904757702.3375, "weight": 0.00012108870892956256}, {"ticker": "PLYM", "market_cap": 890182968.66, "weight": 0.00011913809200810267}, {"ticker": "FIBK", "market_cap": 2510882749.881, "weight": 0.00033604527452056414}, {"ticker": "MORN", "market_cap": 9710114805.0, "weight": 0.0012995581714944939}, {"ticker": "EVE", "market_cap": 166641866.28, "weight": 2.2302599236597467e-05}, {"ticker": "VOYA", "market_cap": 6813825012.670001, "weight": 0.0009119317487151867}, {"ticker": "TRV", "market_cap": 36882586146.5672, "weight": 0.004936199743790879}, {"ticker": "SBCF", "market_cap": 1792767687.83, "weight": 0.00023993597862623483}, {"ticker": "FGBI", "market_cap": 125970534.66, "weight": 1.685933080838928e-05}, {"ticker": "FRST", "market_cap": 193791097.4, "weight": 2.5936130441977343e-05}, {"ticker": "ORRF", "market_cap": 212652957.0, "weight": 2.8460517049655754e-05}, {"ticker": "PKST", "market_cap": 565934286.0600001, "weight": 7.57421040582821e-05}, {"ticker": "LMFA", "market_cap": 6754518.063, "weight": 9.039943728326301e-07}, {"ticker": "MRBK", "market_cap": 109653737.31, "weight": 1.4675563906076925e-05}, {"ticker": "EIG", "market_cap": 1020789236.145, "weight": 0.00013661784848545438}, {"ticker": "HLNE", "market_cap": 3376112851.93, "weight": 0.0004518437868884921}, {"ticker": "LSAK", "market_cap": 239915754.0, "weight": 3.210924740255559e-05}, {"ticker": "EQH", "market_cap": 9260384325.0, "weight": 0.001239368263136954}, {"ticker": "BCML", "market_cap": 227833069.14000002, "weight": 3.0492155106662207e-05}, {"ticker": "TENK", "market_cap": 96205160.0, "weight": 1.2875666696912471e-05}, {"ticker": "TIPT", "market_cap": 564527886.1552, "weight": 7.555387780912067e-05}, {"ticker": "SAMA", "market_cap": 95915970.28, "weight": 1.283696284311821e-05}, {"ticker": "BEEP", "market_cap": 51525438.0, "weight": 6.8959332960979255e-06}, {"ticker": "CCTS", "market_cap": 59922503.550000004, "weight": 8.019758850298199e-06}, {"ticker": "DBRG", "market_cap": 2579473365.8199997, "weight": 0.0003452251346171171}, {"ticker": "RMBI", "market_cap": 120741902.75, "weight": 1.6159554187738156e-05}, {"ticker": "PLMI", "market_cap": 140803963.82, "weight": 1.8844570371801704e-05}, {"ticker": "CTRE", "market_cap": 2021358090.88, "weight": 0.00027052949190332605}, {"ticker": "SQFT", "market_cap": 8959565.731, "weight": 1.1991080530548979e-06}, {"ticker": "CCV", "market_cap": 283138406.2608, "weight": 3.789397313105717e-05}, {"ticker": "AC", "market_cap": 771906562.9900001, "weight": 0.00010330850888058929}, {"ticker": "SBAC", "market_cap": 20624148549.96, "weight": 0.0027602434488638197}, {"ticker": "UMH", "market_cap": 876239694.6750001, "weight": 0.00011727198681691969}, {"ticker": "GABC", "market_cap": 785761066.51, "weight": 0.00010516273343127575}, {"ticker": "NYCB", "market_cap": 7820795035.9, "weight": 0.0010467000957860887}, {"ticker": "HTBK", "market_cap": 509194776.9250001, "weight": 6.814834289028778e-05}, {"ticker": "CFBK", "market_cap": 101910562.32000001, "weight": 1.3639252128755329e-05}, {"ticker": "EWBC", "market_cap": 7071353726.639999, "weight": 0.0009463982356059335}, {"ticker": "LBAI", "market_cap": 801813513.0600001, "weight": 0.00010731112080933118}, {"ticker": "QOMO", "market_cap": 51023235.36, "weight": 6.82872074942216e-06}, {"ticker": "SLAC", "market_cap": 104163230.82000001, "weight": 1.3940739167336563e-05}, {"ticker": "AVTA", "market_cap": 940717313.69, "weight": 0.00012590138187065325}, {"ticker": "MKL", "market_cap": 19278877962.64, "weight": 0.002580198473111043}, {"ticker": "IVCA", "market_cap": 176564008.56, "weight": 2.363053421343887e-05}, {"ticker": "PFS", "market_cap": 1130821374.9, "weight": 0.00015134405594207943}, {"ticker": "SEDA", "market_cap": 265186944.76999998, "weight": 3.549143011903993e-05}, {"ticker": "TRIS", "market_cap": 175693533.48, "weight": 2.3514033736769545e-05}, {"ticker": "RWT", "market_cap": 770843947.4997, "weight": 0.00010316629319402859}, {"ticker": "FPH", "market_cap": 192621889.8808, "weight": 2.577964895681851e-05}, {"ticker": "PGC", "market_cap": 455783564.6, "weight": 6.100002602480235e-05}, {"ticker": "HR", "market_cap": 5691915815.74, "weight": 0.0007617804586609793}, {"ticker": "RPT", "market_cap": 863034285.28, "weight": 0.0001155046341097853}, {"ticker": "AJX", "market_cap": 147198706.622, "weight": 1.9700414038929665e-05}, {"ticker": "AEL", "market_cap": 4169384315.25, "weight": 0.0005580116781105466}, {"ticker": "AGM", "market_cap": 1622843445.5, "weight": 0.00021719408091548352}, {"ticker": "PWOD", "market_cap": 148166545.205, "weight": 1.9829945209722584e-05}, {"ticker": "COLD", "market_cap": 7819827007.184999, "weight": 0.0010465705391688826}, {"ticker": "SFBC", "market_cap": 94477304.25, "weight": 1.2644418240620274e-05}, {"ticker": "BMAC", "market_cap": 126367221.42, "weight": 1.691242158340424e-05}, {"ticker": "IVR", "market_cap": 401887464.94500005, "weight": 5.3786814015993686e-05}, {"ticker": "TFIN", "market_cap": 1413297771.6, "weight": 0.00018914942868564146}, {"ticker": "CPF", "market_cap": 427387620.06, "weight": 5.719964029246687e-05}, {"ticker": "LCA", "market_cap": 141550980.12, "weight": 1.8944547679629692e-05}, {"ticker": "ATEK", "market_cap": 129836490.80999999, "weight": 1.737673302311746e-05}, {"ticker": "EQR", "market_cap": 21775412011.95, "weight": 0.002914323381966335}, {"ticker": "HRTG", "market_cap": 160943455.047, "weight": 2.1539949460451885e-05}, {"ticker": "JBGS", "market_cap": 1424359532.79, "weight": 0.0001906298851410258}, {"ticker": "FBK", "market_cap": 1329549333.99, "weight": 0.00017794091378837892}, {"ticker": "OHAA", "market_cap": 59241105.0, "weight": 7.928563527536307e-06}, {"ticker": "NWLI", "market_cap": 1548399117.0, "weight": 0.00020723078621027788}, {"ticker": "RELI", "market_cap": 5018181.279999999, "weight": 6.716108531597014e-07}, {"ticker": "RRAC", "market_cap": 348921959.04, "weight": 4.66981484967416e-05}, {"ticker": "HHGC", "market_cap": 58510511.4006, "weight": 7.830784160226156e-06}, {"ticker": "CBNK", "market_cap": 260697597.6, "weight": 3.489059604893759e-05}, {"ticker": "FCPT", "market_cap": 1994259928.92, "weight": 0.0002669027955650433}, {"ticker": "NXRT", "market_cap": 782553060.24, "weight": 0.00010473338827459054}, {"ticker": "FFBC", "market_cap": 1839233116.2450001, "weight": 0.000246154702956622}, {"ticker": "EG", "market_cap": 16620749907.3, "weight": 0.002224446547972413}, {"ticker": "OSBC", "market_cap": 594625008.6700001, "weight": 7.958194156408668e-05}, {"ticker": "ABR", "market_cap": 2514979132.875, "weight": 0.00033659351602958136}, {"ticker": "AAME", "market_cap": 37336187.04, "weight": 4.996907650905866e-06}, {"ticker": "AXS", "market_cap": 4763014488.81, "weight": 0.0006374604754098689}, {"ticker": "OSCR", "market_cap": 1233795586.36, "weight": 0.00016512566209643065}, {"ticker": "XFIN", "market_cap": 112132746.88000001, "weight": 1.5007343417298322e-05}, {"ticker": "RGTI", "market_cap": 168232026.16, "weight": 2.2515419095840802e-05}, {"ticker": "RFAC", "market_cap": 76499237.55, "weight": 1.0238314506849018e-05}, {"ticker": "VALU", "market_cap": 416433922.55999994, "weight": 5.5733646596195236e-05}, {"ticker": "BANC", "market_cap": 675994731.39, "weight": 9.047209993982146e-05}, {"ticker": "HTLF", "market_cap": 1229396136.975, "weight": 0.00016453685954227247}, {"ticker": "MPU", "market_cap": 27797121.6822, "weight": 3.7202419694902653e-06}, {"ticker": "CZWI", "market_cap": 95696161.4925, "weight": 1.2807544621840865e-05}, {"ticker": "WSFS", "market_cap": 2183384016.0, "weight": 0.0002922143142985491}, {"ticker": "ACRE", "market_cap": 475857839.66999996, "weight": 6.368667687579058e-05}, {"ticker": "ALOR", "market_cap": 78522999.49, "weight": 1.0509165719126375e-05}, {"ticker": "WY", "market_cap": 21644755760.0, "weight": 0.0028968369357925956}, {"ticker": "HTH", "market_cap": 1832334395.1999998, "weight": 0.0002452314091040844}, {"ticker": "INBK", "market_cap": 141745909.5607, "weight": 1.8970636160828297e-05}, {"ticker": "PORT", "market_cap": 303887500.0, "weight": 4.06709386831017e-05}, {"ticker": "APLE", "market_cap": 3398810511.6600003, "weight": 0.0004548815397645688}, {"ticker": "EVBN", "market_cap": 146632808.85, "weight": 1.962467682174924e-05}, {"ticker": "SMBK", "market_cap": 358531279.82, "weight": 4.79842168484495e-05}, {"ticker": "SIEB", "market_cap": 75599587.75999999, "weight": 1.01179094179745e-05}, {"ticker": "CG", "market_cap": 10685178444.72, "weight": 0.001430056311441593}, {"ticker": "VHC", "market_cap": 18325487.699, "weight": 2.452601000514873e-06}, {"ticker": "EHTH", "market_cap": 214879335.3, "weight": 2.875848552590005e-05}, {"ticker": "TRST", "market_cap": 510045048.72999996, "weight": 6.826213945133461e-05}, {"ticker": "GATE", "market_cap": 124346140.86000001, "weight": 1.664192923498791e-05}, {"ticker": "NRIM", "market_cap": 214332052.35, "weight": 2.8685239632924005e-05}, {"ticker": "PEB", "market_cap": 1555076516.205, "weight": 0.00020812445934138444}, {"ticker": "BETR", "market_cap": 314285155.1318, "weight": 4.206251416519121e-05}, {"ticker": "VAC", "market_cap": 3503988887.44, "weight": 0.0004689581413758117}, {"ticker": "CFIV", "market_cap": 225176814.7398, "weight": 3.0136653943115652e-05}, {"ticker": "FBRT", "market_cap": 1033798596.8, "weight": 0.00013835896290939699}, {"ticker": "RGLD", "market_cap": 6740977883.08, "weight": 0.0009021822159413973}, {"ticker": "OMF", "market_cap": 4492812742.6, "weight": 0.0006012978867802809}, {"ticker": "NKSH", "market_cap": 140282305.59, "weight": 1.8774753976307105e-05}, {"ticker": "GOOD", "market_cap": 460973006.26, "weight": 6.16945575983399e-05}, {"ticker": "ESHA", "market_cap": 148384500.0, "weight": 1.9859115300967312e-05}, {"ticker": "ALX", "market_cap": 871661184.3, "weight": 0.00011665921954376244}, {"ticker": "VICI", "market_cap": 28507733859.5, "weight": 0.003815347112974067}, {"ticker": "DX", "market_cap": 607630415.99, "weight": 8.132252689142156e-05}, {"ticker": "MCY", "market_cap": 1525457937.5119002, "weight": 0.00020416044174307032}, {"ticker": "LAND", "market_cap": 492420193.08, "weight": 6.590330789873812e-05}, {"ticker": "CBAN", "market_cap": 171803069.28, "weight": 2.2993351474659383e-05}, {"ticker": "SCHW", "market_cap": 93140838910.18001, "weight": 0.012465551719661336}, {"ticker": "MACA", "market_cap": 64617443.28999999, "weight": 8.64810850695205e-06}, {"ticker": "SRC", "market_cap": 4660401530.05, "weight": 0.000623727217695025}, {"ticker": "CASH", "market_cap": 1205326875.48, "weight": 0.00016131553764383742}, {"ticker": "MAC", "market_cap": 2308619795.625, "weight": 0.0003089753087917705}, {"ticker": "CNC", "market_cap": 37134640998.54, "weight": 0.004969933633567077}, {"ticker": "CZNC", "market_cap": 270651640.5, "weight": 3.622280046154049e-05}, {"ticker": "ALRS", "market_cap": 349833087.44549996, "weight": 4.6820089831980866e-05}, {"ticker": "MNSB", "market_cap": 152077359.97, "weight": 2.035335110008755e-05}, {"ticker": "SACH", "market_cap": 149869947.845, "weight": 2.005792097155574e-05}, {"ticker": "FZT", "market_cap": 151184718.21, "weight": 2.0233883934485358e-05}, {"ticker": "HWC", "market_cap": 2935157040.0, "weight": 0.0003928282407111654}, {"ticker": "BRKL", "market_cap": 780606544.0799999, "weight": 0.00010447287529070989}, {"ticker": "AMTB", "market_cap": 585645256.9, "weight": 7.838013190219815e-05}, {"ticker": "FRT", "market_cap": 7118668129.482, "weight": 0.0009527305828621207}, {"ticker": "AGBA", "market_cap": 37827962.680199996, "weight": 5.0627246947408945e-06}, {"ticker": "FG", "market_cap": 3346029230.18, "weight": 0.0004478175300152746}, {"ticker": "SHFS", "market_cap": 37494902.67, "weight": 5.018149438263951e-06}, {"ticker": "GTY", "market_cap": 1371359814.45, "weight": 0.00018353664078307164}, {"ticker": "VRE", "market_cap": 1441273082.0149999, "weight": 0.00019289351863514316}, {"ticker": "NXTP", "market_cap": 5220314.0248, "weight": 6.986633922394855e-07}, {"ticker": "PACW", "market_cap": 889883863.65, "weight": 0.00011909806113640997}, {"ticker": "AIG", "market_cap": 41763377872.0728, "weight": 0.00558942299579377}, {"ticker": "ATLO", "market_cap": 144099476.17499998, "weight": 1.9285626950040717e-05}, {"ticker": "HCVI", "market_cap": 470028192.48, "weight": 6.290646306834998e-05}, {"ticker": "TFSL", "market_cap": 3227989563.4700003, "weight": 0.0004320196309673172}, {"ticker": "ACNB", "market_cap": 274142666.82, "weight": 3.669002375108617e-05}, {"ticker": "BLUA", "market_cap": 105792012.1, "weight": 1.4158727941363343e-05}, {"ticker": "CIGI", "market_cap": 4439107487.84, "weight": 0.0005941102165954121}, {"ticker": "BHM", "market_cap": 48348509.42, "weight": 6.4707474379176016e-06}, {"ticker": "ROOT", "market_cap": 126440000.00000001, "weight": 1.6922161941808662e-05}, {"ticker": "ECBK", "market_cap": 97716380.55, "weight": 1.3077921670630353e-05}, {"ticker": "FSBW", "market_cap": 222606056.97, "weight": 2.979259526474078e-05}, {"ticker": "COFS", "market_cap": 145068771.51000002, "weight": 1.9415353085981168e-05}, {"ticker": "CBFV", "market_cap": 111470623.61999999, "weight": 1.4918727812812729e-05}, {"ticker": "WABC", "market_cap": 1139759167.8200002, "weight": 0.00015254025001986015}, {"ticker": "WASH", "market_cap": 432033382.01500005, "weight": 5.7821408215162256e-05}, {"ticker": "JEF", "market_cap": 7310268720.0, "weight": 0.0009783735456973925}, {"ticker": "GHL", "market_cap": 278278391.2, "weight": 3.7243530534580686e-05}, {"ticker": "VMCA", "market_cap": 130016608.8, "weight": 1.7400839206251067e-05}, {"ticker": "ERIE", "market_cap": 15651141840.42, "weight": 0.0020946785574011743}, {"ticker": "KFS", "market_cap": 198435094.2, "weight": 2.6557662124252263e-05}, {"ticker": "LATG", "market_cap": 95231197.08, "weight": 1.2745315872350964e-05}, {"ticker": "IRM", "market_cap": 16728980083.88, "weight": 0.002238931588901528}, {"ticker": "CTBI", "market_cap": 617285585.89, "weight": 8.261473148350854e-05}, {"ticker": "PNC", "market_cap": 47814446555.64, "weight": 0.006399270861851434}, {"ticker": "REFR", "market_cap": 36860215.7, "weight": 4.933205783655474e-06}, {"ticker": "AIRC", "market_cap": 4482674751.08, "weight": 0.0005999410635102229}, {"ticker": "RGA", "market_cap": 9343809074.880001, "weight": 0.0012505334571216446}, {"ticker": "MVBF", "market_cap": 281871277.68, "weight": 3.77243863306349e-05}, {"ticker": "EBMT", "market_cap": 94739245.52, "weight": 1.2679475284199704e-05}, {"ticker": "FNVT", "market_cap": 98944710.48, "weight": 1.3242315833817878e-05}, {"ticker": "ALHC", "market_cap": 1356514876.8, "weight": 0.0001815498609750255}, {"ticker": "LBBB", "market_cap": 62278817.13999999, "weight": 8.335117282405637e-06}, {"ticker": "ML", "market_cap": 200414074.545, "weight": 2.682251996890385e-05}, {"ticker": "WTBA", "market_cap": 266096245.54, "weight": 3.561312685174913e-05}, {"ticker": "STHO", "market_cap": 159901221.76000002, "weight": 2.140046163647405e-05}, {"ticker": "PFSI", "market_cap": 3235304583.6800003, "weight": 0.0004329986404311042}, {"ticker": "LOAN", "market_cap": 53296370.25000001, "weight": 7.132946917756196e-06}, {"ticker": "JYNT", "market_cap": 128512156.63000001, "weight": 1.719949008212543e-05}, {"ticker": "STEP", "market_cap": 1884417781.29, "weight": 0.0002522020156676143}, {"ticker": "VTR", "market_cap": 16280211088.26, "weight": 0.002178870361296779}, {"ticker": "APPS", "market_cap": 565921561.1741999, "weight": 7.574040101669556e-05}, {"ticker": "PWUP", "market_cap": 95396939.69, "weight": 1.2767498119164299e-05}, {"ticker": "RJF", "market_cap": 20123971083.48, "weight": 0.002693301942319861}, {"ticker": "OPAD", "market_cap": 237950966.14000002, "weight": 3.184628901637859e-05}, {"ticker": "IRAA", "market_cap": 88534557.60000001, "weight": 1.1849067709218497e-05}, {"ticker": "DRH", "market_cap": 1644525360.465, "weight": 0.00022009589107244534}, {"ticker": "BRO", "market_cap": 19850079679.17, "weight": 0.0026566455464150586}, {"ticker": "BTCS", "market_cap": 13759960.32, "weight": 1.8415713132545185e-06}, {"ticker": "FNF", "market_cap": 10590303647.22, "weight": 0.0014173586944889569}, {"ticker": "VSAC", "market_cap": 50721135.92, "weight": 6.788289116661881e-06}, {"ticker": "ISTR", "market_cap": 101114221.12, "weight": 1.3532673397757747e-05}, {"ticker": "HAFC", "market_cap": 479407944.73, "weight": 6.416180699866114e-05}, {"ticker": "FBIZ", "market_cap": 246636691.9, "weight": 3.300874755713199e-05}, {"ticker": "PSA", "market_cap": 45270812611.020004, "weight": 0.0060588423144649975}, {"ticker": "MCBS", "market_cap": 490808210.09, "weight": 6.568756733242824e-05}, {"ticker": "AMP", "market_cap": 32390850628.86, "weight": 0.004335046027954001}, {"ticker": "ACAQ", "market_cap": 50482463.4, "weight": 6.756346258116329e-06}, {"ticker": "CSR", "market_cap": 858972987.6, "weight": 0.00011496108826167671}, {"ticker": "GLPI", "market_cap": 11722944345.029999, "weight": 0.001568946240441377}, {"ticker": "SNEX", "market_cap": 1931521654.14, "weight": 0.00025850618653485623}, {"ticker": "BNIX", "market_cap": 58242114.58, "weight": 7.794863134736912e-06}, {"ticker": "CIZN", "market_cap": 57568489.5, "weight": 7.70470817830047e-06}, {"ticker": "SRG", "market_cap": 413222449.31, "weight": 5.5303837434472e-05}, {"ticker": "SYF", "market_cap": 11987217414.9, "weight": 0.0016043153616466842}, {"ticker": "ACAH", "market_cap": 130815894.36, "weight": 1.750781199717221e-05}, {"ticker": "TCOA", "market_cap": 112575019.9, "weight": 1.5066535252690072e-05}, {"ticker": "KREF", "market_cap": 746967413.349, "weight": 9.997076505809638e-05}, {"ticker": "EQIX", "market_cap": 66550861276.56, "weight": 0.008906868490104329}, {"ticker": "CCB", "market_cap": 552635546.2377, "weight": 7.396226042576912e-05}, {"ticker": "ORC", "market_cap": 403938990.0, "weight": 5.406138091893886e-05}, {"ticker": "FSP", "market_cap": 189277545.99, "weight": 2.5332056985059447e-05}, {"ticker": "WINV", "market_cap": 45213484.68, "weight": 6.051169801553661e-06}, {"ticker": "RHP", "market_cap": 4943697206.4, "weight": 0.0006616422391487494}, {"ticker": "PBHC", "market_cap": 86502459.0, "weight": 1.157710075579456e-05}, {"ticker": "AIB", "market_cap": 40857576.8727, "weight": 5.468194656672933e-06}, {"ticker": "ICCH", "market_cap": 50287408.0, "weight": 6.730240919090512e-06}, {"ticker": "CSLM", "market_cap": 101915685.27000001, "weight": 1.3639937761383609e-05}, {"ticker": "PTWO", "market_cap": 58409610.0, "weight": 7.817279969771326e-06}, {"ticker": "THCP", "market_cap": 103403747.88, "weight": 1.3839093380380526e-05}, {"ticker": "SAFE", "market_cap": 1186084663.72, "weight": 0.0001587402464106731}, {"ticker": "HOOD", "market_cap": 8749205621.7318, "weight": 0.0011709544004518209}, {"ticker": "ALSA", "market_cap": 135566958.15, "weight": 1.814367304470656e-05}, {"ticker": "NFBK", "market_cap": 412942768.367, "weight": 5.526640619270133e-05}, {"ticker": "CETU", "market_cap": 78632775.0, "weight": 1.0523857580542577e-05}, {"ticker": "PEBO", "market_cap": 892747962.1199999, "weight": 0.00011948137921713304}, {"ticker": "GAMC", "market_cap": 97709560.11999999, "weight": 1.3077008854899787e-05}, {"ticker": "MBIN", "market_cap": 1163061751.35, "weight": 0.00015565896318149553}, {"ticker": "SAMG", "market_cap": 150162556.85999998, "weight": 2.0097082448441718e-05}, {"ticker": "CNOB", "market_cap": 667788637.9499999, "weight": 8.937383323544551e-05}, {"ticker": "BRKH", "market_cap": 183898789.61999997, "weight": 2.461218838067258e-05}, {"ticker": "ARE", "market_cap": 16773355259.039999, "weight": 0.0022448705631205536}, {"ticker": "VCTR", "market_cap": 2110479588.4400003, "weight": 0.00028245711302169705}, {"ticker": "WTW", "market_cap": 21800018097.06, "weight": 0.0029176165499273077}, {"ticker": "SFBS", "market_cap": 2830013732.0, "weight": 0.00037875633241415924}, {"ticker": "NRT", "market_cap": 102291266.7, "weight": 1.3690203893784717e-05}, {"ticker": "HASI", "market_cap": 1648732762.26, "weight": 0.00022065899083936443}, {"ticker": "CWD", "market_cap": 29749837.599999998, "weight": 3.981584701120755e-06}, {"ticker": "CFSB", "market_cap": 43443805.1, "weight": 5.814323831624273e-06}, {"ticker": "NBTB", "market_cap": 1510559717.84, "weight": 0.00020216653090842515}, {"ticker": "GNTY", "market_cap": 322265033.71999997, "weight": 4.3130505289404206e-05}, {"ticker": "ARIZ", "market_cap": 55321240.42, "weight": 7.403946450561302e-06}, {"ticker": "CORR", "market_cap": 12603945.1246, "weight": 1.6868554294855342e-06}, {"ticker": "USCT", "market_cap": 84987748.80000001, "weight": 1.1374378742987622e-05}, {"ticker": "NWFL", "market_cap": 207745415.75, "weight": 2.7803713761387754e-05}, {"ticker": "KERN", "market_cap": 1695378.5114, "weight": 2.2690184848602735e-07}, {"ticker": "WE", "market_cap": 121341141.39999999, "weight": 1.6239753598344692e-05}, {"ticker": "HCI", "market_cap": 463935006.0, "weight": 6.209097834550754e-05}, {"ticker": "HIPO", "market_cap": 172875476.715, "weight": 2.3136877671137315e-05}, {"ticker": "SFR", "market_cap": 8112039.6906, "weight": 1.0856789728148736e-06}, {"ticker": "EPRT", "market_cap": 3290547298.86, "weight": 0.0004403920774160865}, {"ticker": "BLFY", "market_cap": 202187661.2405, "weight": 2.7059888849630586e-05}, {"ticker": "MSB", "market_cap": 250723391.1, "weight": 3.355569303063609e-05}, {"ticker": "FFIN", "market_cap": 3429357233.8999996, "weight": 0.0004589697759282568}, {"ticker": "OPEN", "market_cap": 1733683394.4099998, "weight": 0.00023202840205655294}, {"ticker": "RITM", "market_cap": 4330552629.76, "weight": 0.0005795817217520095}, {"ticker": "ACTG", "market_cap": 353098148.27000004, "weight": 4.7257070914091316e-05}, {"ticker": "BOTJ", "market_cap": 47432448.72, "weight": 6.348145986526217e-06}, {"ticker": "GMFI", "market_cap": 69767864.43180001, "weight": 9.337417749518128e-06}, {"ticker": "HONE", "market_cap": 437062038.42, "weight": 5.84944210120234e-05}, {"ticker": "LDI", "market_cap": 263000559.96500003, "weight": 3.5198814192613806e-05}, {"ticker": "FNLC", "market_cap": 255199881.14, "weight": 3.415480636018191e-05}, {"ticker": "HPLT", "market_cap": 76874922.95, "weight": 1.028859455412815e-05}, {"ticker": "MOBV", "market_cap": 88003510.26, "weight": 1.1777994717394338e-05}, {"ticker": "PEAK", "market_cap": 9499597711.119999, "weight": 0.0012713835087757633}, {"ticker": "APCA", "market_cap": 236971875.0, "weight": 3.171525185387566e-05}, {"ticker": "ACRO", "market_cap": 171079471.70999998, "weight": 2.289650842451513e-05}, {"ticker": "ASB", "market_cap": 2472842059.65, "weight": 0.0003309540793254743}, {"ticker": "ELS", "market_cap": 11724219370.439999, "weight": 0.001569116884117966}, {"ticker": "CLSK", "market_cap": 548752764.1600001, "weight": 7.344260630441835e-05}, {"ticker": "CIFR", "market_cap": 626134578.7850001, "weight": 8.379904096461503e-05}, {"ticker": "EEFT", "market_cap": 3800426075.94, "weight": 0.0005086319638162694}, {"ticker": "CPSS", "market_cap": 181592096.4, "weight": 2.4303470916113014e-05}, {"ticker": "BANF", "market_cap": 2795107996.6, "weight": 0.0003740847054991266}, {"ticker": "ARI", "market_cap": 1348508888.82, "weight": 0.0001804783754870333}, {"ticker": "HPP", "market_cap": 847035589.02, "weight": 0.00011336344042922908}, {"ticker": "UHT", "market_cap": 557030710.5999999, "weight": 7.455048949172692e-05}, {"ticker": "PW", "market_cap": 2459199.0555000002, "weight": 3.291281609009325e-07}, {"ticker": "CHEA", "market_cap": 156543750.0, "weight": 2.095111268963943e-05}, {"ticker": "SSRM", "market_cap": 2548383387.5, "weight": 0.00034106419149865496}, {"ticker": "HYAC", "market_cap": 300794568.0, "weight": 4.025699455008207e-05}, {"ticker": "ANY", "market_cap": 13923542.879999999, "weight": 1.8634644686734967e-06}, {"ticker": "FDBC", "market_cap": 246310986.22, "weight": 3.29651565711914e-05}, {"ticker": "LMND", "market_cap": 794427969.6, "weight": 0.00010632267283038158}, {"ticker": "PFIS", "market_cap": 279521824.40000004, "weight": 3.740994605161819e-05}, {"ticker": "HIG", "market_cap": 21277187162.0, "weight": 0.0028476432048523902}, {"ticker": "BEN", "market_cap": 11763402106.5, "weight": 0.0015743609255995422}, {"ticker": "CINF", "market_cap": 15738947295.08, "weight": 0.002106430045246244}, {"ticker": "IGTA", "market_cap": 75694407.04, "weight": 1.0130599604714185e-05}, {"ticker": "SBRA", "market_cap": 3150354215.25, "weight": 0.00042162926450901644}, {"ticker": "THFF", "market_cap": 398486060.56750005, "weight": 5.3331585324870375e-05}, {"ticker": "EPR", "market_cap": 3034065502.76, "weight": 0.00040606570531287434}, {"ticker": "FMNB", "market_cap": 418737385.6, "weight": 5.604193174796566e-05}, {"ticker": "ESNT", "market_cap": 5007058477.2, "weight": 0.0006701222271692839}, {"ticker": "IBTX", "market_cap": 1570519782.36, "weight": 0.00021019131675031644}, {"ticker": "MNTN", "market_cap": 233948812.5, "weight": 3.13106587410537e-05}, {"ticker": "TBBK", "market_cap": 1842604424.865, "weight": 0.00024660590376667776}, {"ticker": "IROQ", "market_cap": 48642077.0, "weight": 6.510037204839658e-06}, {"ticker": "BYN", "market_cap": 118508460.97999999, "weight": 1.5860640368380834e-05}, {"ticker": "OLP", "market_cap": 382923574.512, "weight": 5.1248772059698665e-05}, {"ticker": "ABL", "market_cap": 453953770.48, "weight": 6.075513459472635e-05}, {"ticker": "FNWD", "market_cap": 88671782.02780001, "weight": 1.1867433210559874e-05}, {"ticker": "RF", "market_cap": 15253325563.535, "weight": 0.002041436612917345}, {"ticker": "KIM", "market_cap": 10389098128.400002, "weight": 0.0013904302511715128}, {"ticker": "CNA", "market_cap": 10397027774.744999, "weight": 0.0013914915194378156}, {"ticker": "AB", "market_cap": 3459257585.2, "weight": 0.0004629715047072474}, {"ticker": "ADRT", "market_cap": 36766500.0, "weight": 4.920663295108416e-06}, {"ticker": "FHB", "market_cap": 2219131135.29, "weight": 0.0002969985482559877}, {"ticker": "LGVC", "market_cap": 133538934.80999999, "weight": 1.7872251505784953e-05}, {"ticker": "DEA", "market_cap": 1037848493.66, "weight": 0.0001389009829229413}, {"ticker": "PSTL", "market_cap": 271740325.5204, "weight": 3.6368505176969384e-05}, {"ticker": "NMRK", "market_cap": 992569209.93, "weight": 0.0001328410068719435}, {"ticker": "AIHS", "market_cap": 3872659.1999999997, "weight": 5.182993208465293e-07}, {"ticker": "BRBS", "market_cap": 64098140.4, "weight": 8.578607339588643e-06}, {"ticker": "PVBC", "market_cap": 163592910.0, "weight": 2.189454061651162e-05}, {"ticker": "IBCP", "market_cap": 370922083.07, "weight": 4.9642546326348815e-05}, {"ticker": "PBFS", "market_cap": 223537927.79500002, "weight": 2.9917312672281883e-05}, {"ticker": "SLG", "market_cap": 2250359621.4, "weight": 0.0003011780286352264}, {"ticker": "SOHO", "market_cap": 31862824.95, "weight": 4.2643774416909316e-06}, {"ticker": "O", "market_cap": 34916151417.3024, "weight": 0.004673020948025175}, {"ticker": "ROIC", "market_cap": 1464794116.875, "weight": 0.00019604146834203853}, {"ticker": "UBFO", "market_cap": 123078945.60000001, "weight": 1.6472333510520867e-05}, {"ticker": "PFG", "market_cap": 16397938951.68, "weight": 0.002194626529992258}, {"ticker": "RNR", "market_cap": 10338158052.66, "weight": 0.0013836126601322824}, {"ticker": "TW", "market_cap": 17013010298.9, "weight": 0.0022769449177131}, {"ticker": "ELV", "market_cap": 102384801609.7984, "weight": 0.013702722186182858}, {"ticker": "CBSH", "market_cap": 5737447368.08, "weight": 0.000767874197210168}, {"ticker": "BOCN", "market_cap": 254265000.00000003, "weight": 3.402968606559617e-05}, {"ticker": "UFCS", "market_cap": 496827533.07, "weight": 6.649316649604426e-05}, {"ticker": "VRTS", "market_cap": 1382511896.8000002, "weight": 0.00018502918541700938}, {"ticker": "ENVA", "market_cap": 1483026504.99, "weight": 0.0001984816093122057}, {"ticker": "RM", "market_cap": 258816205.79999998, "weight": 3.4638799017020546e-05}, {"ticker": "ONYX", "market_cap": 93452037.6, "weight": 1.2507201155166021e-05}, {"ticker": "OHI", "market_cap": 8008554294.875, "weight": 0.00107182895205348}, {"ticker": "TFC", "market_cap": 35810175270.815, "weight": 0.004792673086818121}, {"ticker": "HCMA", "market_cap": 155419546.94, "weight": 2.0800654399250338e-05}, {"ticker": "SYBT", "market_cap": 1139478606.46, "weight": 0.00015250270094703086}, {"ticker": "RFL", "market_cap": 46648307.2328, "weight": 6.243200010318616e-06}, {"ticker": "BRK.A", "market_cap": 750167421366.0, "weight": 0.10039903976450859}, {"ticker": "CRD.A", "market_cap": 453623286.96, "weight": 6.07109041641305e-05}, {"ticker": "CFFI", "market_cap": 173533277.06, "weight": 2.3224914716087234e-05}, {"ticker": "MDBH", "market_cap": 100299869.27999999, "weight": 1.3423684203562159e-05}, {"ticker": "FGF", "market_cap": 16382945.010000002, "weight": 2.1926198081537973e-06}, {"ticker": "UVE", "market_cap": 408482244.52, "weight": 5.466942970674567e-05}, {"ticker": "HLI", "market_cap": 7225214115.070001, "weight": 0.0009669902192301194}, {"ticker": "AROW", "market_cap": 290014529.49, "weight": 3.8814242593382026e-05}, {"ticker": "EBC", "market_cap": 2074189698.0, "weight": 0.00027760023701033846}, {"ticker": "FFIC", "market_cap": 354808216.0, "weight": 4.748593870164684e-05}, {"ticker": "AUB", "market_cap": 2127883509.22, "weight": 0.00028478637564319}, {"ticker": "DFS", "market_cap": 21686737872.94, "weight": 0.0029024556333078592}, {"ticker": "NYC", "market_cap": 20442633.505, "weight": 2.73595029016651e-06}]}, "Services": {"sic_description": "Services", "companies": [{"ticker": "CDNS", "market_cap": 63484708200.0, "weight": 0.004965096858049927}, {"ticker": "SNAP", "market_cap": 13858777339.539999, "weight": 0.0010838857699114945}, {"ticker": "WAVD", "market_cap": 5701731.362, "weight": 4.459286223971481e-07}, {"ticker": "ATIF", "market_cap": 11938040.48, "weight": 9.336662159931113e-07}, {"ticker": "BYD", "market_cap": 5856705179.52, "weight": 0.00045804902172267507}, {"ticker": "SWI", "market_cap": 1548539578.2, "weight": 0.00012111025178007796}, {"ticker": "WW", "market_cap": 839804048.1, "weight": 6.568051675472488e-05}, {"ticker": "ONTF", "market_cap": 285160428.96, "weight": 2.2302207728655282e-05}, {"ticker": "CTV", "market_cap": 161591774.64, "weight": 1.2637985355846304e-05}, {"ticker": "QUBT", "market_cap": 75845892.43, "weight": 5.931856865653606e-06}, {"ticker": "FUBO", "market_cap": 721220669.25, "weight": 5.640618946491181e-05}, {"ticker": "DASH", "market_cap": 30665429232.09, "weight": 0.002398322850462475}, {"ticker": "EXPO", "market_cap": 4314024069.6, "weight": 0.0003373969568552372}, {"ticker": "OPCH", "market_cap": 5808218836.74, "weight": 0.000454256937061328}, {"ticker": "SQ", "market_cap": 25458479492.16, "weight": 0.001991090770064406}, {"ticker": "AYX", "market_cap": 2545787033.0699997, "weight": 0.000199104312795126}, {"ticker": "GDDY", "market_cap": 10796585440.34, "weight": 0.0008443937755627854}, {"ticker": "ELYS", "market_cap": 17853946.132842, "weight": 1.3963452674098683e-06}, {"ticker": "DOCN", "market_cap": 1982193503.29, "weight": 0.00015502603720295838}, {"ticker": "DUOT", "market_cap": 35182614.06, "weight": 2.7516088752738285e-06}, {"ticker": "FROG", "market_cap": 2553718601.42, "weight": 0.00019972463548716596}, {"ticker": "NFTG", "market_cap": 5301661.6499499995, "weight": 4.1463943596751907e-07}, {"ticker": "LTRPB", "market_cap": 2080118734.98, "weight": 0.00016268470452574258}, {"ticker": "KFRC", "market_cap": 1183502397.36, "weight": 9.256093634571816e-05}, {"ticker": "SP", "market_cap": 688129377.22, "weight": 5.3818141496425354e-05}, {"ticker": "NVEE", "market_cap": 1601817054.47, "weight": 0.00012527704780912556}, {"ticker": "UPLD", "market_cap": 147598859.79999998, "weight": 1.154360878112584e-05}, {"ticker": "AMED", "market_cap": 3035844361.83, "weight": 0.00023743137095258348}, {"ticker": "MGRX", "market_cap": 11198715.0, "weight": 8.758440613057207e-07}, {"ticker": "PNTG", "market_cap": 329249283.28999996, "weight": 2.5750367739397895e-05}, {"ticker": "ETSY", "market_cap": 7821217404.0, "weight": 0.0006116922178548473}, {"ticker": "FOUR", "market_cap": 3059215371.24, "weight": 0.00023925920207414238}, {"ticker": "ASAN", "market_cap": 3740013285.1499996, "weight": 0.0002925039546950812}, {"ticker": "CANO", "market_cap": 72110891.538, "weight": 5.6397449268972596e-06}, {"ticker": "PLTK", "market_cap": 3421236052.6000004, "weight": 0.00026757259908790753}, {"ticker": "XGN", "market_cap": 35993461.13999999, "weight": 2.8150246867883705e-06}, {"ticker": "AKAM", "market_cap": 16087678013.880001, "weight": 0.00125820661108488}, {"ticker": "CSGS", "market_cap": 1627125795.0, "weight": 0.00012725642759442486}, {"ticker": "VCYT", "market_cap": 1552627538.5974, "weight": 0.0001214299684472952}, {"ticker": "TRU", "market_cap": 13442082000.000002, "weight": 0.0010512963041995913}, {"ticker": "EFSH", "market_cap": 3006070.3101000004, "weight": 2.351027621444542e-07}, {"ticker": "ACN", "market_cap": 193820060000.0, "weight": 0.015158538145931785}, {"ticker": "PRGS", "market_cap": 2245923741.67, "weight": 0.00017565220396154318}, {"ticker": "BGLC", "market_cap": 12919940.77, "weight": 1.010459985438165e-06}, {"ticker": "TGL", "market_cap": 4065547.5579, "weight": 3.1796377392787393e-07}, {"ticker": "TTEK", "market_cap": 8182251813.009999, "weight": 0.0006399284791632588}, {"ticker": "LFMD", "market_cap": 219079059.2, "weight": 1.7134027694852883e-05}, {"ticker": "SCWX", "market_cap": 526035390.99999994, "weight": 4.1140878506505676e-05}, {"ticker": "KBNT", "market_cap": 4004281.0884, "weight": 3.1317216404506655e-07}, {"ticker": "TH", "market_cap": 1577786749.6799998, "weight": 0.00012339765363383954}, {"ticker": "MLGO", "market_cap": 94261218.20580001, "weight": 7.372107262037887e-06}, {"ticker": "AL", "market_cap": 4116890504.16, "weight": 0.00032197927164986787}, {"ticker": "SRT", "market_cap": 129771824.98, "weight": 1.0149368229617271e-05}, {"ticker": "VVI", "market_cap": 550475072.285, "weight": 4.305228974553371e-05}, {"ticker": "STER", "market_cap": 1262898020.34, "weight": 9.877041527974774e-05}, {"ticker": "CREX", "market_cap": 15613540.5, "weight": 1.221124631074311e-06}, {"ticker": "SPLK", "market_cap": 24642829924.44, "weight": 0.0019272993591753762}, {"ticker": "DOMO", "market_cap": 337374254.8, "weight": 2.638581636411169e-05}, {"ticker": "STAF", "market_cap": 3201673.2, "weight": 2.5040073423260465e-07}, {"ticker": "ADP", "market_cap": 99841418077.59999, "weight": 0.0078085309873148455}, {"ticker": "ESTC", "market_cap": 7441466033.92, "weight": 0.0005819921154540559}, {"ticker": "BILL", "market_cap": 11031548005.4, "weight": 0.0008627700417001913}, {"ticker": "STCN", "market_cap": 63129979.3, "weight": 4.937353746412697e-06}, {"ticker": "NHC", "market_cap": 1016516495.9957001, "weight": 7.950107992186017e-05}, {"ticker": "CEVA", "market_cap": 440755785.7, "weight": 3.4471217223715567e-05}, {"ticker": "R", "market_cap": 4609180004.88, "weight": 0.00036048090649357724}, {"ticker": "SMAR", "market_cap": 5424229146.96, "weight": 0.0004242253584921405}, {"ticker": "CDLX", "market_cap": 501354737.60999995, "weight": 3.9210620999213416e-05}, {"ticker": "TSP", "market_cap": 297925780.4736, "weight": 2.3300577391037665e-05}, {"ticker": "QTWO", "market_cap": 1816518214.56, "weight": 0.00014206868292264307}, {"ticker": "SAIC", "market_cap": 5585738554.08, "weight": 0.00043685690193896097}, {"ticker": "APDN", "market_cap": 15160957.200000001, "weight": 1.1857283918137222e-06}, {"ticker": "CCCS", "market_cap": 8005904412.9, "weight": 0.000626136466140957}, {"ticker": "AGTI", "market_cap": 755652894.975, "weight": 5.90991109669573e-05}, {"ticker": "CERT", "market_cap": 2249648163.84, "weight": 0.00017594348854547894}, {"ticker": "BSQR", "market_cap": 23217298.65, "weight": 1.8158095051230274e-06}, {"ticker": "WMG", "market_cap": 16465351308.6, "weight": 0.0012877441885921453}, {"ticker": "PTC", "market_cap": 16479789701.480001, "weight": 0.0012888734057084617}, {"ticker": "NOTV", "market_cap": 61362925.96, "weight": 4.799153678471917e-06}, {"ticker": "ASGN", "market_cap": 3813194000.0, "weight": 0.0002982273697925705}, {"ticker": "VMW", "market_cap": 71299239206.0, "weight": 0.005576266137158692}, {"ticker": "BB", "market_cap": 2474922365.2000003, "weight": 0.00019356203419348812}, {"ticker": "DTST", "market_cap": 22304805.2145, "weight": 1.7444439996643093e-06}, {"ticker": "TLSI", "market_cap": 136752000.0, "weight": 1.069528308128923e-05}, {"ticker": "LFLY", "market_cap": 16129314.25, "weight": 1.2614629534545915e-06}, {"ticker": "TENB", "market_cap": 5107775292.55, "weight": 0.000399475712745972}, {"ticker": "CRM", "market_cap": 195582730000.0, "weight": 0.015296395395762837}, {"ticker": "DDOG", "market_cap": 28482952586.76, "weight": 0.002227632801760395}, {"ticker": "RXT", "market_cap": 368094826.77000004, "weight": 2.878845189147706e-05}, {"ticker": "INTA", "market_cap": 2387764125.615, "weight": 0.00018674544617116736}, {"ticker": "LDOS", "market_cap": 12482470421.76, "weight": 0.0009762457200958155}, {"ticker": "CNVS", "market_cap": 14497972.059999999, "weight": 1.1338767644079936e-06}, {"ticker": "BAER", "market_cap": 369844394.64000005, "weight": 2.892528443242402e-05}, {"ticker": "BBSI", "market_cap": 613709884.5799999, "weight": 4.799784241084912e-05}, {"ticker": "CHH", "market_cap": 6050097271.525, "weight": 0.00047317408877599934}, {"ticker": "AI", "market_cap": 2829750230.1600003, "weight": 0.00022131288581450038}, {"ticker": "GOOG", "market_cap": 1706629410900.0, "weight": 0.1334743525829924}, {"ticker": "RUM", "market_cap": 1445529407.28, "weight": 0.00011305389473783076}, {"ticker": "SOND", "market_cap": 87550146.15, "weight": 6.847238774442015e-06}, {"ticker": "EGAN", "market_cap": 196771162.5, "weight": 1.5389341912161166e-05}, {"ticker": "GSMG", "market_cap": 35685966.662999995, "weight": 2.7909757479980935e-06}, {"ticker": "EB", "market_cap": 936718193.4, "weight": 7.326010768257014e-05}, {"ticker": "AKU", "market_cap": 13240280.440499999, "weight": 1.035513538279545e-06}, {"ticker": "DRCT", "market_cap": 34960990.400000006, "weight": 2.734275836040681e-06}, {"ticker": "TEAM", "market_cap": 48886883700.04, "weight": 0.0038234107006405176}, {"ticker": "CSSE", "market_cap": 10434606.4375, "weight": 8.160836381983842e-07}, {"ticker": "SSY", "market_cap": 5523675.736649999, "weight": 4.320030102135293e-07}, {"ticker": "CVLT", "market_cap": 2969001828.71, "weight": 0.0002322036608380049}, {"ticker": "LVS", "market_cap": 33700651417.455, "weight": 0.0026357055614070167}, {"ticker": "NIR", "market_cap": 10737191.4575, "weight": 8.39748611617841e-07}, {"ticker": "LGF.A", "market_cap": 1828876030.04, "weight": 0.00014303517946254697}, {"ticker": "ZDGE", "market_cap": 29959115.6, "weight": 2.343082530471717e-06}, {"ticker": "LH", "market_cap": 17741264000.0, "weight": 0.0013875324726503866}, {"ticker": "ASPA", "market_cap": 26512486.0, "weight": 2.073523918909541e-06}, {"ticker": "TISI", "market_cap": 31583691.060000002, "weight": 2.470139498059874e-06}, {"ticker": "DMTK", "market_cap": 47053051.0506, "weight": 3.679987867267174e-06}, {"ticker": "BRZE", "market_cap": 4457906987.940001, "weight": 0.000348649944323123}, {"ticker": "NTRA", "market_cap": 5079436459.440001, "weight": 0.0003972593514327564}, {"ticker": "TOST", "market_cap": 9258415281.475, "weight": 0.0007240945091809204}, {"ticker": "BALY", "market_cap": 498728609.69, "weight": 3.900523327901864e-05}, {"ticker": "BMBL", "market_cap": 1913972041.28, "weight": 0.00014969048197585846}, {"ticker": "PRO", "market_cap": 1555412919.215, "weight": 0.00012164781121518427}, {"ticker": "GRNQ", "market_cap": 7534146.0285, "weight": 5.892405562666615e-07}, {"ticker": "IONQ", "market_cap": 2933864417.3412004, "weight": 0.00022945558723518357}, {"ticker": "XHR", "market_cap": 1239204043.6200001, "weight": 9.691732509940759e-05}, {"ticker": "SHO", "market_cap": 1925781702.845, "weight": 0.00015061410776218622}, {"ticker": "SEZL", "market_cap": 71230230.36, "weight": 5.5708690011527615e-06}, {"ticker": "ADUS", "market_cap": 1340465363.51, "weight": 0.00010483690566428805}, {"ticker": "SNPS", "market_cap": 69940305761.96, "weight": 0.005469984855183738}, {"ticker": "OBLG", "market_cap": 1429447.31, "weight": 1.117961245922356e-07}, {"ticker": "SERA", "market_cap": 68821511.0, "weight": 5.38248466002004e-06}, {"ticker": "EVI", "market_cap": 284817747.75, "weight": 2.227540685885017e-05}, {"ticker": "JOB", "market_cap": 63949966.596, "weight": 5.0014844081491325e-06}, {"ticker": "ENZ", "market_cap": 67132913.4, "weight": 5.250420563389749e-06}, {"ticker": "MTCH", "market_cap": 10469354534.889, "weight": 0.0008188012638134505}, {"ticker": "GH", "market_cap": 3271840852.6, "weight": 0.00025588849973297436}, {"ticker": "IMXI", "market_cap": 584401834.5, "weight": 4.570567928222065e-05}, {"ticker": "OMQS", "market_cap": 12095074.953599999, "weight": 9.459477778618461e-07}, {"ticker": "BAH", "market_cap": 15109301483.4, "weight": 0.0011816884325311972}, {"ticker": "SHC", "market_cap": 4055535625.0499997, "weight": 0.0003171807473101893}, {"ticker": "LTRPA", "market_cap": 33456455.178, "weight": 2.616607135728727e-06}, {"ticker": "ACON", "market_cap": 3281990.175, "weight": 2.5668227149610225e-07}, {"ticker": "EVCM", "market_cap": 1889294336.93, "weight": 0.00014776045511102567}, {"ticker": "AMN", "market_cap": 3313324524.16, "weight": 0.0002591329101297907}, {"ticker": "OABI", "market_cap": 594781327.36, "weight": 4.651745252413243e-05}, {"ticker": "INPX", "market_cap": 7593379.63, "weight": 5.938731768935391e-07}, {"ticker": "FORA", "market_cap": 82754876.4, "weight": 6.472203912594341e-06}, {"ticker": "BRTX", "market_cap": 9472977.409500001, "weight": 7.408752706889877e-07}, {"ticker": "XWEL", "market_cap": 9940458.2379, "weight": 7.774366357499271e-07}, {"ticker": "UHS", "market_cap": 8583931665.400001, "weight": 0.0006713435935993294}, {"ticker": "BIGC", "market_cap": 716863635.25, "weight": 5.606542872996971e-05}, {"ticker": "BLND", "market_cap": 293833389.99, "weight": 2.2980514249721447e-05}, {"ticker": "IT", "market_cap": 27198642851.100002, "weight": 0.002127187790448389}, {"ticker": "PDFS", "market_cap": 1215484519.96, "weight": 9.506223690985982e-05}, {"ticker": "TOON", "market_cap": 46981131.64, "weight": 3.674363097937245e-06}, {"ticker": "AUGX", "market_cap": 203954285.0, "weight": 1.5951129151434288e-05}, {"ticker": "LSTA", "market_cap": 16854678.99, "weight": 1.3181932479401254e-06}, {"ticker": "MDB", "market_cap": 23831241748.449997, "weight": 0.0018638255870357349}, {"ticker": "LINC", "market_cap": 270629119.3, "weight": 2.1165723652696084e-05}, {"ticker": "ATVI", "market_cap": 73750933924.36, "weight": 0.005768011552521992}, {"ticker": "KIND", "market_cap": 704424414.9, "weight": 5.509256556925701e-05}, {"ticker": "HQI", "market_cap": 208639000.0, "weight": 1.6317517599721418e-05}, {"ticker": "PAYO", "market_cap": 2156824220.97, "weight": 0.00016868378963273123}, {"ticker": "FPAY", "market_cap": 21978527.9616, "weight": 1.718926072447516e-06}, {"ticker": "BL", "market_cap": 3237485059.3900003, "weight": 0.0002532015559671561}, {"ticker": "CNXC", "market_cap": 5287041000.0, "weight": 0.0004134959646468241}, {"ticker": "CACI", "market_cap": 7015824795.72, "weight": 0.0005487029969503451}, {"ticker": "AWRE", "market_cap": 31801111.89, "weight": 2.487143836750488e-06}, {"ticker": "LFST", "market_cap": 2430573699.63, "weight": 0.00019009355451824698}, {"ticker": "HHLA", "market_cap": 154721616.55, "weight": 1.210067485518994e-05}, {"ticker": "CXM", "market_cap": 3744711699.3, "weight": 0.0002928714145447901}, {"ticker": "YELP", "market_cap": 2892154413.84, "weight": 0.00022619347556758894}, {"ticker": "INCY", "market_cap": 12964593594.224998, "weight": 0.0010139522531597736}, {"ticker": "FLT", "market_cap": 18442760329.18, "weight": 0.001442396034580489}, {"ticker": "PEGA", "market_cap": 3612129114.57, "weight": 0.00028250221866219703}, {"ticker": "GDRX", "market_cap": 2040946517.25, "weight": 0.00015962107139756715}, {"ticker": "PENN", "market_cap": 3109858954.14, "weight": 0.000243220003052309}, {"ticker": "SNCE", "market_cap": 49421341.021905005, "weight": 3.865210252765634e-06}, {"ticker": "MPLN", "market_cap": 1071643311.75, "weight": 8.381251156353497e-05}, {"ticker": "SNCR", "market_cap": 84047113.4941, "weight": 6.573268917344122e-06}, {"ticker": "CCRD", "market_cap": 169176818.925, "weight": 1.3231206630944222e-05}, {"ticker": "BKD", "market_cap": 693646431.94, "weight": 5.424962668132476e-05}, {"ticker": "PYPL", "market_cap": 63922251374.26501, "weight": 0.004999316819067317}, {"ticker": "SQSP", "market_cap": 3879098824.77, "weight": 0.0003033817423599766}, {"ticker": "KELYA", "market_cap": 654801635.5, "weight": 5.121160095474777e-05}, {"ticker": "RDI", "market_cap": 45437784.96, "weight": 3.553658979275961e-06}, {"ticker": "DHX", "market_cap": 133739415.45, "weight": 1.0459670844769337e-05}, {"ticker": "PAYS", "market_cap": 97066208.16000001, "weight": 7.591483663116785e-06}, {"ticker": "HHS", "market_cap": 45789056.25, "weight": 3.5811316735318375e-06}, {"ticker": "PRST", "market_cap": 101897823.84, "weight": 7.969361116006656e-06}, {"ticker": "PMD", "market_cap": 19927380.67, "weight": 1.5585072052639892e-06}, {"ticker": "TTEC", "market_cap": 1212941184.8, "weight": 9.48633243564288e-05}, {"ticker": "VSEC", "market_cap": 823872740.02, "weight": 6.443453973229865e-05}, {"ticker": "HEES", "market_cap": 1447110107.496, "weight": 0.0001131775202517302}, {"ticker": "FSLY", "market_cap": 2320432000.0, "weight": 0.00018147944535277093}, {"ticker": "RCM", "market_cap": 5836092113.95, "weight": 0.0004564368875568542}, {"ticker": "MSFT", "market_cap": 2357835517176.7, "weight": 0.18440474958554756}, {"ticker": "CTSH", "market_cap": 33948882370.239998, "weight": 0.0026551195393347523}, {"ticker": "IZEA", "market_cap": 33853749.6, "weight": 2.6476792685670558e-06}, {"ticker": "XMTR", "market_cap": 840887787.47, "weight": 6.576527529096924e-05}, {"ticker": "MODN", "market_cap": 902518933.52, "weight": 7.05854062845125e-05}, {"ticker": "KPLT", "market_cap": 43232350.5, "weight": 3.3811734151384693e-06}, {"ticker": "PD", "market_cap": 2037918529.92, "weight": 0.0001593842545198549}, {"ticker": "ZFOX", "market_cap": 94890092.754, "weight": 7.421291122717195e-06}, {"ticker": "INST", "market_cap": 3694442180.6324997, "weight": 0.0002889398688817718}, {"ticker": "CHE", "market_cap": 7626432338.055, "weight": 0.0005964582072349706}, {"ticker": "TOI", "market_cap": 99218919.68, "weight": 7.75984580113855e-06}, {"ticker": "PWSC", "market_cap": 3596050942.0, "weight": 0.0002812447554655639}, {"ticker": "YOU", "market_cap": 1567217609.2099998, "weight": 0.00012257104817832475}, {"ticker": "ADT", "market_cap": 5697776965.174999, "weight": 0.0004456193516482074}, {"ticker": "PHR", "market_cap": 979953963.5, "weight": 7.664154854235312e-05}, {"ticker": "LQDT", "market_cap": 561341096.92, "weight": 4.390211431438526e-05}, {"ticker": "PYCR", "market_cap": 4083133111.935, "weight": 0.00031933912842759335}, {"ticker": "XELA", "market_cap": 24315648.459999997, "weight": 1.90171071417467e-06}, {"ticker": "GSD", "market_cap": 37171704.28, "weight": 2.9071743001094716e-06}, {"ticker": "NTNX", "market_cap": 8110932512.150001, "weight": 0.0006343506440174671}, {"ticker": "META", "market_cap": 783476174851.04, "weight": 0.061275151204205645}, {"ticker": "SPHR", "market_cap": 1393734059.32, "weight": 0.00010900301497939156}, {"ticker": "LGF.B", "market_cap": 1689186525.8200002, "weight": 0.0001321101561274744}, {"ticker": "APPN", "market_cap": 3137813565.93, "weight": 0.0002454063146713098}, {"ticker": "SCI", "market_cap": 8266984972.0, "weight": 0.0006465554032431256}, {"ticker": "MMS", "market_cap": 4443890531.31, "weight": 0.00034755372656064445}, {"ticker": "WFCF", "market_cap": 77677828.9452, "weight": 6.075131403627562e-06}, {"ticker": "GROM", "market_cap": 2251272.4119, "weight": 1.7607051990733057e-07}, {"ticker": "SLP", "market_cap": 830649450.0150001, "weight": 6.49645417195188e-05}, {"ticker": "HQY", "market_cap": 6153193659.06, "weight": 0.00048123718876243556}, {"ticker": "VRDN", "market_cap": 605923428.375, "weight": 4.738886884327764e-05}, {"ticker": "EVGO", "market_cap": 322051651.32, "weight": 2.518744572411412e-05}, {"ticker": "LAW", "market_cap": 383080429.55, "weight": 2.9960465930583288e-05}, {"ticker": "HSON", "market_cap": 50846012.1, "weight": 3.976632831433233e-06}, {"ticker": "SLE", "market_cap": 6165133.392, "weight": 4.82170987344601e-07}, {"ticker": "ALKT", "market_cap": 1598121736.96, "weight": 0.0001249880394813154}, {"ticker": "PINS", "market_cap": 17534067069.280003, "weight": 0.0013713277383311472}, {"ticker": "SBET", "market_cap": 4590649.08, "weight": 3.5903161516804116e-07}, {"ticker": "GRPN", "market_cap": 430677827.8614, "weight": 3.3683026835530206e-05}, {"ticker": "CFLT", "market_cap": 8653794513.225, "weight": 0.0006768075205207157}, {"ticker": "DV", "market_cap": 4618654260.41, "weight": 0.0003612218817252215}, {"ticker": "IVDA", "market_cap": 12814914.991700001, "weight": 1.0022459890816129e-06}, {"ticker": "MEDP", "market_cap": 7395579810.54, "weight": 0.0005784033844038308}, {"ticker": "AVAH", "market_cap": 220893113.67999998, "weight": 1.7275903690732143e-05}, {"ticker": "ACM", "market_cap": 11121726914.64, "weight": 0.0008698228742897233}, {"ticker": "MAR", "market_cap": 58050843633.035, "weight": 0.004540117919759608}, {"ticker": "RMR", "market_cap": 392379667.98, "weight": 3.0687753191093214e-05}, {"ticker": "BCOV", "market_cap": 131049863.39999999, "weight": 1.0249322765497283e-05}, {"ticker": "BKYI", "market_cap": 4798850.236, "weight": 3.7531488927936427e-07}, {"ticker": "AMSWA", "market_cap": 385055891.5, "weight": 3.0114965497474928e-05}, {"ticker": "HIMS", "market_cap": 1299055839.6959999, "weight": 0.00010159829431343308}, {"ticker": "DT", "market_cap": 13588128016.5, "weight": 0.0010627184661377138}, {"ticker": "PRCH", "market_cap": 73646673.5082, "weight": 5.759857414630011e-06}, {"ticker": "SSNC", "market_cap": 12795158507.95, "weight": 0.0010007008476109424}, {"ticker": "MGRC", "market_cap": 2446907775.455, "weight": 0.00019137103173846764}, {"ticker": "ZM", "market_cap": 19796948434.12, "weight": 0.0015483061867365665}, {"ticker": "NTWK", "market_cap": 21484512.9216, "weight": 1.6802894843229226e-06}, {"ticker": "G", "market_cap": 6480309036.96, "weight": 0.0005068206651787469}, {"ticker": "CRAI", "market_cap": 698281136.6800001, "weight": 5.461210386039705e-05}, {"ticker": "SEAT", "market_cap": 611075789.96, "weight": 4.7791831620339294e-05}, {"ticker": "SHCO", "market_cap": 1348440537.3600001, "weight": 0.00010546063871351766}, {"ticker": "TDOC", "market_cap": 3000478953.6600003, "weight": 0.00023466546587138916}, {"ticker": "WHLM", "market_cap": 20319935.36, "weight": 1.5892086468110065e-06}, {"ticker": "BSY", "market_cap": 14919394240.08, "weight": 0.0011668359131786856}, {"ticker": "PRDO", "market_cap": 1132748967.075, "weight": 8.859154427653781e-05}, {"ticker": "OPGN", "market_cap": 3581880.41952, "weight": 2.8013648831529646e-07}, {"ticker": "INLX", "market_cap": 18820757.34, "weight": 1.4719589297089044e-06}, {"ticker": "BOXL", "market_cap": 17330045.1143, "weight": 1.3553713167555275e-06}, {"ticker": "GTLB", "market_cap": 6925919000.000001, "weight": 0.0005416715243877942}, {"ticker": "IDAI", "market_cap": 12659262.559600001, "weight": 9.900725157605598e-07}, {"ticker": "SPSC", "market_cap": 6059902133.04, "weight": 0.00047394092048212255}, {"ticker": "ZS", "market_cap": 22585991592.31, "weight": 0.0017664353994923214}, {"ticker": "TCX", "market_cap": 209217239.10000002, "weight": 1.6362741295632046e-05}, {"ticker": "AUUD", "market_cap": 6153718.2955, "weight": 4.812782202299136e-07}, {"ticker": "ICFI", "market_cap": 2271307566.0, "weight": 0.0001776374560009654}, {"ticker": "ACEL", "market_cap": 917801418.88, "weight": 7.178063931299369e-05}, {"ticker": "SQL", "market_cap": 5062618.4, "weight": 3.9594402217549693e-07}, {"ticker": "MSGS", "market_cap": 4160072909.6000004, "weight": 0.00032535653889504025}, {"ticker": "LAUR", "market_cap": 2183791356.0, "weight": 0.0001707928713502725}, {"ticker": "RBLX", "market_cap": 18027882631.753002, "weight": 0.0014099487254508587}, {"ticker": "EBIX", "market_cap": 202713446.39999998, "weight": 1.5854083988766165e-05}, {"ticker": "ARC", "market_cap": 137917133.09, "weight": 1.0786407366308295e-05}, {"ticker": "HTCR", "market_cap": 20634263.1, "weight": 1.6137920105614591e-06}, {"ticker": "VERX", "market_cap": 3530651046.36, "weight": 0.0002761298730700116}, {"ticker": "VRNS", "market_cap": 3292746226.77, "weight": 0.0002575234951602326}, {"ticker": "VRAR", "market_cap": 22274752.181, "weight": 1.7420935718772645e-06}, {"ticker": "AOGO", "market_cap": 46413529.03, "weight": 3.6299712748441375e-06}, {"ticker": "OB", "market_cap": 245179134.32999998, "weight": 1.9175297233567246e-05}, {"ticker": "ALRM", "market_cap": 2999359134.2000003, "weight": 0.00023457788553527242}, {"ticker": "CISO", "market_cap": 24208870.128000002, "weight": 1.8933596517573904e-06}, {"ticker": "EXAS", "market_cap": 11723373069.03, "weight": 0.0009168772203758509}, {"ticker": "FATP", "market_cap": 38613838.23, "weight": 3.0199626383888954e-06}, {"ticker": "OKTA", "market_cap": 12756677843.52, "weight": 0.0009976913004069896}, {"ticker": "CYN", "market_cap": 16830411.5764, "weight": 1.316295309642311e-06}, {"ticker": "EUDA", "market_cap": 37958379.6217, "weight": 2.9686996560278594e-06}, {"ticker": "CAR", "market_cap": 6546494146.56, "weight": 0.0005119969586365255}, {"ticker": "SJ", "market_cap": 114088244.86, "weight": 8.92276584638719e-06}, {"ticker": "TRIP", "market_cap": 2196077842.29, "weight": 0.00017175378928160754}, {"ticker": "MG", "market_cap": 162721659.45000002, "weight": 1.272635289630055e-05}, {"ticker": "CASS", "market_cap": 500347222.55, "weight": 3.913182391562151e-05}, {"ticker": "TWKS", "market_cap": 1328106175.0, "weight": 0.0001038703017406199}, {"ticker": "HRB", "market_cap": 6124130458.47, "weight": 0.0004789641751497766}, {"ticker": "IOT", "market_cap": 13020733067.38, "weight": 0.0010183428840640906}, {"ticker": "EVBG", "market_cap": 908963565.4, "weight": 7.108943666294427e-05}, {"ticker": "FRSH", "market_cap": 5514652582.205, "weight": 0.00043129731529809506}, {"ticker": "BWMN", "market_cap": 390038410.81, "weight": 3.0504645023028043e-05}, {"ticker": "VERI", "market_cap": 84170968.7, "weight": 6.582955550725659e-06}, {"ticker": "MDRX", "market_cap": 1489757045.76, "weight": 0.00011651290896475629}, {"ticker": "CCO", "market_cap": 654348684.09, "weight": 5.11761759258486e-05}, {"ticker": "MTN", "market_cap": 8077017221.28, "weight": 0.0006316981516470525}, {"ticker": "SWAG", "market_cap": 23117431.319999997, "weight": 1.8079989475814737e-06}, {"ticker": "UIS", "market_cap": 229831158.94500002, "weight": 1.7974942273733142e-05}, {"ticker": "FA", "market_cap": 2036997110.25, "weight": 0.00015931219089952524}, {"ticker": "MXCT", "market_cap": 334319764.33, "weight": 2.614692669342497e-05}, {"ticker": "CSGP", "market_cap": 31066248528.0, "weight": 0.0024296706613478767}, {"ticker": "ID", "market_cap": 5072318.9085, "weight": 3.967026925016343e-07}, {"ticker": "PCOR", "market_cap": 9236463637.83, "weight": 0.0007223776857130161}, {"ticker": "PGNY", "market_cap": 3153180892.0499997, "weight": 0.0002466081830392743}, {"ticker": "FORR", "market_cap": 550615920.0, "weight": 4.3063305351764535e-05}, {"ticker": "QNST", "market_cap": 493123931.36, "weight": 3.856689510978588e-05}, {"ticker": "CLVT", "market_cap": 4348186632.59, "weight": 0.0003400687882139041}, {"ticker": "NATI", "market_cap": 7925354620.96, "weight": 0.0006198367204192326}, {"ticker": "CCLD", "market_cap": 17347187.67, "weight": 1.356712024649732e-06}, {"ticker": "VRME", "market_cap": 11483729.719999999, "weight": 8.981348732334027e-07}, {"ticker": "RMBL", "market_cap": 88626568.2, "weight": 6.931425027949763e-06}, {"ticker": "EA", "market_cap": 32632663643.935, "weight": 0.002552178947060227}, {"ticker": "H", "market_cap": 10864558332.495, "weight": 0.0008497098903066405}, {"ticker": "BFAM", "market_cap": 4677297267.37, "weight": 0.0003658083123454334}, {"ticker": "NOW", "market_cap": 111265679999.99998, "weight": 0.008702014923599956}, {"ticker": "ABNB", "market_cap": 81598134860.16, "weight": 0.006381735925139129}, {"ticker": "LZ", "market_cap": 1970251111.5, "weight": 0.00015409203067390055}, {"ticker": "HCKT", "market_cap": 648845150.56, "weight": 5.074574822423753e-05}, {"ticker": "DXC", "market_cap": 4315842599.495, "weight": 0.00033753918287035073}, {"ticker": "MVLA", "market_cap": 25962789.81, "weight": 2.0305325450301375e-06}, {"ticker": "IBEX", "market_cap": 282794528.84999996, "weight": 2.2117172252622e-05}, {"ticker": "MCRI", "market_cap": 1195742921.94, "weight": 9.351825964224458e-05}, {"ticker": "CELC", "market_cap": 198921737.715, "weight": 1.555753697118794e-05}, {"ticker": "ACVA", "market_cap": 2335810223.74, "weight": 0.00018268216601635684}, {"ticker": "OOMA", "market_cap": 326144000.0, "weight": 2.5507505595998555e-05}, {"ticker": "MRDB", "market_cap": 39255549.30555499, "weight": 3.070150435345863e-06}, {"ticker": "JKHY", "market_cap": 10685463476.338402, "weight": 0.0008357030005719558}, {"ticker": "STGW", "market_cap": 484436526.08000004, "weight": 3.788745891352195e-05}, {"ticker": "NRDS", "market_cap": 627665447.2800001, "weight": 4.9089297699511686e-05}, {"ticker": "MYSZ", "market_cap": 3953174.504, "weight": 3.091751520271378e-07}, {"ticker": "VRNT", "market_cap": 1388899076.08, "weight": 0.00010862487415187101}, {"ticker": "BACK", "market_cap": 2079990.0, "weight": 1.6267463624847012e-07}, {"ticker": "SHCR", "market_cap": 323948405.8921, "weight": 2.5335789639262263e-05}, {"ticker": "BRLI", "market_cap": 20916186.096, "weight": 1.635841020808806e-06}, {"ticker": "MCW", "market_cap": 1698454897.435, "weight": 0.0001328350293148867}, {"ticker": "WORX", "market_cap": 3361058.9958, "weight": 2.6286619144871525e-07}, {"ticker": "SKIL", "market_cap": 124361833.75, "weight": 9.72625640915291e-06}, {"ticker": "BR", "market_cap": 20905884377.56, "weight": 0.0016350353302526201}, {"ticker": "AMST", "market_cap": 6536066.22, "weight": 5.111813974271092e-07}, {"ticker": "PSNL", "market_cap": 55311547.13999999, "weight": 4.325879360640968e-06}, {"ticker": "NRDY", "market_cap": 366219038.15999997, "weight": 2.864174771029793e-05}, {"ticker": "STRA", "market_cap": 1878881914.8675, "weight": 0.00014694610649805987}, {"ticker": "BGSF", "market_cap": 98930728.07000001, "weight": 7.737306526754244e-06}, {"ticker": "ATXG", "market_cap": 5329639.4410999995, "weight": 4.168275604288684e-07}, {"ticker": "EWCZ", "market_cap": 762041286.9200001, "weight": 5.959874285743059e-05}, {"ticker": "BOWL", "market_cap": 1633853214.5, "weight": 0.00012778257460477268}, {"ticker": "AEYE", "market_cap": 62219222.08, "weight": 4.8661240292149385e-06}, {"ticker": "SGRP", "market_cap": 21139469.2161, "weight": 1.6533038453140635e-06}, {"ticker": "RCMT", "market_cap": 151538281.0, "weight": 1.185170829638289e-05}, {"ticker": "VERB", "market_cap": 2978761.7449999996, "weight": 2.3296697740793612e-07}, {"ticker": "FOXO", "market_cap": 6520657.9382, "weight": 5.099763259426171e-07}, {"ticker": "WEAV", "market_cap": 517420437.6, "weight": 4.046710872364974e-05}, {"ticker": "TWLO", "market_cap": 10185992578.640001, "weight": 0.0007966397134408715}, {"ticker": "NXGN", "market_cap": 1594220165.905, "weight": 0.0001246829002007565}, {"ticker": "MRAI", "market_cap": 4920195.15, "weight": 3.84805194398885e-07}, {"ticker": "PAYC", "market_cap": 14993168055.7, "weight": 0.0011726057142934243}, {"ticker": "APLD", "market_cap": 578804834.025, "weight": 4.5267941592927366e-05}, {"ticker": "LPSN", "market_cap": 261724566.565, "weight": 2.0469304498218683e-05}, {"ticker": "SHAP", "market_cap": 110785632.64, "weight": 8.664470738450011e-06}, {"ticker": "TZOO", "market_cap": 81260034.10000001, "weight": 6.3552932892734e-06}, {"ticker": "DOCS", "market_cap": 4107455377.8399997, "weight": 0.00032124135668774574}, {"ticker": "STRM", "market_cap": 51857110.015499994, "weight": 4.055710127773863e-06}, {"ticker": "RBA", "market_cap": 11249022169.279999, "weight": 0.0008797785515981326}, {"ticker": "PIII", "market_cap": 206791182.32, "weight": 1.6173001006397655e-05}, {"ticker": "UPBD", "market_cap": 1606036534.54, "weight": 0.00012560705054257375}, {"ticker": "LOPE", "market_cap": 3580913516.08, "weight": 0.00028006086743952814}, {"ticker": "UHAL", "market_cap": 10343108170.0, "weight": 0.0008089276194757327}, {"ticker": "PSQH", "market_cap": 228420612.36999997, "weight": 1.7864624363070272e-05}, {"ticker": "IDN", "market_cap": 43419426.75, "weight": 3.395804524383936e-06}, {"ticker": "MELI", "market_cap": 61413111267.31, "weight": 0.004803078638020603}, {"ticker": "UHAL.B", "market_cap": 9921540728.0, "weight": 0.0007759571098667692}, {"ticker": "OMC", "market_cap": 14367384717.84, "weight": 0.0011236636151214432}, {"ticker": "TRUE", "market_cap": 185525004.92000002, "weight": 1.4509787398187794e-05}, {"ticker": "HGV", "market_cap": 4254408437.4799995, "weight": 0.0003327344578673364}, {"ticker": "HSTM", "market_cap": 675104496.0, "weight": 5.27994741881003e-05}, {"ticker": "HOLO", "market_cap": 62244742.87500001, "weight": 4.868119993639478e-06}, {"ticker": "RMNI", "market_cap": 189309875.0, "weight": 1.4805799573011575e-05}, {"ticker": "PATH", "market_cap": 9356845915.43, "weight": 0.0007317927036791324}, {"ticker": "OSPN", "market_cap": 433767126.45, "weight": 3.3924638826051034e-05}, {"ticker": "DFIN", "market_cap": 1594530345.0, "weight": 0.0001247071591017373}, {"ticker": "HRI", "market_cap": 3021127813.21, "weight": 0.0002362803994606093}, {"ticker": "GPN", "market_cap": 28867121939.79, "weight": 0.002257678431673022}, {"ticker": "SMRT", "market_cap": 525616092.75, "weight": 4.110808546889571e-05}, {"ticker": "TBLA", "market_cap": 1154521672.46, "weight": 9.029437310198888e-05}, {"ticker": "UDMY", "market_cap": 1428672291.5, "weight": 0.00011173551091016339}, {"ticker": "RDIB", "market_cap": 387557577.59999996, "weight": 3.0310620705589076e-05}, {"ticker": "MANH", "market_cap": 12224606620.46, "weight": 0.0009560783634844254}, {"ticker": "THC", "market_cap": 6100231211.2, "weight": 0.00047709503089607365}, {"ticker": "LTRY", "market_cap": 7435090.88, "weight": 5.814935189007243e-07}, {"ticker": "CARS", "market_cap": 1116664634.4, "weight": 8.733359930218456e-05}, {"ticker": "BLKB", "market_cap": 3732676326.62, "weight": 0.0002919301360420887}, {"ticker": "PODC", "market_cap": 41035021.12, "weight": 3.2093217439239072e-06}, {"ticker": "HRT", "market_cap": 731102186.44, "weight": 5.7179016360457594e-05}, {"ticker": "SLGC", "market_cap": 375202734.27000004, "weight": 2.9344356615562407e-05}, {"ticker": "IMAQ", "market_cap": 96148403.13, "weight": 7.519702741380494e-06}, {"ticker": "EEX", "market_cap": 291119880.32, "weight": 2.276829246090325e-05}, {"ticker": "THRY", "market_cap": 650552756.0, "weight": 5.0879298911408095e-05}, {"ticker": "DLHC", "market_cap": 167195777.1165, "weight": 1.3076270667025764e-05}, {"ticker": "WWAC", "market_cap": 111170733.47999999, "weight": 8.694589219339812e-06}, {"ticker": "FLL", "market_cap": 141422743.92, "weight": 1.1060578860689973e-05}, {"ticker": "ACIW", "market_cap": 2264214944.8500004, "weight": 0.00017708274681215949}, {"ticker": "DWAC", "market_cap": 589045159.38, "weight": 4.606883063671633e-05}, {"ticker": "GAN", "market_cap": 42900354.721499994, "weight": 3.3552082458330804e-06}, {"ticker": "GETR", "market_cap": 30465008.970000003, "weight": 2.3826481148953262e-06}, {"ticker": "DDD", "market_cap": 557649760.875, "weight": 4.361341737430803e-05}, {"ticker": "CHDN", "market_cap": 8462458442.08, "weight": 0.0006618432534931221}, {"ticker": "CPSI", "market_cap": 246793311.10720003, "weight": 1.9301540927081034e-05}, {"ticker": "AUID", "market_cap": 64573900.903799996, "weight": 5.050281895908355e-06}, {"ticker": "LPTV", "market_cap": 29480420.868, "weight": 2.305644133459155e-06}, {"ticker": "PLYA", "market_cap": 1045093996.95, "weight": 8.173610728864129e-05}, {"ticker": "LRN", "market_cap": 1948435282.2, "weight": 0.00015238582915570278}, {"ticker": "MOBQ", "market_cap": 1781523.5364, "weight": 1.393317723892702e-07}, {"ticker": "RELY", "market_cap": 4469264603.59, "weight": 0.00034953821589871404}, {"ticker": "TTD", "market_cap": 38720772010.95, "weight": 0.0030283258583652965}, {"ticker": "NABL", "market_cap": 2401020843.39, "weight": 0.0001877822452624595}, {"ticker": "URI", "market_cap": 28764086111.25, "weight": 0.002249620067965358}, {"ticker": "BIOC", "market_cap": 2967409.38, "weight": 2.3207911648219375e-07}, {"ticker": "NSP", "market_cap": 3708932455.7999997, "weight": 0.00029007314367733014}, {"ticker": "HLT", "market_cap": 39276722477.54, "weight": 0.003071806375062346}, {"ticker": "BXRX", "market_cap": 2844975.4, "weight": 2.2250363623423465e-07}, {"ticker": "FIVN", "market_cap": 4471386359.04, "weight": 0.0003497041569830639}, {"ticker": "DBX", "market_cap": 9146500888.815, "weight": 0.000715341758871095}, {"ticker": "SSNT", "market_cap": 18186372.419999998, "weight": 1.4223441065114298e-06}, {"ticker": "EXLS", "market_cap": 4570614001.099999, "weight": 0.0003574646849557483}, {"ticker": "ENFN", "market_cap": 761945221.68, "weight": 5.9591229658822354e-05}, {"ticker": "TSRI", "market_cap": 17793023.9712, "weight": 1.3915805856159256e-06}, {"ticker": "NUTX", "market_cap": 130724834.46000001, "weight": 1.0223902468003197e-05}, {"ticker": "RSSS", "market_cap": 71474547.69, "weight": 5.58997689724214e-06}, {"ticker": "EVH", "market_cap": 2974932542.14, "weight": 0.00023266749799583696}, {"ticker": "INUV", "market_cap": 29307125.89525, "weight": 2.292090848753077e-06}, {"ticker": "PFMT", "market_cap": 167394011.4, "weight": 1.3091774438659445e-05}, {"ticker": "GHC", "market_cap": 2718458589.6, "weight": 0.0002126088405327473}, {"ticker": "EVRI", "market_cap": 1116190963.9850001, "weight": 8.729655385366714e-05}, {"ticker": "EHAB", "market_cap": 414343002.45, "weight": 3.24054909906551e-05}, {"ticker": "WYNN", "market_cap": 9978544131.72, "weight": 0.0007804153082067014}, {"ticker": "CARG", "market_cap": 1952736427.7699997, "weight": 0.00015272221889365891}, {"ticker": "MSTR", "market_cap": 4475185932.36, "weight": 0.00035000131908852135}, {"ticker": "MNRO", "market_cap": 846872405.64, "weight": 6.623332830271002e-05}, {"ticker": "ANSS", "market_cap": 25022734256.63, "weight": 0.0019570114246411844}, {"ticker": "SOUN", "market_cap": 465764053.095, "weight": 3.642709720471841e-05}, {"ticker": "MGNI", "market_cap": 1012124497.4, "weight": 7.91575846291139e-05}, {"ticker": "OLO", "market_cap": 973871883.54, "weight": 7.616587310875626e-05}, {"ticker": "USPH", "market_cap": 1362946517.04, "weight": 0.0001065951417485667}, {"ticker": "SNDA", "market_cap": 70000614.0, "weight": 5.474701522420571e-06}, {"ticker": "FLYW", "market_cap": 3572966096.2799997, "weight": 0.00027943930501611315}, {"ticker": "OTEX", "market_cap": 9361362122.400002, "weight": 0.0007321459132263263}, {"ticker": "CDNA", "market_cap": 363202125.84000003, "weight": 2.84057970017611e-05}, {"ticker": "BBAI", "market_cap": 218158220.0, "weight": 1.7062009472696367e-05}, {"ticker": "GRND", "market_cap": 1020029021.96, "weight": 7.977579224430201e-05}, {"ticker": "EBET", "market_cap": 9073033.155000001, "weight": 7.095958962110079e-07}, {"ticker": "MCOM", "market_cap": 10639292.9265, "weight": 8.320920325382856e-07}, {"ticker": "XPOF", "market_cap": 517548896.41, "weight": 4.0477155401849957e-05}, {"ticker": "HCA", "market_cap": 65379115500.0, "weight": 0.005113257194606327}, {"ticker": "XPER", "market_cap": 399632002.25, "weight": 3.125495343692351e-05}, {"ticker": "PRFT", "market_cap": 2004641826.84, "weight": 0.00015678170567630883}, {"ticker": "VVX", "market_cap": 1606672941.44, "weight": 0.00012565682350348391}, {"ticker": "OLB", "market_cap": 9282922.049999999, "weight": 7.260111672684255e-07}, {"ticker": "SEMR", "market_cap": 1144784560.34, "weight": 8.953284003104547e-05}, {"ticker": "ALIT", "market_cap": 3318918746.375, "weight": 0.00025957043053321486}, {"ticker": "ONFO", "market_cap": 4088667.0195000004, "weight": 3.1977193166230557e-07}, {"ticker": "AMWL", "market_cap": 304600684.59000003, "weight": 2.3822617208117938e-05}, {"ticker": "LDWY", "market_cap": 9221990.67, "weight": 7.212457645128271e-07}, {"ticker": "NOGN", "market_cap": 5891258.0849, "weight": 4.607513815003756e-07}, {"ticker": "MCO", "market_cap": 57304806565.200005, "weight": 0.004481770856245872}, {"ticker": "CTM", "market_cap": 10474457.5448, "weight": 8.19200366828871e-07}, {"ticker": "PAY", "market_cap": 1884824509.82, "weight": 0.00014741087290187426}, {"ticker": "PUBM", "market_cap": 614635942.1999999, "weight": 4.8070268762167455e-05}, {"ticker": "WK", "market_cap": 5247057340.525001, "weight": 0.0004103688691987795}, {"ticker": "RSVR", "market_cap": 382409168.13, "weight": 2.990796702081635e-05}, {"ticker": "EGHT", "market_cap": 290268625.46, "weight": 2.2701716383756127e-05}, {"ticker": "CNTY", "market_cap": 153494750.85999998, "weight": 1.2004722504531291e-05}, {"ticker": "NCMI", "market_cap": 397780164.45000005, "weight": 3.1110122432684954e-05}, {"ticker": "AVDX", "market_cap": 1809214504.3999999, "weight": 0.00014149746460258276}, {"ticker": "UNF", "market_cap": 2942674485.2999997, "weight": 0.00023014461679807664}, {"ticker": "GOOGL", "market_cap": 1694397420000.0, "weight": 0.1325176966999102}, {"ticker": "ENG", "market_cap": 12801683.411, "weight": 1.001211155944259e-06}, {"ticker": "ASST", "market_cap": 5160375.0, "weight": 4.0358950092582127e-07}, {"ticker": "RPAY", "market_cap": 593735744.3000001, "weight": 4.643567816754752e-05}, {"ticker": "AUR", "market_cap": 3341410368.75, "weight": 0.0002613294853789069}, {"ticker": "RHI", "market_cap": 7833604120.245, "weight": 0.0006126609747043842}, {"ticker": "UTI", "market_cap": 286593601.44100004, "weight": 2.2414295196396955e-05}, {"ticker": "FLGT", "market_cap": 795754835.14, "weight": 6.223545706919783e-05}, {"ticker": "FLNT", "market_cap": 35145194.9021, "weight": 2.7486823477904715e-06}, {"ticker": "MEG", "market_cap": 831670597.52, "weight": 6.504440498757868e-05}, {"ticker": "CWAN", "market_cap": 3855618322.185, "weight": 0.0003015453478499327}, {"ticker": "BFH", "market_cap": 1563476201.87, "weight": 0.00012227843519552588}, {"ticker": "MYPS", "market_cap": 406799141.76, "weight": 3.181549065716557e-05}, {"ticker": "UBER", "market_cap": 91784820004.41, "weight": 0.007178429803676316}, {"ticker": "LNW", "market_cap": 6286266018.27, "weight": 0.0004916446895817725}, {"ticker": "TWOU", "market_cap": 181159428.8, "weight": 1.4168358589714673e-05}, {"ticker": "VEEV", "market_cap": 32107005672.0, "weight": 0.002511067586248091}, {"ticker": "LUNA", "market_cap": 207276689.4973, "weight": 1.6210972200231905e-05}, {"ticker": "YEXT", "market_cap": 767439532.17, "weight": 6.002093603260151e-05}, {"ticker": "SSTI", "market_cap": 216336883.08, "weight": 1.691956392202213e-05}, {"ticker": "NTCT", "market_cap": 1893895211.25, "weight": 0.00014812028643542192}, {"ticker": "ESMT", "market_cap": 3117925425.69, "weight": 0.0002438508764340103}, {"ticker": "OTRK", "market_cap": 3825526.143, "weight": 2.9919185850486677e-07}, {"ticker": "DH", "market_cap": 849745020.0, "weight": 6.645799356364644e-05}, {"ticker": "DIS", "market_cap": 144314653088.43002, "weight": 0.011286753155776954}, {"ticker": "CCRN", "market_cap": 906163173.25, "weight": 7.087041985307774e-05}, {"ticker": "TASK", "market_cap": 870352470.0, "weight": 6.806968853946774e-05}, {"ticker": "PK", "market_cap": 2561833935.0, "weight": 0.00020035933033577653}, {"ticker": "GEG", "market_cap": 63890577.855, "weight": 4.996839654165012e-06}, {"ticker": "HCP", "market_cap": 4391557311.0, "weight": 0.00034346078016299814}, {"ticker": "BAND", "market_cap": 277704144.2, "weight": 2.1719056650477976e-05}, {"ticker": "VMD", "market_cap": 256322816.85, "weight": 2.0046837241167973e-05}, {"ticker": "IPDN", "market_cap": 28996809.6, "weight": 2.267821217431885e-06}, {"ticker": "AVID", "market_cap": 1184061991.7050002, "weight": 9.26047018477252e-05}, {"ticker": "PCYG", "market_cap": 166122069.652, "weight": 1.2992296719446785e-05}, {"ticker": "DUOL", "market_cap": 6755233541.94, "weight": 0.0005283223280922282}, {"ticker": "AMPL", "market_cap": 1255161463.92, "weight": 9.816534434121474e-05}, {"ticker": "ANGI", "market_cap": 954344444.625, "weight": 7.463864508248602e-05}, {"ticker": "APAC", "market_cap": 82205476.83, "weight": 6.429235737168105e-06}, {"ticker": "IIIV", "market_cap": 454938584.38, "weight": 3.558044448743043e-05}, {"ticker": "FIS", "market_cap": 32019796596.375, "weight": 0.00250424702237285}, {"ticker": "ABSI", "market_cap": 126086897.44000001, "weight": 9.861172494459184e-06}, {"ticker": "DNB", "market_cap": 4273669203.79, "weight": 0.00033424082960630924}, {"ticker": "HUBS", "market_cap": 23623238776.32, "weight": 0.0018475578127532392}, {"ticker": "ZUO", "market_cap": 1104330000.0, "weight": 8.636891573914922e-05}, {"ticker": "APP", "market_cap": 13915303276.33, "weight": 0.0010883066258799933}, {"ticker": "RVYL", "market_cap": 14726246.17, "weight": 1.1517299309180218e-06}, {"ticker": "HOFV", "market_cap": 30463706.1312, "weight": 2.3825462207382002e-06}, {"ticker": "CNK", "market_cap": 2243531567.55, "weight": 0.00017546511361264056}, {"ticker": "IOAC", "market_cap": 134274072.3495, "weight": 1.0501486005728715e-05}, {"ticker": "MAN", "market_cap": 3595377599.855, "weight": 0.00028119209382367684}, {"ticker": "PIXY", "market_cap": 16805741.2991, "weight": 1.3143658636421253e-06}, {"ticker": "WYY", "market_cap": 15029541.799999999, "weight": 1.1754504806735495e-06}, {"ticker": "IAC", "market_cap": 4153228028.6000004, "weight": 0.00032482120529880225}, {"ticker": "NFLX", "market_cap": 165945163846.97, "weight": 0.012978461033946615}, {"ticker": "CCSI", "market_cap": 463502571.35, "weight": 3.625022821965097e-05}, {"ticker": "EVTC", "market_cap": 2385515852.0099998, "weight": 0.00018656961018595567}, {"ticker": "PAYX", "market_cap": 41442385598.575, "weight": 0.003241181449197844}, {"ticker": "FAZE", "market_cap": 12701260.249599999, "weight": 9.93357127198127e-07}, {"ticker": "Z", "market_cap": 10183812126.84, "weight": 0.0007964691817539776}, {"ticker": "TRHC", "market_cap": 280652350.875, "weight": 2.1949633936157687e-05}, {"ticker": "RBT", "market_cap": 69104773.6174, "weight": 5.404638441167227e-06}, {"ticker": "RAMP", "market_cap": 1912545677.898, "weight": 0.00014957892704322656}, {"ticker": "AMS", "market_cap": 15172920.000000002, "weight": 1.186663994455328e-06}, {"ticker": "ALTR", "market_cap": 5182943887.0, "weight": 0.0004053545985865109}, {"ticker": "ACCD", "market_cap": 752150563.515, "weight": 5.882519594992497e-05}, {"ticker": "SNOW", "market_cap": 49857234000.0, "weight": 0.0038993011530367243}, {"ticker": "RNG", "market_cap": 2779938887.12, "weight": 0.00021741717376296175}, {"ticker": "WAVS", "market_cap": 38835997.2, "weight": 3.037337543861559e-06}, {"ticker": "QLYS", "market_cap": 5676421036.5, "weight": 0.0004439491186523979}, {"ticker": "BDSX", "market_cap": 136395487.79000002, "weight": 1.0667400498161481e-05}, {"ticker": "NVTA", "market_cap": 169410495.1248, "weight": 1.3249482291309121e-05}, {"ticker": "TNL", "market_cap": 2551867284.76, "weight": 0.00019957984524094066}, {"ticker": "CYH", "market_cap": 390546016.355, "weight": 3.0544344515521076e-05}, {"ticker": "V", "market_cap": 478467914856.645, "weight": 0.0374206577944455}, {"ticker": "MD", "market_cap": 1076050472.598, "weight": 8.415719268596195e-05}, {"ticker": "MRT", "market_cap": 35406023.0244, "weight": 2.769081541978196e-06}, {"ticker": "DMRC", "market_cap": 632455602.3000001, "weight": 4.946393254172356e-05}, {"ticker": "ORCL", "market_cap": 291387431608.57, "weight": 0.02278921746945903}, {"ticker": "FTFT", "market_cap": 15802659.587, "weight": 1.2359155092445752e-06}, {"ticker": "HCSG", "market_cap": 759014850.0, "weight": 5.936204723625455e-05}, {"ticker": "MULN", "market_cap": 82452335.94399999, "weight": 6.448542424495722e-06}, {"ticker": "AHCO", "market_cap": 1141248893.85, "weight": 8.925631790345993e-05}, {"ticker": "APPF", "market_cap": 6569638716.55, "weight": 0.0005138070800814606}, {"ticker": "FTDR", "market_cap": 2343457680.63, "weight": 0.0001832802685398337}, {"ticker": "CSPI", "market_cap": 80085086.62, "weight": 6.263401427331728e-06}, {"ticker": "RBBN", "market_cap": 441559825.02000004, "weight": 3.4534100604842624e-05}, {"ticker": "HCAT", "market_cap": 555963633.12, "weight": 4.348154644261457e-05}, {"ticker": "CMAX", "market_cap": 251054345.92000002, "weight": 1.963479362936052e-05}, {"ticker": "SNAL", "market_cap": 49293880.125, "weight": 3.855241620685708e-06}, {"ticker": "KD", "market_cap": 3443681132.97, "weight": 0.0002693280139143045}, {"ticker": "AZPN", "market_cap": 12943525982.4682, "weight": 0.0010123045692386195}, {"ticker": "ROVR", "market_cap": 1128563085.535, "weight": 8.82641692618028e-05}, {"ticker": "VMEO", "market_cap": 578179075.3199999, "weight": 4.5219001420275e-05}, {"ticker": "AINC", "market_cap": 18000959.2, "weight": 1.4078430617375812e-06}, {"ticker": "CNET", "market_cap": 6051785.04, "weight": 4.7330608802731416e-07}, {"ticker": "ISSC", "market_cap": 131550304.6, "weight": 1.0288461939326845e-05}, {"ticker": "FI", "market_cap": 68289061434.06, "weight": 0.005340842133152149}, {"ticker": "RGP", "market_cap": 490639516.64000005, "weight": 3.8372590684828874e-05}, {"ticker": "CFFE", "market_cap": 180984958.0, "weight": 1.4154713344340425e-05}, {"ticker": "HCTI", "market_cap": 17422452.640100002, "weight": 1.3625984479658391e-06}, {"ticker": "INFA", "market_cap": 5981746187.95, "weight": 0.000467828395932403}, {"ticker": "PINC", "market_cap": 2479883742.9345, "weight": 0.00019395006025046485}, {"ticker": "MTTR", "market_cap": 643138050.8349999, "weight": 5.029939974573613e-05}, {"ticker": "APEI", "market_cap": 85761475.175, "weight": 6.707348005627587e-06}, {"ticker": "CRL", "market_cap": 9721818357.555, "weight": 0.0007603369559415953}, {"ticker": "ENV", "market_cap": 2195546127.06, "weight": 0.00017171220418666573}, {"ticker": "CSV", "market_cap": 372647274.59999996, "weight": 2.9144495812258113e-05}, {"ticker": "MBLY", "market_cap": 32681682680.85, "weight": 0.0025560126933760253}, {"ticker": "DTSS", "market_cap": 7294831.6344, "weight": 5.705239364707776e-07}, {"ticker": "ISPC", "market_cap": 5248914.657, "weight": 4.105141286865505e-07}, {"ticker": "PRAA", "market_cap": 702424729.5, "weight": 5.493617150243151e-05}, {"ticker": "CDAY", "market_cap": 10601883167.76, "weight": 0.0008291662401569892}, {"ticker": "CVEO", "market_cap": 303235768.53, "weight": 2.3715868029722752e-05}, {"ticker": "ADTH", "market_cap": 104963871.46, "weight": 8.209154663717938e-06}, {"ticker": "INOD", "market_cap": 234030257.26999998, "weight": 1.8303350964443638e-05}, {"ticker": "AMEH", "market_cap": 1474131067.41, "weight": 0.00011529081157769544}, {"ticker": "MAX", "market_cap": 375373828.47999996, "weight": 2.9357737780075673e-05}, {"ticker": "HSII", "market_cap": 502195052.1, "weight": 3.9276341437290084e-05}, {"ticker": "CPHC", "market_cap": 97196726.8, "weight": 7.601691439253038e-06}, {"ticker": "S", "market_cap": 4899167559.324, "weight": 0.0003831606404998759}, {"ticker": "TYL", "market_cap": 16124025927.9, "weight": 0.0012610493572959645}, {"ticker": "SKLZ", "market_cap": 87864999.35000001, "weight": 6.871863234070026e-06}, {"ticker": "VRSN", "market_cap": 20838692887.075, "weight": 0.0016297803284143228}, {"ticker": "GVP", "market_cap": 5044787.0064, "weight": 3.945494407266999e-07}, {"ticker": "JAMF", "market_cap": 2152025372.64, "weight": 0.00016830847489251888}, {"ticker": "ASUR", "market_cap": 231262589.9984, "weight": 1.8086893545578972e-05}, {"ticker": "MKTW", "market_cap": 56595837.37, "weight": 4.426322846428262e-06}, {"ticker": "PALT", "market_cap": 17798763.009999998, "weight": 1.3920294320282668e-06}, {"ticker": "CCEL", "market_cap": 41433925.0, "weight": 3.24051975140332e-06}, {"ticker": "DOCU", "market_cap": 8388305743.68, "weight": 0.0006560438202078359}, {"ticker": "FC", "market_cap": 555241992.4, "weight": 4.342510740125953e-05}, {"ticker": "AVPT", "market_cap": 1255144304.29, "weight": 9.816400229795087e-05}, {"ticker": "LIFW", "market_cap": 68863932.7992, "weight": 5.385802440756422e-06}, {"ticker": "GEN", "market_cap": 10972007680.5564, "weight": 0.0008581134324443544}, {"ticker": "COUR", "market_cap": 2709410575.2000003, "weight": 0.00021190120133674596}, {"ticker": "ZIP", "market_cap": 1167056115.84, "weight": 9.127468359262515e-05}, {"ticker": "ZETA", "market_cap": 1706911579.78, "weight": 0.00013349642082366404}, {"ticker": "DSP", "market_cap": 83003265.83, "weight": 6.491630284919792e-06}, {"ticker": "EVER", "market_cap": 243907565.28, "weight": 1.90758486628176e-05}, {"ticker": "PSN", "market_cap": 5675345422.74, "weight": 0.00044386499561471413}, {"ticker": "BIAF", "market_cap": 11501800.3397, "weight": 8.995481643965728e-07}, {"ticker": "FCN", "market_cap": 6298153393.56, "weight": 0.0004925743933069104}, {"ticker": "HGBL", "market_cap": 115170964.4, "weight": 9.007444622404677e-06}, {"ticker": "ATGE", "market_cap": 1784718640.8, "weight": 0.00013958165938201817}, {"ticker": "BLIN", "market_cap": 8184073.630399999, "weight": 6.400709622911726e-07}, {"ticker": "CHGG", "market_cap": 961779541.92, "weight": 7.522013910309963e-05}, {"ticker": "DKNG", "market_cap": 13218641681.63, "weight": 0.001033821185322057}, {"ticker": "EBAY", "market_cap": 22776336292.0, "weight": 0.0017813221320169465}, {"ticker": "AGL", "market_cap": 7379774784.2, "weight": 0.0005771672837924062}, {"ticker": "RGS", "market_cap": 31851088.349999998, "weight": 2.491052462489788e-06}, {"ticker": "AFAR", "market_cap": 155912400.0, "weight": 1.219380523782613e-05}, {"ticker": "INNV", "market_cap": 806436113.9849999, "weight": 6.307083279253248e-05}, {"ticker": "IAS", "market_cap": 1861787175.37, "weight": 0.00014560913827729044}, {"ticker": "PCTY", "market_cap": 10400773386.57, "weight": 0.0008134375777590485}, {"ticker": "MSGE", "market_cap": 1572923577.48, "weight": 0.0001230173081664822}, {"ticker": "LTH", "market_cap": 2898409124.02, "weight": 0.00022668265229602085}, {"ticker": "EPAM", "market_cap": 13894356983.0, "weight": 0.0010866684301924123}, {"ticker": "ENSG", "market_cap": 5117649674.18, "weight": 0.00040024798157411003}, {"ticker": "MCHX", "market_cap": 56807590.63, "weight": 4.442883928233909e-06}, {"ticker": "DKDCA", "market_cap": 73769777.4, "weight": 5.769485288234853e-06}, {"ticker": "TNET", "market_cap": 5816440561.13, "weight": 0.0004548999526645177}, {"ticker": "EFX", "market_cap": 21941739206.73, "weight": 0.0017160488483663854}, {"ticker": "DGX", "market_cap": 13690425178.02, "weight": 0.0010707190591884097}, {"ticker": "CZR", "market_cap": 9485671804.380001, "weight": 0.0007418680908801897}, {"ticker": "IPG", "market_cap": 10885953259.44, "weight": 0.0008513831733312418}, {"ticker": "WSC", "market_cap": 7941514336.0, "weight": 0.0006211005609982792}, {"ticker": "MCS", "market_cap": 493735715.32, "weight": 3.8614742326914646e-05}, {"ticker": "AONC", "market_cap": 249421716.0, "weight": 1.9507106727806007e-05}, {"ticker": "ADSK", "market_cap": 44064166282.32, "weight": 0.003446229174932816}, {"ticker": "SSTK", "market_cap": 1348622553.6000001, "weight": 0.00010547487408274218}, {"ticker": "NEO", "market_cap": 1522967799.48, "weight": 0.00011911029995266418}, {"ticker": "MGAM", "market_cap": 8270745.165000001, "weight": 6.468494854399146e-07}, {"ticker": "WU", "market_cap": 4908278619.525001, "weight": 0.00038387321046609476}, {"ticker": "LVOX", "market_cap": 340072909.42, "weight": 2.659687634933698e-05}, {"ticker": "LYFT", "market_cap": 3931902483.7, "weight": 0.0003075114814496001}, {"ticker": "SEM", "market_cap": 3095306486.865, "weight": 0.00024208186425333475}, {"ticker": "DCGO", "market_cap": 583795158.75, "weight": 4.565823157480282e-05}, {"ticker": "PFSW", "market_cap": 169565948.5, "weight": 1.326164019652225e-05}, {"ticker": "WULF", "market_cap": 250985857.39000002, "weight": 1.9629437186923326e-05}, {"ticker": "NCNO", "market_cap": 3359108051.25, "weight": 0.0002627136093713917}, {"ticker": "TBI", "market_cap": 459646189.65, "weight": 3.59486231685292e-05}, {"ticker": "BRQS", "market_cap": 17415544.809, "weight": 1.362058191084095e-06}, {"ticker": "AGIL", "market_cap": 8096475.0105, "weight": 6.332199324169422e-07}, {"ticker": "III", "market_cap": 213411073.92, "weight": 1.6690738331112826e-05}, {"ticker": "HRYU", "market_cap": 252034271.86139998, "weight": 1.9711432986313045e-05}, {"ticker": "COMP", "market_cap": 1144205444.1200001, "weight": 8.94875477361623e-05}, {"ticker": "U", "market_cap": 11212292212.24, "weight": 0.0008769059260562292}, {"ticker": "WGS", "market_cap": 89433448.16000001, "weight": 6.994530573644301e-06}, {"ticker": "CNDT", "market_cap": 755570718.8100001, "weight": 5.909268402367889e-05}, {"ticker": "KELYB", "market_cap": 643121390.11, "weight": 5.029809672150092e-05}, {"ticker": "UPWK", "market_cap": 1453370757.675, "weight": 0.0001136671615435382}, {"ticker": "ASPS", "market_cap": 103972948.53, "weight": 8.131655239591852e-06}, {"ticker": "VCSA", "market_cap": 114892335.03, "weight": 8.985653204458968e-06}, {"ticker": "FTAI", "market_cap": 3329222595.48, "weight": 0.0002603762877272951}, {"ticker": "ACHC", "market_cap": 6301783094.46, "weight": 0.0004928582698032389}, {"ticker": "SDIG", "market_cap": 30921988.9, "weight": 2.418388211667715e-06}, {"ticker": "HTZ", "market_cap": 3347573777.9550004, "weight": 0.0002618115215187316}, {"ticker": "CTG", "market_cap": 166464955.625, "weight": 1.3019113603630111e-05}, {"ticker": "TALK", "market_cap": 342190743.735, "weight": 2.6762510764323183e-05}, {"ticker": "FNGR", "market_cap": 275412100.226, "weight": 2.1539797413781675e-05}, {"ticker": "BOX", "market_cap": 3565125085.5, "weight": 0.0002788260647714693}, {"ticker": "PLTR", "market_cap": 33514680262.35, "weight": 0.002621160880899219}, {"ticker": "RDNT", "market_cap": 1923387154.26, "weight": 0.00015042683170795319}, {"ticker": "WLDN", "market_cap": 258984407.10000002, "weight": 2.02549984466359e-05}, {"ticker": "RCAT", "market_cap": 52286737.396193996, "weight": 4.0893109998342e-06}, {"ticker": "PRTH", "market_cap": 248091361.92000002, "weight": 1.940306061890853e-05}, {"ticker": "NRC", "market_cap": 1128396941.22, "weight": 8.825117522528946e-05}, {"ticker": "DPSI", "market_cap": 37756946.7, "weight": 2.9529457210252813e-06}, {"ticker": "APCX", "market_cap": 54954186.622499995, "weight": 4.297930431947139e-06}, {"ticker": "MA", "market_cap": 368421703271.47107, "weight": 0.02881401668552654}, {"ticker": "CXAI", "market_cap": 25474829.63, "weight": 1.9923695034841507e-06}, {"ticker": "VRSK", "market_cap": 34583157019.880005, "weight": 0.00270472573836062}, {"ticker": "SABR", "market_cap": 1277815182.7150002, "weight": 9.993707664024107e-05}, {"ticker": "MAPS", "market_cap": 123355357.902, "weight": 9.647540601641205e-06}, {"ticker": "SPGI", "market_cap": 114276757000.0, "weight": 0.008937509255635754}, {"ticker": "ROL", "market_cap": 17178170015.585, "weight": 0.0013434932661693883}, {"ticker": "PET", "market_cap": 73280783.56639999, "weight": 5.731241405327422e-06}, {"ticker": "EXFY", "market_cap": 251444153.46, "weight": 1.9665280218130857e-05}, {"ticker": "MARA", "market_cap": 1294382351.935, "weight": 0.00010123278394005035}, {"ticker": "EGIO", "market_cap": 176433157.0716, "weight": 1.3798720017303794e-05}, {"ticker": "CRNC", "market_cap": 767017263.114, "weight": 5.9987910650227664e-05}, {"ticker": "CREG", "market_cap": 10124407.8, "weight": 7.918232088116643e-07}, {"ticker": "LTBR", "market_cap": 52165424.2752, "weight": 4.07982318122456e-06}, {"ticker": "MGM", "market_cap": 12226733999.775, "weight": 0.0009562447444075213}, {"ticker": "CBZ", "market_cap": 2596238698.14, "weight": 0.00020305010400729142}, {"ticker": "NOTE", "market_cap": 271238179.41, "weight": 2.1213357839325684e-05}, {"ticker": "WEX", "market_cap": 7792285684.23, "weight": 0.0006094294872697831}, {"ticker": "ETWO", "market_cap": 1253746224.3999999, "weight": 9.805465939844074e-05}, {"ticker": "ATIP", "market_cap": 37420904.945599996, "weight": 2.926664118632328e-06}, {"ticker": "MLNK", "market_cap": 1351378012.4, "weight": 0.00010569037668515259}, {"ticker": "TETE", "market_cap": 74155996.8, "weight": 5.799691250959242e-06}, {"ticker": "GETY", "market_cap": 2254874034.402, "weight": 0.00017635220041080276}, {"ticker": "ZI", "market_cap": 6680452330.24, "weight": 0.0005224737391992444}, {"ticker": "KLR", "market_cap": 96546290.4, "weight": 7.5508212404670994e-06}, {"ticker": "SPT", "market_cap": 2647939443.6, "weight": 0.00020709358496704615}, {"ticker": "ABM", "market_cap": 2614077623.06, "weight": 0.00020444527447562288}, {"ticker": "DLPN", "market_cap": 26342246.56, "weight": 2.060209605390176e-06}, {"ticker": "ALLE", "market_cap": 9081079661.2432, "weight": 0.0007102252081193264}, {"ticker": "ZG", "market_cap": 9888123023.02, "weight": 0.0007733435333582859}, {"ticker": "SOPA", "market_cap": 9846204.694, "weight": 7.70065128690248e-07}, {"ticker": "SEAS", "market_cap": 2849924979.0, "weight": 0.00022289073952002356}, {"ticker": "MHH", "market_cap": 102103052.955, "weight": 7.985411948765573e-06}, {"ticker": "TTWO", "market_cap": 23611571814.07, "weight": 0.0018466453473855483}, {"ticker": "MSCI", "market_cap": 39375070310.4, "weight": 0.0030794980937419196}, {"ticker": "SIX", "market_cap": 1846620390.12, "weight": 0.00014442295407755755}, {"ticker": "QBTS", "market_cap": 126412798.16849999, "weight": 9.88666097395276e-06}, {"ticker": "SAI", "market_cap": 22658889.5299, "weight": 1.7721366987681433e-06}, {"ticker": "TDC", "market_cap": 4448547000.0, "weight": 0.0003479179058837893}, {"ticker": "WH", "market_cap": 5662909475.08, "weight": 0.00044289238840891247}, {"ticker": "SCPL", "market_cap": 484957868.08, "weight": 3.792823272503596e-05}, {"ticker": "BLBX", "market_cap": 7993293.289999999, "weight": 6.251501585959965e-07}, {"ticker": "EHC", "market_cap": 6601199565.96, "weight": 0.0005162754331492468}, {"ticker": "RRR", "market_cap": 2358698102.985, "weight": 0.00018447221184863456}, {"ticker": "BASE", "market_cap": 787792242.8149999, "weight": 6.16127080126811e-05}, {"ticker": "KLTR", "market_cap": 248591926.57999998, "weight": 1.9442209448462678e-05}, {"ticker": "FUN", "market_cap": 1890924248.71, "weight": 0.00014788792942865633}, {"ticker": "DVA", "market_cap": 8435207000.0, "weight": 0.0006597119363100538}, {"ticker": "FDS", "market_cap": 16951803149.699999, "weight": 0.0013257892639546907}, {"ticker": "AGYS", "market_cap": 1680964763.3999999, "weight": 0.0001314671375499837}, {"ticker": "WETG", "market_cap": 10355484.6, "weight": 8.09895571844881e-07}, {"ticker": "INTU", "market_cap": 144257968831.89, "weight": 0.011282319917725972}, {"ticker": "SGRY", "market_cap": 3444565591.6, "weight": 0.0002693971868362474}, {"ticker": "NEWR", "market_cap": 6104580916.255, "weight": 0.00047743521843909565}, {"ticker": "WDAY", "market_cap": 54629620000.0, "weight": 0.004272546291997629}, {"ticker": "NVRI", "market_cap": 553500158.0400001, "weight": 4.328887969299263e-05}, {"ticker": "AMC", "market_cap": 1658263667.28, "weight": 0.00012969169990183994}, {"ticker": "GDEN", "market_cap": 956827577.55, "weight": 7.483284925910753e-05}, {"ticker": "GMGI", "market_cap": 100816460.28, "weight": 7.884788390284249e-06}, {"ticker": "IQV", "market_cap": 35714333392.65, "weight": 0.0027931942910811728}, {"ticker": "PRG", "market_cap": 1404221399.04, "weight": 0.00010982322285258573}, {"ticker": "NET", "market_cap": 19762339077.18, "weight": 0.0015455994119198569}, {"ticker": "RPD", "market_cap": 2787996307.2599998, "weight": 0.0002180473392398994}, {"ticker": "KFY", "market_cap": 2516382511.605, "weight": 0.00019680460470355868}, {"ticker": "OSW", "market_cap": 1079744288.22, "weight": 8.444608355210928e-05}, {"ticker": "ADEX", "market_cap": 95052277.67999999, "weight": 7.4339754980469e-06}, {"ticker": "MSGM", "market_cap": 9548351.28, "weight": 7.467702110330405e-07}, {"ticker": "INSE", "market_cap": 284435128.8, "weight": 2.2245482484928652e-05}, {"ticker": "ADBE", "market_cap": 234456735000.00003, "weight": 0.018336705504415386}, {"ticker": "CSTL", "market_cap": 412869811.2, "weight": 3.229027368157276e-05}, {"ticker": "PRVA", "market_cap": 2639850637.5439997, "weight": 0.00020646096481846647}, {"ticker": "GMBL", "market_cap": 5590889.504199999, "weight": 4.372597543262825e-07}, {"ticker": "CURI", "market_cap": 33621771.924, "weight": 2.629536448620294e-06}, {"ticker": "SST", "market_cap": 106711818.11999999, "weight": 8.345860410907697e-06}, {"ticker": "CRWD", "market_cap": 39090607535.324104, "weight": 0.0030572504490601173}, {"ticker": "HURN", "market_cap": 1923307863.914, "weight": 0.00015042063046266185}, {"ticker": "RCRT", "market_cap": 1675955.54, "weight": 1.3107536951529013e-07}, {"ticker": "GDYN", "market_cap": 887463322.0999999, "weight": 6.940791691617573e-05}, {"ticker": "LYV", "market_cap": 19249757569.4644, "weight": 0.0015055107526881647}, {"ticker": "RDVT", "market_cap": 267834701.75, "weight": 2.0947174112326852e-05}, {"ticker": "SCOR", "market_cap": 56005850.725999996, "weight": 4.380180382904805e-06}, {"ticker": "CTOS", "market_cap": 1477575486.0, "weight": 0.00011556019726763419}, {"ticker": "GWRE", "market_cap": 7188772354.4, "weight": 0.000562229110632781}, {"ticker": "PHUN", "market_cap": 21697076.1774, "weight": 1.696913915362041e-06}, {"ticker": "EDR", "market_cap": 6055365792.825, "weight": 0.00047358613632721104}, {"ticker": "ADV", "market_cap": 941193399.1999999, "weight": 7.361011055549359e-05}, {"ticker": "TLS", "market_cap": 172565366.32, "weight": 1.3496222671834958e-05}, {"ticker": "AIRS", "market_cap": 395768512.9728, "weight": 3.095279250691021e-05}, {"ticker": "SMSI", "market_cap": 81104271.705, "weight": 6.34311121582698e-06}, {"ticker": "GAIA", "market_cap": 55426708.942499995, "weight": 4.334886088717259e-06}, {"ticker": "BLZE", "market_cap": 192593500.0, "weight": 1.506260970308498e-05}, {"ticker": "OPRX", "market_cap": 119543246.835, "weight": 9.349397927319218e-06}, {"ticker": "BTTX", "market_cap": 13796515.58, "weight": 1.079016319055789e-06}, {"ticker": "PLNT", "market_cap": 4003962071.55, "weight": 0.0003131472139491378}, {"ticker": "MQ", "market_cap": 3000539143.29, "weight": 0.00023467017326236995}, {"ticker": "AGAE", "market_cap": 32193717.51, "weight": 2.517849261498975e-06}, {"ticker": "AAN", "market_cap": 301281498.56, "weight": 2.3563025873509957e-05}, {"ticker": "DRVN", "market_cap": 1992797683.8899999, "weight": 0.00015585538312376475}, {"ticker": "RSI", "market_cap": 281275314.98, "weight": 2.1998355545000388e-05}, {"ticker": "FICO", "market_cap": 21211406422.620003, "weight": 0.001658930006451075}, {"ticker": "MRIN", "market_cap": 7384094.585, "weight": 5.775051325435088e-07}, {"ticker": "ICCT", "market_cap": 26716496.4, "weight": 2.0894794367778503e-06}, {"ticker": "FTRE", "market_cap": 2425128000.0, "weight": 0.00018966764996753823}]}, "Manufacturing": {"sic_description": "Manufacturing", "companies": [{"ticker": "ELEV", "market_cap": 26145426.1888, "weight": 1.3710501969132687e-06}, {"ticker": "WRAP", "market_cap": 64395399.61, "weight": 3.376855465198724e-06}, {"ticker": "CVI", "market_cap": 3068193881.48, "weight": 0.0001608942151102993}, {"ticker": "SGC", "market_cap": 124937641.84, "weight": 6.551653708364102e-06}, {"ticker": "ADN", "market_cap": 22583727.1335, "weight": 1.1842768715961724e-06}, {"ticker": "HUBB", "market_cap": 16565816377.16, "weight": 0.0008687013033149073}, {"ticker": "ENTX", "market_cap": 20521296.614400003, "weight": 1.0761242735504272e-06}, {"ticker": "PPIH", "market_cap": 63980844.771199994, "weight": 3.355116462389446e-06}, {"ticker": "GEF.B", "market_cap": 2518759927.62, "weight": 0.00013208223380271276}, {"ticker": "BPT", "market_cap": 114704000.0, "weight": 6.015007774251072e-06}, {"ticker": "HOOK", "market_cap": 47327124.671570994, "weight": 2.4818055415020332e-06}, {"ticker": "ASXC", "market_cap": 68871341.331, "weight": 3.6115711180871126e-06}, {"ticker": "PCVX", "market_cap": 4480251913.06, "weight": 0.00023494167673018498}, {"ticker": "NVVE", "market_cap": 10633178.2291, "weight": 5.575973785834299e-07}, {"ticker": "RGNX", "market_cap": 690628723.9000001, "weight": 3.621614889959894e-05}, {"ticker": "WALD", "market_cap": 1162888106.24, "weight": 6.098114276413818e-05}, {"ticker": "RMD", "market_cap": 21581257822.960003, "weight": 0.0011317079926002683}, {"ticker": "MDXG", "market_cap": 843532793.125, "weight": 4.423434499653539e-05}, {"ticker": "ENVX", "market_cap": 1638899220.665, "weight": 8.594287517012482e-05}, {"ticker": "NSYS", "market_cap": 24224025.3, "weight": 1.2702931066323289e-06}, {"ticker": "ITRI", "market_cap": 2654422712.92, "weight": 0.00013919630749025685}, {"ticker": "ATKR", "market_cap": 5406975004.275, "weight": 0.0002835384702006499}, {"ticker": "APLS", "market_cap": 4448114778.42, "weight": 0.00023325642499788486}, {"ticker": "VKTX", "market_cap": 1069308171.3199999, "weight": 5.6073868073999134e-05}, {"ticker": "ITRM", "market_cap": 9389549.52, "weight": 4.923822478685609e-07}, {"ticker": "IEP", "market_cap": 7172746887.22, "weight": 0.00037613447037037484}, {"ticker": "ACCO", "market_cap": 510655472.12, "weight": 2.6778461385528416e-05}, {"ticker": "SGHT", "market_cap": 170765269.73999998, "weight": 8.954826554071185e-06}, {"ticker": "AAC", "market_cap": 758642773.6999999, "weight": 3.978276417287014e-05}, {"ticker": "TXG", "market_cap": 4596923117.25, "weight": 0.00024105984349188537}, {"ticker": "AIRI", "market_cap": 8783838.09, "weight": 4.60619110049455e-07}, {"ticker": "LPTH", "market_cap": 54310385.1, "weight": 2.8480034575870902e-06}, {"ticker": "SANM", "market_cap": 3035889644.45, "weight": 0.0001592002006306238}, {"ticker": "EDSA", "market_cap": 13708765.7346, "weight": 7.188793108261761e-07}, {"ticker": "AIM", "market_cap": 21299649.8, "weight": 1.1169406396971797e-06}, {"ticker": "AEON", "market_cap": 222925188.0, "weight": 1.1690060842659207e-05}, {"ticker": "PKOH", "market_cap": 258641387.63, "weight": 1.3562996559296405e-05}, {"ticker": "VAXX", "market_cap": 145756800.6, "weight": 7.643397691091533e-06}, {"ticker": "OFLX", "market_cap": 788266614.4122001, "weight": 4.133622030506308e-05}, {"ticker": "THRD", "market_cap": 271350125.76, "weight": 1.4229435032696384e-05}, {"ticker": "SKIN", "market_cap": 748146868.21, "weight": 3.9232365292969226e-05}, {"ticker": "DXYN", "market_cap": 9567224.745, "weight": 5.016994282604113e-07}, {"ticker": "TNGX", "market_cap": 1079444890.84, "weight": 5.6605431460787756e-05}, {"ticker": "LFVN", "market_cap": 82211727.88, "weight": 4.3111328491841045e-06}, {"ticker": "DAN", "market_cap": 1997621422.72, "weight": 0.00010475404857434167}, {"ticker": "GNPX", "market_cap": 21696466.994400002, "weight": 1.1377494912566065e-06}, {"ticker": "DERM", "market_cap": 52225603.199999996, "weight": 2.738678766764469e-06}, {"ticker": "ECVT", "market_cap": 1136109472.42, "weight": 5.957688754539148e-05}, {"ticker": "NAPA", "market_cap": 1124910584.5400002, "weight": 5.898962469787818e-05}, {"ticker": "ZIMV", "market_cap": 231338478.24, "weight": 1.2131248649541537e-05}, {"ticker": "AVRO", "market_cap": 65682847.400000006, "weight": 3.4443684417801197e-06}, {"ticker": "PBF", "market_cap": 5648303244.900001, "weight": 0.00029619357589448546}, {"ticker": "BTAI", "market_cap": 75772773.03299999, "weight": 3.97347798568539e-06}, {"ticker": "HELE", "market_cap": 2524891623.52, "weight": 0.00013240377619450246}, {"ticker": "GTHX", "market_cap": 60283598.370000005, "weight": 3.1612351169565075e-06}, {"ticker": "JJSF", "market_cap": 3088103921.91, "weight": 0.00016193828548249296}, {"ticker": "VLCN", "market_cap": 11429397.483, "weight": 5.993506304509923e-07}, {"ticker": "RDW", "market_cap": 178429032.39499998, "weight": 9.35670959171451e-06}, {"ticker": "SSKN", "market_cap": 21437156.09, "weight": 1.1241513856463917e-06}, {"ticker": "ENVB", "market_cap": 5542056.48, "weight": 2.9062206036876246e-07}, {"ticker": "SLNO", "market_cap": 822994926.3, "weight": 4.315735179125129e-05}, {"ticker": "ANVS", "market_cap": 78814129.83960001, "weight": 4.132964880963414e-06}, {"ticker": "FRTX", "market_cap": 5807967.06, "weight": 3.0456624894070074e-07}, {"ticker": "XPEL", "market_cap": 2076416700.48, "weight": 0.00010888602486375331}, {"ticker": "VERA", "market_cap": 577025945.5799999, "weight": 3.0258888518345264e-05}, {"ticker": "TSHA", "market_cap": 450574065.13000005, "weight": 2.362782906117362e-05}, {"ticker": "GBIO", "market_cap": 208999947.3603, "weight": 1.0959829719890058e-05}, {"ticker": "NDSN", "market_cap": 12673467465.645, "weight": 0.0006645889012813215}, {"ticker": "JANX", "market_cap": 451006867.75, "weight": 2.365052496649528e-05}, {"ticker": "LIFE", "market_cap": 82146487.67999999, "weight": 4.307711692901903e-06}, {"ticker": "FDMT", "market_cap": 503374170.6, "weight": 2.6396634376448818e-05}, {"ticker": "EL", "market_cap": 50601948365.63, "weight": 0.0026535352979104106}, {"ticker": "PFE", "market_cap": 186683653182.05, "weight": 0.009789576869295068}, {"ticker": "NNBR", "market_cap": 80166726.64, "weight": 4.2038942319000255e-06}, {"ticker": "BPMC", "market_cap": 2800284813.8399997, "weight": 0.00014684522706588098}, {"ticker": "SHOT", "market_cap": 42187832.0325, "weight": 2.212304171208379e-06}, {"ticker": "RBC", "market_cap": 6825570800.099999, "weight": 0.0003579287681885776}, {"ticker": "SPGC", "market_cap": 16326940.182, "weight": 8.5617478138916e-07}, {"ticker": "TCMD", "market_cap": 314376877.40000004, "weight": 1.6485731636261824e-05}, {"ticker": "CELU", "market_cap": 42008601.8, "weight": 2.202905447172004e-06}, {"ticker": "BDX", "market_cap": 74803828556.1798, "weight": 0.003922667128514836}, {"ticker": "VYGR", "market_cap": 303791591.48, "weight": 1.593064570114648e-05}, {"ticker": "NEPH", "market_cap": 15412850.04, "weight": 8.082404520676344e-07}, {"ticker": "PBLA", "market_cap": 3578860.56, "weight": 1.8767326415260621e-07}, {"ticker": "DTC", "market_cap": 280875511.41, "weight": 1.4728940444342793e-05}, {"ticker": "AMRX", "market_cap": 646076882.4000001, "weight": 3.387987751429677e-05}, {"ticker": "KLIC", "market_cap": 2694058633.3849998, "weight": 0.0001412747909758944}, {"ticker": "RCKT", "market_cap": 1706000873.04, "weight": 8.946164487912118e-05}, {"ticker": "BELFA", "market_cap": 599862642.06, "weight": 3.145643094812463e-05}, {"ticker": "TRVN", "market_cap": 8020230.1011, "weight": 4.2057597302098405e-07}, {"ticker": "CMPR", "market_cap": 1789741570.8600001, "weight": 9.385295597906983e-05}, {"ticker": "CTHR", "market_cap": 16788037.75, "weight": 8.803544565200034e-07}, {"ticker": "OPTN", "market_cap": 140279146.25, "weight": 7.356152839125515e-06}, {"ticker": "ST", "market_cap": 5740229090.4, "weight": 0.00030101411114466937}, {"ticker": "ELYM", "market_cap": 72328270.8, "weight": 3.7928503902229805e-06}, {"ticker": "VERU", "market_cap": 63909522.7681, "weight": 3.351376380063445e-06}, {"ticker": "SPRB", "market_cap": 85696006.66, "weight": 4.493846302501845e-06}, {"ticker": "PACK", "market_cap": 399249780.15999997, "weight": 2.0936414872458074e-05}, {"ticker": "SNAX", "market_cap": 5671587.600000001, "weight": 2.974145932691622e-07}, {"ticker": "DAWN", "market_cap": 1000746853.5597, "weight": 5.2478554402801073e-05}, {"ticker": "ANNX", "market_cap": 104082215.675, "weight": 5.458007885046744e-06}, {"ticker": "CORT", "market_cap": 2654931629.34, "weight": 0.00013922299475681028}, {"ticker": "PXLW", "market_cap": 65771414.279999994, "weight": 3.4490128349289293e-06}, {"ticker": "NPO", "market_cap": 2518407231.45, "weight": 0.00013206373863075278}, {"ticker": "BEAT", "market_cap": 52623808.0, "weight": 2.759560383514923e-06}, {"ticker": "ACRS", "market_cap": 427507604.64540005, "weight": 2.2418237947181745e-05}, {"ticker": "GRMN", "market_cap": 19801834643.940002, "weight": 0.001038396126793602}, {"ticker": "FTV", "market_cap": 25916034487.5, "weight": 0.00135902103605865}, {"ticker": "APVO", "market_cap": 3691046.2347999997, "weight": 1.9355621248990572e-07}, {"ticker": "QS", "market_cap": 3097758514.41, "weight": 0.00016244456642251884}, {"ticker": "CCCC", "market_cap": 76245825.25, "weight": 3.998284555315757e-06}, {"ticker": "SRI", "market_cap": 505576072.21000004, "weight": 2.6512100753404165e-05}, {"ticker": "BOLT", "market_cap": 36880768.1948, "weight": 1.9340049816229044e-06}, {"ticker": "CELZ", "market_cap": 6909602.953, "weight": 3.623353630150924e-07}, {"ticker": "SXT", "market_cap": 2364727126.88, "weight": 0.00012400484771381645}, {"ticker": "AGS", "market_cap": 247225303.0, "weight": 1.2964344046734e-05}, {"ticker": "SCHL", "market_cap": 1183266580.3, "weight": 6.204977751007794e-05}, {"ticker": "SUNW", "market_cap": 23991098.6776, "weight": 1.2580785766720307e-06}, {"ticker": "JOBY", "market_cap": 4318900959.974999, "weight": 0.00022648053119743024}, {"ticker": "AME", "market_cap": 34413019371.72, "weight": 0.0018045977390182429}, {"ticker": "ATAK", "market_cap": 115877374.03999999, "weight": 6.076538792983673e-06}, {"ticker": "FUSN", "market_cap": 227629863.3924, "weight": 1.193677114971575e-05}, {"ticker": "KTCC", "market_cap": 45317162.593899995, "weight": 2.3764043565116155e-06}, {"ticker": "SNSE", "market_cap": 19100473.951500002, "weight": 1.0016172000117922e-06}, {"ticker": "NX", "market_cap": 907453993.32, "weight": 4.758633373374059e-05}, {"ticker": "DALN", "market_cap": 24032680.1, "weight": 1.260259081092107e-06}, {"ticker": "MIDD", "market_cap": 6675184827.78, "weight": 0.0003500426195569422}, {"ticker": "SDPI", "market_cap": 23117621.202, "weight": 1.21227395079702e-06}, {"ticker": "CSBR", "market_cap": 86806144.60000001, "weight": 4.552061258733459e-06}, {"ticker": "YETI", "market_cap": 3826812879.9199996, "weight": 0.00020067573252304131}, {"ticker": "SWIM", "market_cap": 283083957.33, "weight": 1.4844750000921577e-05}, {"ticker": "LANC", "market_cap": 4530282960.0, "weight": 0.0002375652743056664}, {"ticker": "AGCO", "market_cap": 8604431383.039999, "weight": 0.0004512111318000723}, {"ticker": "EKSO", "market_cap": 9526795.5, "weight": 4.995793433201992e-07}, {"ticker": "INAB", "market_cap": 32549179.35, "weight": 1.7068591054866652e-06}, {"ticker": "JSPR", "market_cap": 83100309.75, "weight": 4.3577295402856236e-06}, {"ticker": "EVA", "market_cap": 527976957.91499996, "weight": 2.7686789532049062e-05}, {"ticker": "BLNK", "market_cap": 199332943.11, "weight": 1.0452897915251402e-05}, {"ticker": "CUTR", "market_cap": 90246034.375, "weight": 4.732446979712603e-06}, {"ticker": "JRSH", "market_cap": 37989826.116000004, "weight": 1.9921633023276123e-06}, {"ticker": "PDSB", "market_cap": 129492048.66000001, "weight": 6.7904840231691845e-06}, {"ticker": "ACLX", "market_cap": 1610595862.205, "weight": 8.445866432155532e-05}, {"ticker": "OM", "market_cap": 493421000.92, "weight": 2.587469623127829e-05}, {"ticker": "DZSI", "market_cap": 60686783.6328, "weight": 3.182377906137403e-06}, {"ticker": "ZYNE", "market_cap": 65536408.66500001, "weight": 3.436689283865169e-06}, {"ticker": "TMDX", "market_cap": 1703469301.1299999, "weight": 8.932889079277958e-05}, {"ticker": "ATNF", "market_cap": 3297465.561, "weight": 1.7291708209600514e-07}, {"ticker": "OSIS", "market_cap": 1979457512.78, "weight": 0.00010380154421965573}, {"ticker": "SIEN", "market_cap": 26021803.5, "weight": 1.3645674985400139e-06}, {"ticker": "AKTS", "market_cap": 54266120.25, "weight": 2.8456822358609422e-06}, {"ticker": "SANA", "market_cap": 706037303.025, "weight": 3.702416538748984e-05}, {"ticker": "LXRX", "market_cap": 244924695.0, "weight": 1.2843701566911987e-05}, {"ticker": "TLF", "market_cap": 36563642.72, "weight": 1.917375115216022e-06}, {"ticker": "AMKR", "market_cap": 5465762759.36, "weight": 0.0002866212642084181}, {"ticker": "ENS", "market_cap": 3812608103.5, "weight": 0.00019993084271450982}, {"ticker": "NVNO", "market_cap": 52560128.0, "weight": 2.7562210431687774e-06}, {"ticker": "CMC", "market_cap": 5538008527.320001, "weight": 0.00029040978820005}, {"ticker": "ADNT", "market_cap": 3336987650.92, "weight": 0.0001749895963773157}, {"ticker": "ISDR", "market_cap": 68564682.0, "weight": 3.595490089875266e-06}, {"ticker": "IDEX", "market_cap": 25667594.42, "weight": 1.3459929905027152e-06}, {"ticker": "LEVI", "market_cap": 5345084078.95, "weight": 0.00028029294783887116}, {"ticker": "NVFY", "market_cap": 3629679.8200000003, "weight": 1.90338195140032e-07}, {"ticker": "TMO", "market_cap": 193079092938.71, "weight": 0.010124949828006746}, {"ticker": "NTIC", "market_cap": 119988422.9611, "weight": 6.292119690081796e-06}, {"ticker": "WLY", "market_cap": 1959354136.74, "weight": 0.00010274733544603585}, {"ticker": "SNOA", "market_cap": 3829048.9155, "weight": 2.007929888645569e-07}, {"ticker": "SNTI", "market_cap": 16991761.1997, "weight": 8.910375899220012e-07}, {"ticker": "AEVA", "market_cap": 160919455.525, "weight": 8.438518063983161e-06}, {"ticker": "GOEV", "market_cap": 272592411.1638, "weight": 1.4294579721300928e-05}, {"ticker": "SILO", "market_cap": 5098427.08, "weight": 2.673584053097729e-07}, {"ticker": "CLAY", "market_cap": 30706977.6, "weight": 1.610255169721662e-06}, {"ticker": "PTPI", "market_cap": 3101452.6180000002, "weight": 1.6263828296085003e-07}, {"ticker": "SXI", "market_cap": 1763520907.71, "weight": 9.247796040181648e-05}, {"ticker": "ATAI", "market_cap": 216975692.132, "weight": 1.1378072909379682e-05}, {"ticker": "FLS", "market_cap": 5012117637.6, "weight": 0.0002628323908113485}, {"ticker": "KZR", "market_cap": 71380855.01785, "weight": 3.7431684846653677e-06}, {"ticker": "OCX", "market_cap": 25876513.92, "weight": 1.3569486016121154e-06}, {"ticker": "CRKN", "market_cap": 1267783.8599999999, "weight": 6.648181208998842e-08}, {"ticker": "HLIO", "market_cap": 1773643190.4099998, "weight": 9.30087667305728e-05}, {"ticker": "TFFP", "market_cap": 20543003.6076, "weight": 1.077262575029483e-06}, {"ticker": "MSI", "market_cap": 45746677204.799995, "weight": 0.0023989278406422294}, {"ticker": "AGE", "market_cap": 28087728.2661, "weight": 1.4729033327664517e-06}, {"ticker": "HPQ", "market_cap": 25640633263.595, "weight": 0.0013445791639109758}, {"ticker": "REYN", "market_cap": 5363635759.74, "weight": 0.0002812657866603358}, {"ticker": "ICVX", "market_cap": 369343553.76, "weight": 1.936815060709233e-05}, {"ticker": "INFN", "market_cap": 897483510.35, "weight": 4.706348769020603e-05}, {"ticker": "AXTI", "market_cap": 107836812.3561, "weight": 5.6548966441658134e-06}, {"ticker": "RARE", "market_cap": 2440620735.7200003, "weight": 0.0001279846622554939}, {"ticker": "PHAT", "market_cap": 568599861.83, "weight": 2.9817029827604402e-05}, {"ticker": "IMUX", "market_cap": 58419951.730000004, "weight": 3.0635066242443363e-06}, {"ticker": "MDGL", "market_cap": 2496202427.62, "weight": 0.00013089933226599507}, {"ticker": "PLSE", "market_cap": 213023414.96, "weight": 1.1170817905931024e-05}, {"ticker": "VRA", "market_cap": 206976397.995, "weight": 1.0853716025826552e-05}, {"ticker": "LMT", "market_cap": 100589040866.66, "weight": 0.005274827929430697}, {"ticker": "FOSL", "market_cap": 96534751.76, "weight": 5.0622234823702515e-06}, {"ticker": "ADVM", "market_cap": 120181681.89999999, "weight": 6.30225407092228e-06}, {"ticker": "HUN", "market_cap": 4222343521.4, "weight": 0.0002214171180323236}, {"ticker": "BWXT", "market_cap": 6654169251.0, "weight": 0.0003489405755330889}, {"ticker": "AMLX", "market_cap": 1183826944.51, "weight": 6.207916266734849e-05}, {"ticker": "FORD", "market_cap": 7777296.005, "weight": 4.0783665724583975e-07}, {"ticker": "AUVI", "market_cap": 2954859.3, "weight": 1.54951018807697e-07}, {"ticker": "STX", "market_cap": 13677453038.37, "weight": 0.0007172372921410718}, {"ticker": "HSDT", "market_cap": 5232374.159999999, "weight": 2.743825084582091e-07}, {"ticker": "CNXA", "market_cap": 1998350.4012999998, "weight": 1.0479227576629628e-07}, {"ticker": "KO", "market_cap": 237601125695.34, "weight": 0.012459658060994177}, {"ticker": "BSET", "market_cap": 133093679.28, "weight": 6.979351335375216e-06}, {"ticker": "SMR", "market_cap": 347836609.38, "weight": 1.8240339566099118e-05}, {"ticker": "TWST", "market_cap": 1066994075.29, "weight": 5.5952518290113534e-05}, {"ticker": "OGEN", "market_cap": 7567367.3, "weight": 3.96828124041998e-07}, {"ticker": "RPM", "market_cap": 12617959142.75, "weight": 0.000661678078696677}, {"ticker": "ACNT", "market_cap": 86941718.845, "weight": 4.559170689421693e-06}, {"ticker": "VICR", "market_cap": 2516424362.56, "weight": 0.00013195975819599315}, {"ticker": "EGRX", "market_cap": 186103294.43, "weight": 9.759143210438922e-06}, {"ticker": "IBRX", "market_cap": 904717757.944, "weight": 4.744284722011577e-05}, {"ticker": "XBIT", "market_cap": 118090570.32, "weight": 6.192597455542464e-06}, {"ticker": "BA", "market_cap": 111972012205.1106, "weight": 0.005871744001188068}, {"ticker": "OMIC", "market_cap": 27056427.97, "weight": 1.4188225744787814e-06}, {"ticker": "NXU", "market_cap": 10381431.6355, "weight": 5.443959408162621e-07}, {"ticker": "VVOS", "market_cap": 11399874.5874, "weight": 5.978024678188924e-07}, {"ticker": "GANX", "market_cap": 40892138.84, "weight": 2.1443588107507516e-06}, {"ticker": "HRTX", "market_cap": 134157665.9556, "weight": 7.035146147460527e-06}, {"ticker": "WLYB", "market_cap": 2066458871.18, "weight": 0.00010836384237095301}, {"ticker": "WNC", "market_cap": 1003436997.85, "weight": 5.2619623928013894e-05}, {"ticker": "LASE", "market_cap": 10977872.6119, "weight": 5.756729417048788e-07}, {"ticker": "PLRX", "market_cap": 997135243.17, "weight": 5.2289163757561046e-05}, {"ticker": "ENR", "market_cap": 2169933397.775, "weight": 0.0001137899834114213}, {"ticker": "HSTO", "market_cap": 2733925.7600000002, "weight": 1.4336539877096936e-07}, {"ticker": "FUL", "market_cap": 3770700560.3999996, "weight": 0.00019773323672390563}, {"ticker": "MAS", "market_cap": 11681534302.880001, "weight": 0.00061257253144619}, {"ticker": "SCTL", "market_cap": 47071938.904, "weight": 2.4684237555502117e-06}, {"ticker": "VRTX", "market_cap": 90511270672.35, "weight": 0.004746355809313784}, {"ticker": "NKE", "market_cap": 146425932743.63998, "weight": 0.007678486572438268}, {"ticker": "TGLS", "market_cap": 1532700870.95, "weight": 8.037389850716312e-05}, {"ticker": "ICAD", "market_cap": 51784180.8, "weight": 2.7155308454388953e-06}, {"ticker": "IVAC", "market_cap": 83384711.7532, "weight": 4.372643407807772e-06}, {"ticker": "CLVR", "market_cap": 4667366.72, "weight": 2.4475386303948185e-07}, {"ticker": "BALL", "market_cap": 15472527453.119999, "weight": 0.00081136989919994}, {"ticker": "AXLA", "market_cap": 28298006.4, "weight": 1.483930189808608e-06}, {"ticker": "INFU", "market_cap": 204546954.54, "weight": 1.0726317493352284e-05}, {"ticker": "SPRY", "market_cap": 380839703.395, "weight": 1.9971001679665896e-05}, {"ticker": "OSK", "market_cap": 5999210678.950001, "weight": 0.0003145949476326397}, {"ticker": "MLSS", "market_cap": 66013234.575, "weight": 3.461693743653967e-06}, {"ticker": "NEGG", "market_cap": 291868500.0, "weight": 1.5305406058716338e-05}, {"ticker": "IRBT", "market_cap": 1067550530.085, "weight": 5.59816984400468e-05}, {"ticker": "CRUS", "market_cap": 3891501956.8199997, "weight": 0.00020406798824614274}, {"ticker": "SGH", "market_cap": 1195120701.39, "weight": 6.267140038733823e-05}, {"ticker": "KOPN", "market_cap": 132582375.16, "weight": 6.9525388592906276e-06}, {"ticker": "STEM", "market_cap": 571794848.37, "weight": 2.998457297236594e-05}, {"ticker": "WFRD", "market_cap": 6119138549.1, "weight": 0.00032088389197025324}, {"ticker": "SNA", "market_cap": 13459323983.8, "weight": 0.0007057987376091583}, {"ticker": "UTRS", "market_cap": 27521362.900000002, "weight": 1.4432034785315686e-06}, {"ticker": "MDAI", "market_cap": 60076800.0, "weight": 3.1503907366101164e-06}, {"ticker": "CGC", "market_cap": 566898153.0388, "weight": 2.972779325687819e-05}, {"ticker": "TALS", "market_cap": 119572755.84, "weight": 6.270322359867356e-06}, {"ticker": "TEX", "market_cap": 3591409000.0, "weight": 0.00018833129668987365}, {"ticker": "BEEM", "market_cap": 97828305.11999999, "weight": 5.13005663131718e-06}, {"ticker": "ZYME", "market_cap": 418490671.13, "weight": 2.1945395455245662e-05}, {"ticker": "WAT", "market_cap": 15681778294.259998, "weight": 0.0008223428856365567}, {"ticker": "FTEK", "market_cap": 35550797.489999995, "weight": 1.8642621293344211e-06}, {"ticker": "AMPH", "market_cap": 2254686032.2999997, "weight": 0.00011823435985475486}, {"ticker": "ALPP", "market_cap": 18717480.599999998, "weight": 9.815332623395313e-07}, {"ticker": "CPRI", "market_cap": 5988142024.251, "weight": 0.00031401451413367725}, {"ticker": "GLW", "market_cap": 25448715613.035, "weight": 0.0013345151194126634}, {"ticker": "HRL", "market_cap": 20721909089.3508, "weight": 0.0010866442693347137}, {"ticker": "LIXT", "market_cap": 5735689.5, "weight": 3.00776057793889e-07}, {"ticker": "RVTY", "market_cap": 13270626517.8, "weight": 0.0006959035576244022}, {"ticker": "LIDR", "market_cap": 37368334.305, "weight": 1.959572650957142e-06}, {"ticker": "CECO", "market_cap": 542685240.3, "weight": 2.8458082886174945e-05}, {"ticker": "CYCN", "market_cap": 8437786.0, "weight": 4.424723495908325e-07}, {"ticker": "MED", "market_cap": 796067247.64, "weight": 4.174528075203352e-05}, {"ticker": "STZ", "market_cap": 45482406661.08, "weight": 0.002385069654572159}, {"ticker": "EWTX", "market_cap": 374092632.45, "weight": 1.961718939598269e-05}, {"ticker": "TR", "market_cap": 2159466466.6400003, "weight": 0.00011324110392901812}, {"ticker": "PEPG", "market_cap": 110256722.61, "weight": 5.7817952613910056e-06}, {"ticker": "NVAC", "market_cap": 66613125.6, "weight": 3.4931516629861476e-06}, {"ticker": "HAE", "market_cap": 4392674306.2, "weight": 0.00023034916046123875}, {"ticker": "BLUE", "market_cap": 314441052.65999997, "weight": 1.6489096947740188e-05}, {"ticker": "DXCM", "market_cap": 33647878303.0, "weight": 0.001764474208219408}, {"ticker": "VUZI", "market_cap": 222250451.67, "weight": 1.1654678081199104e-05}, {"ticker": "MACK", "market_cap": 173713159.89000002, "weight": 9.109412114905056e-06}, {"ticker": "DNMR", "market_cap": 187234714.945, "weight": 9.81847421191814e-06}, {"ticker": "ATRO", "market_cap": 511795983.27000004, "weight": 2.6838269094360455e-05}, {"ticker": "SYBX", "market_cap": 13039390.62, "weight": 6.837776882305455e-07}, {"ticker": "EMR", "market_cap": 53858160000.0, "weight": 0.0028242890492646998}, {"ticker": "PBH", "market_cap": 2826718449.3, "weight": 0.00014823139078112737}, {"ticker": "RYTM", "market_cap": 1259720931.3999999, "weight": 6.605899703373727e-05}, {"ticker": "CF", "market_cap": 15649981458.2, "weight": 0.0008206754789541614}, {"ticker": "SOI", "market_cap": 295629198.9, "weight": 1.55026148144713e-05}, {"ticker": "ELUT", "market_cap": 31419614.880000003, "weight": 1.6476254338747965e-06}, {"ticker": "TPB", "market_cap": 399614743.62, "weight": 2.0955553333620875e-05}, {"ticker": "MIR", "market_cap": 1614959919.69, "weight": 8.468751283337318e-05}, {"ticker": "TWI", "market_cap": 801651481.74, "weight": 4.203811458106074e-05}, {"ticker": "LYEL", "market_cap": 341396715.92, "weight": 1.790263548230737e-05}, {"ticker": "WEST", "market_cap": 776505602.88, "weight": 4.0719480036203754e-05}, {"ticker": "FUV", "market_cap": 7573071.42, "weight": 3.9712724461447377e-07}, {"ticker": "OIS", "market_cap": 484383724.28000003, "weight": 2.540078695830039e-05}, {"ticker": "LODE", "market_cap": 44977868.3942, "weight": 2.358611975697051e-06}, {"ticker": "ALLO", "market_cap": 490307117.625, "weight": 2.5711406091200043e-05}, {"ticker": "IONM", "market_cap": 1733878.68, "weight": 9.092354006667759e-08}, {"ticker": "AMPE", "market_cap": 2763622.08, "weight": 1.4492265567279186e-07}, {"ticker": "SONX", "market_cap": 17282847.096, "weight": 9.06301956720189e-07}, {"ticker": "CLFD", "market_cap": 426109707.28000003, "weight": 2.234493306225632e-05}, {"ticker": "VWE", "market_cap": 33823322.91, "weight": 1.7736744163643322e-06}, {"ticker": "SCPH", "market_cap": 225182242.6, "weight": 1.1808419408758987e-05}, {"ticker": "DNA", "market_cap": 3431624625.57, "weight": 0.00017995230158595143}, {"ticker": "SCX", "market_cap": 77634084.55, "weight": 4.071084025972198e-06}, {"ticker": "HWM", "market_cap": 18763708433.120003, "weight": 0.0009839574217027933}, {"ticker": "THAR", "market_cap": 3411396.477, "weight": 1.7889154981698736e-07}, {"ticker": "TTC", "market_cap": 8555713751.2, "weight": 0.00044865640891106497}, {"ticker": "BRID", "market_cap": 101569750.08, "weight": 5.326255722206187e-06}, {"ticker": "ETNB", "market_cap": 1086924729.6000001, "weight": 5.699766964159702e-05}, {"ticker": "PGEN", "market_cap": 329572751.37, "weight": 1.728259399560491e-05}, {"ticker": "ASNS", "market_cap": 3330617.37, "weight": 1.74655542732648e-07}, {"ticker": "OLMA", "market_cap": 617661785.84, "weight": 3.23898071879394e-05}, {"ticker": "TGAN", "market_cap": 128264720.86400001, "weight": 6.726123702391404e-06}, {"ticker": "OESX", "market_cap": 40303171.92, "weight": 2.113473744819514e-06}, {"ticker": "BW", "market_cap": 310447835.63, "weight": 1.6279695083117143e-05}, {"ticker": "NRIX", "market_cap": 307275452.625, "weight": 1.6113337253939636e-05}, {"ticker": "CGA", "market_cap": 28451837.4382, "weight": 1.4919969955930106e-06}, {"ticker": "COYA", "market_cap": 34658535.86, "weight": 1.81747247386368e-06}, {"ticker": "FTNT", "market_cap": 45525982237.89, "weight": 0.002387354731232778}, {"ticker": "GALT", "market_cap": 116668009.5993, "weight": 6.11799923931326e-06}, {"ticker": "VIR", "market_cap": 1190809208.3999999, "weight": 6.244530832556636e-05}, {"ticker": "GWH", "market_cap": 325234802.34, "weight": 1.7055114595237398e-05}, {"ticker": "PACB", "market_cap": 1995696803.745, "weight": 0.00010465312272958388}, {"ticker": "ADTN", "market_cap": 631028268.5799999, "weight": 3.309073738737004e-05}, {"ticker": "STAA", "market_cap": 1839115904.64, "weight": 9.644211591712924e-05}, {"ticker": "NKLA", "market_cap": 1389128479.23, "weight": 7.284504988493879e-05}, {"ticker": "POLA", "market_cap": 13985514.0, "weight": 7.333918210079614e-07}, {"ticker": "UFAB", "market_cap": 2499160.3109999998, "weight": 1.3105444186571282e-07}, {"ticker": "ONTO", "market_cap": 6287291740.139999, "weight": 0.00032970174271103575}, {"ticker": "SHYF", "market_cap": 513228801.2, "weight": 2.6913405192386992e-05}, {"ticker": "HLMN", "market_cap": 1553485371.8999999, "weight": 8.146382505548033e-05}, {"ticker": "LYTS", "market_cap": 467588362.752, "weight": 2.452004844733061e-05}, {"ticker": "IGMS", "market_cap": 352528828.0, "weight": 1.848639664761141e-05}, {"ticker": "SCL", "market_cap": 1571398866.2400002, "weight": 8.240319776889142e-05}, {"ticker": "AVNW", "market_cap": 354146656.79, "weight": 1.8571234602253418e-05}, {"ticker": "ALXO", "market_cap": 266458028.02499998, "weight": 1.3972896412348172e-05}, {"ticker": "PSTX", "market_cap": 205815614.15600002, "weight": 1.0792845229552579e-05}, {"ticker": "ONTX", "market_cap": 14936069.0, "weight": 7.832383452342589e-07}, {"ticker": "CRSR", "market_cap": 1457960825.95, "weight": 7.645457614941732e-05}, {"ticker": "VHAQ", "market_cap": 75595321.05, "weight": 3.96417251196781e-06}, {"ticker": "IRTC", "market_cap": 2593585161.58, "weight": 0.0001360060234175436}, {"ticker": "PM", "market_cap": 141247889111.06998, "weight": 0.0074069531236891405}, {"ticker": "AXGN", "market_cap": 202452680.64, "weight": 1.0616495047841133e-05}, {"ticker": "AWI", "market_cap": 3165786989.38, "weight": 0.00016601193814290343}, {"ticker": "LHX", "market_cap": 30860781516.809998, "weight": 0.0016183205532769207}, {"ticker": "CENN", "market_cap": 70419074.7483, "weight": 3.692733314152879e-06}, {"ticker": "GFF", "market_cap": 2117205154.2600002, "weight": 0.00011102494649322029}, {"ticker": "TRT", "market_cap": 30438332.4, "weight": 1.5961675793454305e-06}, {"ticker": "ONVO", "market_cap": 10810571.72, "weight": 5.668997850109741e-07}, {"ticker": "GMDA", "market_cap": 121900922.40685, "weight": 6.392409994120339e-06}, {"ticker": "CTAS", "market_cap": 49053100724.81, "weight": 0.00257231467264309}, {"ticker": "GE", "market_cap": 117947544775.41, "weight": 0.006185097283250083}, {"ticker": "ORGN", "market_cap": 160019909.60999998, "weight": 8.391346425051468e-06}, {"ticker": "KNW", "market_cap": 12649804.6608, "weight": 6.633480382329251e-07}, {"ticker": "SCLX", "market_cap": 207182712.60000002, "weight": 1.086453503783151e-05}, {"ticker": "DYNT", "market_cap": 3110254.4739, "weight": 1.6309984691386244e-07}, {"ticker": "AGIO", "market_cap": 1323808517.5, "weight": 6.941971094628162e-05}, {"ticker": "CVRX", "market_cap": 303981153.895, "weight": 1.594058623852905e-05}, {"ticker": "CRON", "market_cap": 760273267.215, "weight": 3.986826625796387e-05}, {"ticker": "TILE", "market_cap": 570029424.75, "weight": 2.989199523489256e-05}, {"ticker": "FOLD", "market_cap": 3126124025.9550004, "weight": 0.00016393203654094352}, {"ticker": "EXP", "market_cap": 5887732282.7699995, "weight": 0.0003087490885546324}, {"ticker": "NYT", "market_cap": 6869377473.2, "weight": 0.00036022596339764247}, {"ticker": "AFIB", "market_cap": 20441889.692986, "weight": 1.0719602230409893e-06}, {"ticker": "SELB", "market_cap": 155728984.565, "weight": 8.166332933766042e-06}, {"ticker": "SGMO", "market_cap": 96623297.7549, "weight": 5.06686678031716e-06}, {"ticker": "SYK", "market_cap": 100069677625.105, "weight": 0.005247592837928974}, {"ticker": "RAPT", "market_cap": 513310790.88, "weight": 2.6917704681180832e-05}, {"ticker": "IOBT", "market_cap": 97404931.34899999, "weight": 5.107855169084138e-06}, {"ticker": "VREX", "market_cap": 757904000.0000001, "weight": 3.974402333079914e-05}, {"ticker": "WTS", "market_cap": 5678109172.26, "weight": 0.00029775658053939026}, {"ticker": "SOBR", "market_cap": 15799973.639999999, "weight": 8.285409774511961e-07}, {"ticker": "TCON", "market_cap": 4614201.7335, "weight": 2.4196592358562277e-07}, {"ticker": "MKSI", "market_cap": 5706738955.799999, "weight": 0.00029925790891998917}, {"ticker": "ACAD", "market_cap": 3519351824.2050004, "weight": 0.0001845526623563064}, {"ticker": "KEQU", "market_cap": 50473153.72, "weight": 2.6467813852766197e-06}, {"ticker": "CHD", "market_cap": 22498536765.6, "weight": 0.0011798095406817335}, {"ticker": "FLEX", "market_cap": 11893675944.8, "weight": 0.0006236971097119102}, {"ticker": "LUNR", "market_cap": 81786845.4624, "weight": 4.288852274443847e-06}, {"ticker": "BWEN", "market_cap": 63771591.74, "weight": 3.3441433611074194e-06}, {"ticker": "AAOI", "market_cap": 297031892.871, "weight": 1.557617123046778e-05}, {"ticker": "NVST", "market_cap": 4382288041.0, "weight": 0.0002298045110512493}, {"ticker": "CLRB", "market_cap": 27176014.53, "weight": 1.4250936207203768e-06}, {"ticker": "MBC", "market_cap": 1479206535.5200002, "weight": 7.756868819636452e-05}, {"ticker": "HON", "market_cap": 120757985626.875, "weight": 0.006332475086732392}, {"ticker": "COHR", "market_cap": 4618046449.5, "weight": 0.00024216753814683935}, {"ticker": "STOK", "market_cap": 149932194.27499998, "weight": 7.862352787824722e-06}, {"ticker": "RCUS", "market_cap": 1179393001.1200001, "weight": 6.18466493813128e-05}, {"ticker": "FNKO", "market_cap": 367270032.96999997, "weight": 1.9259416442007228e-05}, {"ticker": "DORM", "market_cap": 2399398096.8, "weight": 0.00012582297222219998}, {"ticker": "ATER", "market_cap": 26074553.860799998, "weight": 1.3673336952751455e-06}, {"ticker": "FSS", "market_cap": 3616256234.36, "weight": 0.00018963427049936625}, {"ticker": "SPI", "market_cap": 22525176.38, "weight": 1.181206505806917e-06}, {"ticker": "CRCT", "market_cap": 2015844135.27, "weight": 0.00010570963650201806}, {"ticker": "FTK", "market_cap": 112777096.68, "weight": 5.91396213983527e-06}, {"ticker": "ACU", "market_cap": 102710404.719, "weight": 5.386070955513835e-06}, {"ticker": "TRN", "market_cap": 1728746997.1200001, "weight": 9.06544377475066e-05}, {"ticker": "SCYX", "market_cap": 81972341.325, "weight": 4.29857956429974e-06}, {"ticker": "ATHX", "market_cap": 11802205.438000001, "weight": 6.18900452145333e-07}, {"ticker": "QDEL", "market_cap": 4941169993.62, "weight": 0.00025911193964918763}, {"ticker": "SONN", "market_cap": 4524851.21, "weight": 2.3728043664980618e-07}, {"ticker": "KULR", "market_cap": 45820499.9208, "weight": 2.402799058826916e-06}, {"ticker": "FREQ", "market_cap": 11317780.425, "weight": 5.934975000317478e-07}, {"ticker": "ALOT", "market_cap": 91843044.19999999, "weight": 4.816193200532542e-06}, {"ticker": "BHIL", "market_cap": 67841260.697, "weight": 3.5575543181357986e-06}, {"ticker": "RPHM", "market_cap": 243703681.48, "weight": 1.2779672362915041e-05}, {"ticker": "GOSS", "market_cap": 154233006.199, "weight": 8.087884741012509e-06}, {"ticker": "ITCI", "market_cap": 4904513426.559999, "weight": 0.00025718969163827905}, {"ticker": "FFIE", "market_cap": 25373238.96, "weight": 1.330557169778998e-06}, {"ticker": "OTIS", "market_cap": 32750197220.460003, "weight": 0.0017174003599641054}, {"ticker": "SGEN", "market_cap": 40157973193.25, "weight": 0.0021058596121806116}, {"ticker": "BPTH", "market_cap": 4068358.2199999997, "weight": 2.1334222277983548e-07}, {"ticker": "BIVI", "market_cap": 130653376.39999999, "weight": 6.851383341279741e-06}, {"ticker": "EML", "market_cap": 111010833.22000001, "weight": 5.821340361664712e-06}, {"ticker": "TSE", "market_cap": 227318280.2667, "weight": 1.1920431920714051e-05}, {"ticker": "BVS", "market_cap": 189006478.5, "weight": 9.911384411714658e-06}, {"ticker": "BRC", "market_cap": 2689995167.8199997, "weight": 0.00014106170532095753}, {"ticker": "ASTE", "market_cap": 1032353960.85, "weight": 5.4136011824274976e-05}, {"ticker": "VFC", "market_cap": 6379386331.67, "weight": 0.0003345311269000739}, {"ticker": "INGR", "market_cap": 6346584712.9908, "weight": 0.00033281103003018783}, {"ticker": "RWOD", "market_cap": 94045630.25, "weight": 4.931695469103883e-06}, {"ticker": "PMTS", "market_cap": 202669803.81, "weight": 1.0627880854399929e-05}, {"ticker": "HY", "market_cap": 754426181.52, "weight": 3.956164865167169e-05}, {"ticker": "SYNA", "market_cap": 3499738320.06, "weight": 0.0001835241421659688}, {"ticker": "NPCE", "market_cap": 213510142.4295, "weight": 1.1196341597458644e-05}, {"ticker": "TPST", "market_cap": 3986560.248, "weight": 2.0905278703654869e-07}, {"ticker": "ALRN", "market_cap": 6630103.82, "weight": 3.4767859901478353e-07}, {"ticker": "RPID", "market_cap": 46141886.54000001, "weight": 2.4196523770462313e-06}, {"ticker": "IDXX", "market_cap": 35660885290.68, "weight": 0.0018700350664328698}, {"ticker": "CIX", "market_cap": 229651568.04999998, "weight": 1.2042788108433e-05}, {"ticker": "COOK", "market_cap": 342772042.58500004, "weight": 1.797475677347516e-05}, {"ticker": "ENTG", "market_cap": 14147705861.25, "weight": 0.0007418970632518152}, {"ticker": "SLGN", "market_cap": 4679869792.95, "weight": 0.0002454095165563276}, {"ticker": "ALSN", "market_cap": 5241369123.82, "weight": 0.0002748541988727231}, {"ticker": "LOOP", "market_cap": 167274578.24, "weight": 8.771776821629317e-06}, {"ticker": "TRNR", "market_cap": 18106179.025, "weight": 9.494769807274086e-07}, {"ticker": "TGTX", "market_cap": 1179889662.66, "weight": 6.187269400943624e-05}, {"ticker": "SMTC", "market_cap": 1579332131.6599998, "weight": 8.281921336709632e-05}, {"ticker": "GHM", "market_cap": 173895692.7, "weight": 9.118984024090488e-06}, {"ticker": "OMER", "market_cap": 166882212.72, "weight": 8.751201413159271e-06}, {"ticker": "SWTX", "market_cap": 1447865519.1000001, "weight": 7.592518441777588e-05}, {"ticker": "ALGN", "market_cap": 22067728211.359997, "weight": 0.0011572182029518593}, {"ticker": "TTNP", "market_cap": 6749824.6025, "weight": 3.5395668380238395e-07}, {"ticker": "OCUP", "market_cap": 68366771.4624, "weight": 3.58511178203709e-06}, {"ticker": "OLIT", "market_cap": 65080989.6, "weight": 3.412807385966951e-06}, {"ticker": "NURO", "market_cap": 5837812.920000001, "weight": 3.0613134762888265e-07}, {"ticker": "CGTX", "market_cap": 42587772.71, "weight": 2.233276816315801e-06}, {"ticker": "VRCA", "market_cap": 161527883.51999998, "weight": 8.470423656813375e-06}, {"ticker": "CLDX", "market_cap": 1207986150.24, "weight": 6.334605667527917e-05}, {"ticker": "BOF", "market_cap": 7846621.2, "weight": 4.1147202817341397e-07}, {"ticker": "ALTO", "market_cap": 311619868.35, "weight": 1.634115576384734e-05}, {"ticker": "BMRN", "market_cap": 16154804262.05, "weight": 0.0008471480787743678}, {"ticker": "PIRS", "market_cap": 30050985.808, "weight": 1.5758553603974457e-06}, {"ticker": "LLY", "market_cap": 501920836820.29004, "weight": 0.026320422439781072}, {"ticker": "PNR", "market_cap": 10502858539.64, "weight": 0.0005507634935816873}, {"ticker": "XTNT", "market_cap": 145653664.23999998, "weight": 7.637989283300976e-06}, {"ticker": "VSH", "market_cap": 3369723899.855, "weight": 0.00017670626529770074}, {"ticker": "KMT", "market_cap": 1953611794.8600001, "weight": 0.00010244621054149368}, {"ticker": "MDLZ", "market_cap": 93113804465.95499, "weight": 0.0048828310935347796}, {"ticker": "TGI", "market_cap": 571897509.855, "weight": 2.9989956478001237e-05}, {"ticker": "TBIO", "market_cap": 28453452.285, "weight": 1.4920816771739166e-06}, {"ticker": "FORM", "market_cap": 2664389986.0800004, "weight": 0.00013971898521331346}, {"ticker": "OUST", "market_cap": 184472247.84, "weight": 9.673612122429649e-06}, {"ticker": "ASPI", "market_cap": 33691978.4208, "weight": 1.7667867914894978e-06}, {"ticker": "SPR", "market_cap": 1699370157.42, "weight": 8.911393419768769e-05}, {"ticker": "MGTX", "market_cap": 258383262.76, "weight": 1.3549460648606477e-05}, {"ticker": "ATR", "market_cap": 8139985700.59, "weight": 0.0004268558835902968}, {"ticker": "KRON", "market_cap": 72604067.4, "weight": 3.8073129956518416e-06}, {"ticker": "ARCT", "market_cap": 652728147.06, "weight": 3.4228665774850017e-05}, {"ticker": "OSUR", "market_cap": 432045480.075, "weight": 2.2656201365960745e-05}, {"ticker": "GOLF", "market_cap": 3428272227.52, "weight": 0.0001797765038776489}, {"ticker": "XOS", "market_cap": 54301790.545, "weight": 2.8475527643667905e-06}, {"ticker": "VERV", "market_cap": 755096966.55, "weight": 3.959682420937065e-05}, {"ticker": "ATRA", "market_cap": 135982394.44, "weight": 7.1308337958386425e-06}, {"ticker": "ARAV", "market_cap": 9084987.027999999, "weight": 4.7641117661450456e-07}, {"ticker": "CRVO", "market_cap": 7052590.334999999, "weight": 3.69833534084539e-07}, {"ticker": "TNON", "market_cap": 3371576.8296000003, "weight": 1.7680343180297794e-07}, {"ticker": "FEIM", "market_cap": 66012023.38, "weight": 3.4616302293271685e-06}, {"ticker": "GRPH", "market_cap": 143211279.25, "weight": 7.509912104627486e-06}, {"ticker": "XLO", "market_cap": 57557805.8, "weight": 3.0182962177067356e-06}, {"ticker": "SOTK", "market_cap": 82574573.58, "weight": 4.330160256304637e-06}, {"ticker": "TKR", "market_cap": 5102166271.86, "weight": 0.0002675544862494726}, {"ticker": "TROX", "market_cap": 1867330680.81, "weight": 9.792168156445892e-05}, {"ticker": "FREE", "market_cap": 155244605.67, "weight": 8.140932400052237e-06}, {"ticker": "VZIO", "market_cap": 1010127949.6349999, "weight": 5.297049335718736e-05}, {"ticker": "AXTA", "market_cap": 6001464098.62, "weight": 0.00031471311558522807}, {"ticker": "REGN", "market_cap": 88028093251.84, "weight": 0.004616139500473531}, {"ticker": "AAPL", "market_cap": 2701751631920.0, "weight": 0.1416782071252469}, {"ticker": "LUNG", "market_cap": 363925299.54, "weight": 1.9084020661700987e-05}, {"ticker": "MXL", "market_cap": 1756423367.84, "weight": 9.210576974154214e-05}, {"ticker": "FIGS", "market_cap": 1001533300.885, "weight": 5.251979522069512e-05}, {"ticker": "RMBS", "market_cap": 6188846003.96, "weight": 0.00032453930837165296}, {"ticker": "WLKP", "market_cap": 755509068.6, "weight": 3.961843458943181e-05}, {"ticker": "DUNE", "market_cap": 55604886.48, "weight": 2.915886320124392e-06}, {"ticker": "PRPO", "market_cap": 8316527.705999999, "weight": 4.3611363863827265e-07}, {"ticker": "ASMB", "market_cap": 41880898.424, "weight": 2.1962087600517807e-06}, {"ticker": "F", "market_cap": 47746551431.86, "weight": 0.00250380002490163}, {"ticker": "MPC", "market_cap": 56457979577.6, "weight": 0.0029606220016544517}, {"ticker": "SMTI", "market_cap": 255570941.28, "weight": 1.3401984226111243e-05}, {"ticker": "FCUV", "market_cap": 126402543.14999999, "weight": 6.628472239262419e-06}, {"ticker": "ROIV", "market_cap": 7750106138.97, "weight": 0.0004064108372609108}, {"ticker": "OPK", "market_cap": 1151854234.17, "weight": 6.040253324501818e-05}, {"ticker": "ICU", "market_cap": 10500824.34, "weight": 5.506568213937166e-07}, {"ticker": "ISRG", "market_cap": 101053118076.75, "weight": 0.005299163855174735}, {"ticker": "FARO", "market_cap": 268230568.83999997, "weight": 1.406584737118485e-05}, {"ticker": "ONDS", "market_cap": 31107571.985099997, "weight": 1.6312620948567733e-06}, {"ticker": "FIZZ", "market_cap": 4433388393.54, "weight": 0.00023248418235996624}, {"ticker": "FSLR", "market_cap": 16166794854.02, "weight": 0.0008477768581013088}, {"ticker": "GLT", "market_cap": 84010622.15, "weight": 4.4054657671216284e-06}, {"ticker": "RPTX", "market_cap": 386427014.28, "weight": 2.026399685342124e-05}, {"ticker": "AORT", "market_cap": 605131275.9449999, "weight": 3.173271489443825e-05}, {"ticker": "SENS", "market_cap": 287433527.7666, "weight": 1.5072838820760482e-05}, {"ticker": "MRNA", "market_cap": 39397041746.82, "weight": 0.002065956831406196}, {"ticker": "AP", "market_cap": 50161016.225, "weight": 2.6304130854870725e-06}, {"ticker": "CBT", "market_cap": 3800079008.04, "weight": 0.00019927382459311707}, {"ticker": "RIGL", "market_cap": 176107928.86, "weight": 9.23499233854229e-06}, {"ticker": "CVM", "market_cap": 55294313.489999995, "weight": 2.899600062022474e-06}, {"ticker": "GIS", "market_cap": 36600246653.985, "weight": 0.0019192946031805914}, {"ticker": "CRS", "market_cap": 3188306740.8199997, "weight": 0.0001671928601681667}, {"ticker": "XCUR", "market_cap": 6313264.109999999, "weight": 3.310637179396557e-07}, {"ticker": "EVLV", "market_cap": 688476200.85, "weight": 3.610327190420205e-05}, {"ticker": "ACST", "market_cap": 25096408.68, "weight": 1.3160403588016293e-06}, {"ticker": "ELF", "market_cap": 5378749397.63, "weight": 0.00028205833660981935}, {"ticker": "CRNX", "market_cap": 1707099431.3700001, "weight": 8.951925260766961e-05}, {"ticker": "ADTX", "market_cap": 2782637.45, "weight": 1.459198100735125e-07}, {"ticker": "TRS", "market_cap": 996701692.38, "weight": 5.2266428618661075e-05}, {"ticker": "PHIO", "market_cap": 3243909.76, "weight": 1.7010864856821842e-07}, {"ticker": "ATEN", "market_cap": 814845409.29, "weight": 4.2729996091610986e-05}, {"ticker": "BSFC", "market_cap": 795922.493429, "weight": 4.1737689929529334e-08}, {"ticker": "ICCC", "market_cap": 41873349.2928, "weight": 2.1958128882176963e-06}, {"ticker": "COKE", "market_cap": 6044154667.2, "weight": 0.00031695178295424657}, {"ticker": "AXL", "market_cap": 828769924.92, "weight": 4.346018919531382e-05}, {"ticker": "IRWD", "market_cap": 1494759601.88, "weight": 7.838428150670105e-05}, {"ticker": "SLVM", "market_cap": 1753077947.5, "weight": 9.19303379400946e-05}, {"ticker": "ERII", "market_cap": 1136593030.3, "weight": 5.960224502557961e-05}, {"ticker": "IMRX", "market_cap": 214505229.95, "weight": 1.124852337988879e-05}, {"ticker": "FSR", "market_cap": 2150398524.8199997, "weight": 0.0001127655865927111}, {"ticker": "LWLG", "market_cap": 486821297.18390006, "weight": 2.5528611794114853e-05}, {"ticker": "ARAY", "market_cap": 274798643.885, "weight": 1.4410273219085007e-05}, {"ticker": "VATE", "market_cap": 122814236.05, "weight": 6.440303604315946e-06}, {"ticker": "OWLT", "market_cap": 37638874.56, "weight": 1.9737596168613204e-06}, {"ticker": "BELFB", "market_cap": 601396163.94, "weight": 3.1536847899845446e-05}, {"ticker": "RGEN", "market_cap": 8531135438.415, "weight": 0.000447367537184885}, {"ticker": "COMM", "market_cap": 618804650.92, "weight": 3.24497383354244e-05}, {"ticker": "GM", "market_cap": 42210435350.2419, "weight": 0.0022134894753995265}, {"ticker": "CING", "market_cap": 11275364.1424, "weight": 5.912732160521671e-07}, {"ticker": "NOC", "market_cap": 63709275991.68, "weight": 0.0033408755612869853}, {"ticker": "DARE", "market_cap": 46325181.7272, "weight": 2.4292642648268733e-06}, {"ticker": "PRPL", "market_cap": 157568821.63, "weight": 8.262812866892439e-06}, {"ticker": "THMO", "market_cap": 2880210.3694, "weight": 1.510364744334945e-07}, {"ticker": "DLX", "market_cap": 788587332.4799999, "weight": 4.135303856485488e-05}, {"ticker": "OC", "market_cap": 11840108810.800001, "weight": 0.0006208880818885184}, {"ticker": "PEGY", "market_cap": 8940143.421, "weight": 4.688156662386192e-07}, {"ticker": "BSGM", "market_cap": 39147946.0554, "weight": 2.0528944053319202e-06}, {"ticker": "GTBP", "market_cap": 9371512.0528, "weight": 4.914363740940126e-07}, {"ticker": "KAMN", "market_cap": 534336895.22499996, "weight": 2.802030076411943e-05}, {"ticker": "GILD", "market_cap": 92510335638.485, "weight": 0.0048511855564240414}, {"ticker": "KODK", "market_cap": 309946872.3, "weight": 1.6253424871750803e-05}, {"ticker": "XFOR", "market_cap": 148459239.5013, "weight": 7.785111938203736e-06}, {"ticker": "GRTX", "market_cap": 7485444.6864, "weight": 3.925321521692563e-07}, {"ticker": "BMI", "market_cap": 4179559966.56, "weight": 0.00021917357452056553}, {"ticker": "NPK", "market_cap": 502919936.64000005, "weight": 2.6372814624733722e-05}, {"ticker": "VANI", "market_cap": 53359738.95, "weight": 2.798152153510407e-06}, {"ticker": "CLSD", "market_cap": 52080802.7624, "weight": 2.73108552016558e-06}, {"ticker": "RBOT", "market_cap": 88685062.8419, "weight": 4.650590584931418e-06}, {"ticker": "INZY", "market_cap": 225621929.23, "weight": 1.1831476307364827e-05}, {"ticker": "AMPX", "market_cap": 390711059.99999994, "weight": 2.048864959710103e-05}, {"ticker": "MNOV", "market_cap": 98337723.22999999, "weight": 5.156770206188103e-06}, {"ticker": "ASTI", "market_cap": 831432.3661, "weight": 4.359980598632535e-08}, {"ticker": "DCI", "market_cap": 7213910126.5, "weight": 0.00037829304552278935}, {"ticker": "LASR", "market_cap": 467430203.40000004, "weight": 2.4511754667411424e-05}, {"ticker": "KRO", "market_cap": 786669762.424, "weight": 4.125248236110863e-05}, {"ticker": "INBS", "market_cap": 1008462.629, "weight": 5.288316495917033e-08}, {"ticker": "AXSM", "market_cap": 3044289474.7000003, "weight": 0.00015964068260384303}, {"ticker": "AVGR", "market_cap": 5752531.0378, "weight": 3.0165921776038834e-07}, {"ticker": "NARI", "market_cap": 3738801065.49, "weight": 0.0001960604466740527}, {"ticker": "PPSI", "market_cap": 59277913.6, "weight": 3.108497621228408e-06}, {"ticker": "HUMA", "market_cap": 284444894.25, "weight": 1.4916116702641355e-05}, {"ticker": "ALIM", "market_cap": 156208146.18, "weight": 8.19145987649993e-06}, {"ticker": "MIST", "market_cap": 97811513.17, "weight": 5.129176071704658e-06}, {"ticker": "LXU", "market_cap": 731548266.24, "weight": 3.836194473316966e-05}, {"ticker": "IPWR", "market_cap": 52555353.3, "weight": 2.755970660814023e-06}, {"ticker": "LMAT", "market_cap": 1224695496.43, "weight": 6.422228459440583e-05}, {"ticker": "NDRA", "market_cap": 7696325.0061, "weight": 4.0359058746734576e-07}, {"ticker": "UPXI", "market_cap": 33758324.245, "weight": 1.7702659260301595e-06}, {"ticker": "DCTH", "market_cap": 56675766.769999996, "weight": 2.9720426291427547e-06}, {"ticker": "UTHR", "market_cap": 10381969294.4, "weight": 0.0005444241353209297}, {"ticker": "ALGM", "market_cap": 5846319403.8, "weight": 0.00030657742244919004}, {"ticker": "CTCX", "market_cap": 71783906.61999999, "weight": 3.764304264763329e-06}, {"ticker": "YHGJ", "market_cap": 52050595.449999996, "weight": 2.729501467134079e-06}, {"ticker": "ATNM", "market_cap": 156046052.86, "weight": 8.182959801699102e-06}, {"ticker": "UBX", "market_cap": 27304352.46, "weight": 1.4318235834651919e-06}, {"ticker": "BRLT", "market_cap": 37563364.800000004, "weight": 1.9697999311186105e-06}, {"ticker": "ELAN", "market_cap": 5069631718.2, "weight": 0.0002658483941062458}, {"ticker": "INGN", "market_cap": 112609166.415, "weight": 5.905155979200008e-06}, {"ticker": "TSVT", "market_cap": 207409415.58, "weight": 1.0876423203781659e-05}, {"ticker": "SAVA", "market_cap": 794915883.3594, "weight": 4.168490391165478e-05}, {"ticker": "MERC", "market_cap": 546169149.86, "weight": 2.8640776977821163e-05}, {"ticker": "GRI", "market_cap": 5025801.8, "weight": 2.6354997993831973e-07}, {"ticker": "KRT", "market_cap": 428911319.76, "weight": 2.2491847911325562e-05}, {"ticker": "SUN", "market_cap": 3938449888.15, "weight": 0.00020652990912017465}, {"ticker": "VNT", "market_cap": 4773678066.650001, "weight": 0.00025032876519277077}, {"ticker": "SLRX", "market_cap": 2294102.79, "weight": 1.203013505787163e-07}, {"ticker": "LUMO", "market_cap": 30789495.56, "weight": 1.6145823611963736e-06}, {"ticker": "IOVA", "market_cap": 1012167627.505, "weight": 5.307745282019666e-05}, {"ticker": "PYXS", "market_cap": 83357271.2, "weight": 4.371204441940603e-06}, {"ticker": "FLXS", "market_cap": 105206853.78, "weight": 5.516983221083796e-06}, {"ticker": "EPC", "market_cap": 1843963524.3899999, "weight": 9.669632213908194e-05}, {"ticker": "LGVN", "market_cap": 52283142.080000006, "weight": 2.7416960705247715e-06}, {"ticker": "XERS", "market_cap": 228499218.415, "weight": 1.1982359596670723e-05}, {"ticker": "MIRA", "market_cap": 70357012.6, "weight": 3.689478812962761e-06}, {"ticker": "SAM", "market_cap": 4607848288.44, "weight": 0.00024163275280318115}, {"ticker": "IOSP", "market_cap": 2501766851.46, "weight": 0.00013119112725707495}, {"ticker": "VGR", "market_cap": 1620144077.8000002, "weight": 8.495936692158804e-05}, {"ticker": "AMPG", "market_cap": 19182829.87, "weight": 1.0059358941291121e-06}, {"ticker": "ME", "market_cap": 413476551.1881, "weight": 2.168245806481851e-05}, {"ticker": "APRE", "market_cap": 17076595.61, "weight": 8.954862546370808e-07}, {"ticker": "REVB", "market_cap": 4282166.04, "weight": 2.2455417440746553e-07}, {"ticker": "AXON", "market_cap": 14471291070.73, "weight": 0.0007588656742039603}, {"ticker": "CNTX", "market_cap": 19318924.13, "weight": 1.0130725940866631e-06}, {"ticker": "OBIO", "market_cap": 323480865.1, "weight": 1.6963139196522896e-05}, {"ticker": "BIIB", "market_cap": 37012499725.95, "weight": 0.0019409129027414466}, {"ticker": "SWKS", "market_cap": 15488973378.449999, "weight": 0.0008122323134898925}, {"ticker": "NHWK", "market_cap": 12780126.1, "weight": 6.701820149899657e-07}, {"ticker": "CVGI", "market_cap": 252372488.94, "weight": 1.3234259336912336e-05}, {"ticker": "MYMD", "market_cap": 24729686.1056, "weight": 1.2968096507530052e-06}, {"ticker": "ATXS", "market_cap": 190676848.4, "weight": 9.998977590107521e-06}, {"ticker": "PKG", "market_cap": 13720591785.195, "weight": 0.0007194994617038056}, {"ticker": "MVST", "market_cap": 539920718.73, "weight": 2.831311306179537e-05}, {"ticker": "TG", "market_cap": 180175707.48000002, "weight": 9.448304167451763e-06}, {"ticker": "BTMD", "market_cap": 140833530.88, "weight": 7.385224430869267e-06}, {"ticker": "AZTA", "market_cap": 2902922358.64, "weight": 0.00015222747729169738}, {"ticker": "RRX", "market_cap": 9094936089.505, "weight": 0.0004769328993294847}, {"ticker": "PCSA", "market_cap": 5639785.872599999, "weight": 2.957469300878815e-07}, {"ticker": "GPRO", "market_cap": 458943081.41499996, "weight": 2.406669516886915e-05}, {"ticker": "DECK", "market_cap": 13291723994.22, "weight": 0.0006970098964154066}, {"ticker": "CW", "market_cap": 7375329802.679999, "weight": 0.00038675779485271495}, {"ticker": "HNI", "market_cap": 1611053345.02, "weight": 8.448265444124437e-05}, {"ticker": "AULT", "market_cap": 2208777.3836, "weight": 1.1582693832772999e-07}, {"ticker": "ESI", "market_cap": 4599191181.39, "weight": 0.0002411787793915454}, {"ticker": "LOGI", "market_cap": 11024425975.8, "weight": 0.0005781141717036237}, {"ticker": "MTX", "market_cap": 1694065114.47, "weight": 8.883574098222016e-05}, {"ticker": "MRK", "market_cap": 257964402040.53998, "weight": 0.013527495848042588}, {"ticker": "ZVSA", "market_cap": 6266261.259400999, "weight": 3.28598917132666e-07}, {"ticker": "NRXS", "market_cap": 17733602.44, "weight": 9.299392919346996e-07}, {"ticker": "SJM", "market_cap": 12213897115.75, "weight": 0.0006404893125360841}, {"ticker": "PLUG", "market_cap": 3864662018.34, "weight": 0.00020266051824843021}, {"ticker": "KLAC", "market_cap": 62427452379.6, "weight": 0.0032736575131641667}, {"ticker": "SKYX", "market_cap": 118489606.32000001, "weight": 6.213522659913769e-06}, {"ticker": "RIBT", "market_cap": 2845308.3456, "weight": 1.4920623360061946e-07}, {"ticker": "MNTX", "market_cap": 96400057.88, "weight": 5.055160217485469e-06}, {"ticker": "RNAZ", "market_cap": 1488045.762, "weight": 7.803221183979077e-08}, {"ticker": "CRSP", "market_cap": 3263413537.75, "weight": 0.0001711314147733509}, {"ticker": "CELH", "market_cap": 12025787902.800001, "weight": 0.0006306249801823519}, {"ticker": "PFIN", "market_cap": 21116960.39, "weight": 1.107360518503295e-06}, {"ticker": "SNES", "market_cap": 1327493.418515, "weight": 6.961294490719466e-08}, {"ticker": "MTSI", "market_cap": 5729858893.41, "weight": 0.00030047030434180843}, {"ticker": "XNCR", "market_cap": 1167410925.3600001, "weight": 6.121831663922826e-05}, {"ticker": "WDFC", "market_cap": 2733862868.22, "weight": 0.0001433621007643991}, {"ticker": "JVA", "market_cap": 4852309.149999999, "weight": 2.544521312275039e-07}, {"ticker": "DAR", "market_cap": 7710597229.5, "weight": 0.0004043390141543562}, {"ticker": "NVRO", "market_cap": 642576970.38, "weight": 3.369634426341192e-05}, {"ticker": "WINT", "market_cap": 4892352.5157, "weight": 2.565519808926654e-07}, {"ticker": "ZVRA", "market_cap": 167298100.20000002, "weight": 8.773010298859978e-06}, {"ticker": "PCRX", "market_cap": 1332864872.875, "weight": 6.989462069648217e-05}, {"ticker": "GEOS", "market_cap": 154964745.75, "weight": 8.126256716601781e-06}, {"ticker": "EMN", "market_cap": 8999565767.94, "weight": 0.00047193173785607234}, {"ticker": "FIXX", "market_cap": 61857858.81, "weight": 3.2437883739074063e-06}, {"ticker": "AMGN", "market_cap": 141722388846.6586, "weight": 0.007431835600311104}, {"ticker": "ROK", "market_cap": 33015384557.04, "weight": 0.0017313066220923802}, {"ticker": "PPG", "market_cap": 31193696982.449997, "weight": 0.0016357784371693134}, {"ticker": "RMGC", "market_cap": 134098707.9, "weight": 7.03205442299766e-06}, {"ticker": "LGL", "market_cap": 23552922.8, "weight": 1.235100901000273e-06}, {"ticker": "CNHI", "market_cap": 15380346033.8846, "weight": 0.000806535961819008}, {"ticker": "ITT", "market_cap": 7887346999.999999, "weight": 0.00041360766427688537}, {"ticker": "PTIX", "market_cap": 4893983.67, "weight": 2.566375176289213e-07}, {"ticker": "NEU", "market_cap": 4348671940.305, "weight": 0.00022804170324140457}, {"ticker": "NRGV", "market_cap": 315713169.98, "weight": 1.6555806003828553e-05}, {"ticker": "MICS", "market_cap": 4599660.284100001, "weight": 2.4120337885143846e-07}, {"ticker": "XOM", "market_cap": 440728822407.5028, "weight": 0.02311155053980375}, {"ticker": "CDMO", "market_cap": 594208273.6099999, "weight": 3.115991931657534e-05}, {"ticker": "GERN", "market_cap": 942067215.0, "weight": 4.940142995965316e-05}, {"ticker": "WHD", "market_cap": 3029539361.2200003, "weight": 0.00015886719565261827}, {"ticker": "DXR", "market_cap": 44089334.8, "weight": 2.31201781614903e-06}, {"ticker": "RSLS", "market_cap": 1021924.3119999999, "weight": 5.3589087402149686e-08}, {"ticker": "COLM", "market_cap": 4331142537.4800005, "weight": 0.00022712247205268967}, {"ticker": "PLXS", "market_cap": 2555746485.0, "weight": 0.00013402178630466112}, {"ticker": "AEHR", "market_cap": 1287696945.92, "weight": 6.752604216581952e-05}, {"ticker": "USNA", "market_cap": 1122974651.4, "weight": 5.888810554521104e-05}, {"ticker": "SOFO", "market_cap": 7441427.68, "weight": 3.9022392721027266e-07}, {"ticker": "CFRX", "market_cap": 3010600.5288, "weight": 1.5787405483589403e-07}, {"ticker": "AKLI", "market_cap": 43758558.2235, "weight": 2.294672094298112e-06}, {"ticker": "EQRX", "market_cap": 1065164060.205, "weight": 5.5856553415625536e-05}, {"ticker": "MOV", "market_cap": 621200601.45, "weight": 3.257538051934712e-05}, {"ticker": "NBY", "market_cap": 1894499.5590000001, "weight": 9.93464009598639e-08}, {"ticker": "TOVX", "market_cap": 8843490.7585, "weight": 4.6374725958898565e-07}, {"ticker": "HPCO", "market_cap": 9996832.865600001, "weight": 5.24227815982639e-07}, {"ticker": "RKLB", "market_cap": 2071054540.99, "weight": 0.0001086048364917774}, {"ticker": "BMY", "market_cap": 117846295773.60999, "weight": 0.006179787847371977}, {"ticker": "CYCC", "market_cap": 4613365.7478, "weight": 2.419220850055849e-07}, {"ticker": "PROK", "market_cap": 284854818.375, "weight": 1.4937612873644354e-05}, {"ticker": "SEER", "market_cap": 134273939.1, "weight": 7.041243440209713e-06}, {"ticker": "RVPH", "market_cap": 125935478.96, "weight": 6.603979678114383e-06}, {"ticker": "ALG", "market_cap": 2097639413.8, "weight": 0.00010999893100138147}, {"ticker": "FGI", "market_cap": 13775000.0, "weight": 7.223525952914329e-07}, {"ticker": "CABA", "market_cap": 571998309.8399999, "weight": 2.999524236771231e-05}, {"ticker": "QUAD", "market_cap": 256281687.325, "weight": 1.34392553150549e-05}, {"ticker": "STXS", "market_cap": 121706761.39999999, "weight": 6.3822283093869456e-06}, {"ticker": "WIRE", "market_cap": 2931044290.0299997, "weight": 0.0001537021742154124}, {"ticker": "PRME", "market_cap": 840674678.4000001, "weight": 4.4084467204212756e-05}, {"ticker": "POWL", "market_cap": 980158579.12, "weight": 5.139891785295791e-05}, {"ticker": "OLED", "market_cap": 7360473520.440001, "weight": 0.0003859787404764939}, {"ticker": "WWW", "market_cap": 642081194.425, "weight": 3.3670346074825536e-05}, {"ticker": "NOVT", "market_cap": 5037157640.429999, "weight": 0.00026414547328179166}, {"ticker": "MNST", "market_cap": 54389770229.8125, "weight": 0.0028521663653582412}, {"ticker": "MKC.V", "market_cap": 18260156202.936, "weight": 0.0009575514499904011}, {"ticker": "FGEN", "market_cap": 73156754.1432, "weight": 3.836295551247753e-06}, {"ticker": "SWBI", "market_cap": 608467326.4350001, "weight": 3.190765534666873e-05}, {"ticker": "CLDI", "market_cap": 98742938.25, "weight": 5.178019434598127e-06}, {"ticker": "ERAS", "market_cap": 280940199.48, "weight": 1.4732332647264672e-05}, {"ticker": "BBIO", "market_cap": 3866843096.2000003, "weight": 0.000202774892640641}, {"ticker": "MX", "market_cap": 332543461.74, "weight": 1.7438376234852e-05}, {"ticker": "TRDA", "market_cap": 515707661.0, "weight": 2.7043395087842066e-05}, {"ticker": "AXDX", "market_cap": 91523975.27, "weight": 4.799461420520756e-06}, {"ticker": "GPK", "market_cap": 6695664071.925, "weight": 0.0003511165386246553}, {"ticker": "AVY", "market_cap": 14725707450.640001, "weight": 0.0007722071139362755}, {"ticker": "LFCR", "market_cap": 209542300.0, "weight": 1.0988270361403703e-05}, {"ticker": "BF.B", "market_cap": 27516963097.399998, "weight": 0.0014429727555677293}, {"ticker": "SITM", "market_cap": 2514195319.2000003, "weight": 0.00013184286852222814}, {"ticker": "VSTM", "market_cap": 187360275.62, "weight": 9.825058537105276e-06}, {"ticker": "FGH", "market_cap": 32010344.24, "weight": 1.6786029210842953e-06}, {"ticker": "EVOK", "market_cap": 4446283.100000001, "weight": 2.3316037289912434e-07}, {"ticker": "SPRU", "market_cap": 91245830.5161, "weight": 4.784875679334088e-06}, {"ticker": "LAZR", "market_cap": 1666921874.1, "weight": 8.741236601845328e-05}, {"ticker": "MLKN", "market_cap": 1763286346.2985, "weight": 9.246566014451322e-05}, {"ticker": "XAIR", "market_cap": 68655001.305, "weight": 3.6002263791218486e-06}, {"ticker": "SBEV", "market_cap": 25985984.426, "weight": 1.3626891681541818e-06}, {"ticker": "FRPT", "market_cap": 2914839033.6, "weight": 0.0001528523804557337}, {"ticker": "BCTX", "market_cap": 92134650.39, "weight": 4.831484851214905e-06}, {"ticker": "AURA", "market_cap": 327731100.84, "weight": 1.718601896548038e-05}, {"ticker": "TMBR", "market_cap": 9817622.1, "weight": 5.148301127786226e-07}, {"ticker": "NWL", "market_cap": 3274251000.0, "weight": 0.00017169972468134804}, {"ticker": "BCAB", "market_cap": 75046410.08940001, "weight": 3.935387956107678e-06}, {"ticker": "MIRM", "market_cap": 1106045518.0, "weight": 5.8000352118893444e-05}, {"ticker": "AIP", "market_cap": 226543451.44, "weight": 1.1879800369797654e-05}, {"ticker": "PEN", "market_cap": 8757793664.55, "weight": 0.0004592533562696595}, {"ticker": "MTW", "market_cap": 499047151.04, "weight": 2.6169728110819578e-05}, {"ticker": "ASTC", "market_cap": 16806037.14, "weight": 8.812983335494163e-07}, {"ticker": "JBL", "market_cap": 17006731324.98, "weight": 0.0008918226141577793}, {"ticker": "AVGO", "market_cap": 338762983295.6, "weight": 0.017764524150435206}, {"ticker": "VINC", "market_cap": 21380570.0, "weight": 1.121184045612352e-06}, {"ticker": "PANW", "market_cap": 72575834439.0072, "weight": 0.0038058324764034994}, {"ticker": "WHR", "market_cap": 6998036773.5199995, "weight": 0.0003669727786059569}, {"ticker": "CLIR", "market_cap": 38947706.86, "weight": 2.0423939840995237e-06}, {"ticker": "AMTI", "market_cap": 6933908.902547, "weight": 3.63609952179252e-07}, {"ticker": "IBIO", "market_cap": 7589045.8749, "weight": 3.9796493528274103e-07}, {"ticker": "OPXS", "market_cap": 26071634.85, "weight": 1.3671806241298053e-06}, {"ticker": "BTTR", "market_cap": 5094486.302399999, "weight": 2.6715175333686353e-07}, {"ticker": "MIMO", "market_cap": 12507567.758399999, "weight": 6.558892218558031e-07}, {"ticker": "PETV", "market_cap": 26419526.9513, "weight": 1.3854238736583312e-06}, {"ticker": "SNBR", "market_cap": 463161900.00000006, "weight": 2.4287927441387377e-05}, {"ticker": "CROX", "market_cap": 5229590627.429999, "weight": 0.0002742365417085889}, {"ticker": "AMD", "market_cap": 165976305196.02, "weight": 0.008703696175334154}, {"ticker": "POCI", "market_cap": 36399108.0, "weight": 1.908747014888795e-06}, {"ticker": "SMP", "market_cap": 723474701.0999999, "weight": 3.793857190325071e-05}, {"ticker": "KE", "market_cap": 671812801.92, "weight": 3.522945343135545e-05}, {"ticker": "NSSC", "market_cap": 820340864.0699999, "weight": 4.3018174387265405e-05}, {"ticker": "CASA", "market_cap": 77737066.4, "weight": 4.076484331352627e-06}, {"ticker": "TIO", "market_cap": 198631516.5592, "weight": 1.0416115534897374e-05}, {"ticker": "CSWI", "market_cap": 2717605121.625, "weight": 0.00014250955445249428}, {"ticker": "ARWR", "market_cap": 2549047185.78, "weight": 0.0001336704791410894}, {"ticker": "CODA", "market_cap": 67593362.06099999, "weight": 3.5445546649173733e-06}, {"ticker": "HBB", "market_cap": 167208003.45, "weight": 8.768285680261804e-06}, {"ticker": "FLNC", "market_cap": 2431765302.12, "weight": 0.00012752028872058346}, {"ticker": "CCK", "market_cap": 10525450951.56, "weight": 0.0005519482258781886}, {"ticker": "WVVI", "market_cap": 28670154.975, "weight": 1.5034454340180644e-06}, {"ticker": "ENOV", "market_cap": 2711985389.1, "weight": 0.00014221485910771915}, {"ticker": "PH", "market_cap": 49117361319.3739, "weight": 0.002575684459013922}, {"ticker": "MKUL", "market_cap": 4539734.129, "weight": 2.380608878414695e-07}, {"ticker": "GGG", "market_cap": 12518984994.24, "weight": 0.0006564879347371156}, {"ticker": "CBUS", "market_cap": 328836138.8, "weight": 1.724396648187251e-05}, {"ticker": "RXST", "market_cap": 935111656.215, "weight": 4.903668470084758e-05}, {"ticker": "COEP", "market_cap": 33803601.76, "weight": 1.7726402512910377e-06}, {"ticker": "RZLT", "market_cap": 41246875.04000001, "weight": 2.1629609606392326e-06}, {"ticker": "B", "market_cap": 1673719462.38, "weight": 8.776882740036115e-05}, {"ticker": "VIEW", "market_cap": 27483471.599999998, "weight": 1.4412164818786487e-06}, {"ticker": "IFF", "market_cap": 16639917319.949999, "weight": 0.0008725871115427039}, {"ticker": "HOLX", "market_cap": 16905902430.619999, "weight": 0.0008865352084575026}, {"ticker": "CRWS", "market_cap": 47115984.48, "weight": 2.4707334786815875e-06}, {"ticker": "UG", "market_cap": 33584471.89, "weight": 1.7611492146086152e-06}, {"ticker": "NBIX", "market_cap": 10796454872.0, "weight": 0.0005661595061151386}, {"ticker": "MEIP", "market_cap": 45567945.3087, "weight": 2.389555249062615e-06}, {"ticker": "SWAV", "market_cap": 7032923473.89, "weight": 0.00036880221588751224}, {"ticker": "CPRX", "market_cap": 1283257598.28, "weight": 6.729324548421117e-05}, {"ticker": "KTB", "market_cap": 2432428288.84, "weight": 0.00012755505533966412}, {"ticker": "MIND", "market_cap": 6480706.859999999, "weight": 3.3984431358577075e-07}, {"ticker": "ASRT", "market_cap": 233031390.67000002, "weight": 1.2220023944453452e-05}, {"ticker": "ELSE", "market_cap": 13163600.639999999, "weight": 6.902911858935728e-07}, {"ticker": "MAMA", "market_cap": 160257696.36, "weight": 8.403815817137744e-06}, {"ticker": "LTRN", "market_cap": 35684145.224, "weight": 1.871254803144304e-06}, {"ticker": "FMC", "market_cap": 8085689252.7795, "weight": 0.0004240086109956674}, {"ticker": "PRSO", "market_cap": 4835128.228800001, "weight": 2.535511742025807e-07}, {"ticker": "AGLE", "market_cap": 41650997.63999999, "weight": 2.1841529032109863e-06}, {"ticker": "AIMD", "market_cap": 13393131.84, "weight": 7.023276619749055e-07}, {"ticker": "SOLO", "market_cap": 68045412.69, "weight": 3.568259924086976e-06}, {"ticker": "PLAG", "market_cap": 49131043.488, "weight": 2.576401943588606e-06}, {"ticker": "OTLK", "market_cap": 61300713.75435, "weight": 3.2145720271268207e-06}, {"ticker": "ELOX", "market_cap": 14802481.76, "weight": 7.76233111875869e-07}, {"ticker": "INMB", "market_cap": 119483817.96, "weight": 6.265658511704908e-06}, {"ticker": "ELMD", "market_cap": 89320615.12, "weight": 4.6839185586177275e-06}, {"ticker": "NSTG", "market_cap": 63758582.55, "weight": 3.343461167121275e-06}, {"ticker": "JOUT", "market_cap": 543402806.49, "weight": 2.8495711619361146e-05}, {"ticker": "LIPO", "market_cap": 6318339.500000001, "weight": 3.3132986829454627e-07}, {"ticker": "TACT", "market_cap": 62337818.68, "weight": 3.2689571766464437e-06}, {"ticker": "BRKR", "market_cap": 9137200006.44, "weight": 0.0004791491933465576}, {"ticker": "SPRO", "market_cap": 60887313.795, "weight": 3.1928935854912603e-06}, {"ticker": "FFIV", "market_cap": 9190716372.31, "weight": 0.0004819555589201881}, {"ticker": "APD", "market_cap": 63119127462.93, "weight": 0.0033099285325138466}, {"ticker": "CUE", "market_cap": 98686207.86, "weight": 5.175044527560131e-06}, {"ticker": "SLS", "market_cap": 41164014.632, "weight": 2.1586158114003423e-06}, {"ticker": "SMAP", "market_cap": 55427051.36, "weight": 2.9065607549363005e-06}, {"ticker": "DSS", "market_cap": 25584199.2, "weight": 1.3416197960488567e-06}, {"ticker": "TTOO", "market_cap": 69210513.31478, "weight": 3.629357089973401e-06}, {"ticker": "LEXX", "market_cap": 8068993.38, "weight": 4.2313308961396663e-07}, {"ticker": "BTCY", "market_cap": 18073827.45, "weight": 9.477804838734693e-07}, {"ticker": "CVU", "market_cap": 38549694.199999996, "weight": 2.021522443053437e-06}, {"ticker": "EOLS", "market_cap": 479130844.83, "weight": 2.512532916494572e-05}, {"ticker": "FBRX", "market_cap": 23220334.080000002, "weight": 1.2176601514498808e-06}, {"ticker": "SMPL", "market_cap": 3347832500.07, "weight": 0.00017555829364984178}, {"ticker": "ORGS", "market_cap": 19803424.55, "weight": 1.0384795004973196e-06}, {"ticker": "SABS", "market_cap": 35681664.392000005, "weight": 1.8711247098278844e-06}, {"ticker": "ARDX", "market_cap": 859469223.3449999, "weight": 4.507004167378387e-05}, {"ticker": "HRMY", "market_cap": 1925104652.325, "weight": 0.00010095131338036844}, {"ticker": "TPX", "market_cap": 7113523025.36, "weight": 0.00037302880718941277}, {"ticker": "UAA", "market_cap": 2948146768.42, "weight": 0.0001545990177472405}, {"ticker": "ETN", "market_cap": 83167560000.0, "weight": 0.0043612561023634085}, {"ticker": "RMTI", "market_cap": 57121774.315, "weight": 2.9954309926745376e-06}, {"ticker": "CSLR", "market_cap": 80617184.34, "weight": 4.227515958844781e-06}, {"ticker": "EVTV", "market_cap": 21903827.599999998, "weight": 1.1486233548948178e-06}, {"ticker": "MHK", "market_cap": 5188185249.32, "weight": 0.0002720652689436683}, {"ticker": "EMKR", "market_cap": 35002777.968, "weight": 1.835524319970569e-06}, {"ticker": "SVRA", "market_cap": 487300254.805, "weight": 2.5553728039533087e-05}, {"ticker": "EAR", "market_cap": 43989107.480000004, "weight": 2.3067619566411456e-06}, {"ticker": "TELA", "market_cap": 177044270.73000002, "weight": 9.284093534903418e-06}, {"ticker": "FN", "market_cap": 6094900543.2699995, "weight": 0.00031961286573315773}, {"ticker": "INTT", "market_cap": 176404686.56, "weight": 9.250554131265899e-06}, {"ticker": "WRK", "market_cap": 9242043143.265001, "weight": 0.0004846471034724403}, {"ticker": "RGR", "market_cap": 921047783.54, "weight": 4.829918379873255e-05}, {"ticker": "CMCO", "market_cap": 991281977.3499999, "weight": 5.198222206928463e-05}, {"ticker": "MOG.B", "market_cap": 3595596440.16, "weight": 0.00018855088349693016}, {"ticker": "VLO", "market_cap": 45366981093.6, "weight": 0.0023790168082395155}, {"ticker": "IPGP", "market_cap": 4669797365.8875, "weight": 0.0002448813246267827}, {"ticker": "LIN", "market_cap": 183577432683.40002, "weight": 0.009626688561582018}, {"ticker": "WMS", "market_cap": 9019310629.14, "weight": 0.00047296714633022753}, {"ticker": "IDYA", "market_cap": 1465170301.4699998, "weight": 7.683263664688098e-05}, {"ticker": "COTY", "market_cap": 9190589617.98, "weight": 0.00048194891200046105}, {"ticker": "CVV", "market_cap": 46642151.714999996, "weight": 2.445885977590345e-06}, {"ticker": "STRR", "market_cap": 15291377.867999999, "weight": 8.018705254832505e-07}, {"ticker": "AMTX", "market_cap": 153254330.355, "weight": 8.036563576884563e-06}, {"ticker": "BIOL", "market_cap": 1910066.1600000001, "weight": 1.0016270401846397e-07}, {"ticker": "CRMD", "market_cap": 188553424.48, "weight": 9.887626535333225e-06}, {"ticker": "SIBN", "market_cap": 826654081.2750001, "weight": 4.334923564553549e-05}, {"ticker": "TRVI", "market_cap": 130894031.35, "weight": 6.864003140024005e-06}, {"ticker": "BLCO", "market_cap": 5814623011.079999, "weight": 0.00030491528295425936}, {"ticker": "ELTX", "market_cap": 62913427.5, "weight": 3.299141751964022e-06}, {"ticker": "AVIR", "market_cap": 251032124.76999998, "weight": 1.3163971457650255e-05}, {"ticker": "SBFM", "market_cap": 8117809.0206, "weight": 4.256929520225492e-07}, {"ticker": "ADI", "market_cap": 86225755376.45999, "weight": 0.0045216260019709685}, {"ticker": "UI", "market_cap": 8176041472.039999, "weight": 0.00042874662624598766}, {"ticker": "ITP", "market_cap": 4026368.0, "weight": 2.1114028126303998e-07}, {"ticker": "BCPC", "market_cap": 3954852463.23, "weight": 0.0002073900501494669}, {"ticker": "SHPH", "market_cap": 7866582.5, "weight": 4.125187865661828e-07}, {"ticker": "PRLD", "market_cap": 145243094.75, "weight": 7.616459269751142e-06}, {"ticker": "AADI", "market_cap": 99795830.2, "weight": 5.233232446042334e-06}, {"ticker": "AGRX", "market_cap": 3891550.2, "weight": 2.0407051808906676e-07}, {"ticker": "SCKT", "market_cap": 8202255.040000001, "weight": 4.301212497558066e-07}, {"ticker": "TREX", "market_cap": 6421503993.45, "weight": 0.000336739751386055}, {"ticker": "SYM", "market_cap": 2534923317.3, "weight": 0.00013292983209556612}, {"ticker": "DOW", "market_cap": 35744310477.880005, "weight": 0.0018744098323484123}, {"ticker": "APTV", "market_cap": 27096037189.282, "weight": 0.001420899657770674}, {"ticker": "XRX", "market_cap": 2429861233.02, "weight": 0.00012742044049873235}, {"ticker": "NAUT", "market_cap": 389909335.779, "weight": 2.044660766811756e-05}, {"ticker": "WLK", "market_cap": 15742566723.84, "weight": 0.0008255305937941469}, {"ticker": "BLFS", "market_cap": 591465224.0, "weight": 3.1016075468677215e-05}, {"ticker": "LQDA", "market_cap": 413048192.48, "weight": 2.1659995195525466e-05}, {"ticker": "LHC", "market_cap": 153042075.08, "weight": 8.02543303976946e-06}, {"ticker": "ULBI", "market_cap": 164333301.275, "weight": 8.617538052181865e-06}, {"ticker": "KITT", "market_cap": 93165116.66000001, "weight": 4.885521873682767e-06}, {"ticker": "JNPR", "market_cap": 8696004847.199999, "weight": 0.0004560131883877894}, {"ticker": "EYPT", "market_cap": 279522511.56, "weight": 1.4657989957731074e-05}, {"ticker": "ATOS", "market_cap": 90980309.3748, "weight": 4.770951912689964e-06}, {"ticker": "ITGR", "market_cap": 2582042361.6, "weight": 0.00013540072602934158}, {"ticker": "VIGL", "market_cap": 195868878.66, "weight": 1.0271244489065244e-05}, {"ticker": "PAHC", "market_cap": 505079991.76000005, "weight": 2.6486086597285776e-05}, {"ticker": "EFOI", "market_cap": 6920163.36, "weight": 3.6288914431482267e-07}, {"ticker": "IRDM", "market_cap": 5576634271.889999, "weight": 0.0002924352986781046}, {"ticker": "TSN", "market_cap": 17130897229.38, "weight": 0.0008983337984256594}, {"ticker": "RGF", "market_cap": 37982115.96, "weight": 1.9917589864512634e-06}, {"ticker": "SUP", "market_cap": 76408716.80000001, "weight": 4.006826488810753e-06}, {"ticker": "MYGN", "market_cap": 1271649605.78, "weight": 6.668452944003706e-05}, {"ticker": "BBLG", "market_cap": 1770930.9149999998, "weight": 9.286653666294604e-08}, {"ticker": "ABBV", "market_cap": 259020600290.0, "weight": 0.013582882239813165}, {"ticker": "PG", "market_cap": 343093016054.57, "weight": 0.017991588426379955}, {"ticker": "ORGO", "market_cap": 374238778.2, "weight": 1.9624853189943005e-05}, {"ticker": "AEIS", "market_cap": 3733854033.48, "weight": 0.0001958010273338412}, {"ticker": "ALZN", "market_cap": 21753363.8256, "weight": 1.1407331263695775e-06}, {"ticker": "UAN", "market_cap": 845677713.3337, "weight": 4.4346823303573325e-05}, {"ticker": "DRS", "market_cap": 4244400000.0, "weight": 0.0002225737463125196}, {"ticker": "FSI", "market_cap": 31586251.28, "weight": 1.6563637450188997e-06}, {"ticker": "CPSH", "market_cap": 39630165.12, "weight": 2.0781816788573516e-06}, {"ticker": "ARTW", "market_cap": 11592903.63, "weight": 6.07924793037675e-07}, {"ticker": "INSP", "market_cap": 5408482045.815001, "weight": 0.00028361749853949794}, {"ticker": "DTIL", "market_cap": 37150631.483967, "weight": 1.9481564478518457e-06}, {"ticker": "SIF", "market_cap": 22718590.560000002, "weight": 1.1913490273959672e-06}, {"ticker": "NSPR", "market_cap": 69943839.89999999, "weight": 3.667812288668854e-06}, {"ticker": "BMRA", "market_cap": 13457316.8, "weight": 7.05693482115354e-07}, {"ticker": "MTEX", "market_cap": 19767738.599999998, "weight": 1.0366081510528229e-06}, {"ticker": "MATW", "market_cap": 1143756031.48, "weight": 5.997786843700964e-05}, {"ticker": "MINM", "market_cap": 2944554.6, "weight": 1.544106466270292e-07}, {"ticker": "MOS", "market_cap": 11084861100.24, "weight": 0.0005812833527552386}, {"ticker": "ZBRA", "market_cap": 11753918437.8, "weight": 0.0006163683113167807}, {"ticker": "GTX", "market_cap": 1920301624.36, "weight": 0.0001006994455244138}, {"ticker": "INBX", "market_cap": 778603167.9899999, "weight": 4.082947507075919e-05}, {"ticker": "VIRC", "market_cap": 110344369.5, "weight": 5.7863914108255405e-06}, {"ticker": "TDG", "market_cap": 45233084420.4, "weight": 0.002371995348392916}, {"ticker": "TPIC", "market_cap": 101313951.06, "weight": 5.312841777671159e-06}, {"ticker": "AVTE", "market_cap": 370499628.40000004, "weight": 1.9428774455844026e-05}, {"ticker": "BKSY", "market_cap": 157722985.28, "weight": 8.270897114636695e-06}, {"ticker": "DHR", "market_cap": 159092730003.58, "weight": 0.008342725692202194}, {"ticker": "MKC", "market_cap": 18281085671.34, "weight": 0.0009586489785435553}, {"ticker": "GEF", "market_cap": 3794806432.32, "weight": 0.00019899733393938113}, {"ticker": "FF", "market_cap": 301528744.27, "weight": 1.5811983374112613e-05}, {"ticker": "IKT", "market_cap": 5401809.26, "weight": 2.832675817227074e-07}, {"ticker": "UTSI", "market_cap": 32826358.4, "weight": 1.7213942057500345e-06}, {"ticker": "VTVT", "market_cap": 40725503.28, "weight": 2.1356205436557357e-06}, {"ticker": "IEX", "market_cap": 15616279096.16, "weight": 0.0008189081476520165}, {"ticker": "FARM", "market_cap": 49059890.410000004, "weight": 2.5726707195917806e-06}, {"ticker": "ALNT", "market_cap": 480712850.7, "weight": 2.5208288587520004e-05}, {"ticker": "BCEL", "market_cap": 9823915.25, "weight": 5.151601217249064e-07}, {"ticker": "INDP", "market_cap": 22514805.96, "weight": 1.1806626873095478e-06}, {"ticker": "AOS", "market_cap": 9882715731.9, "weight": 0.000518243583119088}, {"ticker": "PSTV", "market_cap": 3502769.7679999997, "weight": 1.8368310944632812e-07}, {"ticker": "BC", "market_cap": 5313329781.049999, "weight": 0.00027862777183163174}, {"ticker": "BHC", "market_cap": 2887349042.2, "weight": 0.00015141082207952106}, {"ticker": "GNSS", "market_cap": 84362142.0, "weight": 4.42389925357854e-06}, {"ticker": "NUBI", "market_cap": 77295888.28, "weight": 4.053349219921208e-06}, {"ticker": "IRMD", "market_cap": 540150564.78, "weight": 2.8325166048418597e-05}, {"ticker": "SONO", "market_cap": 1601944380.93, "weight": 8.4004985922128e-05}, {"ticker": "GKOS", "market_cap": 3350008839.32, "weight": 0.0001756724195522354}, {"ticker": "KA", "market_cap": 33410311.74, "weight": 1.752016362605069e-06}, {"ticker": "TXMD", "market_cap": 29187662.4, "weight": 1.5305832076319543e-06}, {"ticker": "LLAP", "market_cap": 157715773.8822, "weight": 8.27051895333604e-06}, {"ticker": "JELD", "market_cap": 1100629257.16, "weight": 5.771632670513306e-05}, {"ticker": "PRM", "market_cap": 622718956.99, "weight": 3.265500215745195e-05}, {"ticker": "MLR", "market_cap": 449012457.2, "weight": 2.354593929412729e-05}, {"ticker": "GLUE", "market_cap": 209562406.35999998, "weight": 1.0989324726654364e-05}, {"ticker": "TLIS", "market_cap": 10059280.14, "weight": 5.275025129504587e-07}, {"ticker": "NVDA", "market_cap": 1078994799999.9999, "weight": 0.056581828971757564}, {"ticker": "TPCS", "market_cap": 61729957.080000006, "weight": 3.2370812852244473e-06}, {"ticker": "LPCN", "market_cap": 15203273.799999999, "weight": 7.972504019133389e-07}, {"ticker": "CMTL", "market_cap": 230043742.5, "weight": 1.2063353497308827e-05}, {"ticker": "KIDS", "market_cap": 701715459.8000001, "weight": 3.67975305657097e-05}, {"ticker": "CIEN", "market_cap": 6685431293.099999, "weight": 0.00035057993794652227}, {"ticker": "IRON", "market_cap": 1019194941.5999999, "weight": 5.344596088367769e-05}, {"ticker": "MODD", "market_cap": 23204717.8, "weight": 1.216841243254832e-06}, {"ticker": "LYRA", "market_cap": 191741313.33, "weight": 1.0054797481561765e-05}, {"ticker": "COHU", "market_cap": 1625260001.65, "weight": 8.522764284684108e-05}, {"ticker": "HXL", "market_cap": 5589940092.18, "weight": 0.00029313304777567003}, {"ticker": "CTLT", "market_cap": 7758895732.639999, "weight": 0.00040687175819006363}, {"ticker": "DTI", "market_cap": 115502043.84, "weight": 6.056856706300461e-06}, {"ticker": "CYRX", "market_cap": 614653651.35, "weight": 3.223206245067354e-05}, {"ticker": "RYAM", "market_cap": 220860752.84, "weight": 1.1581803122467782e-05}, {"ticker": "AMCR", "market_cap": 13039634053.485, "weight": 0.00068379045373397}, {"ticker": "COGT", "market_cap": 798672751.9050001, "weight": 4.188191180596207e-05}, {"ticker": "NKTX", "market_cap": 64756868.88, "weight": 3.3958106931698745e-06}, {"ticker": "LINK", "market_cap": 63050442.654999994, "weight": 3.3063267430934956e-06}, {"ticker": "MMM", "market_cap": 48475975202.6, "weight": 0.002542050562387024}, {"ticker": "MODG", "market_cap": 2484444777.93, "weight": 0.0001302827682900895}, {"ticker": "HAYW", "market_cap": 2809959485.13, "weight": 0.00014735256092540355}, {"ticker": "EAF", "market_cap": 878283018.0, "weight": 4.6056625586402336e-05}, {"ticker": "XPON", "market_cap": 32747814.647899996, "weight": 1.7172754193127669e-06}, {"ticker": "NTRB", "market_cap": 18682062.75, "weight": 9.796759718954558e-07}, {"ticker": "LW", "market_cap": 13130587062.78, "weight": 0.0006885599740471322}, {"ticker": "MCFT", "market_cap": 382416376.68, "weight": 2.005368146473642e-05}, {"ticker": "VAPO", "market_cap": 14295603.16, "weight": 7.496527073598845e-07}, {"ticker": "TIL", "market_cap": 51693433.1478, "weight": 2.710772093926498e-06}, {"ticker": "NVTS", "market_cap": 1158711479.54, "weight": 6.0762123008326315e-05}, {"ticker": "AVTR", "market_cap": 13822531893.5, "weight": 0.0007248451387853596}, {"ticker": "GNRC", "market_cap": 6275296613.139999, "weight": 0.0003290727255698887}, {"ticker": "WOR", "market_cap": 2999227770.0, "weight": 0.0001572776743034219}, {"ticker": "ENTA", "market_cap": 213501674.88000003, "weight": 1.1195897564329273e-05}, {"ticker": "LAB", "market_cap": 163686071.733, "weight": 8.58359772990143e-06}, {"ticker": "AGEN", "market_cap": 381470047.93499994, "weight": 2.0004056562743703e-05}, {"ticker": "ZBH", "market_cap": 22797987019.399998, "weight": 0.0011955125292837738}, {"ticker": "PAVM", "market_cap": 31609479.232300002, "weight": 1.6575818046651583e-06}, {"ticker": "UFPT", "market_cap": 1248945762.0, "weight": 6.549395372478665e-05}, {"ticker": "CAG", "market_cap": 12641965797.175, "weight": 0.0006629369730072514}, {"ticker": "PCAR", "market_cap": 45039658934.25, "weight": 0.002361852233916258}, {"ticker": "KTRA", "market_cap": 6484238.2632, "weight": 3.4002949821492073e-07}, {"ticker": "MYO", "market_cap": 27577109.470200002, "weight": 1.4461267946595225e-06}, {"ticker": "KDP", "market_cap": 44139423940.56, "weight": 0.0023146444601184987}, {"ticker": "VIRI", "market_cap": 15782898.34, "weight": 8.27645559137557e-07}, {"ticker": "VITL", "market_cap": 458149113.84, "weight": 2.402505999366926e-05}, {"ticker": "SVFD", "market_cap": 4855263.6321, "weight": 2.5460706246617375e-07}, {"ticker": "ORMP", "market_cap": 94849245.24, "weight": 4.973836548860079e-06}, {"ticker": "LEG", "market_cap": 3237957808.7999997, "weight": 0.00016979653187882692}, {"ticker": "KTTA", "market_cap": 8457066.1272, "weight": 4.434833876975816e-07}, {"ticker": "NATR", "market_cap": 313886109.20170003, "weight": 1.645999605138135e-05}, {"ticker": "ARQT", "market_cap": 275285011.77, "weight": 1.4435778054220844e-05}, {"ticker": "MASS", "market_cap": 199825257.12, "weight": 1.0478714561554255e-05}, {"ticker": "WKSP", "market_cap": 35047978.05, "weight": 1.837894584692172e-06}, {"ticker": "TNYA", "market_cap": 143874134.96, "weight": 7.544671853623657e-06}, {"ticker": "MDT", "market_cap": 101013986437.5887, "weight": 0.00529711181589298}, {"ticker": "EVLO", "market_cap": 67052834.96, "weight": 3.516209753539319e-06}, {"ticker": "AIN", "market_cap": 2640144000.0, "weight": 0.00013844754049677712}, {"ticker": "PLX", "market_cap": 113097603.96000001, "weight": 5.930769346043458e-06}, {"ticker": "DRMA", "market_cap": 3080925.7473999998, "weight": 1.6156186639089564e-07}, {"ticker": "BURU", "market_cap": 12058100.9625, "weight": 6.323194573174591e-07}, {"ticker": "PKE", "market_cap": 316510797.93, "weight": 1.6597633126860093e-05}, {"ticker": "VTNR", "market_cap": 367798943.5175, "weight": 1.9287152188407493e-05}, {"ticker": "MBRX", "market_cap": 12845319.888700001, "weight": 6.736007374919132e-07}, {"ticker": "LCID", "market_cap": 12508923430.28, "weight": 0.0006559603124620378}, {"ticker": "LYB", "market_cap": 30140614334.79, "weight": 0.0015805554256561685}, {"ticker": "NMRD", "market_cap": 9537380.64804, "weight": 5.001344220249715e-07}, {"ticker": "IIIN", "market_cap": 626409828.765, "weight": 3.284854922137639e-05}, {"ticker": "PALI", "market_cap": 5066299.6496, "weight": 2.656736624618974e-07}, {"ticker": "HSCS", "market_cap": 4564969.64, "weight": 2.393842226410597e-07}, {"ticker": "EFHT", "market_cap": 69961552.32000001, "weight": 3.6687411171665602e-06}, {"ticker": "MLAB", "market_cap": 527418224.905, "weight": 2.765748991391124e-05}, {"ticker": "HEAR", "market_cap": 151456112.5, "weight": 7.94226612973693e-06}, {"ticker": "YMAB", "market_cap": 225516392.64, "weight": 1.1825942032977552e-05}, {"ticker": "TCRT", "market_cap": 25217715.364, "weight": 1.3224016072962642e-06}, {"ticker": "MITK", "market_cap": 491455618.5, "weight": 2.5771632776336213e-05}, {"ticker": "ADPT", "market_cap": 708761078.2, "weight": 3.716699849577671e-05}, {"ticker": "LQR", "market_cap": 5461429.6904, "weight": 2.8639404071594385e-07}, {"ticker": "GD", "market_cap": 59542393457.97, "weight": 0.0031223667836100372}, {"ticker": "SLRN", "market_cap": 894611854.8, "weight": 4.691289982528221e-05}, {"ticker": "EBS", "market_cap": 148945202.625, "weight": 7.810595547903962e-06}, {"ticker": "ITI", "market_cap": 177378237.60000002, "weight": 9.301606553798942e-06}, {"ticker": "PBAX", "market_cap": 67833808.02, "weight": 3.557163504301111e-06}, {"ticker": "IMNM", "market_cap": 93288234.82, "weight": 4.891978114873583e-06}, {"ticker": "LEGH", "market_cap": 458805920.76, "weight": 2.4059502547808456e-05}, {"ticker": "WATT", "market_cap": 7526691.435, "weight": 3.9469510649945905e-07}, {"ticker": "COCO", "market_cap": 1527996306.75, "weight": 8.012719403096819e-05}, {"ticker": "CLX", "market_cap": 16303549368.345, "weight": 0.0008549481813928139}, {"ticker": "SMLR", "market_cap": 184957704.36, "weight": 9.699069166140949e-06}, {"ticker": "VYNE", "market_cap": 12267091.540000001, "weight": 6.43278795687592e-07}, {"ticker": "CVCO", "market_cap": 2214590236.8778, "weight": 0.00011613176080695084}, {"ticker": "NUE", "market_cap": 38897710836.659996, "weight": 0.0020397722231402567}, {"ticker": "TDY", "market_cap": 18802541125.62, "weight": 0.0009859937844040295}, {"ticker": "AYI", "market_cap": 5599816687.150001, "weight": 0.00029365097038976963}, {"ticker": "USAP", "market_cap": 111229408.8, "weight": 5.83280233171773e-06}, {"ticker": "DJCO", "market_cap": 401003741.46, "weight": 2.10283915328643e-05}, {"ticker": "JCI", "market_cap": 35322216165.28, "weight": 0.001852275464133213}, {"ticker": "OMGA", "market_cap": 95941329.3, "weight": 5.031104770639926e-06}, {"ticker": "NLS", "market_cap": 27825373.038000003, "weight": 1.4591455846788792e-06}, {"ticker": "ANET", "market_cap": 57715116850.9, "weight": 0.0030265455132338238}, {"ticker": "CGRN", "market_cap": 6423578.784, "weight": 3.3684855213657977e-07}, {"ticker": "TLRY", "market_cap": 1576756024.4, "weight": 8.268412387417364e-05}, {"ticker": "BYND", "market_cap": 545946437.6263, "weight": 2.862909808417206e-05}, {"ticker": "RVLP", "market_cap": 13613818.4546, "weight": 7.139003333943168e-07}, {"ticker": "PWFL", "market_cap": 70948153.49599999, "weight": 3.7204778808690046e-06}, {"ticker": "AVNT", "market_cap": 3154123117.28, "weight": 0.00016540029180659983}, {"ticker": "TARS", "market_cap": 575308437.48, "weight": 3.016882344150541e-05}, {"ticker": "KEYS", "market_cap": 23061621353.940002, "weight": 0.0012093373529326234}, {"ticker": "UTZ", "market_cap": 1052452863.3402, "weight": 5.5189986007672824e-05}, {"ticker": "ACRV", "market_cap": 169740724.04000002, "weight": 8.901100002681737e-06}, {"ticker": "SNPX", "market_cap": 3862521.02, "weight": 2.02548245601794e-07}, {"ticker": "ALGS", "market_cap": 34802065.6, "weight": 1.8249990858557312e-06}, {"ticker": "APYX", "market_cap": 109821020.35, "weight": 5.758947300716933e-06}, {"ticker": "ECOR", "market_cap": 37083214.9314, "weight": 1.944621164968915e-06}, {"ticker": "PCTI", "market_cap": 88503174.6618, "weight": 4.6410524797446246e-06}, {"ticker": "WDC", "market_cap": 14523945760.32, "weight": 0.0007616268539992127}, {"ticker": "SHOO", "market_cap": 2355085947.23, "weight": 0.00012349927013546083}, {"ticker": "CWBR", "market_cap": 8685313.5028, "weight": 4.554525408106937e-07}, {"ticker": "FET", "market_cap": 228014347.47, "weight": 1.195693326015514e-05}, {"ticker": "QTRX", "market_cap": 975803947.21, "weight": 5.117056361254213e-05}, {"ticker": "ADIL", "market_cap": 3361627.5599999996, "weight": 1.7628169817562297e-07}, {"ticker": "ANIK", "market_cap": 273565216.62, "weight": 1.4345593045874411e-05}, {"ticker": "NXGL", "market_cap": 11306687.040000001, "weight": 5.929157696908899e-07}, {"ticker": "OXM", "market_cap": 1483152612.3, "weight": 7.77756180550398e-05}, {"ticker": "LGMK", "market_cap": 2265779.07, "weight": 1.1881607198341263e-07}, {"ticker": "TNDM", "market_cap": 1304807985.25, "weight": 6.842333462811784e-05}, {"ticker": "ENPH", "market_cap": 15840403681.41, "weight": 0.0008306611041546629}, {"ticker": "VNDA", "market_cap": 245849534.32500002, "weight": 1.2892199576831504e-05}, {"ticker": "DYN", "market_cap": 505859828.93999994, "weight": 2.652698078319341e-05}, {"ticker": "INO", "market_cap": 103570725.63815, "weight": 5.431185659595978e-06}, {"ticker": "MNPR", "market_cap": 7856241.460899999, "weight": 4.119765087852829e-07}, {"ticker": "MPX", "market_cap": 470946450.7188, "weight": 2.469614453139848e-05}, {"ticker": "TMPO", "market_cap": 4718333.3444, "weight": 2.474265217261304e-07}, {"ticker": "UFPI", "market_cap": 6210009302.28, "weight": 0.0003256490988229327}, {"ticker": "DYAI", "market_cap": 57622122.0, "weight": 3.0216689199927093e-06}, {"ticker": "HYLN", "market_cap": 200248516.585, "weight": 1.0500910029650402e-05}, {"ticker": "DNTH", "market_cap": 185166187.5, "weight": 9.71000189479819e-06}, {"ticker": "DMK", "market_cap": 5391796.521299999, "weight": 2.827425198144736e-07}, {"ticker": "TWIN", "market_cap": 190869124.76, "weight": 1.0009060445110002e-05}, {"ticker": "IMMR", "market_cap": 213599924.25, "weight": 1.1201049701345986e-05}, {"ticker": "ANAB", "market_cap": 478085859.78000003, "weight": 2.507053078651318e-05}, {"ticker": "MTEM", "market_cap": 34152837.64, "weight": 1.7909539677546958e-06}, {"ticker": "MOG.A", "market_cap": 3554128418.76, "weight": 0.00018637632575610328}, {"ticker": "CBAT", "market_cap": 69990182.737, "weight": 3.670242478765415e-06}, {"ticker": "PTGX", "market_cap": 920483872.0, "weight": 4.826961262164117e-05}, {"ticker": "ALB", "market_cap": 18480943594.75, "weight": 0.0009691294061054261}, {"ticker": "TXN", "market_cap": 142832182900.37, "weight": 0.007490032523355563}, {"ticker": "BG", "market_cap": 15730078050.54, "weight": 0.0008248756953861613}, {"ticker": "THRM", "market_cap": 1803923055.28, "weight": 9.459662436933277e-05}, {"ticker": "PRCT", "market_cap": 1541907299.985, "weight": 8.085667802852781e-05}, {"ticker": "OCUL", "market_cap": 224262608.05, "weight": 1.1760194334064819e-05}, {"ticker": "CDIO", "market_cap": 3420989.8765, "weight": 1.7939462183342963e-07}, {"ticker": "PBI", "market_cap": 611691225.7, "weight": 3.207671465708839e-05}, {"ticker": "VHI", "market_cap": 356152126.87, "weight": 1.8676400229626725e-05}, {"ticker": "NVOS", "market_cap": 72500525.685, "weight": 3.8018833312924095e-06}, {"ticker": "CDXC", "market_cap": 107296284.81, "weight": 5.626551709446987e-06}, {"ticker": "ESAB", "market_cap": 4125958995.43, "weight": 0.00021636277229872185}, {"ticker": "FLUX", "market_cap": 55058733.2881, "weight": 2.887246379972257e-06}, {"ticker": "SLDP", "market_cap": 331806223.98, "weight": 1.739971593653746e-05}, {"ticker": "AEMD", "market_cap": 5088757.2729, "weight": 2.668513265254061e-07}, {"ticker": "SNGX", "market_cap": 5726974.8426, "weight": 3.003190664770131e-07}, {"ticker": "EYE", "market_cap": 1205974668.84, "weight": 6.324057581795283e-05}, {"ticker": "ALVR", "market_cap": 227736224.0, "weight": 1.19423486350832e-05}, {"ticker": "XYL", "market_cap": 21926233331.760002, "weight": 0.0011497982977976304}, {"ticker": "LIQT", "market_cap": 21763778.0, "weight": 1.1412792393209865e-06}, {"ticker": "NTAP", "market_cap": 15663512448.099998, "weight": 0.0008213850358086896}, {"ticker": "NGVT", "market_cap": 1541893118.34, "weight": 8.085593435171683e-05}, {"ticker": "SGE", "market_cap": 16493568.607700001, "weight": 8.649126743658367e-07}, {"ticker": "KRTX", "market_cap": 6229131527.650001, "weight": 0.0003266518566540592}, {"ticker": "DAIO", "market_cap": 33562841.425, "weight": 1.760014926221674e-06}, {"ticker": "ILMN", "market_cap": 21679185000.0, "weight": 0.0011368432340147442}, {"ticker": "ETON", "market_cap": 104152787.75999999, "weight": 5.461708642125138e-06}, {"ticker": "DNOW", "market_cap": 1228869308.03, "weight": 6.44411567280913e-05}, {"ticker": "OPA", "market_cap": 125111312.42999999, "weight": 6.560760888139949e-06}, {"ticker": "ABUS", "market_cap": 311672145.1261, "weight": 1.6343897126089758e-05}, {"ticker": "TYRA", "market_cap": 615913109.44, "weight": 3.229810766446463e-05}, {"ticker": "ATEC", "market_cap": 1336145049.15, "weight": 7.006663113896927e-05}, {"ticker": "BWA", "market_cap": 9143951478.0, "weight": 0.0004795032363958064}, {"ticker": "TBLT", "market_cap": 6208400.9508, "weight": 3.255647578526446e-07}, {"ticker": "AVTX", "market_cap": 19739615.823400002, "weight": 1.0351334098068112e-06}, {"ticker": "SMG", "market_cap": 2682197471.4431996, "weight": 0.00014065279888066164}, {"ticker": "ZWS", "market_cap": 4679101592.69, "weight": 0.0002453692326034046}, {"ticker": "COP", "market_cap": 133819582707.75, "weight": 0.007017417268222124}, {"ticker": "IPSC", "market_cap": 102204588.227, "weight": 5.359546247293333e-06}, {"ticker": "TENX", "market_cap": 6860449.774999999, "weight": 3.597578003511997e-07}, {"ticker": "VEEE", "market_cap": 12852000.0, "weight": 6.739510384526675e-07}, {"ticker": "BKR", "market_cap": 33384207658.359997, "weight": 0.0017506474804910687}, {"ticker": "FNA", "market_cap": 966602863.3800001, "weight": 5.068806439046631e-05}, {"ticker": "CAL", "market_cap": 960983834.72, "weight": 5.0393405955942314e-05}, {"ticker": "CLRO", "market_cap": 18443622.0342, "weight": 9.671722862416427e-07}, {"ticker": "KOSS", "market_cap": 26365339.725, "weight": 1.3825823285730717e-06}, {"ticker": "LTRX", "market_cap": 159524669.15670002, "weight": 8.36537631784751e-06}, {"ticker": "BAX", "market_cap": 18605313343.98, "weight": 0.000975651279871817}, {"ticker": "MIRO", "market_cap": 33045769.13, "weight": 1.7328999705594929e-06}, {"ticker": "WTMA", "market_cap": 63394842.56, "weight": 3.3243868639787866e-06}, {"ticker": "MOTS", "market_cap": 2805283.628, "weight": 1.4710736183044403e-07}, {"ticker": "ECL", "market_cap": 47942704671.2, "weight": 0.0025140861810912535}, {"ticker": "CERE", "market_cap": 3168651236.32, "weight": 0.00016616213750483917}, {"ticker": "IRIX", "market_cap": 46090652.519999996, "weight": 2.4169656962974678e-06}, {"ticker": "GRTS", "market_cap": 223846401.93499997, "weight": 1.1738368739339125e-05}, {"ticker": "PMCB", "market_cap": 18258450.080000002, "weight": 9.57461981944615e-07}, {"ticker": "SRTS", "market_cap": 42618760.6, "weight": 2.234901802360382e-06}, {"ticker": "RLAY", "market_cap": 1025678946.9679999, "weight": 5.378597816901043e-05}, {"ticker": "FOXF", "market_cap": 4061781428.52, "weight": 0.0002129973398474022}, {"ticker": "PNT", "market_cap": 1310968999.83, "weight": 6.874641447359814e-05}, {"ticker": "CRBU", "market_cap": 399930035.28000003, "weight": 2.0972087035898533e-05}, {"ticker": "TFX", "market_cap": 9115304042.025, "weight": 0.0004780009823322865}, {"ticker": "HEI", "market_cap": 22098249584.879997, "weight": 0.0011588187251568708}, {"ticker": "CPS", "market_cap": 220299705.99, "weight": 1.1552382167972133e-05}, {"ticker": "VINE", "market_cap": 6958479.4662, "weight": 3.6489841754567797e-07}, {"ticker": "GLTO", "market_cap": 16950858.1644, "weight": 8.888926597075364e-07}, {"ticker": "TMCI", "market_cap": 721303555.84, "weight": 3.7824718370523626e-05}, {"ticker": "OVID", "market_cap": 254876082.73, "weight": 1.3365546267711756e-05}, {"ticker": "IMPL", "market_cap": 9739490.699505, "weight": 5.10732949807928e-07}, {"ticker": "CDTX", "market_cap": 83925098.6054, "weight": 4.400980964624327e-06}, {"ticker": "NMTC", "market_cap": 21277334.046384, "weight": 1.115770415193339e-06}, {"ticker": "RL", "market_cap": 7399572264.990001, "weight": 0.0003880290547849026}, {"ticker": "FEMY", "market_cap": 36175567.199999996, "weight": 1.8970246717284668e-06}, {"ticker": "AOUT", "market_cap": 125651281.14, "weight": 6.589076517834662e-06}, {"ticker": "ATI", "market_cap": 5142746156.365, "weight": 0.00026968247063341547}, {"ticker": "CYT", "market_cap": 108354052.24, "weight": 5.6820203880876576e-06}, {"ticker": "KNTE", "market_cap": 60752383.59, "weight": 3.1858179278676705e-06}, {"ticker": "KOP", "market_cap": 795232496.4, "weight": 4.1701506906324864e-05}, {"ticker": "GCTK", "market_cap": 4959806.6182, "weight": 2.600892328711721e-07}, {"ticker": "NBSE", "market_cap": 2803244.1502, "weight": 1.4700041285898346e-07}, {"ticker": "MTNB", "market_cap": 26441092.8142, "weight": 1.3865547743505643e-06}, {"ticker": "JBI", "market_cap": 1529938027.72, "weight": 8.022901669390912e-05}, {"ticker": "EVEX", "market_cap": 2207144152.2, "weight": 0.00011574129266961736}, {"ticker": "RGLS", "market_cap": 27473090.009999998, "weight": 1.4406720776332948e-06}, {"ticker": "CKPT", "market_cap": 37356729.05, "weight": 1.9589640784657975e-06}, {"ticker": "MAIA", "market_cap": 28866751.75, "weight": 1.5137548489470789e-06}, {"ticker": "ACRX", "market_cap": 9036085.254, "weight": 4.7384679742297977e-07}, {"ticker": "HLVX", "market_cap": 621189224.73, "weight": 3.257478393109173e-05}, {"ticker": "ONCT", "market_cap": 18156524.9258, "weight": 9.521170890472028e-07}, {"ticker": "LUCD", "market_cap": 55968899.84, "weight": 2.9349749586228867e-06}, {"ticker": "CTSO", "market_cap": 75416056.2, "weight": 3.9547719726108575e-06}, {"ticker": "OLPX", "market_cap": 1289755666.76, "weight": 6.763400023055669e-05}, {"ticker": "BF.A", "market_cap": 27799802961.99, "weight": 0.001457804705494297}, {"ticker": "EPAC", "market_cap": 1522094032.12, "weight": 7.981768235059771e-05}, {"ticker": "QRVO", "market_cap": 9163438547.550001, "weight": 0.0004805251264331253}, {"ticker": "PBYI", "market_cap": 117349119.55000001, "weight": 6.1537162295540565e-06}, {"ticker": "CRIS", "market_cap": 30044083.835, "weight": 1.5754934251445108e-06}, {"ticker": "LWAY", "market_cap": 167122246.63, "weight": 8.763788644944858e-06}, {"ticker": "PI", "market_cap": 1364197204.77, "weight": 7.15376690638786e-05}, {"ticker": "OSA", "market_cap": 14852504.868500002, "weight": 7.788562931644005e-07}, {"ticker": "EFTR", "market_cap": 31111340.779200003, "weight": 1.6314597281198774e-06}, {"ticker": "HROW", "market_cap": 482132437.42, "weight": 2.5282730848967065e-05}, {"ticker": "JILL", "market_cap": 302919281.85, "weight": 1.588490231638218e-05}, {"ticker": "WISA", "market_cap": 3224507.92785, "weight": 1.6909122832814866e-07}, {"ticker": "FNCH", "market_cap": 7462138.65, "weight": 3.913099978404362e-07}, {"ticker": "CETY", "market_cap": 71698168.95, "weight": 3.759808233660699e-06}, {"ticker": "DM", "market_cap": 415145434.445, "weight": 2.1769973284554274e-05}, {"ticker": "AOSL", "market_cap": 803760865.38, "weight": 4.2148729372118404e-05}, {"ticker": "LPX", "market_cap": 3869235111.9599996, "weight": 0.00020290032848762566}, {"ticker": "DOMH", "market_cap": 12684393.6, "weight": 6.651618611004022e-07}, {"ticker": "CNSP", "market_cap": 4554892.12, "weight": 2.388557636409798e-07}, {"ticker": "WRBY", "market_cap": 1545719432.3999999, "weight": 8.105658392642761e-05}, {"ticker": "NCR", "market_cap": 3692989000.0, "weight": 0.00019365808991163072}, {"ticker": "SNPO", "market_cap": 692488542.84, "weight": 3.631367667005856e-05}, {"ticker": "VGAS", "market_cap": 35673776.8, "weight": 1.8707110893159567e-06}, {"ticker": "EDIT", "market_cap": 574285474.665, "weight": 3.0115179895639572e-05}, {"ticker": "EAST", "market_cap": 2029792.08, "weight": 1.0644105821342982e-07}, {"ticker": "AZEK", "market_cap": 4277666762.7200003, "weight": 0.0002243182350521012}, {"ticker": "VNRX", "market_cap": 53374950.2484, "weight": 2.7989498247174482e-06}, {"ticker": "OI", "market_cap": 2522515022.58, "weight": 0.00013227914869127334}, {"ticker": "DBD", "market_cap": 1457470783.5600002, "weight": 7.642887862548126e-05}, {"ticker": "CPTN", "market_cap": 61161375.57, "weight": 3.2072652177556107e-06}, {"ticker": "HOG", "market_cap": 4431962196.88, "weight": 0.0002324093934772986}, {"ticker": "KALU", "market_cap": 1102106012.3, "weight": 5.7793766843644046e-05}, {"ticker": "ESP", "market_cap": 38356043.88, "weight": 2.011367538426866e-06}, {"ticker": "FTI", "market_cap": 8406535666.400001, "weight": 0.0004408336011639953}, {"ticker": "WVE", "market_cap": 571133415.9699999, "weight": 2.9949887860877742e-05}, {"ticker": "MRSN", "market_cap": 150634113.75, "weight": 7.899161016823042e-06}, {"ticker": "CMI", "market_cap": 31902474629.024998, "weight": 0.001672946304500566}, {"ticker": "OLN", "market_cap": 5972971233.04, "weight": 0.00031321896709891206}, {"ticker": "CAT", "market_cap": 134315576009.13, "weight": 0.007043426854320056}, {"ticker": "FCEL", "market_cap": 552017257.9250001, "weight": 2.8947448196572347e-05}, {"ticker": "FRD", "market_cap": 93194063.352, "weight": 4.887039820549648e-06}, {"ticker": "PTVE", "market_cap": 1409247851.6000001, "weight": 7.390009749634382e-05}, {"ticker": "CARA", "market_cap": 77060695.425, "weight": 4.0410158501060905e-06}, {"ticker": "SMFL", "market_cap": 1431730.4622, "weight": 7.50790718786187e-08}, {"ticker": "LVWR", "market_cap": 1500848431.68, "weight": 7.870357602636114e-05}, {"ticker": "HLIT", "market_cap": 1043047604.2800001, "weight": 5.469677996110123e-05}, {"ticker": "MBOT", "market_cap": 15570731.610000001, "weight": 8.165196652682288e-07}, {"ticker": "KRMD", "market_cap": 124594691.13, "weight": 6.533669582380396e-06}, {"ticker": "PASG", "market_cap": 34794216.414000005, "weight": 1.8245874793310108e-06}, {"ticker": "CERS", "market_cap": 270302056.245, "weight": 1.4174474906801205e-05}, {"ticker": "K", "market_cap": 18106715852.31, "weight": 0.0009495051316240042}, {"ticker": "SYRS", "market_cap": 62130138.0, "weight": 3.258066528501987e-06}, {"ticker": "MGOL", "market_cap": 12791752.1262, "weight": 6.707916767103647e-07}, {"ticker": "CYTK", "market_cap": 2571786366.42, "weight": 0.00013486290789971767}, {"ticker": "GT", "market_cap": 3415901669.8500004, "weight": 0.00017912779938123317}, {"ticker": "CODX", "market_cap": 32411444.5017, "weight": 1.6996363740796542e-06}, {"ticker": "DSGN", "market_cap": 124570311.825, "weight": 6.53239114650104e-06}, {"ticker": "PGTI", "market_cap": 1550103320.535, "weight": 8.128647234543195e-05}, {"ticker": "PRMW", "market_cap": 2191522999.035, "weight": 0.00011492212892876925}, {"ticker": "FATE", "market_cap": 172484256.0, "weight": 9.044969144719558e-06}, {"ticker": "EW", "market_cap": 42937128269.0, "weight": 0.0022515968086731977}, {"ticker": "IART", "market_cap": 3044503279.4, "weight": 0.00015965189439185977}, {"ticker": "CETX", "market_cap": 4680688.959000001, "weight": 2.454524731241819e-07}, {"ticker": "NPWR", "market_cap": 1054070338.72, "weight": 5.527480542969958e-05}, {"ticker": "CC", "market_cap": 3969205459.275, "weight": 0.00020814271250469836}, {"ticker": "BGS", "market_cap": 611586707.58, "weight": 3.207123379064651e-05}, {"ticker": "EMBC", "market_cap": 744086674.66, "weight": 3.901945122050258e-05}, {"ticker": "VERO", "market_cap": 11108226.809999999, "weight": 5.825086363186478e-07}, {"ticker": "MGNX", "market_cap": 287755306.72999996, "weight": 1.5089712713270256e-05}, {"ticker": "LABP", "market_cap": 11625399.17, "weight": 6.096288393283753e-07}, {"ticker": "QNCX", "market_cap": 42204267.239999995, "weight": 2.2131660234618654e-06}, {"ticker": "GURE", "market_cap": 19299059.400000002, "weight": 1.012030899765773e-06}, {"ticker": "ENSC", "market_cap": 3579326.131, "weight": 1.8769767841178172e-07}, {"ticker": "UCTT", "market_cap": 1314403447.896, "weight": 6.892651483467755e-05}, {"ticker": "GSIT", "market_cap": 60450374.63, "weight": 3.1699807622736764e-06}, {"ticker": "ODC", "market_cap": 434118307.92, "weight": 2.2764899193432842e-05}, {"ticker": "CLPT", "market_cap": 114560552.7, "weight": 6.00748548536232e-06}, {"ticker": "FBIO", "market_cap": 42574625.9904, "weight": 2.2325874103613454e-06}, {"ticker": "IGC", "market_cap": 18337037.0204, "weight": 9.615830331499835e-07}, {"ticker": "MRTX", "market_cap": 2941433564.055, "weight": 0.00015424698140634904}, {"ticker": "AIRG", "market_cap": 37371995.7328, "weight": 1.9597646539969826e-06}, {"ticker": "SKX", "market_cap": 7499380342.26, "weight": 0.00039326292945982325}, {"ticker": "BRCC", "market_cap": 198860073.775, "weight": 1.0428100935841529e-05}, {"ticker": "INM", "market_cap": 2263169.8800000004, "weight": 1.1867924765178953e-07}, {"ticker": "SILK", "market_cap": 573174961.92, "weight": 3.0056945284862442e-05}, {"ticker": "KNDI", "market_cap": 263992123.72, "weight": 1.3843585895146209e-05}, {"ticker": "NOV", "market_cap": 7546732486.99, "weight": 0.00039574604703792346}, {"ticker": "HYPR", "market_cap": 124989000.6694, "weight": 6.55434693404165e-06}, {"ticker": "LTHM", "market_cap": 3043480112.7149997, "weight": 0.0001595982401551755}, {"ticker": "BIRD", "market_cap": 158004015.52, "weight": 8.28563416895389e-06}, {"ticker": "SKYT", "market_cap": 270758779.2, "weight": 1.4198425179895464e-05}, {"ticker": "FRZA", "market_cap": 11364480.0, "weight": 5.959463972513671e-07}, {"ticker": "CHX", "market_cap": 6548143188.93, "weight": 0.00034338063352911107}, {"ticker": "OCC", "market_cap": 24549347.91, "weight": 1.2873528258076815e-06}, {"ticker": "RNA", "market_cap": 429387519.565, "weight": 2.2516819538550175e-05}, {"ticker": "CL", "market_cap": 58189990034.781, "weight": 0.0030514475732563826}, {"ticker": "SSD", "market_cap": 6228848940.44, "weight": 0.00032663703795318515}, {"ticker": "UFI", "market_cap": 123517285.26, "weight": 6.4771710759283665e-06}, {"ticker": "ITW", "market_cap": 69953707052.12761, "weight": 0.003668329716106061}, {"ticker": "ATXI", "market_cap": 5994423.3, "weight": 3.143439004014835e-07}, {"ticker": "ALBT", "market_cap": 8157290.25, "weight": 4.2776332360312165e-07}, {"ticker": "LNSR", "market_cap": 33401228.85, "weight": 1.7515400613953234e-06}, {"ticker": "BLBD", "market_cap": 667910897.125, "weight": 3.5024839924622355e-05}, {"ticker": "AMAT", "market_cap": 115943591887.2, "weight": 0.0060800112164885395}, {"ticker": "SEE", "market_cap": 4601575000.0, "weight": 0.00024130378538498548}, {"ticker": "NAII", "market_cap": 38694406.615, "weight": 2.0291110738008883e-06}, {"ticker": "LBPH", "market_cap": 100875692.0859, "weight": 5.289859744469641e-06}, {"ticker": "KWR", "market_cap": 2807718210.3999996, "weight": 0.00014723502984605858}, {"ticker": "KNSA", "market_cap": 1136563413.8040001, "weight": 5.9600691954599656e-05}, {"ticker": "HYZN", "market_cap": 288926545.9, "weight": 1.5151131780722634e-05}, {"ticker": "KTOS", "market_cap": 1883110330.13, "weight": 9.874915674697004e-05}, {"ticker": "CBIO", "market_cap": 16705154.9908, "weight": 8.76008135197823e-07}, {"ticker": "FTCI", "market_cap": 132282165.12000002, "weight": 6.936796027963838e-06}, {"ticker": "CTLP", "market_cap": 494691278.325, "weight": 2.594130880334666e-05}, {"ticker": "QURE", "market_cap": 286223892.0, "weight": 1.5009406259209785e-05}, {"ticker": "YCBD", "market_cap": 2715238.5345, "weight": 1.4238545206761391e-07}, {"ticker": "SRM", "market_cap": 18333000.0, "weight": 9.61371334263364e-07}, {"ticker": "OSS", "market_cap": 39237175.839999996, "weight": 2.0575735607934884e-06}, {"ticker": "CAMP", "market_cap": 16062386.535, "weight": 8.423017495558196e-07}, {"ticker": "CLW", "market_cap": 604326965.1199999, "weight": 3.169053732551921e-05}, {"ticker": "MRNS", "market_cap": 417144000.0, "weight": 2.1874776842849327e-05}, {"ticker": "ALPN", "market_cap": 576150115.37, "weight": 3.0212960516513824e-05}, {"ticker": "AQMS", "market_cap": 108807617.14, "weight": 5.70580505470458e-06}, {"ticker": "MATV", "market_cap": 744570082.14, "weight": 3.904480081380648e-05}, {"ticker": "SAGE", "market_cap": 1174204354.344, "weight": 6.157455991019163e-05}, {"ticker": "CAAS", "market_cap": 105951814.02, "weight": 5.556048481537729e-06}, {"ticker": "UEIC", "market_cap": 114500302.05, "weight": 6.004325978037783e-06}, {"ticker": "PLUR", "market_cap": 22747663.687000003, "weight": 1.192873604437106e-06}, {"ticker": "PRTA", "market_cap": 2464229859.0, "weight": 0.00012922271027537507}, {"ticker": "SES", "market_cap": 825579606.85, "weight": 4.3292890862270656e-05}, {"ticker": "MYE", "market_cap": 644719163.16, "weight": 3.380867954575294e-05}, {"ticker": "GTES", "market_cap": 3027748615.485, "weight": 0.0001587732900388844}, {"ticker": "COO", "market_cap": 15530030264.164999, "weight": 0.0008143853115262493}, {"ticker": "GBX", "market_cap": 1180202672.6650002, "weight": 6.188910806311784e-05}, {"ticker": "LPTX", "market_cap": 44992572.0986, "weight": 2.359383028984437e-06}, {"ticker": "MAT", "market_cap": 7527234881.205, "weight": 0.00039472360448686983}, {"ticker": "VMI", "market_cap": 4879797434.94, "weight": 0.0002558936001179953}, {"ticker": "PMVP", "market_cap": 274785934.522, "weight": 1.4409606747843807e-05}, {"ticker": "DE", "market_cap": 108221976819.29, "weight": 0.005675094433610411}, {"ticker": "NWSA", "market_cap": 11234419888.12, "weight": 0.0005891261243395405}, {"ticker": "OEC", "market_cap": 1199340811.5500002, "weight": 6.28927003892614e-05}, {"ticker": "THRX", "market_cap": 108140715.45690002, "weight": 5.670833137347666e-06}, {"ticker": "RVNC", "market_cap": 913856159.23, "weight": 4.7922059407829506e-05}, {"ticker": "RPRX", "market_cap": 11999808124.92, "weight": 0.0006292626164816831}, {"ticker": "TNC", "market_cap": 1395615893.3999999, "weight": 7.318524592576853e-05}, {"ticker": "CSL", "market_cap": 12655469950.4, "weight": 0.0006636451225629169}, {"ticker": "TBPH", "market_cap": 459474004.79999995, "weight": 2.40945364672398e-05}, {"ticker": "GEHC", "market_cap": 30586732728.717503, "weight": 0.001603949602038076}, {"ticker": "MBUU", "market_cap": 1003318963.35, "weight": 5.261343427085173e-05}, {"ticker": "SLDB", "market_cap": 49147095.550000004, "weight": 2.5772437039258463e-06}, {"ticker": "CRDF", "market_cap": 54635709.97010001, "weight": 2.865063295280708e-06}, {"ticker": "PLOW", "market_cap": 681001092.571, "weight": 3.571128178693017e-05}, {"ticker": "NEOG", "market_cap": 3725949774.9500003, "weight": 0.00019538653283924956}, {"ticker": "ARVN", "market_cap": 962730414.0, "weight": 5.0484995507723815e-05}, {"ticker": "VCNX", "market_cap": 4803857.8328, "weight": 2.519113737157283e-07}, {"ticker": "OGN", "market_cap": 4164485790.6950006, "weight": 0.00021838309393559552}, {"ticker": "RLYB", "market_cap": 139107150.08, "weight": 7.294694075055017e-06}, {"ticker": "RCKY", "market_cap": 102795334.955, "weight": 5.390524645270156e-06}, {"ticker": "TCRX", "market_cap": 127197917.56, "weight": 6.670181188031341e-06}, {"ticker": "TPR", "market_cap": 6346303358.04, "weight": 0.0003327962759482344}, {"ticker": "GOVX", "market_cap": 14649781.546000002, "weight": 7.682256058225511e-07}, {"ticker": "STRO", "market_cap": 190962820.665, "weight": 1.0013973801200378e-05}, {"ticker": "LECO", "market_cap": 10335698454.325, "weight": 0.000541997720699188}, {"ticker": "CMRA", "market_cap": 8606582.88, "weight": 4.5132395498793576e-07}, {"ticker": "CTKB", "market_cap": 743163133.6, "weight": 3.897102129080754e-05}, {"ticker": "RANI", "market_cap": 51063544.0, "weight": 2.6777410913378055e-06}, {"ticker": "BIO", "market_cap": 10301416463.83, "weight": 0.0005401999940345186}, {"ticker": "INSM", "market_cap": 3461985000.0, "weight": 0.0001815443810969155}, {"ticker": "REVG", "market_cap": 945090620.0450001, "weight": 4.9559975475506006e-05}, {"ticker": "GPRE", "market_cap": 1691967269.78, "weight": 8.87257312866601e-05}, {"ticker": "WKHS", "market_cap": 83393620.2009, "weight": 4.373110561369741e-06}, {"ticker": "DRRX", "market_cap": 62100177.75, "weight": 3.2564954312719993e-06}, {"ticker": "ADM", "market_cap": 39258723316.89, "weight": 0.0020587034973345757}, {"ticker": "QSI", "market_cap": 215409061.76, "weight": 1.1295919768539276e-05}, {"ticker": "PCCT", "market_cap": 87706248.0, "weight": 4.599262131838406e-06}, {"ticker": "CPB", "market_cap": 11893973182.4, "weight": 0.0006237126966702971}, {"ticker": "TIVC", "market_cap": 2404251.48, "weight": 1.2607748067595415e-07}, {"ticker": "LFUS", "market_cap": 5983669848.509999, "weight": 0.0003137799959664822}, {"ticker": "BE", "market_cap": 2713920220.0, "weight": 0.0001423163204595932}, {"ticker": "ALV", "market_cap": 7860295692.12, "weight": 0.0004121891101968023}, {"ticker": "RXRX", "market_cap": 1501892325.2849998, "weight": 7.875831717008381e-05}, {"ticker": "VVV", "market_cap": 4344303362.23, "weight": 0.0002278126176726053}, {"ticker": "FLO", "market_cap": 4636356587.52, "weight": 0.00024312771061282059}, {"ticker": "ISPR", "market_cap": 498917420.94500005, "weight": 2.6162925143791583e-05}, {"ticker": "ELIQ", "market_cap": 65949221.01, "weight": 3.4583369113627433e-06}, {"ticker": "ESPR", "market_cap": 97364784.79, "weight": 5.105749908025287e-06}, {"ticker": "ORIC", "market_cap": 320106444.18, "weight": 1.678618662235464e-05}, {"ticker": "WOLF", "market_cap": 4321415835.0, "weight": 0.00022661240970930994}, {"ticker": "NTGR", "market_cap": 346333142.65999997, "weight": 1.8161498688630783e-05}, {"ticker": "MNMD", "market_cap": 118952019.66000001, "weight": 6.237771333325485e-06}, {"ticker": "LEE", "market_cap": 63760116.0, "weight": 3.3435415803036523e-06}, {"ticker": "JAKK", "market_cap": 180764722.48, "weight": 9.479191754668864e-06}, {"ticker": "CGEM", "market_cap": 346150616.4, "weight": 1.8151927122923355e-05}, {"ticker": "SPLP", "market_cap": 929277880.2240999, "weight": 4.8730765047317593e-05}, {"ticker": "PTCT", "market_cap": 1573956026.39, "weight": 8.253729368692614e-05}, {"ticker": "NEOV", "market_cap": 76588343.37, "weight": 4.016245996543805e-06}, {"ticker": "AVAV", "market_cap": 2811499653.6, "weight": 0.0001474333264202486}, {"ticker": "SRRK", "market_cap": 374788752.715, "weight": 1.9653693517946955e-05}, {"ticker": "EXEL", "market_cap": 6912046842.35, "weight": 0.00036246351908148644}, {"ticker": "ATRI", "market_cap": 724183957.5, "weight": 3.797576487611947e-05}, {"ticker": "INSG", "market_cap": 46760894.9019, "weight": 2.452112797861154e-06}, {"ticker": "WWD", "market_cap": 7511116032.0, "weight": 0.00039387834186934947}, {"ticker": "MRUS", "market_cap": 1211585928.0, "weight": 6.353482682463733e-05}, {"ticker": "REX", "market_cap": 672318845.4499999, "weight": 3.525599004531014e-05}, {"ticker": "SWK", "market_cap": 11947346764.59, "weight": 0.0006265115747548668}, {"ticker": "SRZN", "market_cap": 14367403.955, "weight": 7.534178972409907e-07}, {"ticker": "PRAX", "market_cap": 203093552.34, "weight": 1.0650101968766275e-05}, {"ticker": "KMB", "market_cap": 40703965977.96, "weight": 0.0021344911406775747}, {"ticker": "NVAX", "market_cap": 720385247.9705, "weight": 3.7776562866145415e-05}, {"ticker": "ANIP", "market_cap": 1167362732.88, "weight": 6.121578945498133e-05}, {"ticker": "ROP", "market_cap": 51918053690.46999, "weight": 0.0027225510581336443}, {"ticker": "SDGR", "market_cap": 1970240201.63, "weight": 0.00010331819404682008}, {"ticker": "ICHR", "market_cap": 877572990.0, "weight": 4.601939215130037e-05}, {"ticker": "QMCO", "market_cap": 56012182.32480001, "weight": 2.937244665717329e-06}, {"ticker": "GNTX", "market_cap": 7415088472.885, "weight": 0.0003888427152598234}, {"ticker": "HII", "market_cap": 7988670890.28, "weight": 0.00041892102726118907}, {"ticker": "ROCK", "market_cap": 1972669919.88, "weight": 0.00010344560698937648}, {"ticker": "EOSE", "market_cap": 284068352.72, "weight": 1.4896371094552027e-05}, {"ticker": "LCUT", "market_cap": 111361674.78000002, "weight": 5.839738279007877e-06}, {"ticker": "VIAV", "market_cap": 1891286396.285, "weight": 9.91779046675754e-05}, {"ticker": "NAOV", "market_cap": 7255145.6546, "weight": 3.8045541145681825e-07}, {"ticker": "CE", "market_cap": 13140096461.59, "weight": 0.0006890586411186432}, {"ticker": "DD", "market_cap": 33708850478.31, "weight": 0.0017676715518909682}, {"ticker": "CARM", "market_cap": 163153622.25, "weight": 8.5556764038828e-06}, {"ticker": "THS", "market_cap": 2450774438.2799997, "weight": 0.00012851711622253803}, {"ticker": "VSAT", "market_cap": 2102107823.4750001, "weight": 0.00011023325167837325}, {"ticker": "BCRX", "market_cap": 1190968124.4750001, "weight": 6.245364178757798e-05}, {"ticker": "MOD", "market_cap": 2373136989.84, "weight": 0.0001244458557962267}, {"ticker": "GENC", "market_cap": 203742057.8, "weight": 1.068410919940814e-05}, {"ticker": "FLGC", "market_cap": 8791221.65, "weight": 4.610062994308336e-07}, {"ticker": "ZNTL", "market_cap": 1378295624.6399999, "weight": 7.227698159982072e-05}, {"ticker": "VISL", "market_cap": 8320301.5, "weight": 4.363115340930818e-07}, {"ticker": "HOTH", "market_cap": 5545998.72, "weight": 2.908287890290355e-07}, {"ticker": "TSLA", "market_cap": 819303191766.71, "weight": 0.042963759484808524}, {"ticker": "AKBA", "market_cap": 214677739.98, "weight": 1.1257569700606344e-05}, {"ticker": "MLI", "market_cap": 4113401548.2, "weight": 0.00021570426742780892}, {"ticker": "JBT", "market_cap": 3282487799.2999997, "weight": 0.00017213165741102133}, {"ticker": "ON", "market_cap": 38664994278.399994, "weight": 0.002027568708815291}, {"ticker": "QUIK", "market_cap": 120154512.84, "weight": 6.30082934199287e-06}, {"ticker": "UTMD", "market_cap": 312175445.25, "weight": 1.6370289877502438e-05}, {"ticker": "RENB", "market_cap": 293013722.24, "weight": 1.5365460814233542e-05}, {"ticker": "MPAA", "market_cap": 148238860.57500002, "weight": 7.773555401771044e-06}, {"ticker": "VTYX", "market_cap": 1719542331.2, "weight": 9.017175068281674e-05}, {"ticker": "XOMA", "market_cap": 154882908.0, "weight": 8.121965194924445e-06}, {"ticker": "PEP", "market_cap": 231912535535.17, "weight": 0.012161351863843681}, {"ticker": "TECH", "market_cap": 10528383440.3391, "weight": 0.0005521020038005294}, {"ticker": "BDTX", "market_cap": 132806456.72500001, "weight": 6.964289559837613e-06}, {"ticker": "VTAK", "market_cap": 2551538.1473999997, "weight": 1.338011036486014e-07}, {"ticker": "MU", "market_cap": 74179301401.79999, "weight": 0.0038899173055895204}, {"ticker": "NEXI", "market_cap": 4957513.5351, "weight": 2.5996898499251476e-07}, {"ticker": "PSX", "market_cap": 48946049045.76, "weight": 0.0025667009479104536}, {"ticker": "THR", "market_cap": 901806584.93, "weight": 4.729018708349106e-05}, {"ticker": "NXPI", "market_cap": 50725792391.174995, "weight": 0.0026600296030475264}, {"ticker": "AWH", "market_cap": 49431358.82700001, "weight": 2.59215029673071e-06}, {"ticker": "IMGN", "market_cap": 3747843278.43, "weight": 0.00019653461480359074}, {"ticker": "DELL", "market_cap": 48610653276.384995, "weight": 0.002549112998403535}, {"ticker": "NUWE", "market_cap": 1845808.7765, "weight": 9.67930860338642e-08}, {"ticker": "CMPX", "market_cap": 253644098.54, "weight": 1.330094176847368e-05}, {"ticker": "SUPN", "market_cap": 1469681274.92, "weight": 7.70691893422638e-05}, {"ticker": "DBVT", "market_cap": 238311215.1636, "weight": 1.2496894719454194e-05}, {"ticker": "ISUN", "market_cap": 7159332.848, "weight": 3.754310463381492e-07}, {"ticker": "PRPH", "market_cap": 73449379.9487, "weight": 3.851640669944825e-06}, {"ticker": "KALA", "market_cap": 22553890.919999998, "weight": 1.1827122787645647e-06}, {"ticker": "EIGR", "market_cap": 13630007.510899998, "weight": 7.147492776290625e-07}, {"ticker": "BKTI", "market_cap": 41701670.5, "weight": 2.1868101570717376e-06}, {"ticker": "BJDX", "market_cap": 4684724.1, "weight": 2.456640734562121e-07}, {"ticker": "ALKS", "market_cap": 4668641342.05, "weight": 0.00024482070344208315}, {"ticker": "IMVT", "market_cap": 4709327704.29, "weight": 0.00024695427145348287}, {"ticker": "BERY", "market_cap": 7054113000.0, "weight": 0.0003699133817080969}, {"ticker": "PRLB", "market_cap": 674045060.2199999, "weight": 3.5346511694612494e-05}, {"ticker": "BMEA", "market_cap": 435596016.59999996, "weight": 2.284238933499964e-05}, {"ticker": "SHLS", "market_cap": 2754719311.21, "weight": 0.00014445579990939904}, {"ticker": "DAKT", "market_cap": 403447441.79999995, "weight": 2.115653768768924e-05}, {"ticker": "LCTX", "market_cap": 204716906.40289998, "weight": 1.0735229665347959e-05}, {"ticker": "JEWL", "market_cap": 14616884.6187, "weight": 7.665005110267419e-07}, {"ticker": "THO", "market_cap": 4964095404.1, "weight": 0.00026031413418699885}, {"ticker": "LITE", "market_cap": 2884677034.825, "weight": 0.00015127070364308047}, {"ticker": "IMO", "market_cap": 33419376996.78, "weight": 0.0017524917391395166}, {"ticker": "TRNS", "market_cap": 812342545.7700001, "weight": 4.2598747455724804e-05}, {"ticker": "PODD", "market_cap": 10539497762.099998, "weight": 0.0005526848320523544}, {"ticker": "BOOM", "market_cap": 438570859.93, "weight": 2.2998388304147438e-05}, {"ticker": "DCO", "market_cap": 627657894.12, "weight": 3.291399700709527e-05}, {"ticker": "SGMT", "market_cap": 155782080.09, "weight": 8.169117230701223e-06}, {"ticker": "GLSI", "market_cap": 108935736.5855, "weight": 5.712523560255522e-06}, {"ticker": "CVKD", "market_cap": 9117230.075399999, "weight": 4.781019823473172e-07}, {"ticker": "AYTU", "market_cap": 16349435.68, "weight": 8.573544315788277e-07}, {"ticker": "ACXP", "market_cap": 20418050.96, "weight": 1.0707101344282201e-06}, {"ticker": "VBIV", "market_cap": 13952026.75, "weight": 7.316357700499452e-07}, {"ticker": "ARLO", "market_cap": 893992233.215, "weight": 4.688040724742208e-05}, {"ticker": "PRGO", "market_cap": 4065964492.59, "weight": 0.0002132166971749692}, {"ticker": "FBIN", "market_cap": 7599473242.8, "weight": 0.00039851174009324}, {"ticker": "DGLY", "market_cap": 6128045.376, "weight": 3.213509605384584e-07}, {"ticker": "CTS", "market_cap": 1309086989.75, "weight": 6.864772301329669e-05}, {"ticker": "UNCY", "market_cap": 30581954.48, "weight": 1.6036990335907413e-06}, {"ticker": "ZTS", "market_cap": 78424006978.088, "weight": 0.004112507076136138}, {"ticker": "ADMA", "market_cap": 742191205.8, "weight": 3.8920053989989684e-05}, {"ticker": "MLTX", "market_cap": 3108385963.15, "weight": 0.00016300186335018967}, {"ticker": "FWBI", "market_cap": 3971726.3049999997, "weight": 2.0827490411644302e-07}, {"ticker": "HAS", "market_cap": 8603460337.614, "weight": 0.0004511602107704087}, {"ticker": "GES", "market_cap": 1121045939.44, "weight": 5.8786965066817166e-05}, {"ticker": "BWV", "market_cap": 7792218.1068, "weight": 4.0861916315962796e-07}, {"ticker": "BGXX", "market_cap": 67761491.0052, "weight": 3.553371244168661e-06}, {"ticker": "PHGE", "market_cap": 16460743.34, "weight": 8.631913373557291e-07}, {"ticker": "BYRN", "market_cap": 57140270.2, "weight": 2.9964009055988184e-06}, {"ticker": "HLTH", "market_cap": 69064717.6736, "weight": 3.621711655505993e-06}, {"ticker": "SCWO", "market_cap": 169813896.96, "weight": 8.904937145960651e-06}, {"ticker": "IONS", "market_cap": 6266221813.76, "weight": 0.00032859684862731947}, {"ticker": "MORF", "market_cap": 1014519748.4000001, "weight": 5.320079660480229e-05}, {"ticker": "PCT", "market_cap": 835538868.0649999, "weight": 4.381514844381988e-05}, {"ticker": "NVCT", "market_cap": 188683140.14999998, "weight": 9.894428745923022e-06}, {"ticker": "ACHV", "market_cap": 87377846.39999999, "weight": 4.582040952306074e-06}, {"ticker": "AA", "market_cap": 4812768001.8895, "weight": 0.0002523786175463117}, {"ticker": "XRAY", "market_cap": 6987686778.030001, "weight": 0.0003664300311574302}, {"ticker": "BLPH", "market_cap": 4484488.7568, "weight": 2.3516385423083347e-07}, {"ticker": "LEDS", "market_cap": 9137509.238, "weight": 4.791654092608888e-07}, {"ticker": "PFIE", "market_cap": 95582048.496, "weight": 5.012264304490541e-06}, {"ticker": "SXC", "market_cap": 800709434.5200001, "weight": 4.198871419962669e-05}, {"ticker": "SMCI", "market_cap": 14583836435.637299, "weight": 0.0007647674844710245}, {"ticker": "ATMU", "market_cap": 1759249451.52, "weight": 9.225396784540847e-05}, {"ticker": "ADOC", "market_cap": 41605872.879999995, "weight": 2.1817865883291062e-06}, {"ticker": "GEVO", "market_cap": 252834327.05999997, "weight": 1.3258477846138217e-05}, {"ticker": "VIRX", "market_cap": 35972322.0696, "weight": 1.8863666210987185e-06}, {"ticker": "KOD", "market_cap": 85236389.875, "weight": 4.469744278728033e-06}, {"ticker": "RUN", "market_cap": 2227215326.0350003, "weight": 0.00011679381277925497}, {"ticker": "BCLI", "market_cap": 8922131.559999999, "weight": 4.678711352375753e-07}, {"ticker": "SMID", "market_cap": 100712873.08, "weight": 5.281321615142989e-06}, {"ticker": "APTO", "market_cap": 19120802.58, "weight": 1.002683220886978e-06}, {"ticker": "INTS", "market_cap": 62263915.349999994, "weight": 3.2650817311127826e-06}, {"ticker": "IPAR", "market_cap": 4198565349.3500004, "weight": 0.00022017020519808742}, {"ticker": "FREY", "market_cap": 655217547.46, "weight": 3.435920841293783e-05}, {"ticker": "VRT", "market_cap": 14395364971.65, "weight": 0.000754884155893921}, {"ticker": "LSF", "market_cap": 8596151.56, "weight": 4.507769429317241e-07}, {"ticker": "CRDO", "market_cap": 2380205912.505, "weight": 0.0001248165457877314}, {"ticker": "RLMD", "market_cap": 89996616.97000001, "weight": 4.7193676831744836e-06}, {"ticker": "RIVN", "market_cap": 22029949044.885, "weight": 0.0011552370865125735}, {"ticker": "LNN", "market_cap": 1256946295.375, "weight": 6.591349681350877e-05}, {"ticker": "MITQ", "market_cap": 9265638.1038, "weight": 4.858844088066149e-07}, {"ticker": "PLAB", "market_cap": 1259019871.1778, "weight": 6.602223386343152e-05}, {"ticker": "HEPA", "market_cap": 17661119.1757, "weight": 9.261383137799047e-07}, {"ticker": "NXT", "market_cap": 2193053924.48, "weight": 0.00011500240972502287}, {"ticker": "OCGN", "market_cap": 102646863.3828, "weight": 5.382738886612756e-06}, {"ticker": "CR", "market_cap": 4946257762.1173, "weight": 0.00025937873912492386}, {"ticker": "ACA", "market_cap": 3456233052.64, "weight": 0.00018124275248686283}, {"ticker": "NNVC", "market_cap": 14974076.16, "weight": 7.852314175148873e-07}, {"ticker": "SINT", "market_cap": 3155600.9471, "weight": 1.654777883006743e-07}, {"ticker": "MWA", "market_cap": 1982670714.85, "weight": 0.0001039700425756964}, {"ticker": "MRVI", "market_cap": 1259870007.5500002, "weight": 6.606681449608564e-05}, {"ticker": "OCEA", "market_cap": 78659265.726, "weight": 4.124843901335357e-06}, {"ticker": "BSX", "market_cap": 74843772088.24501, "weight": 0.003924761742965102}, {"ticker": "SONM", "market_cap": 28670218.29, "weight": 1.503448754218033e-06}, {"ticker": "ATRC", "market_cap": 1939925362.03, "weight": 0.00010172850235455846}, {"ticker": "MNTS", "market_cap": 2794987.22, "weight": 1.465674244771969e-07}, {"ticker": "NTLA", "market_cap": 2525089258.25, "weight": 0.00013241414003915838}, {"ticker": "SKY", "market_cap": 3440001532.32, "weight": 0.00018039158146481728}, {"ticker": "NVEC", "market_cap": 386768748.02, "weight": 2.028191716224067e-05}, {"ticker": "KURA", "market_cap": 595375551.06, "weight": 3.1221130633848124e-05}, {"ticker": "RNXT", "market_cap": 10906941.6, "weight": 5.719533627188452e-07}, {"ticker": "EMAN", "market_cap": 164296134.1, "weight": 8.615589028202126e-06}, {"ticker": "PL", "market_cap": 734145670.5799999, "weight": 3.84981510319733e-05}, {"ticker": "SPWR", "market_cap": 941655425.125, "weight": 4.937983594985853e-05}, {"ticker": "ERNA", "market_cap": 11469901.72, "weight": 6.014746479259289e-07}, {"ticker": "SYPR", "market_cap": 43372270.35, "weight": 2.2744153939022985e-06}, {"ticker": "INKT", "market_cap": 38649336.32, "weight": 2.0267476150303763e-06}, {"ticker": "IMMX", "market_cap": 85219124.03, "weight": 4.468838868350854e-06}, {"ticker": "ARMP", "market_cap": 98627545.38, "weight": 5.171968302901384e-06}, {"ticker": "DOOR", "market_cap": 1974807752.75, "weight": 0.00010355771364069726}, {"ticker": "ZVIA", "market_cap": 102700539.19999999, "weight": 5.385553613716844e-06}, {"ticker": "MCRB", "market_cap": 255768204.93, "weight": 1.3412328611558371e-05}, {"ticker": "MRAM", "market_cap": 209037815.6661, "weight": 1.0961815510741158e-05}, {"ticker": "A", "market_cap": 32474261430.269997, "weight": 0.0017029304554866068}, {"ticker": "CYTH", "market_cap": 22499769.1674, "weight": 1.1798741670801851e-06}, {"ticker": "ABCL", "market_cap": 1283293270.145, "weight": 6.729511609504686e-05}, {"ticker": "HOWL", "market_cap": 71316100.0, "weight": 3.739772771039082e-06}, {"ticker": "AIR", "market_cap": 2075345823.6, "weight": 0.00010882986873355326}, {"ticker": "LSDI", "market_cap": 8117296.16, "weight": 4.2566605792560305e-07}, {"ticker": "SOVO", "market_cap": 2277371634.875, "weight": 0.0001194239790123448}, {"ticker": "VPG", "market_cap": 448936587.0, "weight": 2.3541960707130897e-05}, {"ticker": "NERV", "market_cap": 44268259.980000004, "weight": 2.3214005434184303e-06}, {"ticker": "DMAC", "market_cap": 87663164.82000001, "weight": 4.597002876166072e-06}, {"ticker": "INTC", "market_cap": 150076980000.0, "weight": 0.007869945262903844}, {"ticker": "DNLI", "market_cap": 2839828337.115, "weight": 0.00014891886529925038}, {"ticker": "TSBX", "market_cap": 47740080.95999999, "weight": 2.5034607173051986e-06}, {"ticker": "BNGO", "market_cap": 95794272.4, "weight": 5.023393196529545e-06}, {"ticker": "ICPT", "market_cap": 778469335.7, "weight": 4.0822456987128325e-05}, {"ticker": "ICUI", "market_cap": 2845377596.41, "weight": 0.000149209865070843}, {"ticker": "EQ", "market_cap": 25317969.400000002, "weight": 1.327658867774888e-06}, {"ticker": "UAMY", "market_cap": 38817622.510199994, "weight": 2.035572440165961e-06}, {"ticker": "URGN", "market_cap": 421131539.63, "weight": 2.208388098808039e-05}, {"ticker": "OMCL", "market_cap": 1992494690.94, "weight": 0.00010448520588783379}, {"ticker": "NBN", "market_cap": 335202401.82, "weight": 1.7577809430315696e-05}, {"ticker": "AZTR", "market_cap": 17541582.349999998, "weight": 9.198698755746562e-07}, {"ticker": "GHSI", "market_cap": 9142265.28, "weight": 4.794148132015069e-07}, {"ticker": "KN", "market_cap": 1336628461.1399999, "weight": 7.00919809687748e-05}, {"ticker": "AKYA", "market_cap": 190869381.29999998, "weight": 1.0009073897911076e-05}, {"ticker": "ANIX", "market_cap": 110298578.1, "weight": 5.783990137748805e-06}, {"ticker": "MSA", "market_cap": 6177713972.65, "weight": 0.0003239555514418784}, {"ticker": "ALEC", "market_cap": 506754163.5, "weight": 2.657387914184857e-05}, {"ticker": "FATH", "market_cap": 20096988.450000003, "weight": 1.0538738122976009e-06}, {"ticker": "CAPR", "market_cap": 74495145.63000001, "weight": 3.906479984206443e-06}, {"ticker": "SLAB", "market_cap": 3614534130.34, "weight": 0.00018954396441528575}, {"ticker": "AVXL", "market_cap": 519111142.85599995, "weight": 2.7221871599762852e-05}, {"ticker": "PSTG", "market_cap": 10684494061.75, "weight": 0.0005602883495376417}, {"ticker": "XENE", "market_cap": 2148554292.8849998, "weight": 0.0001126688761952834}, {"ticker": "SCS", "market_cap": 1251827508.7, "weight": 6.564507076345944e-05}, {"ticker": "PDEX", "market_cap": 53888696.8, "weight": 2.8258903804249096e-06}, {"ticker": "LULU", "market_cap": 46681697617.82, "weight": 0.0024479597406056024}, {"ticker": "CLAR", "market_cap": 287697361.995, "weight": 1.5086674126721385e-05}, {"ticker": "STIM", "market_cap": 33493130.08, "weight": 1.7563593058237062e-06}, {"ticker": "CRVS", "market_cap": 70016286.0738, "weight": 3.67161132182046e-06}, {"ticker": "RVMD", "market_cap": 2694630219.2200003, "weight": 0.00014130476458833319}, {"ticker": "KSCP", "market_cap": 58554830.204, "weight": 3.07057956912585e-06}, {"ticker": "BNTC", "market_cap": 7667776.34, "weight": 4.0209351283580717e-07}, {"ticker": "VOR", "market_cap": 139805067.6, "weight": 7.331292443974897e-06}, {"ticker": "MPTI", "market_cap": 50233642.50000001, "weight": 2.6342215630357186e-06}, {"ticker": "CATX", "market_cap": 83441823.1324, "weight": 4.375638293686959e-06}, {"ticker": "AMWD", "market_cap": 1232038968.54, "weight": 6.460737179129212e-05}, {"ticker": "LEA", "market_cap": 7738743627.299999, "weight": 0.00040581499408168356}, {"ticker": "VBLT", "market_cap": 19355768.4231, "weight": 1.0150046863365697e-06}, {"ticker": "ALDX", "market_cap": 327550801.5, "weight": 1.7176564178099017e-05}, {"ticker": "GIA", "market_cap": 103386850.81, "weight": 5.421543375797581e-06}, {"ticker": "BFRG", "market_cap": 18680083.86, "weight": 9.7957220011126e-07}, {"ticker": "OXUS", "market_cap": 72444126.72, "weight": 3.7989258039791966e-06}, {"ticker": "ITAQ", "market_cap": 60633454.77, "weight": 3.17958137311036e-06}, {"ticker": "PHIN", "market_cap": 1212952453.8, "weight": 6.360648660381428e-05}, {"ticker": "ESCA", "market_cap": 217453544.0, "weight": 1.140313116978002e-05}, {"ticker": "PEV", "market_cap": 22356520.2, "weight": 1.1723622786319668e-06}, {"ticker": "MEC", "market_cap": 227479386.07, "weight": 1.1928880210741656e-05}, {"ticker": "ALNY", "market_cap": 21010109588.16, "weight": 0.0011017573276489868}, {"ticker": "NKTR", "market_cap": 99878844.86055, "weight": 5.2375856841908295e-06}, {"ticker": "GMED", "market_cap": 7023949723.5, "weight": 0.0003683316378923243}, {"ticker": "NEPT", "market_cap": 938410.0000000001, "weight": 4.920964783647431e-08}, {"ticker": "TRMB", "market_cap": 12899366978.3154, "weight": 0.0006764349338949355}, {"ticker": "HALO", "market_cap": 4886349395.2, "weight": 0.0002562371809164024}, {"ticker": "WGO", "market_cap": 1776081291.58, "weight": 9.313661926833924e-05}, {"ticker": "ARTL", "market_cap": 4039963.1999999997, "weight": 2.1185320525603497e-07}, {"ticker": "SGMA", "market_cap": 17673435.2, "weight": 9.267841585796706e-07}, {"ticker": "NWS", "market_cap": 11670901920.339998, "weight": 0.0006120149757930574}, {"ticker": "NEON", "market_cap": 23653600.740000002, "weight": 1.240380390746015e-06}, {"ticker": "CHPT", "market_cap": 1564434569.1699998, "weight": 8.203799427975201e-05}, {"ticker": "TERN", "market_cap": 300473733.24, "weight": 1.5756659239406147e-05}, {"ticker": "LAKE", "market_cap": 112607134.52999999, "weight": 5.905049428390345e-06}, {"ticker": "CMT", "market_cap": 241789338.56, "weight": 1.267928538821161e-05}, {"ticker": "ELVN", "market_cap": 546075242.97, "weight": 2.8635852557806117e-05}, {"ticker": "CBAY", "market_cap": 1568386500.48, "weight": 8.224523114640843e-05}, {"ticker": "MTD", "market_cap": 23674568985.86, "weight": 0.0012414799527653022}, {"ticker": "JBSS", "market_cap": 1138128002.8049998, "weight": 5.968273804719033e-05}, {"ticker": "OFIX", "market_cap": 450048842.25, "weight": 2.3600286693807052e-05}, {"ticker": "COMS", "market_cap": 3139778.07, "weight": 1.6464804627975507e-07}, {"ticker": "KAI", "market_cap": 2630900575.5, "weight": 0.00013796282095580032}, {"ticker": "HAIN", "market_cap": 903774260.0, "weight": 4.739337076360031e-05}, {"ticker": "IKNA", "market_cap": 166128904.36, "weight": 8.71169838238608e-06}, {"ticker": "RMCF", "market_cap": 30516549.012, "weight": 1.6002692107554563e-06}, {"ticker": "STRT", "market_cap": 92434320.64, "weight": 4.847199376283445e-06}, {"ticker": "SXTP", "market_cap": 4001679.15, "weight": 2.0984561303274882e-07}, {"ticker": "SPB", "market_cap": 2727258646.2000003, "weight": 0.00014301577939118475}, {"ticker": "MCHP", "market_cap": 42068875293.509995, "weight": 0.0022060661523962675}, {"ticker": "BFRI", "market_cap": 12103507.799999999, "weight": 6.347005641713321e-07}, {"ticker": "COCP", "market_cap": 19533676.8, "weight": 1.0243340930718004e-06}, {"ticker": "CLMT", "market_cap": 1418459567.8799999, "weight": 7.438315427761032e-05}, {"ticker": "SON", "market_cap": 5253392078.6, "weight": 0.00027548467528567443}, {"ticker": "KVHI", "market_cap": 98654386.1, "weight": 5.173375813881528e-06}, {"ticker": "AAON", "market_cap": 4539527491.875, "weight": 0.00023805005191671253}, {"ticker": "SRDX", "market_cap": 439707326.6, "weight": 2.3057983922915985e-05}, {"ticker": "XBIO", "market_cap": 6758766.0, "weight": 3.5442556523176016e-07}, {"ticker": "GIII", "market_cap": 1108277088.48, "weight": 5.811737431328936e-05}, {"ticker": "HURC", "market_cap": 136997325.6, "weight": 7.18405616661673e-06}, {"ticker": "DGII", "market_cap": 940241109.32, "weight": 4.9305670091978063e-05}, {"ticker": "NUVB", "market_cap": 271490625.71999997, "weight": 1.4236802764873829e-05}, {"ticker": "ADES", "market_cap": 55508719.365, "weight": 2.910843375289406e-06}, {"ticker": "APLT", "market_cap": 135565589.9052, "weight": 7.10897682034376e-06}, {"ticker": "LRCX", "market_cap": 83050187795.82, "weight": 0.004355101175589943}, {"ticker": "FULC", "market_cap": 243580862.76, "weight": 1.2773231824175123e-05}, {"ticker": "TT", "market_cap": 45419297525.132, "weight": 0.002381760249988592}, {"ticker": "CDT", "market_cap": 310871363.75, "weight": 1.6301904639317573e-05}, {"ticker": "HLLY", "market_cap": 562213049.93, "weight": 2.9482109308431752e-05}, {"ticker": "FHTX", "market_cap": 174146643.84, "weight": 9.132143748756212e-06}, {"ticker": "LZB", "market_cap": 1316516062.62, "weight": 6.903729906180875e-05}, {"ticker": "HES", "market_cap": 43519759923.63, "weight": 0.002282149657153845}, {"ticker": "MLYS", "market_cap": 369139859.855, "weight": 1.9357469022996376e-05}, {"ticker": "VC", "market_cap": 3730494657.2999997, "weight": 0.0001956248636966591}, {"ticker": "CHRS", "market_cap": 337788532.575, "weight": 1.7713424549200433e-05}, {"ticker": "MRCY", "market_cap": 2116458971.4399998, "weight": 0.00011098581712141709}, {"ticker": "MBIO", "market_cap": 16193424.9411, "weight": 8.491733236196445e-07}, {"ticker": "ANEB", "market_cap": 81385463.975, "weight": 4.267804074144367e-06}, {"ticker": "CXT", "market_cap": 3032956168.7999997, "weight": 0.00015904637095737501}, {"ticker": "DRQ", "market_cap": 876429389.605, "weight": 4.595942244434541e-05}, {"ticker": "LCII", "market_cap": 2975114388.84, "weight": 0.00015601318330798252}, {"ticker": "CRBP", "market_cap": 27644922.1719, "weight": 1.4496828513612805e-06}, {"ticker": "KALV", "market_cap": 312039364.06, "weight": 1.6363153862927715e-05}, {"ticker": "ELDN", "market_cap": 38967190.15, "weight": 2.0434156759395467e-06}, {"ticker": "REPL", "market_cap": 945711105.7800001, "weight": 4.959251336886489e-05}, {"ticker": "ETD", "market_cap": 751523236.86, "weight": 3.940942000491029e-05}, {"ticker": "EBF", "market_cap": 553254777.8, "weight": 2.901234298375426e-05}, {"ticker": "PMN", "market_cap": 36620720.130399995, "weight": 1.920368219792062e-06}, {"ticker": "RVP", "market_cap": 34727104.44, "weight": 1.821068168362297e-06}, {"ticker": "KROS", "market_cap": 905023987.9200001, "weight": 4.745890573321339e-05}, {"ticker": "TUP", "market_cap": 55975595.721, "weight": 2.935326086537087e-06}, {"ticker": "MMSI", "market_cap": 3848890743.18, "weight": 0.00020183348220176005}, {"ticker": "CRI", "market_cap": 2456626472.045, "weight": 0.00012882399330260198}, {"ticker": "TKNO", "market_cap": 90822949.4, "weight": 4.762700051623411e-06}, {"ticker": "VCEL", "market_cap": 1603636250.0399997, "weight": 8.409370650597568e-05}, {"ticker": "BHVN", "market_cap": 1538610381.56, "weight": 8.068378963790981e-05}, {"ticker": "NR", "market_cap": 569058572.61, "weight": 2.9841084341028805e-05}, {"ticker": "VECO", "market_cap": 1517666715.875, "weight": 7.958551658800232e-05}, {"ticker": "GTLS", "market_cap": 6485450647.555, "weight": 0.0003400930749107701}, {"ticker": "POAI", "market_cap": 13535299.68, "weight": 7.097828567619092e-07}, {"ticker": "ABT", "market_cap": 164727988572.50998, "weight": 0.008638235213247919}, {"ticker": "IR", "market_cap": 25392242281.77, "weight": 0.0013315536923778886}, {"ticker": "LXFR", "market_cap": 347028988.38, "weight": 1.8197988413622758e-05}, {"ticker": "SPXC", "market_cap": 3694195054.83, "weight": 0.000193721334691051}, {"ticker": "CGNX", "market_cap": 7160501859.400001, "weight": 0.00037549234858270204}, {"ticker": "AMBA", "market_cap": 2090018086.7099998, "weight": 0.000109599273258875}, {"ticker": "HSY", "market_cap": 40475442154.725006, "weight": 0.0021225074908191558}, {"ticker": "GCI", "market_cap": 371191451.28000003, "weight": 1.9465053225560905e-05}, {"ticker": "VRPX", "market_cap": 9145353.233084, "weight": 4.795767435771415e-07}, {"ticker": "VSTO", "market_cap": 1800465329.28, "weight": 9.441530332759725e-05}, {"ticker": "MSN", "market_cap": 12204738.159999998, "weight": 6.400090224848192e-07}, {"ticker": "PTON", "market_cap": 1833229481.5249999, "weight": 9.613343548053368e-05}, {"ticker": "POWW", "market_cap": 230607735.555, "weight": 1.2092928948997073e-05}, {"ticker": "LNZA", "market_cap": 746498225.13, "weight": 3.914591145576071e-05}, {"ticker": "CLNN", "market_cap": 62586233.6892, "weight": 3.2819839081604155e-06}, {"ticker": "KRYS", "market_cap": 3106513821.69, "weight": 0.00016290368939429975}, {"ticker": "HEI.A", "market_cap": 17665886420.48, "weight": 0.0009263883051874707}, {"ticker": "CNMD", "market_cap": 2973763511.74, "weight": 0.0001559423441370856}, {"ticker": "DMAQ", "market_cap": 50639977.4764, "weight": 2.6555295212760252e-06}, {"ticker": "PAR", "market_cap": 1126619548.8, "weight": 5.9079241740961384e-05}, {"ticker": "PPC", "market_cap": 5516021396.055, "weight": 0.0002892567964517896}, {"ticker": "QCOM", "market_cap": 122123880000.0, "weight": 0.006404101754269293}, {"ticker": "GIFI", "market_cap": 52934274.25, "weight": 2.7758410442363675e-06}, {"ticker": "X", "market_cap": 7275308598.22, "weight": 0.00038151274391798865}, {"ticker": "FELE", "market_cap": 4119988362.02, "weight": 0.00021604967592563676}, {"ticker": "IMAX", "market_cap": 1024126556.25, "weight": 5.3704571746937575e-05}, {"ticker": "CIR", "market_cap": 1134903848.04, "weight": 5.951366533850656e-05}, {"ticker": "APT", "market_cap": 49320672.839999996, "weight": 2.586345991106619e-06}, {"ticker": "AKRO", "market_cap": 2549915745.5, "weight": 0.00013371602588286126}, {"ticker": "POWI", "market_cap": 4336113375.8, "weight": 0.0002273831397812723}, {"ticker": "VLD", "market_cap": 302991093.02, "weight": 1.5888668050321955e-05}, {"ticker": "ASYS", "market_cap": 104271703.36, "weight": 5.4679445036337144e-06}, {"ticker": "MNKD", "market_cap": 1038534554.34, "weight": 5.446011837584977e-05}, {"ticker": "STRC", "market_cap": 19520947.045, "weight": 1.023666552486561e-06}, {"ticker": "HBIO", "market_cap": 182278810.42, "weight": 9.558589602433544e-06}, {"ticker": "ASIX", "market_cap": 778837719.96, "weight": 4.084177483295595e-05}, {"ticker": "CENX", "market_cap": 594496657.755, "weight": 3.117504200518381e-05}, {"ticker": "NL", "market_cap": 230005709.64, "weight": 1.2061359077335879e-05}, {"ticker": "HZNP", "market_cap": 26618328584.32, "weight": 0.0013958489099966376}, {"ticker": "XXII", "market_cap": 15151337.9328, "weight": 7.945269167256344e-07}, {"ticker": "ABIO", "market_cap": 29050848.288, "weight": 1.5234087590747352e-06}, {"ticker": "CDRE", "market_cap": 1008433211.7299999, "weight": 5.2881622335480245e-05}, {"ticker": "ATHA", "market_cap": 68498249.4, "weight": 3.592006404864598e-06}, {"ticker": "VTSI", "market_cap": 57310929.63, "weight": 3.005350181981501e-06}, {"ticker": "INVO", "market_cap": 1875114.56, "weight": 9.832986343990949e-08}, {"ticker": "BRBR", "market_cap": 5432678885.4, "weight": 0.00028488636604382273}, {"ticker": "ZIVO", "market_cap": 14317079.166000001, "weight": 7.507788960111073e-07}, {"ticker": "ACOR", "market_cap": 15414436.18, "weight": 8.083236282814635e-07}, {"ticker": "STLD", "market_cap": 17636157883.89, "weight": 0.0009248293588673252}, {"ticker": "SENEA", "market_cap": 417460139.1, "weight": 2.1891354984363527e-05}, {"ticker": "ACHR", "market_cap": 1388274807.4673002, "weight": 7.280028385856395e-05}, {"ticker": "NLTX", "market_cap": 35217140.0, "weight": 1.8467653341373308e-06}, {"ticker": "AMSC", "market_cap": 210178580.12, "weight": 1.1021636502675162e-05}, {"ticker": "IBM", "market_cap": 128078367281.6, "weight": 0.00671635143423253}, {"ticker": "STSS", "market_cap": 5365810.1376, "weight": 2.8137980970863453e-07}, {"ticker": "MASI", "market_cap": 4386805302.18, "weight": 0.00023004139347135693}, {"ticker": "CYAN", "market_cap": 5044652.34, "weight": 2.6453849075441015e-07}, {"ticker": "ACLS", "market_cap": 5243410310.6, "weight": 0.00027496123746205214}, {"ticker": "NVCR", "market_cap": 1562988712.84, "weight": 8.196217445598476e-05}, {"ticker": "VXRT", "market_cap": 105374826.84740001, "weight": 5.525791626250798e-06}, {"ticker": "CADL", "market_cap": 28968973.677, "weight": 1.5191153044290491e-06}, {"ticker": "AQST", "market_cap": 91082754.945, "weight": 4.776324095884888e-06}, {"ticker": "SIGA", "market_cap": 375317944.32, "weight": 1.9681444002831033e-05}, {"ticker": "ANGO", "market_cap": 292950315.52000004, "weight": 1.536213580452386e-05}, {"ticker": "CULP", "market_cap": 70072571.25, "weight": 3.6745628821184277e-06}, {"ticker": "CALC", "market_cap": 14183142.165, "weight": 7.437553213992814e-07}, {"ticker": "EPIX", "market_cap": 123482346.39999999, "weight": 6.475338903427638e-06}, {"ticker": "UA", "market_cap": 2734383860.74, "weight": 0.00014338942129426836}, {"ticker": "FENC", "market_cap": 174940185.195, "weight": 9.173756573239357e-06}, {"ticker": "CPHI", "market_cap": 1640606.9434999998, "weight": 8.603242711363847e-08}, {"ticker": "HAYN", "market_cap": 571150252.68, "weight": 2.9950770767677357e-05}, {"ticker": "SMMT", "market_cap": 1256132354.4, "weight": 6.587081424539949e-05}, {"ticker": "KPTI", "market_cap": 142943175.0, "weight": 7.495852881339199e-06}, {"ticker": "IMNN", "market_cap": 9461533.55, "weight": 4.961570464812679e-07}, {"ticker": "NN", "market_cap": 548760541.6347, "weight": 2.8776667981368993e-05}, {"ticker": "WST", "market_cap": 27342312764.22, "weight": 0.001433814198657306}, {"ticker": "MEI", "market_cap": 832180284.52, "weight": 4.3639026371933574e-05}, {"ticker": "DK", "market_cap": 1612669700.32, "weight": 8.456741512696982e-05}, {"ticker": "ESE", "market_cap": 2747905564.54, "weight": 0.0001440984911913785}, {"ticker": "MO", "market_cap": 73353503729.975, "weight": 0.003846612979533012}, {"ticker": "NXTC", "market_cap": 37411348.9984, "weight": 1.9618283152339593e-06}, {"ticker": "RWLK", "market_cap": 43951994.377151005, "weight": 2.3048157681720137e-06}, {"ticker": "PVH", "market_cap": 4378693132.17, "weight": 0.00022961599622560962}, {"ticker": "SDC", "market_cap": 10048812.0, "weight": 5.269535700759124e-07}, {"ticker": "BCDA", "market_cap": 8621829.4816, "weight": 4.521234774732449e-07}, {"ticker": "CMBM", "market_cap": 216979269.3, "weight": 1.1378260493887022e-05}, {"ticker": "ZYXI", "market_cap": 285401610.0, "weight": 1.4966286292838718e-05}, {"ticker": "BEAM", "market_cap": 1672685541.1699002, "weight": 8.771460920294245e-05}, {"ticker": "NVT", "market_cap": 8609499228.785, "weight": 0.0004514768865388337}, {"ticker": "HCWB", "market_cap": 65745899.43, "weight": 3.447674851762616e-06}, {"ticker": "DCPH", "market_cap": 992358416.99, "weight": 5.2038669907225e-05}, {"ticker": "ABOS", "market_cap": 238707612.0, "weight": 1.251768152769658e-05}, {"ticker": "ARRY", "market_cap": 2992688776.0, "weight": 0.00015693477344777798}, {"ticker": "DFLI", "market_cap": 84193673.0788, "weight": 4.4150648461408066e-06}, {"ticker": "TER", "market_cap": 15360991198.4208, "weight": 0.0008055210060564879}, {"ticker": "TXT", "market_cap": 15005827746.880001, "weight": 0.0007868964513578921}, {"ticker": "GTEC", "market_cap": 37275561.3384, "weight": 1.954707693193338e-06}, {"ticker": "TWNK", "market_cap": 4418571529.9062, "weight": 0.00023170719507140334}, {"ticker": "CMRX", "market_cap": 84854198.8293, "weight": 4.449702413482404e-06}, {"ticker": "HI", "market_cap": 2930156753.5189, "weight": 0.00015365563234229375}, {"ticker": "AXNX", "market_cap": 2789220775.275, "weight": 0.00014626503563416906}, {"ticker": "ROG", "market_cap": 2424553831.04, "weight": 0.00012714212357717097}, {"ticker": "APH", "market_cap": 49362529315.8, "weight": 0.00258854091915917}, {"ticker": "NRXP", "market_cap": 23541368.6984, "weight": 1.2344950109620138e-06}, {"ticker": "FKWL", "market_cap": 37474010.4, "weight": 1.9651142409014985e-06}, {"ticker": "UAVS", "market_cap": 18124298.0625, "weight": 9.504271319987196e-07}, {"ticker": "SEEL", "market_cap": 27209495.768, "weight": 1.426849356412781e-06}, {"ticker": "INTZ", "market_cap": 7939865.67, "weight": 4.163617112878295e-07}, {"ticker": "CDXS", "market_cap": 139957007.97, "weight": 7.339260104272468e-06}, {"ticker": "JAGX", "market_cap": 4492546.465, "weight": 2.355863955324938e-07}, {"ticker": "IVVD", "market_cap": 184938226.44, "weight": 9.698047755900448e-06}, {"ticker": "QLGN", "market_cap": 5052463.0, "weight": 2.6494807699919697e-07}, {"ticker": "RAIN", "market_cap": 30650140.384600002, "weight": 1.6072746608248687e-06}, {"ticker": "MOVE", "market_cap": 48874027.865, "weight": 2.5629242011345597e-06}, {"ticker": "TMST", "market_cap": 913855747.86, "weight": 4.79220378358377e-05}, {"ticker": "DVAX", "market_cap": 1841802205.1000001, "weight": 9.658298387422643e-05}, {"ticker": "INVA", "market_cap": 853109552.1, "weight": 4.473654439399977e-05}, {"ticker": "MGRM", "market_cap": 78106180.17, "weight": 4.095840432239546e-06}, {"ticker": "MRVL", "market_cap": 45512700000.0, "weight": 0.00238665821878188}, {"ticker": "AWIN", "market_cap": 10982975.268, "weight": 5.759405218774171e-07}, {"ticker": "COLL", "market_cap": 802009353.04, "weight": 4.205688113368036e-05}, {"ticker": "DOV", "market_cap": 19270416870.25, "weight": 0.0010105289029816986}, {"ticker": "NVIV", "market_cap": 3509153.9799999995, "weight": 1.8401789362833106e-07}, {"ticker": "FONR", "market_cap": 97033347.0, "weight": 5.088369512541864e-06}, {"ticker": "STTK", "market_cap": 59884582.349999994, "weight": 3.1403109603242126e-06}, {"ticker": "LRMR", "market_cap": 148225437.5, "weight": 7.772851503908027e-06}, {"ticker": "LGND", "market_cap": 1003047078.315, "weight": 5.259917678550486e-05}, {"ticker": "PII", "market_cap": 5548671652.44, "weight": 0.0002909689559753203}, {"ticker": "GLYC", "market_cap": 89515381.8024, "weight": 4.694132004607414e-06}, {"ticker": "RAIL", "market_cap": 47442049.0, "weight": 2.4878321031646698e-06}, {"ticker": "KVSA", "market_cap": 73692206.4, "weight": 3.864374340892337e-06}, {"ticker": "TNXP", "market_cap": 10144961.062150002, "weight": 5.319955682304598e-07}, {"ticker": "MVIS", "market_cap": 400917289.98999995, "weight": 2.102385807052519e-05}, {"ticker": "PTN", "market_cap": 20764465.4126, "weight": 1.0888758969604937e-06}, {"ticker": "BRFH", "market_cap": 24641721.72, "weight": 1.2921968520429233e-06}, {"ticker": "ATOM", "market_cap": 165983791.545, "weight": 8.704088754906927e-06}, {"ticker": "TVTX", "market_cap": 590335507.55, "weight": 3.095683382732687e-05}, {"ticker": "ZURA", "market_cap": 302976062.1, "weight": 1.5887879838048154e-05}, {"ticker": "APOG", "market_cap": 1004972352.0000001, "weight": 5.270013696285557e-05}, {"ticker": "CVX", "market_cap": 308897349969.48004, "weight": 0.01619838856109618}, {"ticker": "ANTX", "market_cap": 447078761.5, "weight": 2.3444537471448605e-05}, {"ticker": "TARA", "market_cap": 18126528.0, "weight": 9.505440685606407e-07}, {"ticker": "REKR", "market_cap": 188482554.75, "weight": 9.883910169932637e-06}, {"ticker": "ACET", "market_cap": 54909351.449999996, "weight": 2.8794128875264536e-06}, {"ticker": "KVUE", "market_cap": 37780867380.12, "weight": 0.001981205633712604}, {"ticker": "MKFG", "market_cap": 275262860.565, "weight": 1.4434616458546029e-05}, {"ticker": "SNDX", "market_cap": 845620925.01, "weight": 4.434384535852745e-05}, {"ticker": "JAZZ", "market_cap": 8015911405.58, "weight": 0.0004203495032629336}, {"ticker": "INVE", "market_cap": 188739298.56, "weight": 9.897373658678809e-06}, {"ticker": "STE", "market_cap": 21753443666.508, "weight": 0.001140737313178079}, {"ticker": "ABEO", "market_cap": 103231990.41, "weight": 5.413422590908443e-06}, {"ticker": "CODI", "market_cap": 1312819663.5400002, "weight": 6.884346214938256e-05}, {"ticker": "KYMR", "market_cap": 848916497.28, "weight": 4.451666315759859e-05}, {"ticker": "CTXR", "market_cap": 107991531.08039999, "weight": 5.663009999667685e-06}, {"ticker": "PATK", "market_cap": 1638133820.0, "weight": 8.590273802625546e-05}, {"ticker": "ZOM", "market_cap": 156987936.8136, "weight": 8.232351621542753e-06}, {"ticker": "ALLR", "market_cap": 1855599.6400000001, "weight": 9.730651294198538e-08}, {"ticker": "THRN", "market_cap": 550634696.49, "weight": 2.8874947518479996e-05}, {"ticker": "NRBO", "market_cap": 17312347.8425, "weight": 9.078489578669991e-07}, {"ticker": "RFIL", "market_cap": 30425149.7088, "weight": 1.5954762870622187e-06}, {"ticker": "EXTR", "market_cap": 3139804242.72, "weight": 0.00016464941876122278}, {"ticker": "MRKR", "market_cap": 31889521.2, "weight": 1.6722670345859286e-06}, {"ticker": "TAP", "market_cap": 13564488697.7, "weight": 0.0007113135110406463}, {"ticker": "SHPW", "market_cap": 19131038.19, "weight": 1.0032199700302008e-06}, {"ticker": "BIO.B", "market_cap": 10323805158.62, "weight": 0.0005413740435290192}, {"ticker": "BDC", "market_cap": 3988204590.9300003, "weight": 0.00020913901537651493}, {"ticker": "AGRI", "market_cap": 4312873.963500001, "weight": 2.261644791796061e-07}, {"ticker": "AREB", "market_cap": 2040529.0542, "weight": 1.0700409858939693e-07}, {"ticker": "KPRX", "market_cap": 4203289.0, "weight": 2.2041791055607488e-07}, {"ticker": "PULM", "market_cap": 7187696.88, "weight": 3.769184388701368e-07}, {"ticker": "TTMI", "market_cap": 1335264597.375, "weight": 7.002046078508902e-05}, {"ticker": "SVT", "market_cap": 26734419.810000002, "weight": 1.401936663039143e-06}, {"ticker": "LIVN", "market_cap": 2761502520.0, "weight": 0.00014481150723962482}, {"ticker": "CVR", "market_cap": 16086097.799999999, "weight": 8.435451538251766e-07}, {"ticker": "DRIO", "market_cap": 88223722.56, "weight": 4.626398182031748e-06}, {"ticker": "MPWR", "market_cap": 21596133780.0, "weight": 0.0011324880787109968}, {"ticker": "BFLY", "market_cap": 222131688.67499998, "weight": 1.1648450222203617e-05}, {"ticker": "NAVB", "market_cap": 7886649.538, "weight": 4.135710897951564e-07}, {"ticker": "ESTA", "market_cap": 1045718769.62, "weight": 5.483685424174018e-05}, {"ticker": "NUVL", "market_cap": 3166586810.82, "weight": 0.00016605388029121223}, {"ticker": "GNLX", "market_cap": 645408287.8, "weight": 3.384481682141052e-05}, {"ticker": "MMAT", "market_cap": 104000267.8425, "weight": 5.453710590710274e-06}, {"ticker": "VTGN", "market_cap": 35015540.56, "weight": 1.8361935825080532e-06}, {"ticker": "ITOS", "market_cap": 354240998.1, "weight": 1.8576181802988208e-05}, {"ticker": "WAB", "market_cap": 18679711229.52, "weight": 0.0009795526595962464}, {"ticker": "RTX", "market_cap": 101442114022.07999, "weight": 0.005319562565205004}, {"ticker": "TAYD", "market_cap": 75005682.2377, "weight": 3.93325221241431e-06}, {"ticker": "LNTH", "market_cap": 4900322212.17, "weight": 0.00025696990691290416}, {"ticker": "NXL", "market_cap": 3048239.327238, "weight": 1.598478104609641e-07}, {"ticker": "DIOD", "market_cap": 3613544906.7599998, "weight": 0.00018949209013431758}, {"ticker": "BIOR", "market_cap": 50855251.46, "weight": 2.6668183576282706e-06}, {"ticker": "CARR", "market_cap": 45382681030.68, "weight": 0.0023798401033607967}, {"ticker": "CPIX", "market_cap": 26443033.76, "weight": 1.3866565563640636e-06}, {"ticker": "LUCY", "market_cap": 6587791.89, "weight": 3.4545978722187683e-07}, {"ticker": "HOFT", "market_cap": 209337507.718, "weight": 1.0977531179088033e-05}, {"ticker": "JNJ", "market_cap": 373145873923.68, "weight": 0.019567541956519784}, {"ticker": "IP", "market_cap": 12180899336.445, "weight": 0.0006387589291226669}, {"ticker": "TOMZ", "market_cap": 17684950.2555, "weight": 9.273880010642696e-07}, {"ticker": "ALT", "market_cap": 130662336.48, "weight": 6.851853202408019e-06}, {"ticker": "POST", "market_cap": 5210618840.8949995, "weight": 0.0002732416727981808}, {"ticker": "ALLK", "market_cap": 194261072.91, "weight": 1.0186932136525355e-05}, {"ticker": "GRC", "market_cap": 835064656.24, "weight": 4.379028106505352e-05}, {"ticker": "CCF", "market_cap": 1209383952.77, "weight": 6.341935658709409e-05}, {"ticker": "MTRN", "market_cap": 1993098087.6399999, "weight": 0.00010451684764262399}, {"ticker": "CTMX", "market_cap": 79453657.00999999, "weight": 4.166501295576685e-06}, {"ticker": "EYEN", "market_cap": 59610420.480000004, "weight": 3.125934079139135e-06}, {"ticker": "ACMR", "market_cap": 1071702023.1800001, "weight": 5.619940020494754e-05}, {"ticker": "NGM", "market_cap": 99672185.935, "weight": 5.226748616226316e-06}, {"ticker": "AZZ", "market_cap": 1101205821.825, "weight": 5.7746561404379235e-05}, {"ticker": "AVNS", "market_cap": 935583802.5600001, "weight": 4.9061443767102976e-05}, {"ticker": "PXMD", "market_cap": 4021184.5233, "weight": 2.1086846290754979e-07}, {"ticker": "SASI", "market_cap": 1881390.0318, "weight": 9.865894535217143e-08}, {"ticker": "BIOS", "market_cap": 208975076.82999998, "weight": 1.0958525524455684e-05}, {"ticker": "NWPX", "market_cap": 293415942.8, "weight": 1.538655301498821e-05}, {"ticker": "ACER", "market_cap": 19054796.1814, "weight": 9.992218856176825e-07}, {"ticker": "AUPH", "market_cap": 1029056179.1999999, "weight": 5.396307816666466e-05}, {"ticker": "HARP", "market_cap": 15298203.399999999, "weight": 8.022284522167855e-07}, {"ticker": "CSCO", "market_cap": 216691599923.52, "weight": 0.01136317528730363}, {"ticker": "ABVC", "market_cap": 3437707.56, "weight": 1.8027128695600574e-07}, {"ticker": "LSCC", "market_cap": 10944250098.2, "weight": 0.0005739097976009647}, {"ticker": "VTRS", "market_cap": 11545500264.375, "weight": 0.0006054389894670929}, {"ticker": "INDI", "market_cap": 872768786.7, "weight": 4.5767462661495464e-05}, {"ticker": "BHE", "market_cap": 864121108.6500001, "weight": 4.5313983700866625e-05}, {"ticker": "APGE", "market_cap": 1042623640.1999999, "weight": 5.46745475434244e-05}, {"ticker": "KHC", "market_cap": 40699538323.77, "weight": 0.0021342589571933493}, {"ticker": "SEDG", "market_cap": 7005816667.92, "weight": 0.0003673807515214512}, {"ticker": "LII", "market_cap": 13170319867.44, "weight": 0.0006906435380808424}, {"ticker": "SRPT", "market_cap": 10955607039.9, "weight": 0.0005745053486943634}, {"ticker": "AVD", "market_cap": 296339377.53000003, "weight": 1.5539856148518567e-05}, {"ticker": "TYGO", "market_cap": 402650960.275, "weight": 2.1114770682485218e-05}, {"ticker": "FTLF", "market_cap": 84521520.61000001, "weight": 4.432256970643328e-06}]}, "Transportation and Public Utilities": {"sic_description": "Transportation and Public Utilities", "companies": [{"ticker": "HUBG", "market_cap": 2550422840.7, "weight": 0.0007508523195749102}, {"ticker": "NWE", "market_cap": 2932256378.52, "weight": 0.0008632652861577189}, {"ticker": "OTTR", "market_cap": 3105352459.5021005, "weight": 0.0009142253041753841}, {"ticker": "NEXT", "market_cap": 1171257004.94, "weight": 0.00034482166052754844}, {"ticker": "CVLG", "market_cap": 561370429.6, "weight": 0.0001652691790864904}, {"ticker": "RSG", "market_cap": 45218797840.35, "weight": 0.013312553002974578}, {"ticker": "OGS", "market_cap": 3676913835.77, "weight": 0.0010824947292689862}, {"ticker": "SPIR", "market_cap": 91730584.0, "weight": 2.700576573940073e-05}, {"ticker": "KORE", "market_cap": 50936202.1575, "weight": 1.4995774398647708e-05}, {"ticker": "LSTR", "market_cap": 6292429923.6, "weight": 0.0018525107007749658}, {"ticker": "KEX", "market_cap": 4856390000.0, "weight": 0.0014297361355419729}, {"ticker": "NI", "market_cap": 9899518686.09, "weight": 0.002914448713957459}, {"ticker": "ATEX", "market_cap": 594271360.8, "weight": 0.00017495531430825392}, {"ticker": "RXO", "market_cap": 2265948855.56, "weight": 0.0006671023044039112}, {"ticker": "AVA", "market_cap": 2422786122.36, "weight": 0.0007132756775769055}, {"ticker": "KNX", "market_cap": 7816307240.0, "weight": 0.002301144864297625}, {"ticker": "ULCC", "market_cap": 1029468757.23, "weight": 0.0003030787648074429}, {"ticker": "MESA", "market_cap": 34640675.9496, "weight": 1.0198321420796696e-05}, {"ticker": "ETRN", "market_cap": 4001165334.9999995, "weight": 0.0011779553667904353}, {"ticker": "EXPE", "market_cap": 14289869694.6, "weight": 0.004206981538664678}, {"ticker": "CMS", "market_cap": 15247094512.08, "weight": 0.004488791465665748}, {"ticker": "LSXMB", "market_cap": 7997843276.709999, "weight": 0.0023545896312103646}, {"ticker": "JBLU", "market_cap": 1562944005.4900002, "weight": 0.00046013551680935114}, {"ticker": "MODV", "market_cap": 379561290.075, "weight": 0.00011174400986600257}, {"ticker": "WOW", "market_cap": 613072197.5655999, "weight": 0.0001804903384109731}, {"ticker": "LILAK", "market_cap": 1596005921.28, "weight": 0.0004698690463889789}, {"ticker": "CWCO", "market_cap": 465042902.8, "weight": 0.00013691005926428753}, {"ticker": "AM", "market_cap": 5547479227.245, "weight": 0.0016331949271703129}, {"ticker": "WEC", "market_cap": 24898824704.485, "weight": 0.0073302904858397674}, {"ticker": "NWN", "market_cap": 1361822782.72, "weight": 0.0004009248109519846}, {"ticker": "JBHT", "market_cap": 19258784051.129997, "weight": 0.0056698451904604}, {"ticker": "TDS", "market_cap": 1876288128.0, "weight": 0.0005523849891153722}, {"ticker": "DTM", "market_cap": 4997250424.89, "weight": 0.0014712058773734627}, {"ticker": "SWX", "market_cap": 4203539257.67, "weight": 0.0012375348713468397}, {"ticker": "SLNG", "market_cap": 77426293.51, "weight": 2.2794538674267497e-05}, {"ticker": "GOGO", "market_cap": 1483877355.4599998, "weight": 0.00043685805213617985}, {"ticker": "CLH", "market_cap": 8765665606.25, "weight": 0.0025806388838896916}, {"ticker": "SMLP", "market_cap": 184851807.03500003, "weight": 5.4420939882952436e-05}, {"ticker": "ATUS", "market_cap": 1366461636.6499999, "weight": 0.0004022905038002158}, {"ticker": "LNG", "market_cap": 37900562122.119995, "weight": 0.011158041924834767}, {"ticker": "MSEX", "market_cap": 1145617778.8999999, "weight": 0.00033727339361391156}, {"ticker": "VIA", "market_cap": 23102608.1, "weight": 6.801478799238669e-06}, {"ticker": "CWT", "market_cap": 2699299560.0, "weight": 0.0007946820831079356}, {"ticker": "PTSI", "market_cap": 474840673.5, "weight": 0.00013979455305855536}, {"ticker": "AMCX", "market_cap": 486599823.43, "weight": 0.0001432564829237797}, {"ticker": "FOXA", "market_cap": 14634361240.625, "weight": 0.004308400908142966}, {"ticker": "FE", "market_cap": 19236307849.0, "weight": 0.005663228127503141}, {"ticker": "ORA", "market_cap": 4147116185.8799996, "weight": 0.001220923745671916}, {"ticker": "LBRDK", "market_cap": 13071451318.800001, "weight": 0.003848275425669301}, {"ticker": "SRFM", "market_cap": 125435833.16499999, "weight": 3.692869464104298e-05}, {"ticker": "WTRG", "market_cap": 8691659832.22, "weight": 0.002558851356658673}, {"ticker": "TRGP", "market_cap": 17603919627.96, "weight": 0.0051826480202930595}, {"ticker": "CQP", "market_cap": 24734245885.3, "weight": 0.007281837975861445}, {"ticker": "ARCB", "market_cap": 2360812203.075, "weight": 0.0006950303653464366}, {"ticker": "WBD", "market_cap": 24861320880.0, "weight": 0.007319249244694136}, {"ticker": "GBTG", "market_cap": 2539081293.84, "weight": 0.0007475133333364318}, {"ticker": "ATO", "market_cap": 15719207488.279999, "weight": 0.004627782976259297}, {"ticker": "BKH", "market_cap": 3215285710.3199997, "weight": 0.0009465899909472351}, {"ticker": "EVRG", "market_cap": 11170875153.328, "weight": 0.00328873996370576}, {"ticker": "SO", "market_cap": 70291179749.44499, "weight": 0.020693939263044702}, {"ticker": "GEL", "market_cap": 1215985842.56, "weight": 0.0003579899677364223}, {"ticker": "SRE", "market_cap": 41760821146.8, "weight": 0.012294514040982156}, {"ticker": "MNTK", "market_cap": 1366222947.69, "weight": 0.00040222023303710443}, {"ticker": "NXST", "market_cap": 4726467394.056, "weight": 0.0013914865212107685}, {"ticker": "EGGF", "market_cap": 105566638.59, "weight": 3.107914271708464e-05}, {"ticker": "EPD", "market_cap": 58148668689.299995, "weight": 0.01711914670336408}, {"ticker": "LUMN", "market_cap": 1320461791.0, "weight": 0.00038874800792258697}, {"ticker": "MRTN", "market_cap": 1562614214.9599998, "weight": 0.00046003842546415416}, {"ticker": "TTGT", "market_cap": 818486406.1600001, "weight": 0.00024096491248372476}, {"ticker": "SRCL", "market_cap": 3871105794.1600003, "weight": 0.0011396654384051648}, {"ticker": "TDW", "market_cap": 3358044668.24, "weight": 0.0009886186667353288}, {"ticker": "DUK", "market_cap": 66408015614.925, "weight": 0.019550723812192566}, {"ticker": "LBTYA", "market_cap": 6916592105.200001, "weight": 0.002036265964555723}, {"ticker": "PARAA", "market_cap": 9473539177.95, "weight": 0.0027890390380895503}, {"ticker": "ARTNA", "market_cap": 423950130.88, "weight": 0.00012481222096802044}, {"ticker": "MPLX", "market_cap": 34947474742.635, "weight": 0.010288643927997065}, {"ticker": "UONEK", "market_cap": 240369596.28, "weight": 7.076554759546728e-05}, {"ticker": "FDX", "market_cap": 65085211114.89, "weight": 0.01916128610353293}, {"ticker": "EXPD", "market_cap": 16974158889.519999, "weight": 0.004997244524179019}, {"ticker": "FOX", "market_cap": 13568979742.307499, "weight": 0.0039947493220301574}, {"ticker": "HEP", "market_cap": 2578115698.39, "weight": 0.0007590051819553645}, {"ticker": "KMI", "market_cap": 35450110988.97, "weight": 0.01043662158309032}, {"ticker": "DSKE", "market_cap": 212794588.47759998, "weight": 6.264738058397456e-05}, {"ticker": "CP", "market_cap": 67875543540.840004, "weight": 0.019982768542042853}, {"ticker": "NCLH", "market_cap": 6923769073.724999, "weight": 0.002038378886138182}, {"ticker": "IHRT", "market_cap": 388749557.15999997, "weight": 0.00011444906392352995}, {"ticker": "FWRD", "market_cap": 1815362974.29, "weight": 0.000534448436692145}, {"ticker": "AWX", "market_cap": 7447913.21, "weight": 2.1926885301051624e-06}, {"ticker": "OKE", "market_cap": 35501704360.5, "weight": 0.010451810830171151}, {"ticker": "LPG", "market_cap": 1073020971.33, "weight": 0.0003159006704372689}, {"ticker": "EE", "market_cap": 411402796.89, "weight": 0.00012111824729411512}, {"ticker": "LNT", "market_cap": 11938449906.08, "weight": 0.0035147163290181072}, {"ticker": "CCL", "market_cap": 17066291146.125, "weight": 0.00502436854356733}, {"ticker": "CABO", "market_cap": 3409017162.36, "weight": 0.0010036251255992308}, {"ticker": "SAIA", "market_cap": 10591465048.39, "weight": 0.0031181598487792354}, {"ticker": "PCYO", "market_cap": 229002105.35999998, "weight": 6.741892334602083e-05}, {"ticker": "IDA", "market_cap": 4699077010.76, "weight": 0.0013834227082211536}, {"ticker": "CEQP", "market_cap": 2915365924.96, "weight": 0.0008582926847397057}, {"ticker": "ENB", "market_cap": 66297718903.669, "weight": 0.019518252121551134}, {"ticker": "SALM", "market_cap": 19321197.0913, "weight": 5.688219781228457e-06}, {"ticker": "BBGI", "market_cap": 25184151.5598, "weight": 7.414291588610428e-06}, {"ticker": "AMPS", "market_cap": 700748217.8475, "weight": 0.0002063024281355511}, {"ticker": "MDIA", "market_cap": 19263858.9052, "weight": 5.671339243089305e-06}, {"ticker": "FYBR", "market_cap": 3446769975.0, "weight": 0.0010147396696226214}, {"ticker": "KNTK", "market_cap": 1745638438.5600002, "weight": 0.0005139213191692385}, {"ticker": "UONE", "market_cap": 244273159.4391, "weight": 7.191476858182457e-05}, {"ticker": "NSC", "market_cap": 43640281774.095, "weight": 0.012847833023636358}, {"ticker": "ALGT", "market_cap": 1399951405.57, "weight": 0.0004121499946557432}, {"ticker": "SJW", "market_cap": 1873731668.34, "weight": 0.0005516323595376494}, {"ticker": "LBTYB", "market_cap": 7056663703.600399, "weight": 0.0020775034734452835}, {"ticker": "ALE", "market_cap": 2962318934.38, "weight": 0.0008721157949594815}, {"ticker": "GNK", "market_cap": 588171768.87, "weight": 0.0001731595757052214}, {"ticker": "OPAL", "market_cap": 210476923.2, "weight": 6.196505280604164e-05}, {"ticker": "OGE", "market_cap": 6458266052.179999, "weight": 0.001901333366501814}, {"ticker": "SAVE", "market_cap": 1798972736.16, "weight": 0.0005296231002334589}, {"ticker": "LIND", "market_cap": 372770213.28000003, "weight": 0.00010974469599437117}, {"ticker": "FWONA", "market_cap": 14169568797.16, "weight": 0.00417156458487635}, {"ticker": "ATNI", "market_cap": 492626866.575, "weight": 0.00014503086294162773}, {"ticker": "WERN", "market_cap": 2417073092.25, "weight": 0.0007115937439612554}, {"ticker": "ADEA", "market_cap": 969854520.8950001, "weight": 0.0002855281504867461}, {"ticker": "ET", "market_cap": 41719100785.425, "weight": 0.01228223143842229}, {"ticker": "YORW", "market_cap": 525046704.80999994, "weight": 0.00015457536291650718}, {"ticker": "BKNG", "market_cap": 108556800170.09999, "weight": 0.03195945547248078}, {"ticker": "UPS", "market_cap": 130910267493.69, "weight": 0.03854038492567407}, {"ticker": "ASTS", "market_cap": 339987428.8, "weight": 0.00010009334352993965}, {"ticker": "POR", "market_cap": 4015474096.08, "weight": 0.0011821679100109989}, {"ticker": "INSW", "market_cap": 2005451761.18, "weight": 0.0005904111595331793}, {"ticker": "PCG", "market_cap": 37856287650.63, "weight": 0.011145007384410445}, {"ticker": "ASTR", "market_cap": 30013972.4, "weight": 8.836205681882928e-06}, {"ticker": "VZ", "market_cap": 132595841530.8985, "weight": 0.039036623100558776}, {"ticker": "LILA", "market_cap": 1602240319.41, "weight": 0.0004717044723514359}, {"ticker": "AIRT", "market_cap": 63399465.0, "weight": 1.8664997268450135e-05}, {"ticker": "NEE", "market_cap": 102835026757.555, "weight": 0.030274947801700862}, {"ticker": "GNE", "market_cap": 419032671.96, "weight": 0.00012336450595481778}, {"ticker": "ZD", "market_cap": 2825690445.43, "weight": 0.0008318919480698551}, {"ticker": "CRGE", "market_cap": 94851181.254, "weight": 2.792447915791054e-05}, {"ticker": "DATS", "market_cap": 5088038.49, "weight": 1.497934162656091e-06}, {"ticker": "CPK", "market_cap": 1672893654.0, "weight": 0.0004925050311121327}, {"ticker": "ENLC", "market_cap": 5327991292.85, "weight": 0.001568577004985316}, {"ticker": "ALK", "market_cap": 4602980130.66, "weight": 0.001355131491496011}, {"ticker": "OSG", "market_cap": 317484460.345, "weight": 9.346840048436988e-05}, {"ticker": "QRHC", "market_cap": 147376347.0, "weight": 4.3388049318541715e-05}, {"ticker": "CALX", "market_cap": 2921489420.6682, "weight": 0.0008600954606884763}, {"ticker": "VRRM", "market_cap": 3204232963.5750003, "weight": 0.0009433360283498491}, {"ticker": "CWEN", "market_cap": 2262189914.895, "weight": 0.0006659956607241184}, {"ticker": "AAL", "market_cap": 8294436125.02, "weight": 0.0024419074769295363}, {"ticker": "SIDU", "market_cap": 9864333.7954, "weight": 2.9040901740451807e-06}, {"ticker": "NFG", "market_cap": 4632743084.23, "weight": 0.0013638937964631753}, {"ticker": "PNW", "market_cap": 8100689392.469999, "weight": 0.0023848678436484525}, {"ticker": "KGS", "market_cap": 1320444000.0, "weight": 0.0003887427701975304}, {"ticker": "HCCI", "market_cap": 1103820502.365, "weight": 0.00032496814699464706}, {"ticker": "NRG", "market_cap": 8550662487.6, "weight": 0.002517341305238034}, {"ticker": "XPO", "market_cap": 8547940100.699999, "weight": 0.002516539826171102}, {"ticker": "SKYW", "market_cap": 1764113664.24, "weight": 0.000519360482368032}, {"ticker": "T", "market_cap": 104000077500.0, "weight": 0.030617942319483334}, {"ticker": "AWR", "market_cap": 2856086796.16, "weight": 0.0008408407271068123}, {"ticker": "GXO", "market_cap": 6593802470.639999, "weight": 0.0019412357044841838}, {"ticker": "AREN", "market_cap": 107058901.5, "weight": 3.1518469502239053e-05}, {"ticker": "WMB", "market_cap": 39655339693.8, "weight": 0.011674653832871293}, {"ticker": "GWRS", "market_cap": 232520373.54, "weight": 6.845471230684841e-05}, {"ticker": "CHRW", "market_cap": 9896083783.18, "weight": 0.00291343746798823}, {"ticker": "CXDO", "market_cap": 52730882.12, "weight": 1.5524133693127633e-05}, {"ticker": "ROKU", "market_cap": 9875828733.890001, "weight": 0.0029074743192507736}, {"ticker": "TGNA", "market_cap": 2790072159.225, "weight": 0.0008214058151865066}, {"ticker": "PAGP", "market_cap": 2929086615.265, "weight": 0.0008623320981174696}, {"ticker": "LSXMK", "market_cap": 8059892693.72, "weight": 0.002372857170203014}, {"ticker": "AGR", "market_cap": 11157876772.652, "weight": 0.0032849132005018152}, {"ticker": "USDP", "market_cap": 18810295.8204, "weight": 5.537808877511901e-06}, {"ticker": "EIX", "market_cap": 23365283358.24, "weight": 0.0068788112022414236}, {"ticker": "D", "market_cap": 35295081470.34, "weight": 0.010390980416532239}, {"ticker": "PAA", "market_cap": 10090787210.24, "weight": 0.0029707587550721628}, {"ticker": "RLGT", "market_cap": 272880442.66999996, "weight": 8.033684065076911e-05}, {"ticker": "PESI", "market_cap": 142441036.5, "weight": 4.1935078745344396e-05}, {"ticker": "UTL", "market_cap": 697930380.53, "weight": 0.0002054728481724698}, {"ticker": "MARK", "market_cap": 8254047.36, "weight": 2.4300169004274415e-06}, {"ticker": "MBAC", "market_cap": 151620711.82999998, "weight": 4.4637603363804645e-05}, {"ticker": "CMCSA", "market_cap": 178659506938.44, "weight": 0.05259790771087155}, {"ticker": "MOND", "market_cap": 381707240.18, "weight": 0.00011237578416958787}, {"ticker": "CWEN.A", "market_cap": 2127640217.3449998, "weight": 0.000626383816409004}, {"ticker": "PEG", "market_cap": 27960201357.120003, "weight": 0.008231569177373353}, {"ticker": "GTN.A", "market_cap": 677729278.8, "weight": 0.00019952558176241205}, {"ticker": "SGLY", "market_cap": 9057278.4946, "weight": 2.6664906140974717e-06}, {"ticker": "SGA", "market_cap": 131758136.4343, "weight": 3.879000014656733e-05}, {"ticker": "AES", "market_cap": 8842451407.175, "weight": 0.002603244859579248}, {"ticker": "USM", "market_cap": 3347794424.0, "weight": 0.00098560096334082}, {"ticker": "WES", "market_cap": 10002107572.905, "weight": 0.002944651197403894}, {"ticker": "AROC", "market_cap": 1867822439.5600002, "weight": 0.0005498926644308004}, {"ticker": "DISH", "market_cap": 2650681525.335, "weight": 0.0007803687843408303}, {"ticker": "OMEX", "market_cap": 72736117.8301, "weight": 2.141373654519772e-05}, {"ticker": "AEP", "market_cap": 37690279379.04, "weight": 0.011096134039252605}, {"ticker": "TMUS", "market_cap": 162139335300.78, "weight": 0.0477343184283555}, {"ticker": "PARA", "market_cap": 7666730159.475, "weight": 0.0022571089122683475}, {"ticker": "CLIN", "market_cap": 176730753.4, "weight": 5.203007674374121e-05}, {"ticker": "BLDE", "market_cap": 186398945.835, "weight": 5.487642229870962e-05}, {"ticker": "VIVK", "market_cap": 18401777.82, "weight": 5.417539923166959e-06}, {"ticker": "PATI", "market_cap": 28564560.9, "weight": 8.40949448347833e-06}, {"ticker": "CWST", "market_cap": 4348327919.98, "weight": 0.0012801610983428986}, {"ticker": "NEP", "market_cap": 2139605097.3, "weight": 0.0006299063138256212}, {"ticker": "DINO", "market_cap": 9368743410.0, "weight": 0.002758186842057109}, {"ticker": "SIRI", "market_cap": 17002633491.824999, "weight": 0.005005627534575763}, {"ticker": "ED", "market_cap": 28908045658.850002, "weight": 0.008510617451719302}, {"ticker": "JTAI", "market_cap": 24968598.195, "weight": 7.350832015801774e-06}, {"ticker": "WCN", "market_cap": 34339593203.91, "weight": 0.01010968173549523}, {"ticker": "SNDR", "market_cap": 4722477488.650001, "weight": 0.001390311880801668}, {"ticker": "BATRA", "market_cap": 2476177914.7999997, "weight": 0.0007289943852986544}, {"ticker": "UGI", "market_cap": 4482845763.599999, "weight": 0.001319763564763161}, {"ticker": "OPTT", "market_cap": 22010069.2032, "weight": 6.479831991581104e-06}, {"ticker": "CMLS", "market_cap": 87765698.8, "weight": 2.5838491355812187e-05}, {"ticker": "HA", "market_cap": 288366423.425, "weight": 8.489596096024407e-05}, {"ticker": "GSAT", "market_cap": 2444392931.26, "weight": 0.0007196367884963498}, {"ticker": "SR", "market_cap": 2933677006.26, "weight": 0.0008636835233287517}, {"ticker": "ULH", "market_cap": 627493915.51, "weight": 0.00018473613647943608}, {"ticker": "SBGI", "market_cap": 636780122.5999999, "weight": 0.0001874700243753215}, {"ticker": "VST", "market_cap": 11609706283.08, "weight": 0.0034179331964583073}, {"ticker": "USAC", "market_cap": 2323794092.12, "weight": 0.0006841321197562214}, {"ticker": "EXC", "market_cap": 37012301383.9695, "weight": 0.010896535234656064}, {"ticker": "SSP", "market_cap": 417323661.56000006, "weight": 0.00012286136804272733}, {"ticker": "NOVA", "market_cap": 1127292898.02, "weight": 0.0003318784923861193}, {"ticker": "CCOI", "market_cap": 3000761466.415, "weight": 0.0008834333944916791}, {"ticker": "EVC", "market_cap": 310628495.72999996, "weight": 9.144998343918555e-05}, {"ticker": "NXPL", "market_cap": 33659272.800000004, "weight": 9.909393318540117e-06}, {"ticker": "LSXMA", "market_cap": 8056626934.93, "weight": 0.002371895720782348}, {"ticker": "CNSL", "market_cap": 399391048.125, "weight": 0.00011758195155584612}, {"ticker": "AYRO", "market_cap": 8961477.299999999, "weight": 2.638286448091918e-06}, {"ticker": "LBRDA", "market_cap": 13045132960.44, "weight": 0.003840527220114262}, {"ticker": "UP", "market_cap": 336928460.04749995, "weight": 9.919277373160322e-05}, {"ticker": "ETR", "market_cap": 19213912003.62, "weight": 0.005656634721819948}, {"ticker": "CSX", "market_cap": 61644491001.325005, "weight": 0.018148327531702833}, {"ticker": "SPCE", "market_cap": 592925605.77, "weight": 0.00017455911989306522}, {"ticker": "SATS", "market_cap": 1196529810.67, "weight": 0.0003522620521762244}, {"ticker": "SPOK", "market_cap": 287537688.0, "weight": 8.465197870512736e-05}, {"ticker": "EAC", "market_cap": 93176154.39999999, "weight": 2.7431346106164903e-05}, {"ticker": "CHTR", "market_cap": 64840445493.240005, "weight": 0.019089226352563302}, {"ticker": "GATX", "market_cap": 3738385627.5, "weight": 0.0011005922136046533}, {"ticker": "PANL", "market_cap": 274385402.91, "weight": 8.07799055688836e-05}, {"ticker": "XEL", "market_cap": 31100931321.38, "weight": 0.009156209727634342}, {"ticker": "LBTYK", "market_cap": 7489438690.599999, "weight": 0.002204913759166166}, {"ticker": "MATX", "market_cap": 3156432565.6049995, "weight": 0.0009292634443376514}, {"ticker": "BCO", "market_cap": 3348729379.6499996, "weight": 0.0009858762171565006}, {"ticker": "SHEN", "market_cap": 1093994937.045, "weight": 0.0003220754703788621}, {"ticker": "PNM", "market_cap": 3711499951.76, "weight": 0.0010926769880700606}, {"ticker": "DAL", "market_cap": 23227403337.5, "weight": 0.0068382189005479314}, {"ticker": "NGL", "market_cap": 498936018.4917, "weight": 0.00014688829664854375}, {"ticker": "HLGN", "market_cap": 15692641.98, "weight": 4.619962009008529e-06}, {"ticker": "LUV", "market_cap": 16320364010.199999, "weight": 0.004804765303153503}, {"ticker": "HTLD", "market_cap": 1141156450.2, "weight": 0.0003359599647387759}, {"ticker": "SURG", "market_cap": 63008784.86, "weight": 1.8549979835007478e-05}, {"ticker": "UNP", "market_cap": 123153853440.6155, "weight": 0.03625687279960796}, {"ticker": "ES", "market_cap": 19618622803.0, "weight": 0.005775782824488322}, {"ticker": "SMHI", "market_cap": 353616494.7, "weight": 0.00010410578240138796}, {"ticker": "NFE", "market_cap": 5734728425.82, "weight": 0.0016883216664877795}, {"ticker": "DTE", "market_cap": 20066039004.775, "weight": 0.005907503528819041}, {"ticker": "BZFD", "market_cap": 44644483.223, "weight": 1.3143473015248045e-05}, {"ticker": "PPL", "market_cap": 16860900352.5, "weight": 0.0049639008629335036}, {"ticker": "IDT", "market_cap": 709053131.9699999, "weight": 0.00020874742036712868}, {"ticker": "UAL", "market_cap": 13579999685.525, "weight": 0.0039979936271682705}, {"ticker": "RCL", "market_cap": 22694397873.81, "weight": 0.006681300454566679}, {"ticker": "CLNE", "market_cap": 787072871.0699999, "weight": 0.00023171667124624403}, {"ticker": "NJR", "market_cap": 3925891902.2400002, "weight": 0.001155794636934872}, {"ticker": "DKL", "market_cap": 1776572533.76, "weight": 0.0005230284118301935}, {"ticker": "WM", "market_cap": 62261689135.47, "weight": 0.018330032558518262}, {"ticker": "CDZI", "market_cap": 203116598.29999998, "weight": 5.9798150543484606e-05}, {"ticker": "ATSG", "market_cap": 1473602885.475, "weight": 0.00043383321660791797}, {"ticker": "TSQ", "market_cap": 147430048.6, "weight": 4.34038592345609e-05}, {"ticker": "HE", "market_cap": 1282455708.3, "weight": 0.0003775589004154496}, {"ticker": "VTOL", "market_cap": 753992409.24, "weight": 0.00022197768165546408}, {"ticker": "TRKA", "market_cap": 17356392.900000002, "weight": 5.109775391143243e-06}, {"ticker": "SNCY", "market_cap": 819178849.125, "weight": 0.00024116876981990703}, {"ticker": "CEG", "market_cap": 34201274317.199997, "weight": 0.010068960230311908}, {"ticker": "AEE", "market_cap": 19096636203.800003, "weight": 0.005622108366064494}, {"ticker": "RGCO", "market_cap": 161699353.096, "weight": 4.760478631557843e-05}, {"ticker": "EGLE", "market_cap": 413561373.9, "weight": 0.00012175373899732411}, {"ticker": "ODFL", "market_cap": 43874412563.93, "weight": 0.01291676184744789}, {"ticker": "AWK", "market_cap": 23099380941.059998, "weight": 0.006800528713732427}, {"ticker": "GTN", "market_cap": 597308586.21, "weight": 0.00017584948279975965}, {"ticker": "CNP", "market_cap": 16669571790.49, "weight": 0.00490757314648837}, {"ticker": "MGEE", "market_cap": 2504675006.2000003, "weight": 0.0007373840165540566}]}, "Retail Trade": {"sic_description": "Retail Trade", "companies": [{"ticker": "MCD", "market_cap": 185809173539.18, "weight": 0.04762466155602507}, {"ticker": "NDLS", "market_cap": 104929933.24, "weight": 2.689454165511143e-05}, {"ticker": "CRMT", "market_cap": 585164571.41, "weight": 0.0001499832550630304}, {"ticker": "GPS", "market_cap": 3859704530.5750003, "weight": 0.0009892790462045248}, {"ticker": "KR", "market_cap": 32218153696.62, "weight": 0.008257819764953553}, {"ticker": "CHUY", "market_cap": 624855510.5600001, "weight": 0.0001601564209399076}, {"ticker": "CNXN", "market_cap": 1387145898.72, "weight": 0.0003555387104794276}, {"ticker": "WSM", "market_cap": 9677227881.75, "weight": 0.0024803657101014577}, {"ticker": "OSTK", "market_cap": 672622901.76, "weight": 0.00017239965842911884}, {"ticker": "NGVC", "market_cap": 289794038.445, "weight": 7.427697319253546e-05}, {"ticker": "BH.A", "market_cap": 519739594.08, "weight": 0.00013321421000834772}, {"ticker": "KAVL", "market_cap": 24344352.349999998, "weight": 6.239689458738712e-06}, {"ticker": "ABG", "market_cap": 4398973911.6, "weight": 0.0011274989266854382}, {"ticker": "HBI", "market_cap": 1320822013.1499999, "weight": 0.00033853926667809254}, {"ticker": "BARK", "market_cap": 205712265.64999998, "weight": 5.2726013699418156e-05}, {"ticker": "JWN", "market_cap": 2361313251.0750003, "weight": 0.0006052270846923031}, {"ticker": "TTSH", "market_cap": 238408770.0554, "weight": 6.110643930872703e-05}, {"ticker": "DDS", "market_cap": 5135451962.71, "weight": 0.001316265268300745}, {"ticker": "GROV", "market_cap": 90354152.832, "weight": 2.315863025943662e-05}, {"ticker": "WOOF", "market_cap": 1005458119.475, "weight": 0.0002577084959621613}, {"ticker": "FND", "market_cap": 9237086918.84, "weight": 0.0023675533876726528}, {"ticker": "DLTH", "market_cap": 195702016.48000002, "weight": 5.016029146013268e-05}, {"ticker": "LVO", "market_cap": 83126840.832, "weight": 2.1306201332469673e-05}, {"ticker": "TSCO", "market_cap": 22309965254.719997, "weight": 0.005718256662708191}, {"ticker": "FCFS", "market_cap": 4520263861.5199995, "weight": 0.001158586696492827}, {"ticker": "FAT", "market_cap": 110190392.39999999, "weight": 2.824284745913819e-05}, {"ticker": "PSMT", "market_cap": 2312399727.6, "weight": 0.0005926900825807341}, {"ticker": "SGU", "market_cap": 405513067.28000003, "weight": 0.00010393686284645886}, {"ticker": "ARKR", "market_cap": 55828391.93, "weight": 1.4309348781010163e-05}, {"ticker": "M", "market_cap": 3122166347.51, "weight": 0.0008002409826682818}, {"ticker": "ANF", "market_cap": 2741438945.24, "weight": 0.0007026569219201184}, {"ticker": "HD", "market_cap": 291219213958.39996, "weight": 0.07464225925560111}, {"ticker": "PZZA", "market_cap": 2112509704.8600001, "weight": 0.0005414563652131075}, {"ticker": "LL", "market_cap": 86336241.21000001, "weight": 2.212880122831281e-05}, {"ticker": "SIG", "market_cap": 3138890287.6800003, "weight": 0.0008045274878784863}, {"ticker": "DG", "market_cap": 23356688810.74, "weight": 0.0059865418832312795}, {"ticker": "URBN", "market_cap": 2882036580.675, "weight": 0.000738693435487396}, {"ticker": "WING", "market_cap": 5494899643.9614, "weight": 0.0014083951338000188}, {"ticker": "BBY", "market_cap": 14869038749.599998, "weight": 0.0038110763027736313}, {"ticker": "CPNG", "market_cap": 30100675730.625, "weight": 0.007715089987074272}, {"ticker": "RH", "market_cap": 4567295658.24, "weight": 0.001170641394108117}, {"ticker": "DKS", "market_cap": 8925303701.6, "weight": 0.002287640378443468}, {"ticker": "AEO", "market_cap": 3237742507.14, "weight": 0.000829864253583715}, {"ticker": "SFT", "market_cap": 28556655.3779, "weight": 7.319342859343588e-06}, {"ticker": "GRWG", "market_cap": 163795027.54999998, "weight": 4.1982226189621834e-05}, {"ticker": "AN", "market_cap": 6242429840.16, "weight": 0.0015999942455056661}, {"ticker": "CATO", "market_cap": 152876473.2, "weight": 3.918369667842863e-05}, {"ticker": "KRUS", "market_cap": 742218726.15, "weight": 0.0001902377313248438}, {"ticker": "BH", "market_cap": 503889674.4, "weight": 0.00012915172457734174}, {"ticker": "MUSA", "market_cap": 7456209545.84, "weight": 0.0019110975488869316}, {"ticker": "BROS", "market_cap": 1650075101.3999999, "weight": 0.00042292997029895485}, {"ticker": "GME", "market_cap": 4517571151.2, "weight": 0.0011578965291818392}, {"ticker": "SG", "market_cap": 1265145918.615, "weight": 0.0003242689531705008}, {"ticker": "ARMK", "market_cap": 6433583534.474999, "weight": 0.001648988758658786}, {"ticker": "EZPW", "market_cap": 458196960.0, "weight": 0.00011744024651935846}, {"ticker": "BBWI", "market_cap": 7394424136.320001, "weight": 0.0018952613597395217}, {"ticker": "DBGI", "market_cap": 4805789.6646, "weight": 1.2317696802938393e-06}, {"ticker": "LE", "market_cap": 234977023.36, "weight": 6.0226849933232764e-05}, {"ticker": "JACK", "market_cap": 1291936687.0, "weight": 0.00033113568236830567}, {"ticker": "LIVE", "market_cap": 88822743.1, "weight": 2.276611535395094e-05}, {"ticker": "QRTEB", "market_cap": 3118082895.8199997, "weight": 0.000799194355093268}, {"ticker": "DXLG", "market_cap": 264204784.375, "weight": 6.77182035616167e-05}, {"ticker": "CASY", "market_cap": 10138760990.16, "weight": 0.002598661043244908}, {"ticker": "ONEW", "market_cap": 354191211.21000004, "weight": 9.078258214435243e-05}, {"ticker": "LVLU", "market_cap": 94771622.92310001, "weight": 2.429086993315833e-05}, {"ticker": "RUSHA", "market_cap": 3265728439.08, "weight": 0.0008370373145881084}, {"ticker": "KMX", "market_cap": 10886227191.69, "weight": 0.002790243752507256}, {"ticker": "LESL", "market_cap": 915424556.5999999, "weight": 0.00023463203596326438}, {"ticker": "CAVA", "market_cap": 3480766755.8849998, "weight": 0.0008921536840565725}, {"ticker": "BKE", "market_cap": 1651599617.24, "weight": 0.0004233207182342364}, {"ticker": "RENT", "market_cap": 50340785.6035, "weight": 1.2902822993965765e-05}, {"ticker": "HOUR", "market_cap": 46644132.080000006, "weight": 1.1955335474414141e-05}, {"ticker": "LOW", "market_cap": 115024834298.89, "weight": 0.029481960980077215}, {"ticker": "CDW", "market_cap": 27378603735.985, "weight": 0.007017396999120001}, {"ticker": "KAR", "market_cap": 1616101391.79, "weight": 0.00041422218482657744}, {"ticker": "YUMC", "market_cap": 22101120512.9463, "weight": 0.005664727765532237}, {"ticker": "WINA", "market_cap": 1317335861.73, "weight": 0.00033764573285331864}, {"ticker": "ZUMZ", "market_cap": 342090135.42, "weight": 8.76809611210985e-05}, {"ticker": "IPW", "market_cap": 22028613.1974, "weight": 5.646143449712651e-06}, {"ticker": "GTIM", "market_cap": 32484153.57, "weight": 8.325998066930645e-06}, {"ticker": "BODY", "market_cap": 109471061.9124, "weight": 2.8058476201431387e-05}, {"ticker": "BFI", "market_cap": 29748111.000000004, "weight": 7.624724287400859e-06}, {"ticker": "WEN", "market_cap": 4064375698.2200003, "weight": 0.0010417382165657462}, {"ticker": "SPH", "market_cap": 1006944281.466, "weight": 0.0002580894134405111}, {"ticker": "JAN", "market_cap": 1662190.566, "weight": 4.260352793113075e-07}, {"ticker": "BATRK", "market_cap": 2270961275.55, "weight": 0.0005820690124973959}, {"ticker": "STKS", "market_cap": 160957171.06, "weight": 4.125485653231953e-05}, {"ticker": "WISH", "market_cap": 102262600.0, "weight": 2.6210878731518748e-05}, {"ticker": "RVLV", "market_cap": 1015471722.94, "weight": 0.0002602750779392148}, {"ticker": "CMG", "market_cap": 51164814698.19, "weight": 0.013114029502231376}, {"ticker": "YUM", "market_cap": 34474393901.43, "weight": 0.008836115626758867}, {"ticker": "AMZN", "market_cap": 1301429496653.46, "weight": 0.3335687799293713}, {"ticker": "DNUT", "market_cap": 2135299000.0, "weight": 0.0005472974786924374}, {"ticker": "MDVL", "market_cap": 9683466.0, "weight": 2.4819645992453246e-06}, {"ticker": "GPI", "market_cap": 3603487402.4999995, "weight": 0.0009236081550584767}, {"ticker": "JOAN", "market_cap": 25357181.426999997, "weight": 6.499287201344543e-06}, {"ticker": "KIRK", "market_cap": 22282468.425, "weight": 5.711208963262919e-06}, {"ticker": "CVNA", "market_cap": 4173572369.7500005, "weight": 0.0010697263638977945}, {"ticker": "RICK", "market_cap": 550115444.0, "weight": 0.0001409998297620009}, {"ticker": "ASO", "market_cap": 3319779724.7599998, "weight": 0.0008508911741050887}, {"ticker": "BTBD", "market_cap": 13866381.96, "weight": 3.554085814349325e-06}, {"ticker": "HIBB", "market_cap": 574853709.7800001, "weight": 0.00014734048298603063}, {"ticker": "PBPB", "market_cap": 220176249.93, "weight": 5.643327068230021e-05}, {"ticker": "BNED", "market_cap": 52441850.115, "weight": 1.3441345847071634e-05}, {"ticker": "RUSHB", "market_cap": 3650929345.4700003, "weight": 0.0009357679770654892}, {"ticker": "BURL", "market_cap": 8164421169.66, "weight": 0.0020926189358670983}, {"ticker": "QSR", "market_cap": 20535484669.620003, "weight": 0.0052634403816094275}, {"ticker": "AKA", "market_cap": 53439323.1944, "weight": 1.369700770118162e-05}, {"ticker": "OLLI", "market_cap": 4642324139.025, "weight": 0.0011898719085998836}, {"ticker": "NATH", "market_cap": 282275826.8, "weight": 7.234998391488179e-05}, {"ticker": "TCS", "market_cap": 111007329.12, "weight": 2.8452236124195064e-05}, {"ticker": "PLBY", "market_cap": 49862311.554254, "weight": 1.2780185536273846e-05}, {"ticker": "BJRI", "market_cap": 543124431.36, "weight": 0.00013920796661244717}, {"ticker": "FATBB", "market_cap": 101675680.25999999, "weight": 2.6060445610022966e-05}, {"ticker": "GO", "market_cap": 2809230564.2400002, "weight": 0.0007200325597840328}, {"ticker": "DIBS", "market_cap": 141937523.04, "weight": 3.637993952680245e-05}, {"ticker": "FAST", "market_cap": 31309048619.199997, "weight": 0.008024807471715717}, {"ticker": "BLDR", "market_cap": 14878735452.78, "weight": 0.003813561660188234}, {"ticker": "NSIT", "market_cap": 5088712929.35, "weight": 0.0013042856087240534}, {"ticker": "VNCE", "market_cap": 20858101.1125, "weight": 5.3461300497884255e-06}, {"ticker": "BGFV", "market_cap": 156714904.16, "weight": 4.0167523105801565e-05}, {"ticker": "APRN", "market_cap": 82420628.0216, "weight": 2.1125192260413616e-05}, {"ticker": "CWH", "market_cap": 826429598.13, "weight": 0.0002118217801691254}, {"ticker": "PAG", "market_cap": 10624408038.07, "weight": 0.002723137008838283}, {"ticker": "W", "market_cap": 6623212683.36, "weight": 0.0016975925162924259}, {"ticker": "DLTR", "market_cap": 22969678090.485, "weight": 0.005887347348216508}, {"ticker": "AAP", "market_cap": 3110895299.9361, "weight": 0.0007973521057852701}, {"ticker": "QRTEA", "market_cap": 201664538.4117, "weight": 5.168854264175538e-05}, {"ticker": "BLMN", "market_cap": 2082060550.115, "weight": 0.0005336519567343631}, {"ticker": "CONN", "market_cap": 86161522.02, "weight": 2.208401903520253e-05}, {"ticker": "TDUP", "market_cap": 388653360.81, "weight": 9.961555943999186e-05}, {"ticker": "SCVL", "market_cap": 657453518.9100001, "weight": 0.0001685116010717533}, {"ticker": "CTRN", "market_cap": 184555428.35, "weight": 4.730331471843418e-05}, {"ticker": "BDL", "market_cap": 60406027.5, "weight": 1.5482640393020386e-05}, {"ticker": "TITN", "market_cap": 567482271.02, "weight": 0.0001454511129972451}, {"ticker": "BBW", "market_cap": 417532809.4272, "weight": 0.0001070176372821214}, {"ticker": "CURV", "market_cap": 206581852.07000002, "weight": 5.294889698422802e-05}, {"ticker": "CHWY", "market_cap": 7788977923.200001, "weight": 0.001996389254600137}, {"ticker": "CAKE", "market_cap": 1504936864.2, "weight": 0.00038572965723674443}, {"ticker": "VLGEA", "market_cap": 356572032.0, "weight": 9.139280919713779e-05}, {"ticker": "VSCO", "market_cap": 1101147546.0, "weight": 0.0002822346077032607}, {"ticker": "LAZY", "market_cap": 99908784.78, "weight": 2.560757346363173e-05}, {"ticker": "SBH", "market_cap": 856229098.585, "weight": 0.00021945967606347823}, {"ticker": "ODP", "market_cap": 1774245293.94, "weight": 0.0004547559737326176}, {"ticker": "FWRG", "market_cap": 1035716729.9999999, "weight": 0.0002654640661418265}, {"ticker": "CVS", "market_cap": 87615275602.12001, "weight": 0.022456629929571134}, {"ticker": "LAD", "market_cap": 7692142384.079999, "weight": 0.0019715693832808513}, {"ticker": "WBA", "market_cap": 19021965235.455, "weight": 0.004875510929916475}, {"ticker": "SDOT", "market_cap": 28258651.99, "weight": 7.242961751667579e-06}, {"ticker": "GCO", "market_cap": 343559694.38, "weight": 8.805762308441036e-05}, {"ticker": "PETS", "market_cap": 208835410.85500002, "weight": 5.352650557258763e-05}, {"ticker": "WEL", "market_cap": 90598341.12, "weight": 2.322121804426143e-05}, {"ticker": "ARHS", "market_cap": 1249914740.58, "weight": 0.00032036505711843913}, {"ticker": "RAD", "market_cap": 28333991.917000003, "weight": 7.26227209279169e-06}, {"ticker": "ELA", "market_cap": 124399596.25, "weight": 3.188480179027958e-05}, {"ticker": "DIN", "market_cap": 757347141.2, "weight": 0.0001941152882447308}, {"ticker": "TLYS", "market_cap": 239271368.8764, "weight": 6.132753160533577e-05}, {"ticker": "TAST", "market_cap": 325239413.91, "weight": 8.336196064548763e-05}, {"ticker": "BJ", "market_cap": 9358533799.02, "weight": 0.0023986813802009013}, {"ticker": "BOOT", "market_cap": 2293920528.45, "weight": 0.0005879536877699603}, {"ticker": "KSS", "market_cap": 2224844699.1000004, "weight": 0.000570248894557467}, {"ticker": "HVT", "market_cap": 454098054.84, "weight": 0.00011638965807274399}, {"ticker": "SHAK", "market_cap": 2291586387.81, "weight": 0.0005873554252843855}, {"ticker": "ACI", "market_cap": 13203207039.0, "weight": 0.003384107763408751}, {"ticker": "IMKTA", "market_cap": 1499795928.9599998, "weight": 0.00038441198655222986}, {"ticker": "EAT", "market_cap": 1352019892.4850001, "weight": 0.00034653558040305404}, {"ticker": "REAL", "market_cap": 173130622.20000002, "weight": 4.4375028047366175e-05}, {"ticker": "DRI", "market_cap": 16952340807.300001, "weight": 0.004345046469731035}, {"ticker": "REBN", "market_cap": 7089947.1618, "weight": 1.8172210101328867e-06}, {"ticker": "GENK", "market_cap": 45270900.0, "weight": 1.1603363008242623e-05}, {"ticker": "LOCO", "market_cap": 287943972.85499996, "weight": 7.380278375451173e-05}, {"ticker": "TGT", "market_cap": 49022500276.8, "weight": 0.012564933904194194}, {"ticker": "BIG", "market_cap": 120573863.2, "weight": 3.090422995822452e-05}, {"ticker": "HNST", "market_cap": 113023816.42999999, "weight": 2.8969081034710307e-05}, {"ticker": "VRM", "market_cap": 145250064.96, "weight": 3.7228975582586216e-05}, {"ticker": "CBRL", "market_cap": 1469717919.45, "weight": 0.0003767027061334642}, {"ticker": "DENN", "market_cap": 465343664.76000005, "weight": 0.00011927201504269279}, {"ticker": "TJX", "market_cap": 100278660558.1, "weight": 0.02570237614971154}, {"ticker": "POL", "market_cap": 7984069.7646, "weight": 2.0463931523735565e-06}, {"ticker": "WMK", "market_cap": 1726880040.6000001, "weight": 0.0004426158080084682}, {"ticker": "HZO", "market_cap": 726771251.83, "weight": 0.0001862783964740795}, {"ticker": "SFIX", "market_cap": 394219459.2, "weight": 0.00010104220349077867}, {"ticker": "ORLY", "market_cap": 53930010923.16, "weight": 0.013822775641304135}, {"ticker": "DBI", "market_cap": 729563138.5500001, "weight": 0.00018699398364133382}, {"ticker": "CPRT", "market_cap": 41558808028.53, "weight": 0.010651918467379742}, {"ticker": "NUZE", "market_cap": 4676046.4539, "weight": 1.1985152592064076e-06}, {"ticker": "PLCE", "market_cap": 296372853.75, "weight": 7.596318623773884e-05}, {"ticker": "SAH", "market_cap": 1591522336.425, "weight": 0.0004079223387488589}, {"ticker": "CNNE", "market_cap": 1335002048.01, "weight": 0.0003421737447191767}, {"ticker": "COST", "market_cap": 252459270256.69998, "weight": 0.06470771638258838}, {"ticker": "FL", "market_cap": 1724995628.0, "weight": 0.0004421328151045253}, {"ticker": "AZO", "market_cap": 44518929560.0, "weight": 0.011410625819744318}, {"ticker": "LOVE", "market_cap": 271166726.16, "weight": 6.950261557404871e-05}, {"ticker": "FRGI", "market_cap": 221297987.95, "weight": 5.6720782824674386e-05}, {"ticker": "SPWH", "market_cap": 160757585.5, "weight": 4.1203700851653065e-05}, {"ticker": "SFM", "market_cap": 4345462629.0, "weight": 0.0011137834751029766}, {"ticker": "KXIN", "market_cap": 33886782.72, "weight": 8.685505282236566e-06}, {"ticker": "SBUX", "market_cap": 104185584000.0, "weight": 0.026703757852787433}, {"ticker": "PLAY", "market_cap": 1530356727.645, "weight": 0.0003922450104365326}, {"ticker": "RRGB", "market_cap": 120741820.0, "weight": 3.094727888634618e-05}, {"ticker": "SHW", "market_cap": 65570323298.93, "weight": 0.01680629861136655}, {"ticker": "EXPR", "market_cap": 32171491.34, "weight": 8.245859758355895e-06}, {"ticker": "PRTS", "market_cap": 222935985.16, "weight": 5.714061711633015e-05}, {"ticker": "FIVE", "market_cap": 8901364420.05, "weight": 0.002281504512490258}, {"ticker": "TXRH", "market_cap": 6475265000.280001, "weight": 0.001659672115482951}, {"ticker": "YOSH", "market_cap": 5102371.4, "weight": 1.3077864048886841e-06}, {"ticker": "ARKO", "market_cap": 874501021.35, "weight": 0.00022414294396186035}, {"ticker": "CHS", "market_cap": 921001946.76, "weight": 0.00023606157420228948}, {"ticker": "FLWS", "market_cap": 443241644.4, "weight": 0.00011360705663778699}, {"ticker": "ULTA", "market_cap": 19481745555.260002, "weight": 0.004993357006640007}, {"ticker": "PTLO", "market_cap": 856827780.75, "weight": 0.00021961312400657312}, {"ticker": "ROST", "market_cap": 37855690507.880005, "weight": 0.009702774163770021}, {"ticker": "WMT", "market_cap": 432938045272.5, "weight": 0.1109661460093746}, {"ticker": "EZFL", "market_cap": 9588285.3, "weight": 2.4575688789596968e-06}, {"ticker": "PIK", "market_cap": 5898164.58, "weight": 1.511755779189256e-06}, {"ticker": "SVV", "market_cap": 2557616898.7599998, "weight": 0.0006555415799625808}]}, "Construction": {"sic_description": "Construction", "companies": [{"ticker": "TPC", "market_cap": 393976450.3, "weight": 0.0014068661147266387}, {"ticker": "LSEA", "market_cap": 314818305.62, "weight": 0.0011241971598433707}, {"ticker": "MYRG", "market_cap": 2115510552.0700002, "weight": 0.007554360441563498}, {"ticker": "SLND", "market_cap": 308671935.3, "weight": 0.0011022488425640384}, {"ticker": "GRBK", "market_cap": 1847353198.44, "weight": 0.006596786723770103}, {"ticker": "IBP", "market_cap": 3417223119.04, "weight": 0.012202697417515796}, {"ticker": "ORN", "market_cap": 161149263.03, "weight": 0.0005754542876799894}, {"ticker": "LMB", "market_cap": 320089604.16, "weight": 0.001143020648635371}, {"ticker": "PHM", "market_cap": 15811045176.849998, "weight": 0.05646028761562837}, {"ticker": "ROAD", "market_cap": 2010473684.73, "weight": 0.007179280130684106}, {"ticker": "PRIM", "market_cap": 1648928753.16, "weight": 0.005888225011045158}, {"ticker": "BZH", "market_cap": 736158136.8599999, "weight": 0.0026287762556365902}, {"ticker": "DFH", "market_cap": 1947825154.8400002, "weight": 0.006955566013323625}, {"ticker": "HCDI", "market_cap": 3097998.2600000002, "weight": 1.106276472148845e-05}, {"ticker": "AMRC", "market_cap": 1784743984.3999999, "weight": 0.006373213000935981}, {"ticker": "J", "market_cap": 16767180958.0, "weight": 0.05987459075621795}, {"ticker": "TPH", "market_cap": 2619393358.6800003, "weight": 0.009353695518249336}, {"ticker": "KBH", "market_cap": 3582102920.0625, "weight": 0.012791473231107683}, {"ticker": "KBR", "market_cap": 7717211044.400001, "weight": 0.027557694654828293}, {"ticker": "ESOA", "market_cap": 67014263.324999996, "weight": 0.00023930388784283794}, {"ticker": "BBCP", "market_cap": 457646991.83, "weight": 0.0016342297739419117}, {"ticker": "AGX", "market_cap": 608396069.04, "weight": 0.002172545626048209}, {"ticker": "LEN", "market_cap": 30920751717.26, "weight": 0.11041613730913047}, {"ticker": "MTZ", "market_cap": 5368028380.98, "weight": 0.019168905213347114}, {"ticker": "IESC", "market_cap": 1390594045.73, "weight": 0.0049657273697157394}, {"ticker": "HOV", "market_cap": 556152550.4739, "weight": 0.0019859871758444708}, {"ticker": "UHG", "market_cap": 265958951.5, "weight": 0.0009497233565322459}, {"ticker": "MDC", "market_cap": 2971420899.1, "weight": 0.010610764608775785}, {"ticker": "MTH", "market_cap": 4321021830.51, "weight": 0.015430108042522744}, {"ticker": "GVA", "market_cap": 1642614619.8, "weight": 0.005865677622079943}, {"ticker": "LEN.B", "market_cap": 28620320584.350002, "weight": 0.10220143663935978}, {"ticker": "MTRX", "market_cap": 288832430.37, "weight": 0.0010314031684185015}, {"ticker": "APG", "market_cap": 5998395687.360001, "weight": 0.02141990880125758}, {"ticker": "MHO", "market_cap": 2228508117.6400003, "weight": 0.007957867925135123}, {"ticker": "GEO", "market_cap": 1019541146.0850002, "weight": 0.003640719870196131}, {"ticker": "PWR", "market_cap": 24496519072.25, "weight": 0.08747559044521742}, {"ticker": "TMHC", "market_cap": 4514733671.25, "weight": 0.01612184132899433}, {"ticker": "FLR", "market_cap": 5036529924.72, "weight": 0.017985144242757996}, {"ticker": "FIX", "market_cap": 5895926079.370001, "weight": 0.021053996018499426}, {"ticker": "BLD", "market_cap": 7604919433.65, "weight": 0.027156708093291546}, {"ticker": "EME", "market_cap": 9632042563.1, "weight": 0.034395442385735185}, {"ticker": "GLDD", "market_cap": 494035344.53, "weight": 0.0017641703842128287}, {"ticker": "PLPC", "market_cap": 788692135.4499999, "weight": 0.002816371992465757}, {"ticker": "DHI", "market_cap": 35264033831.36, "weight": 0.12592573548022087}, {"ticker": "LGIH", "market_cap": 2329880756.9500003, "weight": 0.008319863498974742}, {"ticker": "CCS", "market_cap": 2009759025.17, "weight": 0.007176728124548298}, {"ticker": "STRL", "market_cap": 2235542797.8, "weight": 0.007982988343214701}, {"ticker": "DY", "market_cap": 2528610428.3863997, "weight": 0.009029515155873863}, {"ticker": "NVR", "market_cap": 19308485221.69, "weight": 0.06894943483147507}, {"ticker": "TOL", "market_cap": 7666477070.0, "weight": 0.0273765266956916}]}, "Wholesale Trade": {"sic_description": "Wholesale Trade", "companies": [{"ticker": "CNM", "market_cap": 5199891736.1, "weight": 0.010216551016621833}, {"ticker": "RELL", "market_cap": 154444756.41, "weight": 0.0003034472279793927}, {"ticker": "CENT", "market_cap": 2358506523.1, "weight": 0.004633904596321222}, {"ticker": "LKQ", "market_cap": 12976484284.5, "weight": 0.025495706533386207}, {"ticker": "COR", "market_cap": 36500192786.549995, "weight": 0.07171420111142653}, {"ticker": "SEB", "market_cap": 4231155532.9, "weight": 0.00831321468888045}, {"ticker": "NUS", "market_cap": 1017164934.6, "weight": 0.0019984872712857306}, {"ticker": "REZI", "market_cap": 2287878958.38, "weight": 0.004495138222949989}, {"ticker": "SGBX", "market_cap": 6859531.1389, "weight": 1.3477347873253908e-05}, {"ticker": "VOXX", "market_cap": 169907495.76000002, "weight": 0.0003338278346234236}, {"ticker": "UGRO", "market_cap": 14704930.8, "weight": 2.8891693007972376e-05}, {"ticker": "SNX", "market_cap": 8990823719.245, "weight": 0.017664831090889798}, {"ticker": "AVT", "market_cap": 4364949301.8, "weight": 0.008576087636058034}, {"ticker": "STKL", "market_cap": 381506185.5, "weight": 0.0007495689535722645}, {"ticker": "WEYS", "market_cap": 247161629.44, "weight": 0.0004856138405718106}, {"ticker": "OMI", "market_cap": 1197323176.98, "weight": 0.0023524553859604926}, {"ticker": "ARW", "market_cap": 6822288284.91, "weight": 0.0134041745194412}, {"ticker": "WTER", "market_cap": 3486657.6, "weight": 6.850453250899606e-06}, {"ticker": "BXC", "market_cap": 699750154.72, "weight": 0.0013748426923880126}, {"ticker": "BECN", "market_cap": 4733479774.759999, "weight": 0.009300162399391375}, {"ticker": "ZEUS", "market_cap": 573938202.81, "weight": 0.0011276521179639897}, {"ticker": "CHEF", "market_cap": 794900447.64, "weight": 0.0015617903965324813}, {"ticker": "HDSN", "market_cap": 589455178.725, "weight": 0.0011581392865638097}, {"ticker": "DXPE", "market_cap": 573405467.9200001, "weight": 0.0011266054205598434}, {"ticker": "UNFI", "market_cap": 770736683.1500001, "weight": 0.0015143143441078062}, {"ticker": "PDCO", "market_cap": 2833326000.0, "weight": 0.005566811982787865}, {"ticker": "VRTV", "market_cap": 2289184113.33, "weight": 0.0044977025421335404}, {"ticker": "UUU", "market_cap": 5527799.930000001, "weight": 1.086081265931909e-05}, {"ticker": "RS", "market_cap": 14994997090.9, "weight": 0.02946160430797278}, {"ticker": "SITE", "market_cap": 7103008698.24, "weight": 0.013955723391946024}, {"ticker": "PLUS", "market_cap": 1712711872.74, "weight": 0.0033650716423849836}, {"ticker": "GDC", "market_cap": 8000335.0600000005, "weight": 1.5718756358543235e-05}, {"ticker": "AEY", "market_cap": 5408691.164, "weight": 1.0626792251563725e-05}, {"ticker": "ASLE", "market_cap": 730922112.0, "weight": 0.0014360881774868877}, {"ticker": "BIMI", "market_cap": 6532445.244, "weight": 1.2834701852594722e-05}, {"ticker": "PFGC", "market_cap": 8856187609.5, "weight": 0.017400303144213553}, {"ticker": "CLMB", "market_cap": 193767642.73999998, "weight": 0.00038070735082429267}, {"ticker": "EDUC", "market_cap": 9535497.856, "weight": 1.8734986276421702e-05}, {"ticker": "CTNT", "market_cap": 35117151.6, "weight": 6.899685399006611e-05}, {"ticker": "NHTC", "market_cap": 61519146.3341, "weight": 0.00012087049671783197}, {"ticker": "SYY", "market_cap": 32754539694.890003, "weight": 0.06435488329412656}, {"ticker": "CUEN", "market_cap": 2965954.9864999996, "weight": 5.827396409469866e-06}, {"ticker": "HFFG", "market_cap": 225517773.46, "weight": 0.0004430888092753065}, {"ticker": "GWAV", "market_cap": 9164365.92, "weight": 1.8005800256697864e-05}, {"ticker": "CPTK", "market_cap": 116624057.35, "weight": 0.00022913854598352574}, {"ticker": "COSM", "market_cap": 16597273.13, "weight": 3.260969579274925e-05}, {"ticker": "HSIC", "market_cap": 9620166892.64, "weight": 0.018901340803835296}, {"ticker": "AIT", "market_cap": 5966670075.2, "weight": 0.011723088155745272}, {"ticker": "TAIT", "market_cap": 21346400.8, "weight": 4.1940602586088735e-05}, {"ticker": "ACAX", "market_cap": 48823981.6, "weight": 9.59275162188517e-05}, {"ticker": "TEL", "market_cap": 38526547691.84, "weight": 0.07569550674591735}, {"ticker": "RAVE", "market_cap": 32059836.045, "weight": 6.298995578395155e-05}, {"ticker": "CAPL", "market_cap": 760553521.6, "weight": 0.00149430685265105}, {"ticker": "BCC", "market_cap": 3940177333.125, "weight": 0.007741511704741841}, {"ticker": "RYI", "market_cap": 969770730.6, "weight": 0.001905368928129351}, {"ticker": "SPTN", "market_cap": 802754223.24, "weight": 0.0015772211983958063}, {"ticker": "GLP", "market_cap": 984511504.48, "weight": 0.0019343310442680342}, {"ticker": "GNLN", "market_cap": 1565833.728289, "weight": 3.07649100798588e-06}, {"ticker": "SCSC", "market_cap": 764953010.37, "weight": 0.001502950802130558}, {"ticker": "AMRK", "market_cap": 655155562.365, "weight": 0.0012872249205222429}, {"ticker": "POOL", "market_cap": 13136692524.689999, "weight": 0.025810477636757666}, {"ticker": "GMS", "market_cap": 2527751139.0, "weight": 0.004966430029615679}, {"ticker": "FSTR", "market_cap": 206182061.8, "weight": 0.00040509873281936075}, {"ticker": "AE", "market_cap": 80577636.14999999, "weight": 0.00015831589815804484}, {"ticker": "PETQ", "market_cap": 625814659.395, "weight": 0.0012295770218197241}, {"ticker": "DIT", "market_cap": 117799582.17, "weight": 0.00023144817278045648}, {"ticker": "RDUS", "market_cap": 735096298.0799999, "weight": 0.0014442894607449843}, {"ticker": "ASH", "market_cap": 4075710412.6400003, "weight": 0.00800780198376665}, {"ticker": "HPE", "market_cap": 21699656721.885, "weight": 0.04263466648799772}, {"ticker": "USFD", "market_cap": 9579820298.0, "weight": 0.018822069337542102}, {"ticker": "MCK", "market_cap": 59384027676.0, "weight": 0.11667549616703583}, {"ticker": "MEDS", "market_cap": 8050475.8950000005, "weight": 1.5817271178618648e-05}, {"ticker": "MRC", "market_cap": 848939764.46, "weight": 0.0016679648065422176}, {"ticker": "GLG", "market_cap": 23850665.5418, "weight": 4.6860887428964354e-05}, {"ticker": "MGPI", "market_cap": 2257658349.7999997, "weight": 0.004435761911868848}, {"ticker": "MMLP", "market_cap": 98065311.12, "weight": 0.00019267502187839876}, {"ticker": "DPZ", "market_cap": 12963112954.9376, "weight": 0.025469435049753974}, {"ticker": "DLA", "market_cap": 60356272.199999996, "weight": 0.0001185857255110658}, {"ticker": "MSM", "market_cap": 5517398192.88, "weight": 0.010840375718832387}, {"ticker": "GWW", "market_cap": 34718613119.88, "weight": 0.06821382062689713}, {"ticker": "WLFC", "market_cap": 258741143.68, "weight": 0.0005083648330894717}, {"ticker": "HYFM", "market_cap": 47140409.114999995, "weight": 9.261969654565137e-05}, {"ticker": "ANDE", "market_cap": 1703135305.56, "weight": 0.003346255964650901}, {"ticker": "WKC", "market_cap": 1278590928.12, "weight": 0.0025121271960029563}, {"ticker": "AENT", "market_cap": 57824984.65, "weight": 0.00011361234727459682}, {"ticker": "CENTA", "market_cap": 2136289476.9999998, "weight": 0.004197300931579076}, {"ticker": "HLF", "market_cap": 1278076405.77, "weight": 0.0025111162819099818}, {"ticker": "HWKN", "market_cap": 1240521852.21, "weight": 0.0024373305125470293}, {"ticker": "GIC", "market_cap": 1287235106.25, "weight": 0.002529110950924006}, {"ticker": "FIP", "market_cap": 290951367.525, "weight": 0.0005716502651465753}, {"ticker": "DSGR", "market_cap": 1291146946.56, "weight": 0.0025367967871152736}, {"ticker": "GPC", "market_cap": 20001874601.475002, "weight": 0.039298928259477124}, {"ticker": "CAH", "market_cap": 21717338897.565, "weight": 0.04266940775937179}, {"ticker": "FERG", "market_cap": 32796589468.5, "weight": 0.06443750110217464}, {"ticker": "ALTG", "market_cap": 365759665.6, "weight": 0.0007186307856147025}, {"ticker": "WSO", "market_cap": 14968367479.84, "weight": 0.029409283453279114}, {"ticker": "UVV", "market_cap": 1154717442.0, "weight": 0.002268745245997019}, {"ticker": "WCC", "market_cap": 7189536036.9, "weight": 0.01412572904102814}, {"ticker": "ASPN", "market_cap": 511812230.31, "weight": 0.001005589352099649}]}, "Mining": {"sic_description": "Mining", "companies": [{"ticker": "CRK", "market_cap": 2811260718.165, "weight": 0.003386892655836468}, {"ticker": "WTI", "market_cap": 553696807.86, "weight": 0.0006670714103404846}, {"ticker": "CHRD", "market_cap": 6328453856.44, "weight": 0.007624264000376007}, {"ticker": "USEG", "market_cap": 32418850.47, "weight": 3.905691345453476e-05}, {"ticker": "REPX", "market_cap": 549816999.8596, "weight": 0.0006623971753477273}, {"ticker": "CLF", "market_cap": 7688730258.915, "weight": 0.009263069724683725}, {"ticker": "EPM", "market_cap": 202734586.7277, "weight": 0.00024424639039536707}, {"ticker": "PUMP", "market_cap": 1053291385.98, "weight": 0.0012689626531544264}, {"ticker": "ICD", "market_cap": 38874186.0, "weight": 4.683403933839381e-05}, {"ticker": "IPI", "market_cap": 292004021.039, "weight": 0.0003517945766969808}, {"ticker": "EQT", "market_cap": 16080167350.7, "weight": 0.019372732081660553}, {"ticker": "PHX", "market_cap": 128391179.80000001, "weight": 0.00015468047525049125}, {"ticker": "MUX", "market_cap": 296001125.73, "weight": 0.00035661012597531106}, {"ticker": "CCLP", "market_cap": 186013486.68, "weight": 0.0002241014886496379}, {"ticker": "FLME", "market_cap": 239481322.5, "weight": 0.0002885173641648876}, {"ticker": "VMC", "market_cap": 27026971970.55, "weight": 0.03256099737924816}, {"ticker": "CNX", "market_cap": 3395607646.1400003, "weight": 0.0040908900851858755}, {"ticker": "VTLE", "market_cap": 1000247701.78, "weight": 0.001205057778272258}, {"ticker": "URG", "market_cap": 362959921.13000005, "weight": 0.0004372793612826449}, {"ticker": "PED", "market_cap": 83793665.0409, "weight": 0.00010095120203503953}, {"ticker": "METCB", "market_cap": 552939517.525, "weight": 0.0006661590577232496}, {"ticker": "NRP", "market_cap": 953157392.48, "weight": 0.0011483252875079928}, {"ticker": "BSM", "market_cap": 3567546540.0399995, "weight": 0.004298035076484535}, {"ticker": "ARIS", "market_cap": 300891550.59000003, "weight": 0.0003625019110862507}, {"ticker": "DC", "market_cap": 195314520.4, "weight": 0.00023530699605576617}, {"ticker": "CKX", "market_cap": 25193688.52, "weight": 3.0352331987733982e-05}, {"ticker": "MTDR", "market_cap": 6385154717.5, "weight": 0.007692574893301323}, {"ticker": "DWSN", "market_cap": 56078765.1084, "weight": 6.75614170065285e-05}, {"ticker": "XPL", "market_cap": 39972873.0, "weight": 4.815769278231626e-05}, {"ticker": "XPRO", "market_cap": 2298956946.44, "weight": 0.0027696898931039915}, {"ticker": "EP", "market_cap": 202241642.0, "weight": 0.00024365251062207085}, {"ticker": "CIVI", "market_cap": 6657007286.0, "weight": 0.008020091818990067}, {"ticker": "GBR", "market_cap": 5696446.74, "weight": 6.862847513005808e-06}, {"ticker": "TUSK", "market_cap": 212860934.88000003, "weight": 0.00025644620308646986}, {"ticker": "AMPY", "market_cap": 255076838.59, "weight": 0.00030730620810522405}, {"ticker": "KRP", "market_cap": 1127615211.45, "weight": 0.0013585049773549099}, {"ticker": "TELL", "market_cap": 583627458.0, "weight": 0.0007031306411647766}, {"ticker": "AR", "market_cap": 7099570971.190001, "weight": 0.008553274559895125}, {"ticker": "NE", "market_cap": 6743101889.51, "weight": 0.008123815098176177}, {"ticker": "MDU", "market_cap": 3843674290.375, "weight": 0.004630702567492877}, {"ticker": "PTEN", "market_cap": 5091427409.035, "weight": 0.0061339448127176645}, {"ticker": "GTE", "market_cap": 197392236.14999998, "weight": 0.00023781014354725316}, {"ticker": "ARCH", "market_cap": 2667432489.3, "weight": 0.0032136142512768223}, {"ticker": "EGY", "market_cap": 418449949.02000004, "weight": 0.0005041314916163535}, {"ticker": "CEI", "market_cap": 24254597.595799997, "weight": 2.9220953409509566e-05}, {"ticker": "PARR", "market_cap": 2006662671.52, "weight": 0.002417545630327902}, {"ticker": "SM", "market_cap": 4257719180.5200005, "weight": 0.005129527023210404}, {"ticker": "EOG", "market_cap": 68968803368.1, "weight": 0.08309081121501923}, {"ticker": "GPOR", "market_cap": 2097517654.21, "weight": 0.002527004020875103}, {"ticker": "ARLP", "market_cap": 2730654386.76, "weight": 0.003289781423823909}, {"ticker": "HPK", "market_cap": 1856638965.04, "weight": 0.0022368031661390447}, {"ticker": "USGO", "market_cap": 92951578.12910001, "weight": 0.00011198428352079335}, {"ticker": "THM", "market_cap": 70460025.5007, "weight": 8.488737503298499e-05}, {"ticker": "OVV", "market_cap": 11827068072.380001, "weight": 0.014248770928855112}, {"ticker": "SND", "market_cap": 83695420.13, "weight": 0.00010083284055933202}, {"ticker": "SWN", "market_cap": 6564719789.92, "weight": 0.0079089075945319}, {"ticker": "HLX", "market_cap": 1553423113.4, "weight": 0.0018715010316137756}, {"ticker": "MLM", "market_cap": 25726311849.805, "weight": 0.03099401492819822}, {"ticker": "NB", "market_cap": 114711923.89999999, "weight": 0.00013820026370495414}, {"ticker": "SBOW", "market_cap": 788049730.38, "weight": 0.0009494102866418233}, {"ticker": "WWR", "market_cap": 31655912.636, "weight": 3.8137756960034656e-05}, {"ticker": "NINE", "market_cap": 118247639.92500001, "weight": 0.00014245995067059867}, {"ticker": "NG", "market_cap": 1152757825.3500001, "weight": 0.0013887957767162817}, {"ticker": "EPSN", "market_cap": 114592238.31, "weight": 0.00013805607137047548}, {"ticker": "FEAM", "market_cap": 100371359.77939999, "weight": 0.0001209233348926328}, {"ticker": "PVL", "market_cap": 74910000.0, "weight": 9.02485234504738e-05}, {"ticker": "NGS", "market_cap": 166037848.2, "weight": 0.00020003565127411438}, {"ticker": "DEN", "market_cap": 4717599491.64, "weight": 0.005683572131240366}, {"ticker": "RCON", "market_cap": 13728288.6198, "weight": 1.6539284173526804e-05}, {"ticker": "CDE", "market_cap": 817885476.2625, "weight": 0.000985355180673851}, {"ticker": "SCCO", "market_cap": 56212687696.99, "weight": 0.06772276149827743}, {"ticker": "CRGY", "market_cap": 981342459.9999999, "weight": 0.001182281511337013}, {"ticker": "MUR", "market_cap": 6599124710.66, "weight": 0.007950357244728342}, {"ticker": "DMLP", "market_cap": 1122580771.48, "weight": 0.0013524396886926144}, {"ticker": "SNMP", "market_cap": 16143347.677199999, "weight": 1.944884917120459e-05}, {"ticker": "GRNT", "market_cap": 800961355.2600001, "weight": 0.0009649656875331116}, {"ticker": "AESI", "market_cap": 1220661969.1000001, "weight": 0.0014706039292941247}, {"ticker": "VTS", "market_cap": 603095778.6, "weight": 0.0007265852825772775}, {"ticker": "SLCA", "market_cap": 976298004.36, "weight": 0.0011762041562025662}, {"ticker": "VNOM", "market_cap": 1909010345.5800002, "weight": 0.002299898076895925}, {"ticker": "NEM", "market_cap": 27940860000.0, "weight": 0.033662012534193105}, {"ticker": "GATO", "market_cap": 318146225.79999995, "weight": 0.0003832896425015489}, {"ticker": "APA", "market_cap": 11553179190.4, "weight": 0.013918800735447073}, {"ticker": "OII", "market_cap": 2380413065.48, "weight": 0.0028678249147214793}, {"ticker": "AREC", "market_cap": 115748090.5746, "weight": 0.00013944859520183356}, {"ticker": "FANG", "market_cap": 25823168321.02, "weight": 0.031110703668203253}, {"ticker": "BNMV", "market_cap": 2003857.9539, "weight": 2.414166620530805e-06}, {"ticker": "MRO", "market_cap": 14584947222.16, "weight": 0.01757135164067587}, {"ticker": "KNF", "market_cap": 2747986676.12, "weight": 0.0033106626616126733}, {"ticker": "RIG", "market_cap": 5663769185.85, "weight": 0.006823478923872042}, {"ticker": "HYMC", "market_cap": 53598597.17340001, "weight": 6.457341147932305e-05}, {"ticker": "TMQ", "market_cap": 70001700.3, "weight": 8.433520345878506e-05}, {"ticker": "RES", "market_cap": 1777758158.0400002, "weight": 0.002141770775799547}, {"ticker": "CTGO", "market_cap": 173552708.95000002, "weight": 0.00020908925008099492}, {"ticker": "CRC", "market_cap": 3613620328.0, "weight": 0.004353542903652608}, {"ticker": "SD", "market_cap": 537484800.0888001, "weight": 0.0006475398422785649}, {"ticker": "ENSV", "market_cap": 8537694.2257, "weight": 1.0285867007623297e-05}, {"ticker": "CMP", "market_cap": 1083189703.68, "weight": 0.0013049829311690862}, {"ticker": "VAL", "market_cap": 5120316840.76, "weight": 0.00616874962591356}, {"ticker": "HAL", "market_cap": 34266062425.934998, "weight": 0.04128235934324381}, {"ticker": "METC", "market_cap": 510527291.54999995, "weight": 0.000615062531618703}, {"ticker": "FCX", "market_cap": 51023091964.93001, "weight": 0.06147054747981134}, {"ticker": "AMR", "market_cap": 3267473793.28, "weight": 0.0039365196269742185}, {"ticker": "MVO", "market_cap": 143750000.0, "weight": 0.00017318415760253115}, {"ticker": "CTRA", "market_cap": 19291413547.0, "weight": 0.02324151098503828}, {"ticker": "BRN", "market_cap": 25226714.45, "weight": 3.039212028593287e-05}, {"ticker": "PXD", "market_cap": 49677716881.240005, "weight": 0.059849694258744986}, {"ticker": "HUSA", "market_cap": 18431736.57, "weight": 2.2205807102798032e-05}, {"ticker": "STR", "market_cap": 1823571634.4999998, "weight": 0.0021969649902521967}, {"ticker": "TTI", "market_cap": 707379139.74, "weight": 0.0008522216377146092}, {"ticker": "TPET", "market_cap": 16371811.893199999, "weight": 1.9724093573223947e-05}, {"ticker": "CEIX", "market_cap": 3107670469.96, "weight": 0.003743995077887198}, {"ticker": "IDR", "market_cap": 57728223.33, "weight": 6.954861723336929e-05}, {"ticker": "NBR", "market_cap": 1035242240.1199999, "weight": 0.0012472177757894918}, {"ticker": "NC", "market_cap": 253665351.90999997, "weight": 0.00030560570631988146}, {"ticker": "IE", "market_cap": 1286068879.315, "weight": 0.0015494035164034753}, {"ticker": "PZG", "market_cap": 17658305.7354, "weight": 2.1274009067639604e-05}, {"ticker": "PNRG", "market_cap": 192798448.53, "weight": 0.0002322757349269079}, {"ticker": "TALO", "market_cap": 1842231080.25, "weight": 0.0022194451321203286}, {"ticker": "KOS", "market_cap": 3220765779.0, "weight": 0.003880247709712522}, {"ticker": "ACDC", "market_cap": 1522156765.65, "weight": 0.0018338326065953996}, {"ticker": "OXY", "market_cap": 52673959611.52, "weight": 0.06345944572459715}, {"ticker": "CLB", "market_cap": 1042482986.42, "weight": 0.0012559411326477816}, {"ticker": "REI", "market_cap": 336013649.56, "weight": 0.00040481558846609193}, {"ticker": "RRC", "market_cap": 7214013671.2, "weight": 0.00869115047359941}, {"ticker": "ATLX", "market_cap": 287875620.0, "weight": 0.0003468208469148269}, {"ticker": "TMC", "market_cap": 286253833.103, "weight": 0.000344866983975225}, {"ticker": "LBRT", "market_cap": 2818303958.04, "weight": 0.0033953780649811248}, {"ticker": "HCC", "market_cap": 2542905502.89, "weight": 0.003063589199171099}, {"ticker": "UUUU", "market_cap": 1167084870.5, "weight": 0.0014060564184222725}, {"ticker": "PR", "market_cap": 4406418991.8, "weight": 0.0053086745122690624}, {"ticker": "PLL", "market_cap": 681454059.5, "weight": 0.000820988154708401}, {"ticker": "BRY", "market_cap": 566702882.34, "weight": 0.0006827406002711599}, {"ticker": "ESTE", "market_cap": 1945858306.5, "weight": 0.0023442910026093243}, {"ticker": "VGZ", "market_cap": 47733084.3348, "weight": 5.750688000203766e-05}, {"ticker": "USAU", "market_cap": 28353232.4337, "weight": 3.415882208235895e-05}, {"ticker": "GORO", "market_cap": 34900839.819, "weight": 4.2047113347300105e-05}, {"ticker": "DO", "market_cap": 1373161266.84, "weight": 0.0016543288852181558}, {"ticker": "RNGR", "market_cap": 326873981.07, "weight": 0.0003938044873307385}, {"ticker": "MGY", "market_cap": 3958190892.8100004, "weight": 0.004768667515835204}, {"ticker": "DVN", "market_cap": 27540489500.0, "weight": 0.033179662427957245}, {"ticker": "CHK", "market_cap": 10804916591.605001, "weight": 0.01301732436787982}, {"ticker": "HP", "market_cap": 3842835229.9, "weight": 0.004629691701534335}, {"ticker": "WTTR", "market_cap": 764336584.605, "weight": 0.0009208416523799145}, {"ticker": "HNRA", "market_cap": 80943582.81, "weight": 9.751753879847354e-05}, {"ticker": "NCSM", "market_cap": 38194646.04, "weight": 4.601535721296871e-05}, {"ticker": "UEC", "market_cap": 1877152675.1950002, "weight": 0.0022615172503998877}, {"ticker": "NOG", "market_cap": 3458586142.44, "weight": 0.00416676401790789}, {"ticker": "VOC", "market_cap": 151980000.0, "weight": 0.0001830993271125752}, {"ticker": "HL", "market_cap": 2234707426.1853, "weight": 0.0026922846823792816}, {"ticker": "SUM", "market_cap": 3804576106.31, "weight": 0.004583598664389672}, {"ticker": "SLB", "market_cap": 78847400167.68, "weight": 0.09499214314566493}, {"ticker": "BATL", "market_cap": 87384349.52999999, "weight": 0.0001052771127721613}, {"ticker": "LEU", "market_cap": 799570357.0, "weight": 0.000963289869363479}, {"ticker": "MXC", "market_cap": 27034170.0, "weight": 3.2569669272581704e-05}, {"ticker": "BTU", "market_cap": 3139392000.0, "weight": 0.003782211888028699}, {"ticker": "AUMN", "market_cap": 5197105.3624, "weight": 6.261261315887592e-06}, {"ticker": "CPE", "market_cap": 2289408409.6000004, "weight": 0.0027581862039980985}, {"ticker": "HESM", "market_cap": 1901733275.26, "weight": 0.0022911309583346475}, {"ticker": "KLXE", "market_cap": 151850681.35500002, "weight": 0.0001829435292649465}, {"ticker": "PPTA", "market_cap": 202129174.4, "weight": 0.00024351701422858509}, {"ticker": "MP", "market_cap": 3077761111.4249997, "weight": 0.00370796149832326}, {"ticker": "HNRG", "market_cap": 442451080.05, "weight": 0.0005330470788089693}, {"ticker": "USLM", "market_cap": 1179750342.21, "weight": 0.00142131526397869}, {"ticker": "ABAT", "market_cap": 333040599.6708, "weight": 0.0004012337787925517}]}, "Agriculture, Forestry and Fishing": {"sic_description": "Agriculture, Forestry and Fishing", "companies": [{"ticker": "AGFY", "market_cap": 3925097.3194999998, "weight": 9.393867345242164e-05}, {"ticker": "YTEN", "market_cap": 3558014.1998, "weight": 8.515333680864459e-05}, {"ticker": "AQB", "market_cap": 18251299.34673, "weight": 0.0004368051821026616}, {"ticker": "NCRA", "market_cap": 15129135.45, "weight": 0.00036208297501169926}, {"ticker": "SANW", "market_cap": 39963542.3428, "weight": 0.0009564405283639019}, {"ticker": "CALM", "market_cap": 2172904954.8, "weight": 0.052003757455396836}, {"ticker": "LMNR", "market_cap": 265224880.32000002, "weight": 0.006347581065075831}, {"ticker": "VFF", "market_cap": 82568957.821, "weight": 0.0019761085483204657}, {"ticker": "LOCL", "market_cap": 20652031.509999998, "weight": 0.000494261488628298}, {"ticker": "EDBL", "market_cap": 3706254.9192000004, "weight": 8.870115623795815e-05}, {"ticker": "CEAD", "market_cap": 5646401.6508720005, "weight": 0.00013513435150444794}, {"ticker": "BV", "market_cap": 711889858.92, "weight": 0.017037536536723418}, {"ticker": "CVGW", "market_cap": 436211658.15999997, "weight": 0.010439777966384668}, {"ticker": "ALCO", "market_cap": 186154077.46, "weight": 0.004455193252782671}, {"ticker": "SISI", "market_cap": 6396349.6678, "weight": 0.00015308272733668456}, {"ticker": "CTVA", "market_cap": 35715324480.0, "weight": 0.8547686669846407}, {"ticker": "YOTA", "market_cap": 77198988.58, "weight": 0.0018475900057422381}, {"ticker": "RKDA", "market_cap": 3535898.08, "weight": 8.46240355488757e-05}, {"ticker": "AVO", "market_cap": 680531728.772, "weight": 0.016287047846056567}, {"ticker": "VCXA", "market_cap": 100076932.0, "weight": 0.002395123858092204}, {"ticker": "FDP", "market_cap": 1234763972.76, "weight": 0.0295513920257886}]}} \ No newline at end of file diff --git a/examples/tools/treemap/treemap_server.py b/examples/tools/treemap/treemap_server.py new file mode 100644 index 00000000..fca539e5 --- /dev/null +++ b/examples/tools/treemap/treemap_server.py @@ -0,0 +1,280 @@ +from massive import RESTClient +from collections import defaultdict +import http.server +import socketserver +import traceback +import json + +# Connect to http://localhost:8889 in your browser to view D3 treemap. +PORT = 8889 + +# Inline html + js code to render D3.js Treemap +html = """ + + + + + Massive.com Snapshot + D3.js Treemap + + + + +
+ + + +""" + + +class handler(http.server.SimpleHTTPRequestHandler): + def generate_data(self): + client = ( + RESTClient() + ) # Assuming you have MASSIVE_API_KEY environment variable set up + snapshots = client.get_snapshot_all("stocks") + pct_changes = { + snapshot.ticker: round(snapshot.todays_change_percent, 2) + for snapshot in snapshots + } + + with open("sic_code_groups.json", "r") as file: + sic_code_groups = json.load(file) + + data = defaultdict(lambda: defaultdict(list)) + + for sic_code, group_data in sic_code_groups.items(): + parent = group_data["sic_description"] + for company in group_data["companies"]: + ticker = company["ticker"] + weight = company["weight"] + pct_change = pct_changes.get(ticker, 0.0) + data[parent][ticker].append( + {"name": ticker, "weight": weight, "change": pct_change} + ) + + data = dict(data) + output = {"name": "root", "children": []} + for parent, children in data.items(): + parent_dict = {"name": parent, "children": []} + for child, companies in children.items(): + total_change = sum(company["change"] for company in companies) + avg_change = total_change / len(companies) if companies else 0 + avg_change = round(avg_change, 2) + child_dict = { + "name": child, + "change": avg_change, + "children": companies, + } + parent_dict["children"].append(child_dict) + output["children"].append(parent_dict) + + return json.dumps(output) + + def do_GET(self): + if self.path == "/data": + self.send_response(200) + self.send_header("Content-type", "application/json") + self.end_headers() + json_data = self.generate_data() + self.wfile.write(json_data.encode()) + else: + self.send_response(200) + self.send_header("Content-type", "text/html") + self.end_headers() + self.wfile.write(html.encode()) + + +try: + with socketserver.TCPServer(("", PORT), handler) as httpd: + print("serving at port", PORT) + httpd.serve_forever() +except KeyboardInterrupt: + print("\nExiting gracefully...") diff --git a/examples/websocket/aggs.py b/examples/websocket/aggs.py index 8a733575..e083e4b4 100644 --- a/examples/websocket/aggs.py +++ b/examples/websocket/aggs.py @@ -1,5 +1,5 @@ -from polygon import WebSocketClient -from polygon.websocket.models import WebSocketMessage, EquityTrade +from massive import WebSocketClient +from massive.websocket.models import WebSocketMessage, EquityTrade from typing import List c = WebSocketClient(subscriptions=["T.*"]) diff --git a/examples/websocket/async.py b/examples/websocket/async.py index 87cacee6..206c3bb3 100644 --- a/examples/websocket/async.py +++ b/examples/websocket/async.py @@ -1,5 +1,5 @@ -from polygon import WebSocketClient -from polygon.websocket.models import WebSocketMessage +from massive import WebSocketClient +from massive.websocket.models import WebSocketMessage from typing import List import asyncio diff --git a/examples/websocket/crypto.py b/examples/websocket/crypto.py index 37160e81..e6b49cdf 100644 --- a/examples/websocket/crypto.py +++ b/examples/websocket/crypto.py @@ -1,8 +1,38 @@ -from polygon import WebSocketClient -from polygon.websocket.models import WebSocketMessage, Market +from massive import WebSocketClient +from massive.websocket.models import WebSocketMessage, Market from typing import List -c = WebSocketClient(market=Market.Crypto, subscriptions=["XA.*"]) +client = WebSocketClient(market=Market.Crypto) + +# Aggregates (per minute) +client.subscribe("XA.*") # all crypto pair +# client.subscribe("XA.BTC-USD") +# client.subscribe("XA.BTC-EUR") +# client.subscribe("XA.ETH-USD") + +# Aggregates (per second) +# client.subscribe("XAS.*") # all crypto pair +# client.subscribe("XAS.BTC-USD") +# client.subscribe("XAS.BTC-EUR") +# client.subscribe("XAS.ETH-USD") + +# Trades +# client.subscribe("XT.*") # all crypto pair +# client.subscribe("XT.BTC-USD") +# client.subscribe("XT.BTC-EUR") +# client.subscribe("XT.ETH-USD") + +# Quotes +# client.subscribe("XQ.*") # all crypto pair +# client.subscribe("XQ.BTC-USD") +# client.subscribe("XQ.BTC-EUR") +# client.subscribe("XQ.ETH-USD") + +# Level 2 Book +# client.subscribe("XL2.*") # all crypto pair +# client.subscribe("XL2.BTC-USD") +# client.subscribe("XL2.BTC-EUR") +# client.subscribe("XL2.ETH-USD") def handle_msg(msgs: List[WebSocketMessage]): @@ -10,4 +40,4 @@ def handle_msg(msgs: List[WebSocketMessage]): print(m) -c.run(handle_msg) +client.run(handle_msg) diff --git a/examples/websocket/custom-json.py b/examples/websocket/custom-json.py new file mode 100644 index 00000000..20945013 --- /dev/null +++ b/examples/websocket/custom-json.py @@ -0,0 +1,16 @@ +from massive import WebSocketClient +from massive.websocket.models import WebSocketMessage +from typing import List + +# type: ignore +import orjson + +c = WebSocketClient(subscriptions=["T.*"], custom_json=orjson) + + +def handle_msg(msgs: List[WebSocketMessage]): + for m in msgs: + print(m) + + +c.run(handle_msg) diff --git a/examples/websocket/fmv.py b/examples/websocket/fmv.py new file mode 100644 index 00000000..f31f8418 --- /dev/null +++ b/examples/websocket/fmv.py @@ -0,0 +1,19 @@ +from massive import WebSocketClient +from massive.websocket.models import WebSocketMessage, Feed, Market +from typing import List + +client = WebSocketClient(feed=Feed.Business, market=Market.Stocks, verbose=True) + +# FMV +client.subscribe("FMV.*") # all ticker symbols +# client.subscribe("FMV.TSLA") +# client.subscribe("FMV.AAPL") +# client.subscribe("FMV.NVDA") + + +def handle_msg(msgs: List[WebSocketMessage]): + for m in msgs: + print(m) + + +client.run(handle_msg) diff --git a/examples/websocket/forex.py b/examples/websocket/forex.py new file mode 100644 index 00000000..72aa2c1e --- /dev/null +++ b/examples/websocket/forex.py @@ -0,0 +1,31 @@ +from massive import WebSocketClient +from massive.websocket.models import WebSocketMessage, Market +from typing import List + +client = WebSocketClient(market=Market.Forex) + +# Aggregates (per minute) +# client.subscribe("CA.*") # all forex pair +client.subscribe("CA.USD/CAD") +client.subscribe("CA.USD/EUR") +client.subscribe("CA.USD/AUD") + +# Aggregates (per second) +# client.subscribe("CAS.*") # all forex pair +# client.subscribe("CAS.USD/CAD") +# client.subscribe("CAS.USD/EUR") +# client.subscribe("CAS.USD/AUD") + +# Quotes +# client.subscribe("C.*") # all forex pair +# client.subscribe("C.USD/CAD") +# client.subscribe("C.USD/EUR") +# client.subscribe("C.USD/AUD") + + +def handle_msg(msgs: List[WebSocketMessage]): + for m in msgs: + print(m) + + +client.run(handle_msg) diff --git a/examples/websocket/indices.py b/examples/websocket/indices.py new file mode 100644 index 00000000..07157026 --- /dev/null +++ b/examples/websocket/indices.py @@ -0,0 +1,34 @@ +from massive import WebSocketClient +from massive.websocket.models import WebSocketMessage, Market +from typing import List + +client = WebSocketClient(market=Market.Indices) + +# Aggregates (per minute) +# client.subscribe("AM.*") # all aggregates +client.subscribe("AM.I:SPX") # Standard & Poor's 500 +client.subscribe("AM.I:DJI") # Dow Jones Industrial Average +client.subscribe("AM.I:NDX") # Nasdaq-100 +client.subscribe("AM.I:VIX") # Volatility Index + +# Aggregates (per second) +# client.subscribe("A.*") # all aggregates +# client.subscribe("A.I:SPX") # Standard & Poor's 500 +# client.subscribe("A.I:DJI") # Dow Jones Industrial Average +# client.subscribe("A.I:NDX") # Nasdaq-100 +# client.subscribe("A.I:VIX") # Volatility Index + +# Single index +# client.subscribe("V.*") # all tickers +# client.subscribe("V.I:SPX") # Standard & Poor's 500 +# client.subscribe("V.I:DJI") # Dow Jones Industrial Average +# client.subscribe("V.I:NDX") # Nasdaq-100 +# client.subscribe("V.I:VIX") # Volatility Index + + +def handle_msg(msgs: List[WebSocketMessage]): + for m in msgs: + print(m) + + +client.run(handle_msg) diff --git a/examples/websocket/latency.py b/examples/websocket/latency.py new file mode 100644 index 00000000..f871bbb9 --- /dev/null +++ b/examples/websocket/latency.py @@ -0,0 +1,17 @@ +from massive import WebSocketClient +from massive.websocket.models import WebSocketMessage, EquityQuote +from typing import List, cast +import time + +c = WebSocketClient(subscriptions=["Q.SPY"]) + + +def handle_msg(msgs: List[WebSocketMessage]): + for m in msgs: + q: EquityQuote = cast(EquityQuote, m) + if q.timestamp is not None: + now = time.time() * 1000 + print(now, q.timestamp, now - q.timestamp) + + +c.run(handle_msg) diff --git a/examples/websocket/launchpad-ws.py b/examples/websocket/launchpad-ws.py new file mode 100644 index 00000000..c7139036 --- /dev/null +++ b/examples/websocket/launchpad-ws.py @@ -0,0 +1,21 @@ +from massive import WebSocketClient +from massive.websocket.models import WebSocketMessage, Feed, Market +from typing import List + +client = WebSocketClient( + api_key="", feed=Feed.Launchpad, market=Market.Stocks +) + +client.subscribe("AM.*") # all aggregates +# client.subscribe("LV.*") # all aggregates +# client.subscribe("AM.O:A230616C00070000") # all aggregates +# client.subscribe("LV.O:A230616C00070000") # all aggregates + + +def handle_msg(msgs: List[WebSocketMessage]): + for m in msgs: + print(m) + + +# print messages +client.run(handle_msg) diff --git a/examples/websocket/options-ws.py b/examples/websocket/options-ws.py new file mode 100644 index 00000000..47471106 --- /dev/null +++ b/examples/websocket/options-ws.py @@ -0,0 +1,32 @@ +from massive import WebSocketClient +from massive.websocket.models import WebSocketMessage, Market +from typing import List + +# docs +# https://massive.com/docs/options/ws_getting-started +# https://massive-api-client.readthedocs.io/en/latest/WebSocket.html + +# client = WebSocketClient("XXXXXX") # hardcoded api_key is used +client = WebSocketClient( + market=Market.Options +) # MASSIVE_API_KEY environment variable is used + +# aggregates +# client.subscribe("AM.*") # aggregates (per minute) +client.subscribe("A.*") # aggregates (per second) + +# trades +# client.subscribe("T.*") # all trades +# client.subscribe("T.O:SPY241220P00720000", "T.O:SPY251219C00650000") # limited trades + +# quotes (1,000 option contracts per connection) +# client.subscribe("Q.O:SPY241220P00720000", "Q.O:SPY251219C00650000") # limited quotes + + +def handle_msg(msgs: List[WebSocketMessage]): + for m in msgs: + print(m) + + +# print messages +client.run(handle_msg) diff --git a/examples/websocket/raw.py b/examples/websocket/raw.py index 064aca12..78bebbda 100644 --- a/examples/websocket/raw.py +++ b/examples/websocket/raw.py @@ -1,4 +1,4 @@ -from polygon import WebSocketClient +from massive import WebSocketClient from typing import Union import json diff --git a/examples/websocket/simple.py b/examples/websocket/simple.py index d290b8c2..8a5c4976 100644 --- a/examples/websocket/simple.py +++ b/examples/websocket/simple.py @@ -1,5 +1,5 @@ -from polygon import WebSocketClient -from polygon.websocket.models import WebSocketMessage +from massive import WebSocketClient +from massive.websocket.models import WebSocketMessage from typing import List c = WebSocketClient(subscriptions=["T.*"]) diff --git a/examples/websocket/stocks-ws.py b/examples/websocket/stocks-ws.py new file mode 100644 index 00000000..c48f1881 --- /dev/null +++ b/examples/websocket/stocks-ws.py @@ -0,0 +1,35 @@ +from massive import WebSocketClient +from massive.websocket.models import WebSocketMessage +from typing import List + +# client = WebSocketClient("XXXXXX") # hardcoded api_key is used +client = WebSocketClient() # MASSIVE_API_KEY environment variable is used + +# docs +# https://massive.com/docs/stocks/ws_stocks_am +# https://massive-api-client.readthedocs.io/en/latest/WebSocket.html# + +# aggregates (per minute) +# client.subscribe("AM.*") # all aggregates +# client.subscribe("AM.TSLA") # single ticker + +# aggregates (per second) +client.subscribe("A.*") # all aggregates +# client.subscribe("A.TSLA") # single ticker + +# trades +# client.subscribe("T.*") # all trades +# client.subscribe("T.TSLA", "T.UBER") # multiple tickers + +# quotes +# client.subscribe("Q.*") # all quotes +# client.subscribe("Q.TSLA", "Q.UBER") # multiple tickers + + +def handle_msg(msgs: List[WebSocketMessage]): + for m in msgs: + print(m) + + +# print messages +client.run(handle_msg) diff --git a/examples/websocket/stocks-ws_extra.py b/examples/websocket/stocks-ws_extra.py new file mode 100644 index 00000000..bec49b8f --- /dev/null +++ b/examples/websocket/stocks-ws_extra.py @@ -0,0 +1,202 @@ +from massive import WebSocketClient +from massive.websocket.models import WebSocketMessage, EquityTrade +from typing import List +from typing import Dict +from datetime import datetime +import time +import threading +import os + +# docs +# https://massive.com/docs/stocks/ws_stocks_am +# https://massive-api-client.readthedocs.io/en/latest/WebSocket.html# + +# This program connects to the Massive WebSocket API, authenticates the +# connection, and subscribes to receive trades. Every 5 seconds, it counts +# the number of trades per symbol and stores the results in a map. The +# program then prints the map, which gives a readout of the top stocks +# traded in the past 5 seconds. + +# Here's what the output looks like after running it for a couple hours: + +""" + --- Past 5 seconds --- + Tickers seen (5s): 1697 + Trades seen (5s): 12335 + Cash traded (5s): 88,849,414.33 + + --- Running Totals --- + Total Tickers seen: 13848 + Total Trades seen: 22775838 + Total Cash traded: 178,499,702,488.96 + +---------------------------------------------------------------------------------------------------- + +Ticker Trades (5s) Cash (5s) Total Trades Total Cash +NVDA 445 6,933,283.61 632550 18,291,747,596.36 +TSLA 279 8,144,556.76 639585 11,319,594,268.07 +NVDL 277 3,748,806.85 10451 99,902,192.88 +TELL 171 78,424.03 6154 3,710,200.38 +AFRM 163 968,984.99 224338 745,895,134.93 +AAPL 134 2,359,278.02 304572 2,932,389,741.58 +QQQ 132 5,788,859.71 246679 11,003,577,730.48 +NVDS 130 598,047.04 7846 48,854,967.44 +SOXL 127 786,026.38 189184 719,639,349.26 +AMD 116 1,549,180.08 304704 3,713,351,432.39 +SPY 113 6,628,554.14 278926 15,435,607,506.98 +MSFT 109 1,600,861.75 148047 2,396,824,971.18 +SQQQ 88 1,006,330.83 173406 2,065,760,858.90 +TQQQ 83 717,574.40 296021 2,580,097,288.27 +PLUG 82 106,542.65 31921 53,825,007.27 +ITB 75 455,902.33 23369 185,892,273.60 +AVGO 71 1,955,826.79 31586 633,629,812.65 +STX 71 273,681.77 8420 34,141,139.17 +XPEV 68 234,765.41 41284 127,781,104.54 +OIH 55 662.12 2964 65,848,514.45 +XEL 54 197,642.42 18524 103,054,857.37 +XLU 53 850,017.20 35963 291,891,266.17 +ARRY 52 164,056.54 11354 23,001,537.49 +META 52 1,457,535.82 150793 2,717,344,906.63 +PLTR 52 147,743.93 86456 396,851,801.06 + +Current Time: 2023-08-25 08:27:14.602075 | App Uptime: 04:49:40 | Time taken: 0.003417 seconds +""" + +app_start_time = time.time() +string_map: Dict[str, int] = {} +cash_map_5s: Dict[str, float] = {} +cash_traded = float(0) + +# totals +total_tickers_seen = 0 +total_trades_seen = 0 +total_cash_traded = 0.0 + +# These dictionaries will keep track of the running total of trades and cash per ticker. +total_string_map: Dict[str, int] = {} +total_cash_map: Dict[str, float] = {} + + +def print_centered(s: str): + term_width = os.get_terminal_size().columns + print(s.center(term_width)) + + +def run_websocket_client(): + # client = WebSocketClient("XXXXXX") # hardcoded api_key is used + client = WebSocketClient() # MASSIVE_API_KEY environment variable is used + client.subscribe("T.*") # all trades + client.run(handle_msg) + + +def handle_msg(msgs: List[WebSocketMessage]): + global cash_traded + global total_tickers_seen, total_trades_seen, total_cash_traded + for m in msgs: + if isinstance(m, EquityTrade): + # Update total trades and cash for the past 5 seconds + if isinstance(m.symbol, str): + string_map[m.symbol] = string_map.get(m.symbol, 0) + 1 + total_string_map[m.symbol] = total_string_map.get(m.symbol, 0) + 1 + + # Update cash traded + if isinstance(m.price, float) and isinstance(m.size, int): + cash_value = m.price * m.size + cash_traded += cash_value + total_cash_map[m.symbol] = ( # type: ignore + total_cash_map.get(m.symbol, 0) + cash_value # type: ignore + ) + + # Update cash for the past 5 seconds + cash_map_5s[m.symbol] = ( # type: ignore + cash_map_5s.get(m.symbol, 0) + cash_value # type: ignore + ) # Okay! + + # Update totals + total_tickers_seen = len(total_string_map) + total_trades_seen += 1 + total_cash_traded += cash_value + + +def top_function(): + # start timer + start_time = time.time() + global cash_traded + + # Only sort the string_map once + sorted_trades_5s = sorted(string_map.items(), key=lambda x: x[1], reverse=True) + + # Clear screen + print("\033c", end="") + + # Print 5-second snapshot + print() + print_centered("--- Past 5 seconds ---") + print_centered(f"Tickers seen (5s): {len(string_map)}") + print_centered(f"Trades seen (5s): {sum(string_map.values())}") + print_centered(f"Cash traded (5s): {cash_traded:,.2f}") + print() + print_centered("--- Running Totals ---") + print_centered(f"Total Tickers seen: {total_tickers_seen}") + print_centered(f"Total Trades seen: {total_trades_seen}") + print_centered(f"Total Cash traded: {total_cash_traded:,.2f}") + + # Separator + print() + print_centered("-" * 100 + "\n") + + # Print table header + print_centered( + "{:<15}{:<20}{:<20}{:<20}{:<20}".format( + "Ticker", "Trades (5s)", "Cash (5s)", "Total Trades", "Total Cash" + ) + ) + + # Print table content + for ticker, trades in sorted(string_map.items(), key=lambda x: x[1], reverse=True)[ + :25 + ]: + cash_5s = cash_map_5s.get(ticker, 0) + total_trades = total_string_map[ticker] + total_cash = total_cash_map.get(ticker, 0.0) + print_centered( + "{:<15}{:<20}{:<20,.2f}{:<20}{:<20,.2f}".format( + ticker, trades, cash_5s, total_trades, total_cash + ) + ) + + # Print times + end_time = time.time() + current_time = datetime.now() + + # Print elapsed the since we started + elapsed_time = time.time() - app_start_time + hours, rem = divmod(elapsed_time, 3600) + minutes, seconds = divmod(rem, 60) + + # Print the time and quick stats + print() + print_centered( + f"Current Time: {current_time} | App Uptime: {int(hours):02}:{int(minutes):02}:{int(seconds):02} | Time taken: {end_time - start_time:.6f} seconds" + ) + + # clear map and cash for next loop + string_map.clear() + cash_map_5s.clear() + cash_traded = 0 + + +def run_function_periodically(): + while True: + top_function() + time.sleep(5) + + +thread1 = threading.Thread(target=run_function_periodically) +thread2 = threading.Thread(target=run_websocket_client) + +thread1.start() +thread2.start() + +thread1.join() +thread2.join() diff --git a/polygon/__init__.py b/massive/__init__.py similarity index 100% rename from polygon/__init__.py rename to massive/__init__.py diff --git a/polygon/exceptions.py b/massive/exceptions.py similarity index 66% rename from polygon/exceptions.py rename to massive/exceptions.py index 7246108c..b8960763 100644 --- a/polygon/exceptions.py +++ b/massive/exceptions.py @@ -12,11 +12,3 @@ class BadResponse(Exception): """ pass - - -class NoResultsError(Exception): - """ - Missing results key - """ - - pass diff --git a/polygon/logging.py b/massive/logging.py similarity index 100% rename from polygon/logging.py rename to massive/logging.py diff --git a/massive/modelclass.py b/massive/modelclass.py new file mode 100644 index 00000000..117f7910 --- /dev/null +++ b/massive/modelclass.py @@ -0,0 +1,27 @@ +import inspect +import typing +from dataclasses import dataclass + +_T = typing.TypeVar("_T") + + +def modelclass(cls: typing.Type[_T]) -> typing.Type[_T]: + cls = dataclass(cls) + type_hints = typing.get_type_hints(cls) + attributes = [ + a + for a in type_hints.keys() + if not a.startswith("__") and not inspect.isroutine(getattr(cls, a, None)) + ] + + def init(self, *args, **kwargs): + for i, a in enumerate(args): + if i < len(attributes): + self.__dict__[attributes[i]] = a + for k, v in kwargs.items(): + if k in attributes: + self.__dict__[k] = v + + cls.__init__ = init # type: ignore[assignment] + + return cls diff --git a/polygon/rest/__init__.py b/massive/rest/__init__.py similarity index 61% rename from polygon/rest/__init__.py rename to massive/rest/__init__.py index 13a29d6d..5a00da5a 100644 --- a/polygon/rest/__init__.py +++ b/massive/rest/__init__.py @@ -1,7 +1,15 @@ from .aggs import AggsClient +from .futures import FuturesClient +from .financials import FinancialsClient +from .benzinga import BenzingaClient +from .economy import EconomyClient +from .etf_global import EtfGlobalClient +from .tmx import TmxClient from .trades import TradesClient from .quotes import QuotesClient from .snapshot import SnapshotClient +from .indicators import IndicatorsClient +from .summaries import SummariesClient from .reference import ( MarketsClient, TickersClient, @@ -12,16 +20,21 @@ ContractsClient, ) from .vX import VXClient -from typing import Optional +from typing import Optional, Any import os - -BASE = "https://api.polygon.io" -ENV_KEY = "POLYGON_API_KEY" +BASE = "https://api.massive.com" +ENV_KEY = "MASSIVE_API_KEY" class RESTClient( AggsClient, + FuturesClient, + FinancialsClient, + BenzingaClient, + EconomyClient, + EtfGlobalClient, + TmxClient, TradesClient, QuotesClient, SnapshotClient, @@ -32,6 +45,8 @@ class RESTClient( ConditionsClient, ExchangesClient, ContractsClient, + IndicatorsClient, + SummariesClient, ): def __init__( self, @@ -41,7 +56,10 @@ def __init__( num_pools: int = 10, retries: int = 3, base: str = BASE, + pagination: bool = True, verbose: bool = False, + trace: bool = False, + custom_json: Optional[Any] = None, ): super().__init__( api_key=api_key, @@ -50,7 +68,10 @@ def __init__( num_pools=num_pools, retries=retries, base=base, + pagination=pagination, verbose=verbose, + trace=trace, + custom_json=custom_json, ) self.vx = VXClient( api_key=api_key, @@ -59,5 +80,8 @@ def __init__( num_pools=num_pools, retries=retries, base=base, + pagination=pagination, verbose=verbose, + trace=trace, + custom_json=custom_json, ) diff --git a/polygon/rest/aggs.py b/massive/rest/aggs.py similarity index 64% rename from polygon/rest/aggs.py rename to massive/rest/aggs.py index 8c96842c..cb874fac 100644 --- a/polygon/rest/aggs.py +++ b/massive/rest/aggs.py @@ -1,11 +1,58 @@ from .base import BaseClient -from typing import Optional, Any, Dict, List, Union +from typing import Optional, Any, Dict, List, Union, Iterator from .models import Agg, GroupedDailyAgg, DailyOpenCloseAgg, PreviousCloseAgg, Sort from urllib3 import HTTPResponse from datetime import datetime, date +from .models.request import RequestOptionBuilder + class AggsClient(BaseClient): + def list_aggs( + self, + ticker: str, + multiplier: int, + timespan: str, + # "from" is a keyword in python https://www.w3schools.com/python/python_ref_keywords.asp + from_: Union[str, int, datetime, date], + to: Union[str, int, datetime, date], + adjusted: Optional[bool] = None, + sort: Optional[Union[str, Sort]] = None, + limit: Optional[int] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[Agg], HTTPResponse]: + """ + List aggregate bars for a ticker over a given date range in custom time window sizes. + + :param ticker: The ticker symbol. + :param multiplier: The size of the timespan multiplier. + :param timespan: The size of the time window. + :param from_: The start of the aggregate time window as YYYY-MM-DD, a date, Unix MS Timestamp, or a datetime. + :param to: The end of the aggregate time window as YYYY-MM-DD, a date, Unix MS Timestamp, or a datetime. + :param adjusted: Whether or not the results are adjusted for splits. By default, results are adjusted. Set this to false to get results that are NOT adjusted for splits. + :param sort: Sort the results by timestamp. asc will return results in ascending order (oldest at the top), desc will return results in descending order (newest at the top).The end of the aggregate time window. + :param limit: Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000. Read more about how limit is used to calculate aggregate results in our article on Aggregate Data API Improvements. + :param params: Any additional query params + :param raw: Return raw object instead of results object + :return: Iterator of aggregates + """ + if isinstance(from_, datetime): + from_ = int(from_.timestamp() * self.time_mult("millis")) + + if isinstance(to, datetime): + to = int(to.timestamp() * self.time_mult("millis")) + url = f"/v2/aggs/ticker/{ticker}/range/{multiplier}/{timespan}/{from_}/{to}" + + return self._paginate( + path=url, + params=self._get_params(self.list_aggs, locals()), + raw=raw, + deserializer=Agg.from_dict, + options=options, + ) + def get_aggs( self, ticker: str, @@ -19,6 +66,7 @@ def get_aggs( limit: Optional[int] = None, params: Optional[Dict[str, Any]] = None, raw: bool = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[List[Agg], HTTPResponse]: """ Get aggregate bars for a ticker over a given date range in custom time window sizes. @@ -26,7 +74,7 @@ def get_aggs( :param ticker: The ticker symbol. :param multiplier: The size of the timespan multiplier. :param timespan: The size of the time window. - :param _from: The start of the aggregate time window as YYYY-MM-DD, a date, Unix MS Timestamp, or a datetime. + :param from_: The start of the aggregate time window as YYYY-MM-DD, a date, Unix MS Timestamp, or a datetime. :param to: The end of the aggregate time window as YYYY-MM-DD, a date, Unix MS Timestamp, or a datetime. :param adjusted: Whether or not the results are adjusted for splits. By default, results are adjusted. Set this to false to get results that are NOT adjusted for splits. :param sort: Sort the results by timestamp. asc will return results in ascending order (oldest at the top), desc will return results in descending order (newest at the top).The end of the aggregate time window. @@ -48,19 +96,22 @@ def get_aggs( result_key="results", deserializer=Agg.from_dict, raw=raw, + options=options, ) # TODO: next breaking change release move "market_type" to be 2nd mandatory # 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, + locale: str = "us", market_type: str = "stocks", include_otc: bool = False, - ) -> Union[GroupedDailyAgg, HTTPResponse]: + options: Optional[RequestOptionBuilder] = None, + ) -> Union[List[GroupedDailyAgg], HTTPResponse]: """ Get the daily open, high, low, and close (OHLC) for the entire market. @@ -70,7 +121,7 @@ def get_grouped_daily_aggs( :param raw: Return raw object instead of results object :return: List of grouped daily aggregates """ - url = f"/v2/aggs/grouped/locale/us/market/{market_type}/{date}" + url = f"/v2/aggs/grouped/locale/{locale}/market/{market_type}/{date}" return self._get( path=url, @@ -78,15 +129,17 @@ def get_grouped_daily_aggs( result_key="results", deserializer=GroupedDailyAgg.from_dict, raw=raw, + options=options, ) 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, + options: Optional[RequestOptionBuilder] = None, ) -> Union[DailyOpenCloseAgg, HTTPResponse]: """ Get the open, close and afterhours prices of a stock symbol on a certain date. @@ -105,6 +158,7 @@ def get_daily_open_close_agg( params=self._get_params(self.get_daily_open_close_agg, locals()), deserializer=DailyOpenCloseAgg.from_dict, raw=raw, + options=options, ) def get_previous_close_agg( @@ -113,6 +167,7 @@ def get_previous_close_agg( adjusted: Optional[bool] = None, params: Optional[Dict[str, Any]] = None, raw: bool = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[PreviousCloseAgg, HTTPResponse]: """ Get the previous day's open, high, low, and close (OHLC) for the specified stock ticker. @@ -131,4 +186,5 @@ def get_previous_close_agg( result_key="results", deserializer=PreviousCloseAgg.from_dict, raw=raw, + options=options, ) diff --git a/massive/rest/base.py b/massive/rest/base.py new file mode 100644 index 00000000..66c28924 --- /dev/null +++ b/massive/rest/base.py @@ -0,0 +1,267 @@ +import certifi +import json +import urllib3 +import inspect +from urllib3.util.retry import Retry +from enum import Enum +from typing import Optional, Any, Dict +from datetime import datetime +from importlib.metadata import version, PackageNotFoundError +from .models.request import RequestOptionBuilder +from ..logging import get_logger +import logging +from urllib.parse import urlencode, urlparse +from ..exceptions import AuthError, BadResponse + +logger = get_logger("RESTClient") +version_number = "unknown" +try: + version_number = version("massive-api-client") +except PackageNotFoundError: + pass + + +class BaseClient: + def __init__( + self, + api_key: Optional[str], + connect_timeout: float, + read_timeout: float, + num_pools: int, + retries: int, + base: str, + pagination: bool, + verbose: bool, + trace: bool, + custom_json: Optional[Any] = None, + ): + if api_key is None: + raise AuthError( + f"Must specify env var MASSIVE_API_KEY or pass api_key in constructor" + ) + + self.API_KEY = api_key + self.BASE = base + self.pagination = pagination + + self.headers = { + "Authorization": "Bearer " + self.API_KEY, + "Accept-Encoding": "gzip", + "User-Agent": f"Massive.com PythonClient/{version_number}", + } + + # initialize self.retries with the parameter value before using it + self.retries = retries + + # https://urllib3.readthedocs.io/en/stable/reference/urllib3.util.html#urllib3.util.Retry.RETRY_AFTER_STATUS_CODES + retry_strategy = Retry( + total=self.retries, + status_forcelist=[ + 413, + 429, + 499, + 500, + 502, + 503, + 504, + ], # default 413, 429, 503 + backoff_factor=0.1, # [0.0s, 0.2s, 0.4s, 0.8s, 1.6s, ...] + ) + + # 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. + ca_certs=certifi.where(), + cert_reqs="CERT_REQUIRED", + retries=retry_strategy, # use the customized Retry instance + ) + + self.timeout = urllib3.Timeout(connect=connect_timeout, read=read_timeout) + + if verbose: + logger.setLevel(logging.DEBUG) + self.trace = trace + if custom_json: + self.json = custom_json + else: + self.json = json + + def _decode(self, resp): + return self.json.loads(resp.data.decode("utf-8")) + + def _get( + self, + path: str, + params: Optional[dict] = None, + result_key: Optional[str] = None, + deserializer=None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Any: + option = options if options is not None else RequestOptionBuilder() + + headers = self._concat_headers(option.headers) + + if self.trace: + full_url = f"{self.BASE}{path}" + if params: + full_url += f"?{urlencode(params)}" + print_headers = headers.copy() + if "Authorization" in print_headers: + print_headers["Authorization"] = print_headers["Authorization"].replace( + self.API_KEY, "REDACTED" + ) + logger.info("Request URL: %s", full_url) + logger.info("Request Headers: %s", print_headers) + + resp = self.client.request( + "GET", + self.BASE + path, + fields=params, + headers=headers, + ) + + if self.trace: + resp_headers_dict = dict(resp.headers.items()) + logger.info( + "Request URL: %s, Response Headers: %s", full_url, resp_headers_dict + ) + + if resp.status != 200: + raise BadResponse(resp.data.decode("utf-8")) + + if raw: + return resp + + try: + obj = self._decode(resp) + except ValueError as e: + logger.error("Error decoding json response: %s", e) + return [] + + if result_key: + if result_key not in obj: + return [] + obj = obj[result_key] + + if deserializer: + if type(obj) == list: + obj = [deserializer(o) for o in obj] + else: + obj = deserializer(obj) + + return obj + + @staticmethod + def time_mult(timestamp_res: str) -> int: + if timestamp_res == "nanos": + return 1000000000 + elif timestamp_res == "micros": + return 1000000 + elif timestamp_res == "millis": + return 1000 + + return 1 + + def _get_params( + self, fn, caller_locals: Dict[str, Any], datetime_res: str = "nanos" + ): + params = caller_locals["params"] + if params is None: + params = {} + # https://docs.python.org/3.8/library/inspect.html#inspect.Signature + for argname, v in inspect.signature(fn).parameters.items(): + # https://docs.python.org/3.8/library/inspect.html#inspect.Parameter + if argname in ["params", "raw"]: + continue + if v.default != v.empty: + # timestamp_lt -> timestamp.lt + val = caller_locals.get(argname, v.default) + if isinstance(val, Enum): + val = val.value + elif isinstance(val, bool): + val = str(val).lower() + elif isinstance(val, datetime): + val = int(val.timestamp() * self.time_mult(datetime_res)) + if val is not None: + for ext in ["lt", "lte", "gt", "gte", "any_of"]: + if argname.endswith(f"_{ext}"): + # lop off ext, then rebuild argname with ext, + # using ., and not _ (removesuffix would work) + # but that is python 3.9+ + argname = argname[: -len(f"_{ext}")] + f".{ext}" + if argname.endswith("any_of"): + val = ",".join(val) + params[argname] = val + + return params + + def _concat_headers(self, headers: Optional[Dict[str, str]]) -> Dict[str, str]: + if headers is None: + return self.headers + return {**headers, **self.headers} + + def _paginate_iter( + self, + path: str, + params: dict, + deserializer, + result_key: str = "results", + options: Optional[RequestOptionBuilder] = None, + ): + while True: + resp = self._get( + path=path, + params=params, + deserializer=deserializer, + result_key=result_key, + raw=True, + options=options, + ) + + try: + decoded = self._decode(resp) + except ValueError as e: + logger.error("Error decoding json response: %s", e) + return [] + + if result_key not in decoded: + return [] + for t in decoded[result_key]: + yield deserializer(t) + if not self.pagination or "next_url" not in decoded: + return + next_url = decoded["next_url"] + parsed = urlparse(next_url) + path = parsed.path + if parsed.query: + path += "?" + parsed.query + params = {} + + def _paginate( + self, + path: str, + params: dict, + raw: bool, + deserializer, + result_key: str = "results", + options: Optional[RequestOptionBuilder] = None, + ): + if raw: + return self._get( + path=path, + params=params, + deserializer=deserializer, + raw=True, + options=options, + ) + + return self._paginate_iter( + path=path, + params=params, + deserializer=deserializer, + result_key=result_key, + options=options, + ) diff --git a/massive/rest/benzinga.py b/massive/rest/benzinga.py new file mode 100644 index 00000000..fdd9d0b0 --- /dev/null +++ b/massive/rest/benzinga.py @@ -0,0 +1,521 @@ +from typing import Optional, Any, Dict, List, Union, Iterator +from urllib3 import HTTPResponse +from datetime import datetime, date + +from .base import BaseClient +from .models.benzinga import ( + BenzingaAnalystInsight, + BenzingaAnalyst, + BenzingaConsensusRating, + BenzingaEarning, + BenzingaFirm, + BenzingaGuidance, + BenzingaNews, + BenzingaRating, + BenzingaBullsBearsSay, +) +from .models.common import Sort +from .models.request import RequestOptionBuilder + + +class BenzingaClient(BaseClient): + """ + Client for the Benzinga REST Endpoints + (aligned with the paths from /benzinga/v1/...) + """ + + def list_benzinga_analyst_insights( + self, + date: Optional[Union[str, date]] = None, + date_any_of: Optional[str] = None, + date_gt: Optional[Union[str, date]] = None, + date_gte: Optional[Union[str, date]] = None, + date_lt: Optional[Union[str, date]] = None, + date_lte: Optional[Union[str, date]] = None, + ticker: Optional[str] = None, + ticker_any_of: Optional[str] = None, + ticker_gt: Optional[str] = None, + ticker_gte: Optional[str] = None, + ticker_lt: Optional[str] = None, + ticker_lte: Optional[str] = None, + last_updated: Optional[str] = None, + last_updated_any_of: Optional[str] = None, + last_updated_gt: Optional[str] = None, + last_updated_gte: Optional[str] = None, + last_updated_lt: Optional[str] = None, + last_updated_lte: Optional[str] = None, + firm: Optional[str] = None, + firm_any_of: Optional[str] = None, + firm_gt: Optional[str] = None, + firm_gte: Optional[str] = None, + firm_lt: Optional[str] = None, + firm_lte: Optional[str] = None, + rating_action: Optional[str] = None, + rating_action_any_of: Optional[str] = None, + rating_action_gt: Optional[str] = None, + rating_action_gte: Optional[str] = None, + rating_action_lt: Optional[str] = None, + rating_action_lte: Optional[str] = None, + benzinga_firm_id: Optional[str] = None, + benzinga_firm_id_any_of: Optional[str] = None, + benzinga_firm_id_gt: Optional[str] = None, + benzinga_firm_id_gte: Optional[str] = None, + benzinga_firm_id_lt: Optional[str] = None, + benzinga_firm_id_lte: Optional[str] = None, + benzinga_rating_id: Optional[str] = None, + benzinga_rating_id_any_of: Optional[str] = None, + benzinga_rating_id_gt: Optional[str] = None, + benzinga_rating_id_gte: Optional[str] = None, + benzinga_rating_id_lt: Optional[str] = None, + benzinga_rating_id_lte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[BenzingaAnalystInsight], HTTPResponse]: + """ + Endpoint: GET /benzinga/v1/analyst-insights + """ + url = "/benzinga/v1/analyst-insights" + return self._paginate( + path=url, + params=self._get_params(self.list_benzinga_analyst_insights, locals()), + raw=raw, + deserializer=BenzingaAnalystInsight.from_dict, + options=options, + ) + + def list_benzinga_analysts( + self, + benzinga_id: Optional[str] = None, + benzinga_id_any_of: Optional[str] = None, + benzinga_id_gt: Optional[str] = None, + benzinga_id_gte: Optional[str] = None, + benzinga_id_lt: Optional[str] = None, + benzinga_id_lte: Optional[str] = None, + benzinga_firm_id: Optional[str] = None, + benzinga_firm_id_any_of: Optional[str] = None, + benzinga_firm_id_gt: Optional[str] = None, + benzinga_firm_id_gte: Optional[str] = None, + benzinga_firm_id_lt: Optional[str] = None, + benzinga_firm_id_lte: Optional[str] = None, + firm_name: Optional[str] = None, + firm_name_any_of: Optional[str] = None, + firm_name_gt: Optional[str] = None, + firm_name_gte: Optional[str] = None, + firm_name_lt: Optional[str] = None, + firm_name_lte: Optional[str] = None, + full_name: Optional[str] = None, + full_name_any_of: Optional[str] = None, + full_name_gt: Optional[str] = None, + full_name_gte: Optional[str] = None, + full_name_lt: Optional[str] = None, + full_name_lte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[BenzingaAnalyst], HTTPResponse]: + """ + Endpoint: GET /benzinga/v1/analysts + """ + url = "/benzinga/v1/analysts" + return self._paginate( + path=url, + params=self._get_params(self.list_benzinga_analysts, locals()), + raw=raw, + deserializer=BenzingaAnalyst.from_dict, + options=options, + ) + + def list_benzinga_consensus_ratings( + self, + ticker: str, + date: Optional[Union[str, date]] = None, + date_gt: Optional[Union[str, date]] = None, + date_gte: Optional[Union[str, date]] = None, + date_lt: Optional[Union[str, date]] = None, + date_lte: Optional[Union[str, date]] = None, + limit: Optional[int] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[BenzingaConsensusRating], HTTPResponse]: + """ + Endpoint: GET /benzinga/v1/consensus-ratings/{ticker} + """ + url = f"/benzinga/v1/consensus-ratings/{ticker}" + return self._paginate( + path=url, + params=self._get_params(self.list_benzinga_consensus_ratings, locals()), + raw=raw, + deserializer=BenzingaConsensusRating.from_dict, + options=options, + ) + + def list_benzinga_earnings( + self, + date: Optional[Union[str, date]] = None, + date_any_of: Optional[str] = None, + date_gt: Optional[Union[str, date]] = None, + date_gte: Optional[Union[str, date]] = None, + date_lt: Optional[Union[str, date]] = None, + date_lte: Optional[Union[str, date]] = None, + ticker: Optional[str] = None, + ticker_any_of: Optional[str] = None, + ticker_gt: Optional[str] = None, + ticker_gte: Optional[str] = None, + ticker_lt: Optional[str] = None, + ticker_lte: Optional[str] = None, + importance: Optional[int] = None, + importance_any_of: Optional[str] = None, + importance_gt: Optional[int] = None, + importance_gte: Optional[int] = None, + importance_lt: Optional[int] = None, + importance_lte: Optional[int] = None, + last_updated: Optional[str] = None, + last_updated_any_of: Optional[str] = None, + last_updated_gt: Optional[str] = None, + last_updated_gte: Optional[str] = None, + last_updated_lt: Optional[str] = None, + last_updated_lte: Optional[str] = None, + date_status: Optional[str] = None, + date_status_any_of: Optional[str] = None, + date_status_gt: Optional[str] = None, + date_status_gte: Optional[str] = None, + date_status_lt: Optional[str] = None, + date_status_lte: Optional[str] = None, + eps_surprise_percent: Optional[float] = None, + eps_surprise_percent_any_of: Optional[str] = None, + eps_surprise_percent_gt: Optional[float] = None, + eps_surprise_percent_gte: Optional[float] = None, + eps_surprise_percent_lt: Optional[float] = None, + eps_surprise_percent_lte: Optional[float] = None, + revenue_surprise_percent: Optional[float] = None, + revenue_surprise_percent_any_of: Optional[str] = None, + revenue_surprise_percent_gt: Optional[float] = None, + revenue_surprise_percent_gte: Optional[float] = None, + revenue_surprise_percent_lt: Optional[float] = None, + revenue_surprise_percent_lte: Optional[float] = None, + fiscal_year: Optional[int] = None, + fiscal_year_any_of: Optional[str] = None, + fiscal_year_gt: Optional[int] = None, + fiscal_year_gte: Optional[int] = None, + fiscal_year_lt: Optional[int] = None, + fiscal_year_lte: Optional[int] = None, + fiscal_period: Optional[str] = None, + fiscal_period_any_of: Optional[str] = None, + fiscal_period_gt: Optional[str] = None, + fiscal_period_gte: Optional[str] = None, + fiscal_period_lt: Optional[str] = None, + fiscal_period_lte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[BenzingaEarning], HTTPResponse]: + """ + Endpoint: GET /benzinga/v1/earnings + """ + url = "/benzinga/v1/earnings" + return self._paginate( + path=url, + params=self._get_params(self.list_benzinga_earnings, locals()), + raw=raw, + deserializer=BenzingaEarning.from_dict, + options=options, + ) + + def list_benzinga_firms( + self, + benzinga_id: Optional[str] = None, + benzinga_id_any_of: Optional[str] = None, + benzinga_id_gt: Optional[str] = None, + benzinga_id_gte: Optional[str] = None, + benzinga_id_lt: Optional[str] = None, + benzinga_id_lte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[BenzingaFirm], HTTPResponse]: + """ + Endpoint: GET /benzinga/v1/firms + """ + url = "/benzinga/v1/firms" + return self._paginate( + path=url, + params=self._get_params(self.list_benzinga_firms, locals()), + raw=raw, + deserializer=BenzingaFirm.from_dict, + options=options, + ) + + def list_benzinga_guidance( + self, + date: Optional[Union[str, date]] = None, + date_any_of: Optional[str] = None, + date_gt: Optional[Union[str, date]] = None, + date_gte: Optional[Union[str, date]] = None, + date_lt: Optional[Union[str, date]] = None, + date_lte: Optional[Union[str, date]] = None, + ticker: Optional[str] = None, + ticker_any_of: Optional[str] = None, + ticker_gt: Optional[str] = None, + ticker_gte: Optional[str] = None, + ticker_lt: Optional[str] = None, + ticker_lte: Optional[str] = None, + positioning: Optional[str] = None, + positioning_any_of: Optional[str] = None, + positioning_gt: Optional[str] = None, + positioning_gte: Optional[str] = None, + positioning_lt: Optional[str] = None, + positioning_lte: Optional[str] = None, + importance: Optional[int] = None, + importance_any_of: Optional[str] = None, + importance_gt: Optional[int] = None, + importance_gte: Optional[int] = None, + importance_lt: Optional[int] = None, + importance_lte: Optional[int] = None, + last_updated: Optional[str] = None, + last_updated_any_of: Optional[str] = None, + last_updated_gt: Optional[str] = None, + last_updated_gte: Optional[str] = None, + last_updated_lt: Optional[str] = None, + last_updated_lte: Optional[str] = None, + fiscal_year: Optional[int] = None, + fiscal_year_any_of: Optional[str] = None, + fiscal_year_gt: Optional[int] = None, + fiscal_year_gte: Optional[int] = None, + fiscal_year_lt: Optional[int] = None, + fiscal_year_lte: Optional[int] = None, + fiscal_period: Optional[str] = None, + fiscal_period_any_of: Optional[str] = None, + fiscal_period_gt: Optional[str] = None, + fiscal_period_gte: Optional[str] = None, + fiscal_period_lt: Optional[str] = None, + fiscal_period_lte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[BenzingaGuidance], HTTPResponse]: + """ + Endpoint: GET /benzinga/v1/guidance + """ + url = "/benzinga/v1/guidance" + return self._paginate( + path=url, + params=self._get_params(self.list_benzinga_guidance, locals()), + raw=raw, + deserializer=BenzingaGuidance.from_dict, + options=options, + ) + + def list_benzinga_news( + self, + published: Optional[str] = None, + published_any_of: Optional[str] = None, + published_gt: Optional[str] = None, + published_gte: Optional[str] = None, + published_lt: Optional[str] = None, + published_lte: Optional[str] = None, + last_updated: Optional[str] = None, + last_updated_any_of: Optional[str] = None, + last_updated_gt: Optional[str] = None, + last_updated_gte: Optional[str] = None, + last_updated_lt: Optional[str] = None, + last_updated_lte: Optional[str] = None, + tickers: Optional[str] = None, + tickers_all_of: Optional[str] = None, + tickers_any_of: Optional[str] = None, + channels: Optional[str] = None, + channels_all_of: Optional[str] = None, + channels_any_of: Optional[str] = None, + tags: Optional[str] = None, + tags_all_of: Optional[str] = None, + tags_any_of: Optional[str] = None, + author: Optional[str] = None, + author_any_of: Optional[str] = None, + author_gt: Optional[str] = None, + author_gte: Optional[str] = None, + author_lt: Optional[str] = None, + author_lte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[BenzingaNews], HTTPResponse]: + """ + Endpoint: GET /benzinga/v1/news + """ + url = "/benzinga/v1/news" + return self._paginate( + path=url, + params=self._get_params(self.list_benzinga_news, locals()), + raw=raw, + deserializer=BenzingaNews.from_dict, + options=options, + ) + + def list_benzinga_news_v2( + self, + published: Optional[str] = None, + published_gt: Optional[str] = None, + published_gte: Optional[str] = None, + published_lt: Optional[str] = None, + published_lte: Optional[str] = None, + channels: Optional[str] = None, + channels_all_of: Optional[str] = None, + channels_any_of: Optional[str] = None, + tags: Optional[str] = None, + tags_all_of: Optional[str] = None, + tags_any_of: Optional[str] = None, + author: Optional[str] = None, + author_any_of: Optional[str] = None, + author_gt: Optional[str] = None, + author_gte: Optional[str] = None, + author_lt: Optional[str] = None, + author_lte: Optional[str] = None, + stocks: Optional[str] = None, + stocks_all_of: Optional[str] = None, + stocks_any_of: Optional[str] = None, + tickers: Optional[str] = None, + tickers_all_of: Optional[str] = None, + tickers_any_of: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[BenzingaNews], HTTPResponse]: + """ + Endpoint: GET /benzinga/v2/news + """ + url = "/benzinga/v2/news" + return self._paginate( + path=url, + params=self._get_params(self.list_benzinga_news_v2, locals()), + raw=raw, + deserializer=BenzingaNews.from_dict, + options=options, + ) + + def list_benzinga_ratings( + self, + date: Optional[Union[str, date]] = None, + date_any_of: Optional[str] = None, + date_gt: Optional[Union[str, date]] = None, + date_gte: Optional[Union[str, date]] = None, + date_lt: Optional[Union[str, date]] = None, + date_lte: Optional[Union[str, date]] = None, + ticker: Optional[str] = None, + ticker_any_of: Optional[str] = None, + ticker_gt: Optional[str] = None, + ticker_gte: Optional[str] = None, + ticker_lt: Optional[str] = None, + ticker_lte: Optional[str] = None, + importance: Optional[int] = None, + importance_any_of: Optional[str] = None, + importance_gt: Optional[int] = None, + importance_gte: Optional[int] = None, + importance_lt: Optional[int] = None, + importance_lte: Optional[int] = None, + last_updated: Optional[str] = None, + last_updated_any_of: Optional[str] = None, + last_updated_gt: Optional[str] = None, + last_updated_gte: Optional[str] = None, + last_updated_lt: Optional[str] = None, + last_updated_lte: Optional[str] = None, + rating_action: Optional[str] = None, + rating_action_any_of: Optional[str] = None, + rating_action_gt: Optional[str] = None, + rating_action_gte: Optional[str] = None, + rating_action_lt: Optional[str] = None, + rating_action_lte: Optional[str] = None, + price_target_action: Optional[str] = None, + price_target_action_any_of: Optional[str] = None, + price_target_action_gt: Optional[str] = None, + price_target_action_gte: Optional[str] = None, + price_target_action_lt: Optional[str] = None, + price_target_action_lte: Optional[str] = None, + benzinga_id: Optional[str] = None, + benzinga_id_any_of: Optional[str] = None, + benzinga_id_gt: Optional[str] = None, + benzinga_id_gte: Optional[str] = None, + benzinga_id_lt: Optional[str] = None, + benzinga_id_lte: Optional[str] = None, + benzinga_analyst_id: Optional[str] = None, + benzinga_analyst_id_any_of: Optional[str] = None, + benzinga_analyst_id_gt: Optional[str] = None, + benzinga_analyst_id_gte: Optional[str] = None, + benzinga_analyst_id_lt: Optional[str] = None, + benzinga_analyst_id_lte: Optional[str] = None, + benzinga_firm_id: Optional[str] = None, + benzinga_firm_id_any_of: Optional[str] = None, + benzinga_firm_id_gt: Optional[str] = None, + benzinga_firm_id_gte: Optional[str] = None, + benzinga_firm_id_lt: Optional[str] = None, + benzinga_firm_id_lte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[BenzingaRating], HTTPResponse]: + """ + Endpoint: GET /benzinga/v1/ratings + """ + url = "/benzinga/v1/ratings" + return self._paginate( + path=url, + params=self._get_params(self.list_benzinga_ratings, locals()), + raw=raw, + deserializer=BenzingaRating.from_dict, + options=options, + ) + + def list_benzinga_bulls_bears_say( + self, + ticker: Optional[str] = None, + ticker_any_of: Optional[str] = None, + ticker_gt: Optional[str] = None, + ticker_gte: Optional[str] = None, + ticker_lt: Optional[str] = None, + ticker_lte: Optional[str] = None, + benzinga_id: Optional[str] = None, + benzinga_id_any_of: Optional[str] = None, + benzinga_id_gt: Optional[str] = None, + benzinga_id_gte: Optional[str] = None, + benzinga_id_lt: Optional[str] = None, + benzinga_id_lte: Optional[str] = None, + last_updated: Optional[str] = None, + last_updated_gt: Optional[str] = None, + last_updated_gte: Optional[str] = None, + last_updated_lt: Optional[str] = None, + last_updated_lte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[str] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[BenzingaBullsBearsSay], HTTPResponse]: + """ + Endpoint: GET /benzinga/v1/bulls-bears-say + + A comprehensive database of analyst bull and bear case summaries for publicly traded companies, providing concise summaries of both bullish and bearish investment arguments to help investors see both sides of the story before making investment decisions. + """ + url = "/benzinga/v1/bulls-bears-say" + return self._paginate( + path=url, + params=self._get_params(self.list_benzinga_bulls_bears_say, locals()), + raw=raw, + deserializer=BenzingaBullsBearsSay.from_dict, + options=options, + ) diff --git a/massive/rest/economy.py b/massive/rest/economy.py new file mode 100644 index 00000000..f8d58272 --- /dev/null +++ b/massive/rest/economy.py @@ -0,0 +1,170 @@ +from typing import Optional, Any, Dict, List, Union, Iterator +from urllib3 import HTTPResponse +from datetime import datetime, date + +from .base import BaseClient +from .models.economy import ( + FedInflation, + TreasuryYield, + FedInflationExpectations, + FedLaborMarket, +) +from .models.common import Sort, Order +from .models.request import RequestOptionBuilder + + +class EconomyClient(BaseClient): + """ + Client for the Fed REST Endpoints + (aligned with the paths from /fed/v1/...) + """ + + def list_treasury_yields( + self, + date: Optional[str] = None, + date_any_of: 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_any_of: Filter equal to any of the values. + :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/v1/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, + ) + + def list_inflation( + self, + date: Optional[Union[str, date]] = None, + date_any_of: Optional[str] = None, + date_gt: Optional[Union[str, date]] = None, + date_gte: Optional[Union[str, date]] = None, + date_lt: Optional[Union[str, date]] = None, + date_lte: Optional[Union[str, date]] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[FedInflation], HTTPResponse]: + """ + Endpoint: GET /fed/v1/inflation + """ + url = "/fed/v1/inflation" + return self._paginate( + path=url, + params=self._get_params(self.list_inflation, locals()), + raw=raw, + deserializer=FedInflation.from_dict, + options=options, + ) + + def list_inflation_expectations( + self, + date: Optional[Union[str, date]] = None, + date_any_of: Optional[str] = None, + date_gt: Optional[Union[str, date]] = None, + date_gte: Optional[Union[str, date]] = None, + date_lt: Optional[Union[str, date]] = None, + date_lte: Optional[Union[str, date]] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[FedInflationExpectations], HTTPResponse]: + """ + A table tracking inflation expectations from both market-based and economic model perspectives across different time horizons. + + :param date: Calendar date of the observation (YYYY-MM-DD). + :param date_any_of: Filter equal to any of the values. Multiple values can be specified by using a comma separated list. + :param date_gt: Filter greater than the value. + :param date_gte: Filter greater than or equal to the value. + :param date_lt: Filter less than the value. + :param date_lte: Filter less than or equal to the value. + :param limit: Limit the maximum number of results returned. Defaults to '100' if not specified. The maximum allowed limit is '50000'. + :param sort: A comma separated list of sort columns. For each column, append '.asc' or '.desc' to specify the sort direction. The sort column defaults to 'date' if not specified. The sort order defaults to 'asc' if not specified. + :param params: Additional query parameters. + :param raw: Return raw HTTPResponse object if True, else return Iterator[FedInflationExpectations]. + :param options: RequestOptionBuilder for additional headers or params. + :return: An iterator of FedInflationExpectations objects or HTTPResponse if raw=True. + """ + url = "/fed/v1/inflation-expectations" + + return self._paginate( + path=url, + params=self._get_params(self.list_inflation_expectations, locals()), + deserializer=FedInflationExpectations.from_dict, + raw=raw, + result_key="results", + options=options, + ) + + def list_labor_market_indicators( + self, + date: Optional[str] = None, + date_any_of: 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[str] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[FedLaborMarket], HTTPResponse]: + """ + Labor market indicators from the Federal Reserve, including unemployment rate, labor force participation, average hourly earnings, and job openings data. + + :param date: Calendar date of the observation (YYYY-MM-DD). + :param date_any_of: Filter equal to any of the values. Multiple values can be specified by using a comma separated list. + :param date_gt: Filter greater than the value. + :param date_gte: Filter greater than or equal to the value. + :param date_lt: Filter less than the value. + :param date_lte: Filter less than or equal to the value. + :param limit: Limit the maximum number of results returned. Defaults to '100' if not specified. The maximum allowed limit is '50000'. + :param sort: A comma separated list of sort columns. For each column, append '.asc' or '.desc' to specify the sort direction. The sort column defaults to 'date' if not specified. The sort order defaults to 'asc' if not specified. + :param params: Additional query parameters. + :param raw: Return raw HTTPResponse object if True, else return Iterator[FedLaborMarket]. + :param options: RequestOptionBuilder for additional headers or params. + :return: An iterator of FedLaborMarket objects or HTTPResponse if raw=True. + """ + url = "/fed/v1/labor-market" + + return self._paginate( + path=url, + params=self._get_params(self.list_labor_market_indicators, locals()), + deserializer=FedLaborMarket.from_dict, + raw=raw, + options=options, + ) diff --git a/massive/rest/etf_global.py b/massive/rest/etf_global.py new file mode 100644 index 00000000..9da19539 --- /dev/null +++ b/massive/rest/etf_global.py @@ -0,0 +1,282 @@ +from typing import Optional, Any, Dict, List, Union, Iterator +from urllib3 import HTTPResponse +from datetime import datetime, date + +from .base import BaseClient +from .models.etf_global import ( + EtfGlobalAnalytics, + EtfGlobalConstituent, + EtfGlobalFundFlow, + EtfGlobalProfile, + EtfGlobalTaxonomy, +) +from .models.common import Sort +from .models.request import RequestOptionBuilder + + +class EtfGlobalClient(BaseClient): + """ + Client for the ETF Global REST Endpoints + (aligned with the paths from /etf-global/v1/...) + """ + + def get_etf_global_analytics( + self, + composite_ticker: Optional[str] = None, + composite_ticker_any_of: Optional[str] = None, + composite_ticker_gt: Optional[str] = None, + composite_ticker_gte: Optional[str] = None, + composite_ticker_lt: Optional[str] = None, + composite_ticker_lte: Optional[str] = None, + processed_date: Optional[Union[str, date]] = None, + processed_date_gt: Optional[Union[str, date]] = None, + processed_date_gte: Optional[Union[str, date]] = None, + processed_date_lt: Optional[Union[str, date]] = None, + processed_date_lte: Optional[Union[str, date]] = None, + effective_date: Optional[Union[str, date]] = None, + effective_date_gt: Optional[Union[str, date]] = None, + effective_date_gte: Optional[Union[str, date]] = None, + effective_date_lt: Optional[Union[str, date]] = None, + effective_date_lte: Optional[Union[str, date]] = None, + risk_total_score: Optional[float] = None, + risk_total_score_gt: Optional[float] = None, + risk_total_score_gte: Optional[float] = None, + risk_total_score_lt: Optional[float] = None, + risk_total_score_lte: Optional[float] = None, + reward_score: Optional[float] = None, + reward_score_gt: Optional[float] = None, + reward_score_gte: Optional[float] = None, + reward_score_lt: Optional[float] = None, + reward_score_lte: Optional[float] = None, + quant_total_score: Optional[float] = None, + quant_total_score_gt: Optional[float] = None, + quant_total_score_gte: Optional[float] = None, + quant_total_score_lt: Optional[float] = None, + quant_total_score_lte: Optional[float] = None, + quant_grade: Optional[str] = None, + quant_grade_any_of: Optional[str] = None, + quant_grade_gt: Optional[str] = None, + quant_grade_gte: Optional[str] = None, + quant_grade_lt: Optional[str] = None, + quant_grade_lte: Optional[str] = None, + quant_composite_technical: Optional[float] = None, + quant_composite_technical_gt: Optional[float] = None, + quant_composite_technical_gte: Optional[float] = None, + quant_composite_technical_lt: Optional[float] = None, + quant_composite_technical_lte: Optional[float] = None, + quant_composite_sentiment: Optional[float] = None, + quant_composite_sentiment_gt: Optional[float] = None, + quant_composite_sentiment_gte: Optional[float] = None, + quant_composite_sentiment_lt: Optional[float] = None, + quant_composite_sentiment_lte: Optional[float] = None, + quant_composite_behavioral: Optional[float] = None, + quant_composite_behavioral_gt: Optional[float] = None, + quant_composite_behavioral_gte: Optional[float] = None, + quant_composite_behavioral_lt: Optional[float] = None, + quant_composite_behavioral_lte: Optional[float] = None, + quant_composite_fundamental: Optional[float] = None, + quant_composite_fundamental_gt: Optional[float] = None, + quant_composite_fundamental_gte: Optional[float] = None, + quant_composite_fundamental_lt: Optional[float] = None, + quant_composite_fundamental_lte: Optional[float] = None, + quant_composite_global: Optional[float] = None, + quant_composite_global_gt: Optional[float] = None, + quant_composite_global_gte: Optional[float] = None, + quant_composite_global_lt: Optional[float] = None, + quant_composite_global_lte: Optional[float] = None, + quant_composite_quality: Optional[float] = None, + quant_composite_quality_gt: Optional[float] = None, + quant_composite_quality_gte: Optional[float] = None, + quant_composite_quality_lt: Optional[float] = None, + quant_composite_quality_lte: Optional[float] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[EtfGlobalAnalytics], HTTPResponse]: + """ + Endpoint: GET /etf-global/v1/analytics + """ + url = "/etf-global/v1/analytics" + return self._paginate( + path=url, + params=self._get_params(self.get_etf_global_analytics, locals()), + raw=raw, + deserializer=EtfGlobalAnalytics.from_dict, + options=options, + ) + + def get_etf_global_constituents( + self, + composite_ticker: Optional[str] = None, + composite_ticker_any_of: Optional[str] = None, + composite_ticker_gt: Optional[str] = None, + composite_ticker_gte: Optional[str] = None, + composite_ticker_lt: Optional[str] = None, + composite_ticker_lte: Optional[str] = None, + constituent_ticker: Optional[str] = None, + constituent_ticker_any_of: Optional[str] = None, + constituent_ticker_gt: Optional[str] = None, + constituent_ticker_gte: Optional[str] = None, + constituent_ticker_lt: Optional[str] = None, + constituent_ticker_lte: Optional[str] = None, + effective_date: Optional[Union[str, date]] = None, + effective_date_gt: Optional[Union[str, date]] = None, + effective_date_gte: Optional[Union[str, date]] = None, + effective_date_lt: Optional[Union[str, date]] = None, + effective_date_lte: Optional[Union[str, date]] = None, + processed_date: Optional[Union[str, date]] = None, + processed_date_gt: Optional[Union[str, date]] = None, + processed_date_gte: Optional[Union[str, date]] = None, + processed_date_lt: Optional[Union[str, date]] = None, + processed_date_lte: Optional[Union[str, date]] = None, + us_code: Optional[str] = None, + us_code_any_of: Optional[str] = None, + us_code_gt: Optional[str] = None, + us_code_gte: Optional[str] = None, + us_code_lt: Optional[str] = None, + us_code_lte: Optional[str] = None, + isin: Optional[str] = None, + isin_any_of: Optional[str] = None, + isin_gt: Optional[str] = None, + isin_gte: Optional[str] = None, + isin_lt: Optional[str] = None, + isin_lte: Optional[str] = None, + figi: Optional[str] = None, + figi_any_of: Optional[str] = None, + figi_gt: Optional[str] = None, + figi_gte: Optional[str] = None, + figi_lt: Optional[str] = None, + figi_lte: Optional[str] = None, + sedol: Optional[str] = None, + sedol_any_of: Optional[str] = None, + sedol_gt: Optional[str] = None, + sedol_gte: Optional[str] = None, + sedol_lt: Optional[str] = None, + sedol_lte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[EtfGlobalConstituent], HTTPResponse]: + """ + Endpoint: GET /etf-global/v1/constituents + """ + url = "/etf-global/v1/constituents" + return self._paginate( + path=url, + params=self._get_params(self.get_etf_global_constituents, locals()), + raw=raw, + deserializer=EtfGlobalConstituent.from_dict, + options=options, + ) + + def get_etf_global_fund_flows( + self, + processed_date: Optional[Union[str, date]] = None, + processed_date_gt: Optional[Union[str, date]] = None, + processed_date_gte: Optional[Union[str, date]] = None, + processed_date_lt: Optional[Union[str, date]] = None, + processed_date_lte: Optional[Union[str, date]] = None, + effective_date: Optional[Union[str, date]] = None, + effective_date_gt: Optional[Union[str, date]] = None, + effective_date_gte: Optional[Union[str, date]] = None, + effective_date_lt: Optional[Union[str, date]] = None, + effective_date_lte: Optional[Union[str, date]] = None, + composite_ticker: Optional[str] = None, + composite_ticker_any_of: Optional[str] = None, + composite_ticker_gt: Optional[str] = None, + composite_ticker_gte: Optional[str] = None, + composite_ticker_lt: Optional[str] = None, + composite_ticker_lte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[EtfGlobalFundFlow], HTTPResponse]: + """ + Endpoint: GET /etf-global/v1/fund-flows + """ + url = "/etf-global/v1/fund-flows" + return self._paginate( + path=url, + params=self._get_params(self.get_etf_global_fund_flows, locals()), + raw=raw, + deserializer=EtfGlobalFundFlow.from_dict, + options=options, + ) + + def get_etf_global_profiles( + self, + processed_date: Optional[Union[str, date]] = None, + processed_date_gt: Optional[Union[str, date]] = None, + processed_date_gte: Optional[Union[str, date]] = None, + processed_date_lt: Optional[Union[str, date]] = None, + processed_date_lte: Optional[Union[str, date]] = None, + effective_date: Optional[Union[str, date]] = None, + effective_date_gt: Optional[Union[str, date]] = None, + effective_date_gte: Optional[Union[str, date]] = None, + effective_date_lt: Optional[Union[str, date]] = None, + effective_date_lte: Optional[Union[str, date]] = None, + composite_ticker: Optional[str] = None, + composite_ticker_any_of: Optional[str] = None, + composite_ticker_gt: Optional[str] = None, + composite_ticker_gte: Optional[str] = None, + composite_ticker_lt: Optional[str] = None, + composite_ticker_lte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[EtfGlobalProfile], HTTPResponse]: + """ + Endpoint: GET /etf-global/v1/profiles + """ + url = "/etf-global/v1/profiles" + return self._paginate( + path=url, + params=self._get_params(self.get_etf_global_profiles, locals()), + raw=raw, + deserializer=EtfGlobalProfile.from_dict, + options=options, + ) + + def get_etf_global_taxonomies( + self, + processed_date: Optional[Union[str, date]] = None, + processed_date_gt: Optional[Union[str, date]] = None, + processed_date_gte: Optional[Union[str, date]] = None, + processed_date_lt: Optional[Union[str, date]] = None, + processed_date_lte: Optional[Union[str, date]] = None, + effective_date: Optional[Union[str, date]] = None, + effective_date_gt: Optional[Union[str, date]] = None, + effective_date_gte: Optional[Union[str, date]] = None, + effective_date_lt: Optional[Union[str, date]] = None, + effective_date_lte: Optional[Union[str, date]] = None, + composite_ticker: Optional[str] = None, + composite_ticker_any_of: Optional[str] = None, + composite_ticker_gt: Optional[str] = None, + composite_ticker_gte: Optional[str] = None, + composite_ticker_lt: Optional[str] = None, + composite_ticker_lte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[EtfGlobalTaxonomy], HTTPResponse]: + """ + Endpoint: GET /etf-global/v1/taxonomies + """ + url = "/etf-global/v1/taxonomies" + return self._paginate( + path=url, + params=self._get_params(self.get_etf_global_taxonomies, locals()), + raw=raw, + deserializer=EtfGlobalTaxonomy.from_dict, + options=options, + ) diff --git a/massive/rest/financials.py b/massive/rest/financials.py new file mode 100644 index 00000000..6138258a --- /dev/null +++ b/massive/rest/financials.py @@ -0,0 +1,352 @@ +# financials.py +from typing import Optional, Any, Dict, List, Union, Iterator +from urllib3 import HTTPResponse +from datetime import datetime, date + +from .base import BaseClient +from .models.financials import ( + FinancialBalanceSheet, + FinancialCashFlowStatement, + FinancialIncomeStatement, + FinancialRatio, + FinancialFloat, +) +from .models.common import Sort +from .models.request import RequestOptionBuilder + + +class FinancialsClient(BaseClient): + """ + Client for the Stocks Financials REST Endpoints + (aligned with the paths from /stocks/financials/v1/...) + """ + + def list_financials_balance_sheets( + self, + cik: Optional[str] = None, + cik_any_of: Optional[str] = None, + cik_gt: Optional[str] = None, + cik_gte: Optional[str] = None, + cik_lt: Optional[str] = None, + cik_lte: Optional[str] = None, + tickers: Optional[str] = None, + tickers_all_of: Optional[str] = None, + tickers_any_of: Optional[str] = None, + period_end: Optional[Union[str, date]] = None, + period_end_gt: Optional[Union[str, date]] = None, + period_end_gte: Optional[Union[str, date]] = None, + period_end_lt: Optional[Union[str, date]] = None, + period_end_lte: Optional[Union[str, date]] = None, + filing_date: Optional[Union[str, date]] = None, + filing_date_gt: Optional[Union[str, date]] = None, + filing_date_gte: Optional[Union[str, date]] = None, + filing_date_lt: Optional[Union[str, date]] = None, + filing_date_lte: Optional[Union[str, date]] = None, + fiscal_year: Optional[float] = None, + fiscal_year_gt: Optional[float] = None, + fiscal_year_gte: Optional[float] = None, + fiscal_year_lt: Optional[float] = None, + fiscal_year_lte: Optional[float] = None, + fiscal_quarter: Optional[float] = None, + fiscal_quarter_gt: Optional[float] = None, + fiscal_quarter_gte: Optional[float] = None, + fiscal_quarter_lt: Optional[float] = None, + fiscal_quarter_lte: Optional[float] = None, + timeframe: Optional[str] = None, + timeframe_any_of: Optional[str] = None, + timeframe_gt: Optional[str] = None, + timeframe_gte: Optional[str] = None, + timeframe_lt: Optional[str] = None, + timeframe_lte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[FinancialBalanceSheet], HTTPResponse]: + """ + Endpoint: GET /stocks/financials/v1/balance-sheets + """ + url = "/stocks/financials/v1/balance-sheets" + return self._paginate( + path=url, + params=self._get_params(self.list_financials_balance_sheets, locals()), + raw=raw, + deserializer=FinancialBalanceSheet.from_dict, + options=options, + ) + + def list_financials_cash_flow_statements( + self, + cik: Optional[str] = None, + cik_any_of: Optional[str] = None, + cik_gt: Optional[str] = None, + cik_gte: Optional[str] = None, + cik_lt: Optional[str] = None, + cik_lte: Optional[str] = None, + period_end: Optional[Union[str, date]] = None, + period_end_gt: Optional[Union[str, date]] = None, + period_end_gte: Optional[Union[str, date]] = None, + period_end_lt: Optional[Union[str, date]] = None, + period_end_lte: Optional[Union[str, date]] = None, + filing_date: Optional[Union[str, date]] = None, + filing_date_gt: Optional[Union[str, date]] = None, + filing_date_gte: Optional[Union[str, date]] = None, + filing_date_lt: Optional[Union[str, date]] = None, + filing_date_lte: Optional[Union[str, date]] = None, + tickers: Optional[str] = None, + tickers_all_of: Optional[str] = None, + tickers_any_of: Optional[str] = None, + fiscal_year: Optional[float] = None, + fiscal_year_gt: Optional[float] = None, + fiscal_year_gte: Optional[float] = None, + fiscal_year_lt: Optional[float] = None, + fiscal_year_lte: Optional[float] = None, + fiscal_quarter: Optional[float] = None, + fiscal_quarter_gt: Optional[float] = None, + fiscal_quarter_gte: Optional[float] = None, + fiscal_quarter_lt: Optional[float] = None, + fiscal_quarter_lte: Optional[float] = None, + timeframe: Optional[str] = None, + timeframe_any_of: Optional[str] = None, + timeframe_gt: Optional[str] = None, + timeframe_gte: Optional[str] = None, + timeframe_lt: Optional[str] = None, + timeframe_lte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[FinancialCashFlowStatement], HTTPResponse]: + """ + Endpoint: GET /stocks/financials/v1/cash-flow-statements + """ + url = "/stocks/financials/v1/cash-flow-statements" + return self._paginate( + path=url, + params=self._get_params( + self.list_financials_cash_flow_statements, locals() + ), + raw=raw, + deserializer=FinancialCashFlowStatement.from_dict, + options=options, + ) + + def list_financials_income_statements( + self, + cik: Optional[str] = None, + cik_any_of: Optional[str] = None, + cik_gt: Optional[str] = None, + cik_gte: Optional[str] = None, + cik_lt: Optional[str] = None, + cik_lte: Optional[str] = None, + tickers: Optional[str] = None, + tickers_all_of: Optional[str] = None, + tickers_any_of: Optional[str] = None, + period_end: Optional[Union[str, date]] = None, + period_end_gt: Optional[Union[str, date]] = None, + period_end_gte: Optional[Union[str, date]] = None, + period_end_lt: Optional[Union[str, date]] = None, + period_end_lte: Optional[Union[str, date]] = None, + filing_date: Optional[Union[str, date]] = None, + filing_date_gt: Optional[Union[str, date]] = None, + filing_date_gte: Optional[Union[str, date]] = None, + filing_date_lt: Optional[Union[str, date]] = None, + filing_date_lte: Optional[Union[str, date]] = None, + fiscal_year: Optional[float] = None, + fiscal_year_gt: Optional[float] = None, + fiscal_year_gte: Optional[float] = None, + fiscal_year_lt: Optional[float] = None, + fiscal_year_lte: Optional[float] = None, + fiscal_quarter: Optional[float] = None, + fiscal_quarter_gt: Optional[float] = None, + fiscal_quarter_gte: Optional[float] = None, + fiscal_quarter_lt: Optional[float] = None, + fiscal_quarter_lte: Optional[float] = None, + timeframe: Optional[str] = None, + timeframe_any_of: Optional[str] = None, + timeframe_gt: Optional[str] = None, + timeframe_gte: Optional[str] = None, + timeframe_lt: Optional[str] = None, + timeframe_lte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[FinancialIncomeStatement], HTTPResponse]: + """ + Endpoint: GET /stocks/financials/v1/income-statements + """ + url = "/stocks/financials/v1/income-statements" + return self._paginate( + path=url, + params=self._get_params(self.list_financials_income_statements, locals()), + raw=raw, + deserializer=FinancialIncomeStatement.from_dict, + options=options, + ) + + def list_financials_ratios( + self, + ticker: Optional[str] = None, + ticker_any_of: Optional[str] = None, + ticker_gt: Optional[str] = None, + ticker_gte: Optional[str] = None, + ticker_lt: Optional[str] = None, + ticker_lte: Optional[str] = None, + cik: Optional[str] = None, + cik_any_of: Optional[str] = None, + cik_gt: Optional[str] = None, + cik_gte: Optional[str] = None, + cik_lt: Optional[str] = None, + cik_lte: Optional[str] = None, + price: Optional[float] = None, + price_gt: Optional[float] = None, + price_gte: Optional[float] = None, + price_lt: Optional[float] = None, + price_lte: Optional[float] = None, + average_volume: Optional[float] = None, + average_volume_gt: Optional[float] = None, + average_volume_gte: Optional[float] = None, + average_volume_lt: Optional[float] = None, + average_volume_lte: Optional[float] = None, + market_cap: Optional[float] = None, + market_cap_gt: Optional[float] = None, + market_cap_gte: Optional[float] = None, + market_cap_lt: Optional[float] = None, + market_cap_lte: Optional[float] = None, + earnings_per_share: Optional[float] = None, + earnings_per_share_gt: Optional[float] = None, + earnings_per_share_gte: Optional[float] = None, + earnings_per_share_lt: Optional[float] = None, + earnings_per_share_lte: Optional[float] = None, + price_to_earnings: Optional[float] = None, + price_to_earnings_gt: Optional[float] = None, + price_to_earnings_gte: Optional[float] = None, + price_to_earnings_lt: Optional[float] = None, + price_to_earnings_lte: Optional[float] = None, + price_to_book: Optional[float] = None, + price_to_book_gt: Optional[float] = None, + price_to_book_gte: Optional[float] = None, + price_to_book_lt: Optional[float] = None, + price_to_book_lte: Optional[float] = None, + price_to_sales: Optional[float] = None, + price_to_sales_gt: Optional[float] = None, + price_to_sales_gte: Optional[float] = None, + price_to_sales_lt: Optional[float] = None, + price_to_sales_lte: Optional[float] = None, + price_to_cash_flow: Optional[float] = None, + price_to_cash_flow_gt: Optional[float] = None, + price_to_cash_flow_gte: Optional[float] = None, + price_to_cash_flow_lt: Optional[float] = None, + price_to_cash_flow_lte: Optional[float] = None, + price_to_free_cash_flow: Optional[float] = None, + price_to_free_cash_flow_gt: Optional[float] = None, + price_to_free_cash_flow_gte: Optional[float] = None, + price_to_free_cash_flow_lt: Optional[float] = None, + price_to_free_cash_flow_lte: Optional[float] = None, + dividend_yield: Optional[float] = None, + dividend_yield_gt: Optional[float] = None, + dividend_yield_gte: Optional[float] = None, + dividend_yield_lt: Optional[float] = None, + dividend_yield_lte: Optional[float] = None, + return_on_assets: Optional[float] = None, + return_on_assets_gt: Optional[float] = None, + return_on_assets_gte: Optional[float] = None, + return_on_assets_lt: Optional[float] = None, + return_on_assets_lte: Optional[float] = None, + return_on_equity: Optional[float] = None, + return_on_equity_gt: Optional[float] = None, + return_on_equity_gte: Optional[float] = None, + return_on_equity_lt: Optional[float] = None, + return_on_equity_lte: Optional[float] = None, + debt_to_equity: Optional[float] = None, + debt_to_equity_gt: Optional[float] = None, + debt_to_equity_gte: Optional[float] = None, + debt_to_equity_lt: Optional[float] = None, + debt_to_equity_lte: Optional[float] = None, + current: Optional[float] = None, + current_gt: Optional[float] = None, + current_gte: Optional[float] = None, + current_lt: Optional[float] = None, + current_lte: Optional[float] = None, + quick: Optional[float] = None, + quick_gt: Optional[float] = None, + quick_gte: Optional[float] = None, + quick_lt: Optional[float] = None, + quick_lte: Optional[float] = None, + cash: Optional[float] = None, + cash_gt: Optional[float] = None, + cash_gte: Optional[float] = None, + cash_lt: Optional[float] = None, + cash_lte: Optional[float] = None, + ev_to_sales: Optional[float] = None, + ev_to_sales_gt: Optional[float] = None, + ev_to_sales_gte: Optional[float] = None, + ev_to_sales_lt: Optional[float] = None, + ev_to_sales_lte: Optional[float] = None, + ev_to_ebitda: Optional[float] = None, + ev_to_ebitda_gt: Optional[float] = None, + ev_to_ebitda_gte: Optional[float] = None, + ev_to_ebitda_lt: Optional[float] = None, + ev_to_ebitda_lte: Optional[float] = None, + enterprise_value: Optional[float] = None, + enterprise_value_gt: Optional[float] = None, + enterprise_value_gte: Optional[float] = None, + enterprise_value_lt: Optional[float] = None, + enterprise_value_lte: Optional[float] = None, + free_cash_flow: Optional[float] = None, + free_cash_flow_gt: Optional[float] = None, + free_cash_flow_gte: Optional[float] = None, + free_cash_flow_lt: Optional[float] = None, + free_cash_flow_lte: Optional[float] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[FinancialRatio], HTTPResponse]: + """ + Endpoint: GET /stocks/financials/v1/ratios + """ + url = "/stocks/financials/v1/ratios" + return self._paginate( + path=url, + params=self._get_params(self.list_financials_ratios, locals()), + raw=raw, + deserializer=FinancialRatio.from_dict, + options=options, + ) + + def list_stocks_floats( + self, + ticker: Optional[str] = None, + ticker_any_of: Optional[str] = None, + ticker_gt: Optional[str] = None, + ticker_gte: Optional[str] = None, + ticker_lt: Optional[str] = None, + ticker_lte: Optional[str] = None, + free_float_percent: Optional[float] = None, + free_float_percent_gt: Optional[float] = None, + free_float_percent_gte: Optional[float] = None, + free_float_percent_lt: Optional[float] = None, + free_float_percent_lte: Optional[float] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[FinancialFloat], HTTPResponse]: + """ + Endpoint: GET /stocks/vX/float + """ + url = "/stocks/vX/float" + return self._paginate( + path=url, + params=self._get_params(self.list_stocks_floats, locals()), + raw=raw, + deserializer=FinancialFloat.from_dict, + options=options, + ) diff --git a/massive/rest/futures.py b/massive/rest/futures.py new file mode 100644 index 00000000..9ef4e603 --- /dev/null +++ b/massive/rest/futures.py @@ -0,0 +1,344 @@ +from typing import Optional, Any, Dict, List, Union, Iterator +from urllib3 import HTTPResponse +from datetime import datetime, date + +from .base import BaseClient +from .models.futures import ( + FuturesAgg, + FuturesContract, + FuturesProduct, + FuturesQuote, + FuturesTrade, + FuturesSchedule, + FuturesMarketStatus, + FuturesSnapshot, + FuturesExchange, +) +from .models.common import Sort +from .models.request import RequestOptionBuilder + + +class FuturesClient(BaseClient): + """ + Client for the Futures REST Endpoints + (aligned with the paths from /futures/vX/...) + """ + + def list_futures_aggregates( + self, + ticker: str, + resolution: Optional[str] = None, + window_start: Optional[str] = None, + window_start_lt: Optional[str] = None, + window_start_lte: Optional[str] = None, + window_start_gt: Optional[str] = None, + window_start_gte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[FuturesAgg], HTTPResponse]: + """ + Endpoint: GET /futures/vX/aggs/{ticker} + + Get aggregates for a futures contract in a given time range. + This endpoint returns data that includes: + - open, close, high, low + - volume, dollar_volume, etc. + If `next_url` is present, it will be paginated. + """ + url = f"/futures/vX/aggs/{ticker}" + return self._paginate( + path=url, + params=self._get_params(self.list_futures_aggregates, locals()), + raw=raw, + deserializer=FuturesAgg.from_dict, + options=options, + ) + + def list_futures_contracts( + 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, + product_code: Optional[str] = None, + product_code_any_of: Optional[str] = None, + product_code_gt: Optional[str] = None, + product_code_gte: Optional[str] = None, + product_code_lt: Optional[str] = None, + product_code_lte: Optional[str] = None, + ticker: Optional[str] = None, + ticker_any_of: Optional[str] = None, + ticker_gt: Optional[str] = None, + ticker_gte: Optional[str] = None, + ticker_lt: Optional[str] = None, + ticker_lte: Optional[str] = None, + active: Optional[bool] = None, + type: Optional[str] = None, + type_any_of: Optional[str] = None, + first_trade_date: Optional[str] = None, + first_trade_date_gt: Optional[str] = None, + first_trade_date_gte: Optional[str] = None, + first_trade_date_lt: Optional[str] = None, + first_trade_date_lte: Optional[str] = None, + last_trade_date: Optional[str] = None, + last_trade_date_gt: Optional[str] = None, + last_trade_date_gte: Optional[str] = None, + last_trade_date_lt: Optional[str] = None, + last_trade_date_lte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[str] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[FuturesContract], HTTPResponse]: + """ + Endpoint: GET /futures/vX/contracts + + The Contracts endpoint returns a paginated list of futures contracts. + """ + url = "/futures/vX/contracts" + return self._paginate( + path=url, + params=self._get_params(self.list_futures_contracts, locals()), + raw=raw, + deserializer=FuturesContract.from_dict, + options=options, + ) + + def list_futures_products( + self, + name: Optional[str] = None, + name_any_of: Optional[str] = None, + name_gt: Optional[str] = None, + name_gte: Optional[str] = None, + name_lt: Optional[str] = None, + name_lte: Optional[str] = None, + product_code: Optional[str] = None, + product_code_any_of: Optional[str] = None, + product_code_gt: Optional[str] = None, + product_code_gte: Optional[str] = None, + product_code_lt: Optional[str] = None, + product_code_lte: Optional[str] = None, + date: Optional[str] = None, + date_gt: Optional[str] = None, + date_gte: Optional[str] = None, + date_lt: Optional[str] = None, + date_lte: Optional[str] = None, + trading_venue: Optional[str] = None, + trading_venue_any_of: Optional[str] = None, + trading_venue_gt: Optional[str] = None, + trading_venue_gte: Optional[str] = None, + trading_venue_lt: Optional[str] = None, + trading_venue_lte: Optional[str] = None, + sector: Optional[str] = None, + sector_any_of: Optional[str] = None, + sub_sector: Optional[str] = None, + sub_sector_any_of: Optional[str] = None, + asset_class: Optional[str] = None, + asset_class_any_of: Optional[str] = None, + asset_sub_class: Optional[str] = None, + asset_sub_class_any_of: Optional[str] = None, + type: Optional[str] = None, + type_any_of: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[str] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[FuturesProduct], HTTPResponse]: + """ + Endpoint: GET /futures/vX/products + + Returns a list of futures products (including combos). + """ + url = "/futures/vX/products" + return self._paginate( + path=url, + params=self._get_params(self.list_futures_products, locals()), + raw=raw, + deserializer=FuturesProduct.from_dict, + options=options, + ) + + def list_futures_quotes( + self, + ticker: str, + timestamp: Optional[str] = None, + timestamp_lt: Optional[str] = None, + timestamp_lte: Optional[str] = None, + timestamp_gt: Optional[str] = None, + timestamp_gte: Optional[str] = None, + session_end_date: Optional[str] = None, + session_end_date_lt: Optional[str] = None, + session_end_date_lte: Optional[str] = None, + session_end_date_gt: Optional[str] = None, + session_end_date_gte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[FuturesQuote], HTTPResponse]: + """ + Endpoint: GET /futures/vX/quotes/{ticker} + + Get quotes for a contract in a given time range (paginated). + """ + url = f"/futures/vX/quotes/{ticker}" + return self._paginate( + path=url, + params=self._get_params(self.list_futures_quotes, locals()), + raw=raw, + deserializer=FuturesQuote.from_dict, + options=options, + ) + + def list_futures_trades( + self, + ticker: str, + timestamp: Optional[str] = None, + timestamp_lt: Optional[str] = None, + timestamp_lte: Optional[str] = None, + timestamp_gt: Optional[str] = None, + timestamp_gte: Optional[str] = None, + session_end_date: Optional[str] = None, + session_end_date_lt: Optional[str] = None, + session_end_date_lte: Optional[str] = None, + session_end_date_gt: Optional[str] = None, + session_end_date_gte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[FuturesTrade], HTTPResponse]: + """ + Endpoint: GET /futures/vX/trades/{ticker} + + Get trades for a contract in a given time range (paginated). + """ + url = f"/futures/vX/trades/{ticker}" + return self._paginate( + path=url, + params=self._get_params(self.list_futures_trades, locals()), + raw=raw, + deserializer=FuturesTrade.from_dict, + options=options, + ) + + def list_futures_schedules( + self, + product_code: Optional[str] = None, + product_code_any_of: Optional[str] = None, + product_code_gt: Optional[str] = None, + product_code_gte: Optional[str] = None, + product_code_lt: Optional[str] = None, + product_code_lte: Optional[str] = None, + session_end_date: Optional[str] = None, + session_end_date_any_of: Optional[str] = None, + session_end_date_gt: Optional[str] = None, + session_end_date_gte: Optional[str] = None, + session_end_date_lt: Optional[str] = None, + session_end_date_lte: Optional[str] = None, + trading_venue: Optional[str] = None, + trading_venue_any_of: Optional[str] = None, + trading_venue_gt: Optional[str] = None, + trading_venue_gte: Optional[str] = None, + trading_venue_lt: Optional[str] = None, + trading_venue_lte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[str] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[FuturesSchedule], HTTPResponse]: + """ + Endpoint: GET /futures/vX/schedules + + Returns a list of trading schedules for multiple futures products on a specific date. + If `next_url` is present, this is paginated. + """ + url = "/futures/vX/schedules" + return self._paginate( + path=url, + params=self._get_params(self.list_futures_schedules, locals()), + raw=raw, + deserializer=FuturesSchedule.from_dict, + options=options, + ) + + def list_futures_market_statuses( + self, + product_code: Optional[str] = None, + product_code_any_of: Optional[str] = None, + product_code_gt: Optional[str] = None, + product_code_gte: Optional[str] = None, + product_code_lt: Optional[str] = None, + product_code_lte: Optional[str] = None, + limit: Optional[int] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[FuturesMarketStatus], HTTPResponse]: + url = "/futures/vX/market-status" + return self._paginate( + path=url, + params=self._get_params(self.list_futures_market_statuses, locals()), + raw=raw, + deserializer=FuturesMarketStatus.from_dict, + options=options, + ) + + def get_futures_snapshot( + self, + ticker: Optional[str] = None, + ticker_any_of: Optional[str] = None, + ticker_gt: Optional[str] = None, + ticker_gte: Optional[str] = None, + ticker_lt: Optional[str] = None, + ticker_lte: Optional[str] = None, + product_code: Optional[str] = None, + product_code_any_of: Optional[str] = None, + product_code_gt: Optional[str] = None, + product_code_gte: Optional[str] = None, + product_code_lt: Optional[str] = None, + product_code_lte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[str] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[FuturesSnapshot], HTTPResponse]: + url = "/futures/vX/snapshot" + return self._paginate( + path=url, + params=self._get_params(self.get_futures_snapshot, locals()), + raw=raw, + deserializer=FuturesSnapshot.from_dict, + options=options, + ) + + def list_futures_exchanges( + self, + limit: Optional[int] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[FuturesExchange], HTTPResponse]: + """ + Endpoint: GET /futures/vX/exchanges + + US futures exchanges and trading venues including major derivatives exchanges (CME, CBOT, NYMEX, COMEX) and other futures market infrastructure for commodity, financial, and other derivative contract trading. + """ + url = "/futures/vX/exchanges" + return self._paginate( + path=url, + params=self._get_params(self.list_futures_exchanges, locals()), + raw=raw, + deserializer=FuturesExchange.from_dict, + options=options, + ) diff --git a/massive/rest/indicators.py b/massive/rest/indicators.py new file mode 100644 index 00000000..88746f62 --- /dev/null +++ b/massive/rest/indicators.py @@ -0,0 +1,239 @@ +from massive.rest.models.common import SeriesType +from massive.rest.models.indicators import ( + SMAIndicatorResults, + EMAIndicatorResults, + RSIIndicatorResults, + MACDIndicatorResults, +) +from .base import BaseClient +from typing import Optional, Any, Dict, List, Union +from .models import Order +from urllib3 import HTTPResponse +from datetime import datetime, date + +from .models.request import RequestOptionBuilder + + +class IndicatorsClient(BaseClient): + def get_sma( + self, + ticker: str, + timestamp: Optional[Union[str, int, datetime, date]] = None, + timestamp_lt: Optional[Union[str, int, datetime, date]] = None, + timestamp_lte: Optional[Union[str, int, datetime, date]] = None, + timestamp_gt: Optional[Union[str, int, datetime, date]] = None, + timestamp_gte: Optional[Union[str, int, datetime, date]] = None, + timespan: Optional[str] = None, + window: Optional[int] = None, + adjusted: Optional[bool] = None, + expand_underlying: Optional[bool] = None, + order: Optional[Union[str, Order]] = None, + limit: Optional[int] = None, + params: Optional[Dict[str, Any]] = None, + series_type: Optional[Union[str, SeriesType]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[SMAIndicatorResults, HTTPResponse]: + """ + Get SMA values for a given ticker over a given range with the specified parameters + + :param ticker: The ticker symbol + :param timespan: The size of the underlying aggregate time window + :param window: The window size used to calculate the simple moving average. i.e. a window size of 10 with daily + aggregates would result in a 10-day moving average + :param timestamp: Either a date with the format YYYY-MM-DD or a millisecond timestamp. + :param timestamp_lt: Timestamp less than + :param timestamp_lte: Timestamp less than or equal to + :param timestamp_gt: Timestamp greater than + :param timestamp_gte: Timestamp greater than or equal to + :param adjusted: Whether the underlying aggregates are adjusted for splits. By default, the aggregates used to + calculate this indicator are adjusted. Set this as false to get results that are NOT adjusted for splits + :param expand_underlying: Whether to include the aggregates used to calculate this indicator in the response + :param order: Sort the results by timestamp. asc will return results in ascending order (oldest at the top), + desc will return results in descending order (newest at the top).The end of the aggregate time window + :param limit: Limit the number of results returned, default is 10 and max is 5000 + :param params: Any additional query params + :param series_type: The price in the aggregate which will be used to calculate the simple moving average + i.e. 'close' will result in using close prices to calculate the simple moving average + :param raw: Return raw object instead of results object + :return: SingleIndicatorResults + """ + + url = f"/v1/indicators/sma/{ticker}" + + return self._get( + path=url, + params=self._get_params(self.get_sma, locals()), + result_key="results", + deserializer=SMAIndicatorResults.from_dict, + raw=raw, + options=options, + ) + + def get_ema( + self, + ticker: str, + timestamp: Optional[Union[str, int, datetime, date]] = None, + timestamp_lt: Optional[Union[str, int, datetime, date]] = None, + timestamp_lte: Optional[Union[str, int, datetime, date]] = None, + timestamp_gt: Optional[Union[str, int, datetime, date]] = None, + timestamp_gte: Optional[Union[str, int, datetime, date]] = None, + timespan: Optional[str] = None, + window: Optional[int] = None, + adjusted: Optional[bool] = None, + expand_underlying: Optional[bool] = None, + order: Optional[Union[str, Order]] = None, + limit: Optional[int] = None, + params: Optional[Dict[str, Any]] = None, + series_type: Optional[Union[str, SeriesType]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[EMAIndicatorResults, HTTPResponse]: + """ + Get EMA values for a given ticker over a given range with the specified parameters + + :param ticker: The ticker symbol + :param timespan: The size of the underlying aggregate time window + :param window: The window size used to calculate the exponential moving average. i.e. a window size of 10 with daily + aggregates would result in a 10-day moving average + :param timestamp: Either a date with the format YYYY-MM-DD or a millisecond timestamp. + :param timestamp_lt: Timestamp less than + :param timestamp_lte: Timestamp less than or equal to + :param timestamp_gt: Timestamp greater than + :param timestamp_gte: Timestamp greater than or equal to + :param adjusted: Whether the underlying aggregates are adjusted for splits. By default, the aggregates used to + calculate this indicator are adjusted. Set this as false to get results that are NOT adjusted for splits + :param expand_underlying: Whether to include the aggregates used to calculate this indicator in the response + :param order: Sort the results by timestamp. asc will return results in ascending order (oldest at the top), + desc will return results in descending order (newest at the top).The end of the aggregate time window + :param limit: Limit the number of results returned, default is 10 and max is 5000 + :param params: Any additional query params + :param series_type: The price in the aggregate which will be used to calculate the simple moving average + i.e. 'close' will result in using close prices to calculate the simple moving average + :param raw: Return raw object instead of results object + :return: SingleIndicatorResults + """ + + url = f"/v1/indicators/ema/{ticker}" + + return self._get( + path=url, + params=self._get_params(self.get_ema, locals()), + result_key="results", + deserializer=EMAIndicatorResults.from_dict, + raw=raw, + options=options, + ) + + def get_rsi( + self, + ticker: str, + timestamp: Optional[Union[str, int, datetime, date]] = None, + timestamp_lt: Optional[Union[str, int, datetime, date]] = None, + timestamp_lte: Optional[Union[str, int, datetime, date]] = None, + timestamp_gt: Optional[Union[str, int, datetime, date]] = None, + timestamp_gte: Optional[Union[str, int, datetime, date]] = None, + timespan: Optional[str] = None, + window: Optional[int] = None, + adjusted: Optional[bool] = None, + expand_underlying: Optional[bool] = None, + order: Optional[Union[str, Order]] = None, + limit: Optional[int] = None, + params: Optional[Dict[str, Any]] = None, + series_type: Optional[Union[str, SeriesType]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[RSIIndicatorResults, HTTPResponse]: + """ + Get RSI values for a given ticker over a given range with the specified parameters + + :param ticker: The ticker symbol + :param timespan: The size of the underlying aggregate time window + :param window: The window size used to calculate the simple moving average. i.e. a window size of 10 with daily + aggregates would result in a 10-day moving average + :param timestamp: Either a date with the format YYYY-MM-DD or a millisecond timestamp. + :param timestamp_lt: Timestamp less than + :param timestamp_lte: Timestamp less than or equal to + :param timestamp_gt: Timestamp greater than + :param timestamp_gte: Timestamp greater than or equal to + :param adjusted: Whether the underlying aggregates are adjusted for splits. By default, the aggregates used to + calculate this indicator are adjusted. Set this as false to get results that are NOT adjusted for splits + :param expand_underlying: Whether to include the aggregates used to calculate this indicator in the response + :param order: Sort the results by timestamp. asc will return results in ascending order (oldest at the top), + desc will return results in descending order (newest at the top).The end of the aggregate time window + :param limit: Limit the number of results returned, default is 10 and max is 5000 + :param params: Any additional query params + :param series_type: The price in the aggregate which will be used to calculate the simple moving average + i.e. 'close' will result in using close prices to calculate the simple moving average + :param raw: Return raw object instead of results object + :return: SingleIndicatorResults + """ + + url = f"/v1/indicators/rsi/{ticker}" + + return self._get( + path=url, + params=self._get_params(self.get_rsi, locals()), + result_key="results", + deserializer=RSIIndicatorResults.from_dict, + raw=raw, + options=options, + ) + + def get_macd( + self, + ticker: str, + timestamp: Optional[Union[str, int, datetime, date]] = None, + timestamp_lt: Optional[Union[str, int, datetime, date]] = None, + timestamp_lte: Optional[Union[str, int, datetime, date]] = None, + timestamp_gt: Optional[Union[str, int, datetime, date]] = None, + timestamp_gte: Optional[Union[str, int, datetime, date]] = None, + timespan: Optional[str] = None, + short_window: Optional[int] = None, + long_window: Optional[int] = None, + signal_window: Optional[int] = None, + adjusted: Optional[bool] = None, + expand_underlying: Optional[bool] = None, + order: Optional[Union[str, Order]] = None, + limit: Optional[int] = None, + params: Optional[Dict[str, Any]] = None, + series_type: Optional[Union[str, SeriesType]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[MACDIndicatorResults, HTTPResponse]: + """ + Get MACD values for a given ticker over a given range with the specified parameters + + :param ticker: The ticker symbol + :param timespan: The size of the underlying aggregate time window + :param short_window: The short window size used to calculate the MACD data + :param long_window: The long window size used to calculate the MACD data + :param signal_window: The window size used to calculate the MACD signal line + :param timestamp: Either a date with the format YYYY-MM-DD or a millisecond timestamp. + :param timestamp_lt: Timestamp less than + :param timestamp_lte: Timestamp less than or equal to + :param timestamp_gt: Timestamp greater than + :param timestamp_gte: Timestamp greater than or equal to + :param adjusted: Whether the underlying aggregates are adjusted for splits. By default, the aggregates used to + calculate this indicator are adjusted. Set this as false to get results that are NOT adjusted for splits + :param expand_underlying: Whether to include the aggregates used to calculate this indicator in the response + :param order: Sort the results by timestamp. asc will return results in ascending order (oldest at the top), + desc will return results in descending order (newest at the top).The end of the aggregate time window + :param limit: Limit the number of results returned, default is 10 and max is 5000 + :param params: Any additional query params + :param series_type: The price in the aggregate which will be used to calculate the simple moving average + i.e. 'close' will result in using close prices to calculate the simple moving average + :param raw: Return raw object instead of results object + :return: MACDIndicatorResults + """ + + url = f"/v1/indicators/macd/{ticker}" + + return self._get( + path=url, + params=self._get_params(self.get_macd, locals()), + result_key="results", + deserializer=MACDIndicatorResults.from_dict, + raw=raw, + options=options, + ) diff --git a/polygon/rest/models/__init__.py b/massive/rest/models/__init__.py similarity index 80% rename from polygon/rest/models/__init__.py rename to massive/rest/models/__init__.py index 8fca108c..3108ab01 100644 --- a/polygon/rest/models/__init__.py +++ b/massive/rest/models/__init__.py @@ -1,13 +1,16 @@ -from .common import * from .aggs import * -from .trades import * -from .quotes import * -from .markets import * -from .tickers import * -from .splits import * -from .dividends import * +from .common import * from .conditions import * +from .contracts import * +from .dividends import * from .exchanges import * -from .snapshot import * from .financials import * -from .contracts import * +from .futures import * +from .indicators import * +from .markets import * +from .quotes import * +from .snapshot import * +from .splits import * +from .tickers import * +from .trades import * +from .summaries import * diff --git a/polygon/rest/models/aggs.py b/massive/rest/models/aggs.py similarity index 100% rename from polygon/rest/models/aggs.py rename to massive/rest/models/aggs.py diff --git a/massive/rest/models/benzinga.py b/massive/rest/models/benzinga.py new file mode 100644 index 00000000..296ea9f6 --- /dev/null +++ b/massive/rest/models/benzinga.py @@ -0,0 +1,343 @@ +from typing import Optional, List +from ...modelclass import modelclass + + +@modelclass +class BenzingaAnalystInsight: + benzinga_firm_id: Optional[str] = None + benzinga_id: Optional[str] = None + benzinga_rating_id: Optional[str] = None + company_name: Optional[str] = None + date: Optional[str] = None + firm: Optional[str] = None + insight: Optional[str] = None + last_updated: Optional[str] = None + price_target: Optional[float] = None + rating: Optional[str] = None + rating_action: Optional[str] = None + ticker: Optional[str] = None + + @staticmethod + def from_dict(d): + return BenzingaAnalystInsight( + benzinga_firm_id=d.get("benzinga_firm_id"), + benzinga_id=d.get("benzinga_id"), + benzinga_rating_id=d.get("benzinga_rating_id"), + company_name=d.get("company_name"), + date=d.get("date"), + firm=d.get("firm"), + insight=d.get("insight"), + last_updated=d.get("last_updated"), + price_target=d.get("price_target"), + rating=d.get("rating"), + rating_action=d.get("rating_action"), + ticker=d.get("ticker"), + ) + + +@modelclass +class BenzingaAnalyst: + benzinga_firm_id: Optional[str] = None + benzinga_id: Optional[str] = None + firm_name: Optional[str] = None + full_name: Optional[str] = None + last_updated: Optional[str] = None + overall_avg_return: Optional[float] = None + overall_avg_return_percentile: Optional[float] = None + overall_success_rate: Optional[float] = None + smart_score: Optional[float] = None + total_ratings: Optional[float] = None + total_ratings_percentile: Optional[float] = None + + @staticmethod + def from_dict(d): + return BenzingaAnalyst( + benzinga_firm_id=d.get("benzinga_firm_id"), + benzinga_id=d.get("benzinga_id"), + firm_name=d.get("firm_name"), + full_name=d.get("full_name"), + last_updated=d.get("last_updated"), + overall_avg_return=d.get("overall_avg_return"), + overall_avg_return_percentile=d.get("overall_avg_return_percentile"), + overall_success_rate=d.get("overall_success_rate"), + smart_score=d.get("smart_score"), + total_ratings=d.get("total_ratings"), + total_ratings_percentile=d.get("total_ratings_percentile"), + ) + + +@modelclass +class BenzingaConsensusRating: + buy_ratings: Optional[int] = None + consensus_price_target: Optional[float] = None + consensus_rating: Optional[str] = None + consensus_rating_value: Optional[float] = None + high_price_target: Optional[float] = None + hold_ratings: Optional[int] = None + low_price_target: Optional[float] = None + price_target_contributors: Optional[int] = None + ratings_contributors: Optional[int] = None + sell_ratings: Optional[int] = None + strong_buy_ratings: Optional[int] = None + strong_sell_ratings: Optional[int] = None + ticker: Optional[str] = None + + @staticmethod + def from_dict(d): + return BenzingaConsensusRating( + buy_ratings=d.get("buy_ratings"), + consensus_price_target=d.get("consensus_price_target"), + consensus_rating=d.get("consensus_rating"), + consensus_rating_value=d.get("consensus_rating_value"), + high_price_target=d.get("high_price_target"), + hold_ratings=d.get("hold_ratings"), + low_price_target=d.get("low_price_target"), + price_target_contributors=d.get("price_target_contributors"), + ratings_contributors=d.get("ratings_contributors"), + sell_ratings=d.get("sell_ratings"), + strong_buy_ratings=d.get("strong_buy_ratings"), + strong_sell_ratings=d.get("strong_sell_ratings"), + ticker=d.get("ticker"), + ) + + +@modelclass +class BenzingaEarning: + actual_eps: Optional[float] = None + actual_revenue: Optional[float] = None + benzinga_id: Optional[str] = None + company_name: Optional[str] = None + currency: Optional[str] = None + date: Optional[str] = None + date_status: Optional[str] = None + eps_method: Optional[str] = None + eps_surprise: Optional[float] = None + eps_surprise_percent: Optional[float] = None + estimated_eps: Optional[float] = None + estimated_revenue: Optional[float] = None + fiscal_period: Optional[str] = None + fiscal_year: Optional[int] = None + importance: Optional[int] = None + last_updated: Optional[str] = None + notes: Optional[str] = None + previous_eps: Optional[float] = None + previous_revenue: Optional[float] = None + revenue_method: Optional[str] = None + revenue_surprise: Optional[float] = None + revenue_surprise_percent: Optional[float] = None + ticker: Optional[str] = None + time: Optional[str] = None + + @staticmethod + def from_dict(d): + return BenzingaEarning( + actual_eps=d.get("actual_eps"), + actual_revenue=d.get("actual_revenue"), + benzinga_id=d.get("benzinga_id"), + company_name=d.get("company_name"), + currency=d.get("currency"), + date=d.get("date"), + date_status=d.get("date_status"), + eps_method=d.get("eps_method"), + eps_surprise=d.get("eps_surprise"), + eps_surprise_percent=d.get("eps_surprise_percent"), + estimated_eps=d.get("estimated_eps"), + estimated_revenue=d.get("estimated_revenue"), + fiscal_period=d.get("fiscal_period"), + fiscal_year=d.get("fiscal_year"), + importance=d.get("importance"), + last_updated=d.get("last_updated"), + notes=d.get("notes"), + previous_eps=d.get("previous_eps"), + previous_revenue=d.get("previous_revenue"), + revenue_method=d.get("revenue_method"), + revenue_surprise=d.get("revenue_surprise"), + revenue_surprise_percent=d.get("revenue_surprise_percent"), + ticker=d.get("ticker"), + time=d.get("time"), + ) + + +@modelclass +class BenzingaFirm: + benzinga_id: Optional[str] = None + currency: Optional[str] = None + last_updated: Optional[str] = None + name: Optional[str] = None + + @staticmethod + def from_dict(d): + return BenzingaFirm( + benzinga_id=d.get("benzinga_id"), + currency=d.get("currency"), + last_updated=d.get("last_updated"), + name=d.get("name"), + ) + + +@modelclass +class BenzingaGuidance: + benzinga_id: Optional[str] = None + company_name: Optional[str] = None + currency: Optional[str] = None + date: Optional[str] = None + eps_method: Optional[str] = None + estimated_eps_guidance: Optional[float] = None + estimated_revenue_guidance: Optional[float] = None + fiscal_period: Optional[str] = None + fiscal_year: Optional[int] = None + importance: Optional[int] = None + last_updated: Optional[str] = None + max_eps_guidance: Optional[float] = None + max_revenue_guidance: Optional[float] = None + min_eps_guidance: Optional[float] = None + min_revenue_guidance: Optional[float] = None + notes: Optional[str] = None + positioning: Optional[str] = None + previous_max_eps_guidance: Optional[float] = None + previous_max_revenue_guidance: Optional[float] = None + previous_min_eps_guidance: Optional[float] = None + previous_min_revenue_guidance: Optional[float] = None + release_type: Optional[str] = None + revenue_method: Optional[str] = None + ticker: Optional[str] = None + time: Optional[str] = None + + @staticmethod + def from_dict(d): + return BenzingaGuidance( + benzinga_id=d.get("benzinga_id"), + company_name=d.get("company_name"), + currency=d.get("currency"), + date=d.get("date"), + eps_method=d.get("eps_method"), + estimated_eps_guidance=d.get("estimated_eps_guidance"), + estimated_revenue_guidance=d.get("estimated_revenue_guidance"), + fiscal_period=d.get("fiscal_period"), + fiscal_year=d.get("fiscal_year"), + importance=d.get("importance"), + last_updated=d.get("last_updated"), + max_eps_guidance=d.get("max_eps_guidance"), + max_revenue_guidance=d.get("max_revenue_guidance"), + min_eps_guidance=d.get("min_eps_guidance"), + min_revenue_guidance=d.get("min_revenue_guidance"), + notes=d.get("notes"), + positioning=d.get("positioning"), + previous_max_eps_guidance=d.get("previous_max_eps_guidance"), + previous_max_revenue_guidance=d.get("previous_max_revenue_guidance"), + previous_min_eps_guidance=d.get("previous_min_eps_guidance"), + previous_min_revenue_guidance=d.get("previous_min_revenue_guidance"), + release_type=d.get("release_type"), + revenue_method=d.get("revenue_method"), + ticker=d.get("ticker"), + time=d.get("time"), + ) + + +@modelclass +class BenzingaNews: + author: Optional[str] = None + benzinga_id: Optional[int] = None + body: Optional[str] = None + channels: Optional[List[str]] = None + images: Optional[List[str]] = None + last_updated: Optional[str] = None + published: Optional[str] = None + tags: Optional[List[str]] = None + teaser: Optional[str] = None + tickers: Optional[List[str]] = None + title: Optional[str] = None + url: Optional[str] = None + + @staticmethod + def from_dict(d): + return BenzingaNews( + author=d.get("author"), + benzinga_id=d.get("benzinga_id"), + body=d.get("body"), + channels=d.get("channels", []), + images=d.get("images", []), + last_updated=d.get("last_updated"), + published=d.get("published"), + tags=d.get("tags", []), + teaser=d.get("teaser"), + tickers=d.get("tickers", []), + title=d.get("title"), + url=d.get("url"), + ) + + +@modelclass +class BenzingaRating: + adjusted_price_target: Optional[float] = None + analyst: Optional[str] = None + benzinga_analyst_id: Optional[str] = None + benzinga_calendar_url: Optional[str] = None + benzinga_firm_id: Optional[str] = None + benzinga_id: Optional[str] = None + benzinga_news_url: Optional[str] = None + company_name: Optional[str] = None + currency: Optional[str] = None + date: Optional[str] = None + firm: Optional[str] = None + importance: Optional[int] = None + last_updated: Optional[str] = None + notes: Optional[str] = None + previous_adjusted_price_target: Optional[float] = None + previous_price_target: Optional[float] = None + previous_rating: Optional[str] = None + price_percent_change: Optional[float] = None + price_target: Optional[float] = None + price_target_action: Optional[str] = None + rating: Optional[str] = None + rating_action: Optional[str] = None + ticker: Optional[str] = None + time: Optional[str] = None + + @staticmethod + def from_dict(d): + return BenzingaRating( + adjusted_price_target=d.get("adjusted_price_target"), + analyst=d.get("analyst"), + benzinga_analyst_id=d.get("benzinga_analyst_id"), + benzinga_calendar_url=d.get("benzinga_calendar_url"), + benzinga_firm_id=d.get("benzinga_firm_id"), + benzinga_id=d.get("benzinga_id"), + benzinga_news_url=d.get("benzinga_news_url"), + company_name=d.get("company_name"), + currency=d.get("currency"), + date=d.get("date"), + firm=d.get("firm"), + importance=d.get("importance"), + last_updated=d.get("last_updated"), + notes=d.get("notes"), + previous_adjusted_price_target=d.get("previous_adjusted_price_target"), + previous_price_target=d.get("previous_price_target"), + previous_rating=d.get("previous_rating"), + price_percent_change=d.get("price_percent_change"), + price_target=d.get("price_target"), + price_target_action=d.get("price_target_action"), + rating=d.get("rating"), + rating_action=d.get("rating_action"), + ticker=d.get("ticker"), + time=d.get("time"), + ) + + +@modelclass +class BenzingaBullsBearsSay: + bear_case: Optional[str] = None + benzinga_id: Optional[str] = None + bull_case: Optional[str] = None + last_updated: Optional[str] = None + ticker: Optional[str] = None + + @staticmethod + def from_dict(d): + return BenzingaBullsBearsSay( + bear_case=d.get("bear_case"), + benzinga_id=d.get("benzinga_id"), + bull_case=d.get("bull_case"), + last_updated=d.get("last_updated"), + ticker=d.get("ticker"), + ) diff --git a/polygon/rest/models/common.py b/massive/rest/models/common.py similarity index 76% rename from polygon/rest/models/common.py rename to massive/rest/models/common.py index b4613e1b..3fd72e3e 100644 --- a/polygon/rest/models/common.py +++ b/massive/rest/models/common.py @@ -21,6 +21,7 @@ class Market(Enum): CRYPTO = "crypto" FX = "fx" OTC = "otc" + INDICES = "indices" class AssetClass(Enum): @@ -28,6 +29,7 @@ class AssetClass(Enum): OPTIONS = "options" CRYPTO = "crypto" FX = "fx" + INDICES = "indices" class DividendType(Enum): @@ -72,6 +74,7 @@ class SnapshotMarketType(Enum): STOCKS = "stocks" FOREX = "forex" CRYPTO = "crypto" + INDICES = "indices" class Timeframe(Enum): @@ -85,3 +88,16 @@ class Precision(Enum): TWO = 2 THREE = 3 FOUR = 4 + + +class SeriesType(Enum): + OPEN = "open" + CLOSE = "close" + HIGH = "high" + LOW = "low" + + +class LaunchPadOptions(Enum): + X_MASSIVE_EDGE_ID = "X-Massive-Edge-ID" + X_MASSIVE_IP_ADDRESS = "X-Massive-Edge-IP-Address" + X_MASSIVE_EDGE_USER_AGENT = "X-Massive-Edge-User-Agent" diff --git a/polygon/rest/models/conditions.py b/massive/rest/models/conditions.py similarity index 74% rename from polygon/rest/models/conditions.py rename to massive/rest/models/conditions.py index 3fc0d776..3a625a73 100644 --- a/polygon/rest/models/conditions.py +++ b/massive/rest/models/conditions.py @@ -47,18 +47,22 @@ 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"]) + ), ) @modelclass class Condition: - "Condition contains data for a condition that Polygon.io uses." + "Condition contains data for a condition that Massive.com uses." abbreviation: Optional[str] = None asset_class: Optional[str] = None data_types: Optional[List[str]] = None @@ -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/massive/rest/models/contracts.py similarity index 88% rename from polygon/rest/models/contracts.py rename to massive/rest/models/contracts.py index dc69f614..469779b6 100644 --- a/polygon/rest/models/contracts.py +++ b/massive/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/massive/rest/models/dividends.py b/massive/rest/models/dividends.py new file mode 100644 index 00000000..3725daaa --- /dev/null +++ b/massive/rest/models/dividends.py @@ -0,0 +1,54 @@ +from typing import Optional +from ...modelclass import modelclass + + +@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 + dividend_type: Optional[str] = None + ex_dividend_date: Optional[str] = None + frequency: Optional[int] = None + pay_date: Optional[str] = None + record_date: Optional[str] = None + ticker: Optional[str] = None + + @staticmethod + def from_dict(d): + return Dividend(**d) + + +@modelclass +class StockDividend: + cash_amount: Optional[float] = None + currency: Optional[str] = None + declaration_date: Optional[str] = None + distribution_type: Optional[str] = None + ex_dividend_date: Optional[str] = None + frequency: Optional[int] = None + historical_adjustment_factor: Optional[float] = None + id: Optional[str] = None + pay_date: Optional[str] = None + record_date: Optional[str] = None + split_adjusted_cash_amount: Optional[float] = None + ticker: Optional[str] = None + + @staticmethod + def from_dict(d): + return StockDividend( + cash_amount=d.get("cash_amount"), + currency=d.get("currency"), + declaration_date=d.get("declaration_date"), + distribution_type=d.get("distribution_type"), + ex_dividend_date=d.get("ex_dividend_date"), + frequency=d.get("frequency"), + historical_adjustment_factor=d.get("historical_adjustment_factor"), + id=d.get("id"), + pay_date=d.get("pay_date"), + record_date=d.get("record_date"), + split_adjusted_cash_amount=d.get("split_adjusted_cash_amount"), + ticker=d.get("ticker"), + ) diff --git a/massive/rest/models/economy.py b/massive/rest/models/economy.py new file mode 100644 index 00000000..e6ae8d4f --- /dev/null +++ b/massive/rest/models/economy.py @@ -0,0 +1,106 @@ +from typing import Optional +from ...modelclass import modelclass + + +@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"), + ) + + +@modelclass +class FedInflation: + cpi: Optional[float] = None + cpi_core: Optional[float] = None + cpi_year_over_year: Optional[float] = None + date: Optional[str] = None + pce: Optional[float] = None + pce_core: Optional[float] = None + pce_spending: Optional[float] = None + + @staticmethod + def from_dict(d): + return FedInflation( + cpi=d.get("cpi"), + cpi_core=d.get("cpi_core"), + cpi_year_over_year=d.get("cpi_year_over_year"), + date=d.get("date"), + pce=d.get("pce"), + pce_core=d.get("pce_core"), + pce_spending=d.get("pce_spending"), + ) + + +@modelclass +class FedInflationExpectations: + date: Optional[str] = None + forward_years_5_to_10: Optional[float] = None + market_10_year: Optional[float] = None + market_5_year: Optional[float] = None + model_10_year: Optional[float] = None + model_1_year: Optional[float] = None + model_30_year: Optional[float] = None + model_5_year: Optional[float] = None + + @staticmethod + def from_dict(d): + return FedInflationExpectations( + date=d.get("date"), + forward_years_5_to_10=d.get("forward_years_5_to_10"), + market_10_year=d.get("market_10_year"), + market_5_year=d.get("market_5_year"), + model_10_year=d.get("model_10_year"), + model_1_year=d.get("model_1_year"), + model_30_year=d.get("model_30_year"), + model_5_year=d.get("model_5_year"), + ) + + +@modelclass +class FedLaborMarket: + avg_hourly_earnings: Optional[float] = None + date: Optional[str] = None + job_openings: Optional[float] = None + labor_force_participation_rate: Optional[float] = None + unemployment_rate: Optional[float] = None + + @staticmethod + def from_dict(d): + return FedLaborMarket( + avg_hourly_earnings=d.get("avg_hourly_earnings"), + date=d.get("date"), + job_openings=d.get("job_openings"), + labor_force_participation_rate=d.get("labor_force_participation_rate"), + unemployment_rate=d.get("unemployment_rate"), + ) diff --git a/massive/rest/models/etf_global.py b/massive/rest/models/etf_global.py new file mode 100644 index 00000000..053babe6 --- /dev/null +++ b/massive/rest/models/etf_global.py @@ -0,0 +1,351 @@ +from typing import Optional, Dict +from ...modelclass import modelclass + + +@modelclass +class EtfGlobalAnalytics: + composite_ticker: Optional[str] = None + effective_date: Optional[str] = None + processed_date: Optional[str] = None + quant_composite_behavioral: Optional[float] = None + quant_composite_fundamental: Optional[float] = None + quant_composite_global: Optional[float] = None + quant_composite_quality: Optional[float] = None + quant_composite_sentiment: Optional[float] = None + quant_composite_technical: Optional[float] = None + quant_fundamental_div: Optional[float] = None + quant_fundamental_pb: Optional[float] = None + quant_fundamental_pcf: Optional[float] = None + quant_fundamental_pe: Optional[float] = None + quant_global_country: Optional[float] = None + quant_global_sector: Optional[float] = None + quant_grade: Optional[str] = None + quant_quality_diversification: Optional[float] = None + quant_quality_firm: Optional[float] = None + quant_quality_liquidity: Optional[float] = None + quant_sentiment_iv: Optional[float] = None + quant_sentiment_pc: Optional[float] = None + quant_sentiment_si: Optional[float] = None + quant_technical_it: Optional[float] = None + quant_technical_lt: Optional[float] = None + quant_technical_st: Optional[float] = None + quant_total_score: Optional[float] = None + reward_score: Optional[float] = None + risk_country: Optional[float] = None + risk_deviation: Optional[float] = None + risk_efficiency: Optional[float] = None + risk_liquidity: Optional[float] = None + risk_structure: Optional[float] = None + risk_total_score: Optional[float] = None + risk_volatility: Optional[float] = None + + @staticmethod + def from_dict(d): + return EtfGlobalAnalytics( + composite_ticker=d.get("composite_ticker"), + effective_date=d.get("effective_date"), + processed_date=d.get("processed_date"), + quant_composite_behavioral=d.get("quant_composite_behavioral"), + quant_composite_fundamental=d.get("quant_composite_fundamental"), + quant_composite_global=d.get("quant_composite_global"), + quant_composite_quality=d.get("quant_composite_quality"), + quant_composite_sentiment=d.get("quant_composite_sentiment"), + quant_composite_technical=d.get("quant_composite_technical"), + quant_fundamental_div=d.get("quant_fundamental_div"), + quant_fundamental_pb=d.get("quant_fundamental_pb"), + quant_fundamental_pcf=d.get("quant_fundamental_pcf"), + quant_fundamental_pe=d.get("quant_fundamental_pe"), + quant_global_country=d.get("quant_global_country"), + quant_global_sector=d.get("quant_global_sector"), + quant_grade=d.get("quant_grade"), + quant_quality_diversification=d.get("quant_quality_diversification"), + quant_quality_firm=d.get("quant_quality_firm"), + quant_quality_liquidity=d.get("quant_quality_liquidity"), + quant_sentiment_iv=d.get("quant_sentiment_iv"), + quant_sentiment_pc=d.get("quant_sentiment_pc"), + quant_sentiment_si=d.get("quant_sentiment_si"), + quant_technical_it=d.get("quant_technical_it"), + quant_technical_lt=d.get("quant_technical_lt"), + quant_technical_st=d.get("quant_technical_st"), + quant_total_score=d.get("quant_total_score"), + reward_score=d.get("reward_score"), + risk_country=d.get("risk_country"), + risk_deviation=d.get("risk_deviation"), + risk_efficiency=d.get("risk_efficiency"), + risk_liquidity=d.get("risk_liquidity"), + risk_structure=d.get("risk_structure"), + risk_total_score=d.get("risk_total_score"), + risk_volatility=d.get("risk_volatility"), + ) + + +@modelclass +class EtfGlobalConstituent: + asset_class: Optional[str] = None + composite_ticker: Optional[str] = None + constituent_name: Optional[str] = None + constituent_ticker: Optional[str] = None + country_of_exchange: Optional[str] = None + currency_traded: Optional[str] = None + effective_date: Optional[str] = None + exchange: Optional[str] = None + figi: Optional[str] = None + isin: Optional[str] = None + market_value: Optional[float] = None + processed_date: Optional[str] = None + security_type: Optional[str] = None + sedol: Optional[str] = None + shares_held: Optional[float] = None + us_code: Optional[str] = None + weight: Optional[float] = None + + @staticmethod + def from_dict(d): + return EtfGlobalConstituent( + asset_class=d.get("asset_class"), + composite_ticker=d.get("composite_ticker"), + constituent_name=d.get("constituent_name"), + constituent_ticker=d.get("constituent_ticker"), + country_of_exchange=d.get("country_of_exchange"), + currency_traded=d.get("currency_traded"), + effective_date=d.get("effective_date"), + exchange=d.get("exchange"), + figi=d.get("figi"), + isin=d.get("isin"), + market_value=d.get("market_value"), + processed_date=d.get("processed_date"), + security_type=d.get("security_type"), + sedol=d.get("sedol"), + shares_held=d.get("shares_held"), + us_code=d.get("us_code"), + weight=d.get("weight"), + ) + + +@modelclass +class EtfGlobalFundFlow: + composite_ticker: Optional[str] = None + effective_date: Optional[str] = None + fund_flow: Optional[float] = None + nav: Optional[float] = None + processed_date: Optional[str] = None + shares_outstanding: Optional[float] = None + + @staticmethod + def from_dict(d): + return EtfGlobalFundFlow( + composite_ticker=d.get("composite_ticker"), + effective_date=d.get("effective_date"), + fund_flow=d.get("fund_flow"), + nav=d.get("nav"), + processed_date=d.get("processed_date"), + shares_outstanding=d.get("shares_outstanding"), + ) + + +@modelclass +class EtfGlobalProfile: + administrator: Optional[str] = None + advisor: Optional[str] = None + asset_class: Optional[str] = None + aum: Optional[float] = None + avg_daily_trading_volume: Optional[float] = None + bid_ask_spread: Optional[float] = None + call_volume: Optional[float] = None + category: Optional[str] = None + composite_ticker: Optional[str] = None + coupon_exposure: Optional[Dict[str, float]] = None + creation_fee: Optional[float] = None + creation_unit_size: Optional[float] = None + currency_exposure: Optional[Dict[str, float]] = None + custodian: Optional[str] = None + description: Optional[str] = None + development_class: Optional[str] = None + discount_premium: Optional[float] = None + distribution_frequency: Optional[str] = None + distributor: Optional[str] = None + effective_date: Optional[str] = None + fee_waivers: Optional[float] = None + fiscal_year_end: Optional[str] = None + focus: Optional[str] = None + futures_commission_merchant: Optional[str] = None + geographic_exposure: Optional[Dict[str, float]] = None + inception_date: Optional[str] = None + industry_exposure: Optional[Dict[str, float]] = None + industry_group_exposure: Optional[Dict[str, float]] = None + issuer: Optional[str] = None + lead_market_maker: Optional[str] = None + leverage_style: Optional[str] = None + levered_amount: Optional[float] = None + listing_exchange: Optional[str] = None + management_classification: Optional[str] = None + management_fee: Optional[float] = None + maturity_exposure: Optional[Dict[str, float]] = None + net_expenses: Optional[float] = None + num_holdings: Optional[float] = None + options_available: Optional[int] = None + options_volume: Optional[float] = None + other_expenses: Optional[float] = None + portfolio_manager: Optional[str] = None + primary_benchmark: Optional[str] = None + processed_date: Optional[str] = None + product_type: Optional[str] = None + put_call_ratio: Optional[float] = None + put_volume: Optional[float] = None + region: Optional[str] = None + sector_exposure: Optional[Dict[str, float]] = None + short_interest: Optional[float] = None + subadvisor: Optional[str] = None + subindustry_exposure: Optional[Dict[str, float]] = None + tax_classification: Optional[str] = None + total_expenses: Optional[float] = None + transfer_agent: Optional[str] = None + trustee: Optional[str] = None + + @staticmethod + def from_dict(d): + return EtfGlobalProfile( + administrator=d.get("administrator"), + advisor=d.get("advisor"), + asset_class=d.get("asset_class"), + aum=d.get("aum"), + avg_daily_trading_volume=d.get("avg_daily_trading_volume"), + bid_ask_spread=d.get("bid_ask_spread"), + call_volume=d.get("call_volume"), + category=d.get("category"), + composite_ticker=d.get("composite_ticker"), + coupon_exposure=d.get("coupon_exposure"), + creation_fee=d.get("creation_fee"), + creation_unit_size=d.get("creation_unit_size"), + currency_exposure=d.get("currency_exposure"), + custodian=d.get("custodian"), + description=d.get("description"), + development_class=d.get("development_class"), + discount_premium=d.get("discount_premium"), + distribution_frequency=d.get("distribution_frequency"), + distributor=d.get("distributor"), + effective_date=d.get("effective_date"), + fee_waivers=d.get("fee_waivers"), + fiscal_year_end=d.get("fiscal_year_end"), + focus=d.get("focus"), + futures_commission_merchant=d.get("futures_commission_merchant"), + geographic_exposure=d.get("geographic_exposure"), + inception_date=d.get("inception_date"), + industry_exposure=d.get("industry_exposure"), + industry_group_exposure=d.get("industry_group_exposure"), + issuer=d.get("issuer"), + lead_market_maker=d.get("lead_market_maker"), + leverage_style=d.get("leverage_style"), + levered_amount=d.get("levered_amount"), + listing_exchange=d.get("listing_exchange"), + management_classification=d.get("management_classification"), + management_fee=d.get("management_fee"), + maturity_exposure=d.get("maturity_exposure"), + net_expenses=d.get("net_expenses"), + num_holdings=d.get("num_holdings"), + options_available=d.get("options_available"), + options_volume=d.get("options_volume"), + other_expenses=d.get("other_expenses"), + portfolio_manager=d.get("portfolio_manager"), + primary_benchmark=d.get("primary_benchmark"), + processed_date=d.get("processed_date"), + product_type=d.get("product_type"), + put_call_ratio=d.get("put_call_ratio"), + put_volume=d.get("put_volume"), + region=d.get("region"), + sector_exposure=d.get("sector_exposure"), + short_interest=d.get("short_interest"), + subadvisor=d.get("subadvisor"), + subindustry_exposure=d.get("subindustry_exposure"), + tax_classification=d.get("tax_classification"), + total_expenses=d.get("total_expenses"), + transfer_agent=d.get("transfer_agent"), + trustee=d.get("trustee"), + ) + + +@modelclass +class EtfGlobalTaxonomy: + asset_class: Optional[str] = None + category: Optional[str] = None + composite_ticker: Optional[str] = None + country: Optional[str] = None + credit_quality_rating: Optional[str] = None + description: Optional[str] = None + development_class: Optional[str] = None + duration: Optional[str] = None + effective_date: Optional[str] = None + esg: Optional[str] = None + exposure_mechanism: Optional[str] = None + factor: Optional[str] = None + focus: Optional[str] = None + hedge_reset: Optional[str] = None + holdings_disclosure_frequency: Optional[str] = None + inception_date: Optional[str] = None + isin: Optional[str] = None + issuer: Optional[str] = None + leverage_reset: Optional[str] = None + leverage_style: Optional[str] = None + levered_amount: Optional[float] = None + management_classification: Optional[str] = None + management_style: Optional[str] = None + maturity: Optional[str] = None + objective: Optional[str] = None + primary_benchmark: Optional[str] = None + processed_date: Optional[str] = None + product_type: Optional[str] = None + rebalance_frequency: Optional[str] = None + reconstitution_frequency: Optional[str] = None + region: Optional[str] = None + secondary_objective: Optional[str] = None + selection_methodology: Optional[str] = None + selection_universe: Optional[str] = None + strategic_focus: Optional[str] = None + targeted_focus: Optional[str] = None + tax_classification: Optional[str] = None + us_code: Optional[str] = None + weighting_methodology: Optional[str] = None + + @staticmethod + def from_dict(d): + return EtfGlobalTaxonomy( + asset_class=d.get("asset_class"), + category=d.get("category"), + composite_ticker=d.get("composite_ticker"), + country=d.get("country"), + credit_quality_rating=d.get("credit_quality_rating"), + description=d.get("description"), + development_class=d.get("development_class"), + duration=d.get("duration"), + effective_date=d.get("effective_date"), + esg=d.get("esg"), + exposure_mechanism=d.get("exposure_mechanism"), + factor=d.get("factor"), + focus=d.get("focus"), + hedge_reset=d.get("hedge_reset"), + holdings_disclosure_frequency=d.get("holdings_disclosure_frequency"), + inception_date=d.get("inception_date"), + isin=d.get("isin"), + issuer=d.get("issuer"), + leverage_reset=d.get("leverage_reset"), + leverage_style=d.get("leverage_style"), + levered_amount=d.get("levered_amount"), + management_classification=d.get("management_classification"), + management_style=d.get("management_style"), + maturity=d.get("maturity"), + objective=d.get("objective"), + primary_benchmark=d.get("primary_benchmark"), + processed_date=d.get("processed_date"), + product_type=d.get("product_type"), + rebalance_frequency=d.get("rebalance_frequency"), + reconstitution_frequency=d.get("reconstitution_frequency"), + region=d.get("region"), + secondary_objective=d.get("secondary_objective"), + selection_methodology=d.get("selection_methodology"), + selection_universe=d.get("selection_universe"), + strategic_focus=d.get("strategic_focus"), + targeted_focus=d.get("targeted_focus"), + tax_classification=d.get("tax_classification"), + us_code=d.get("us_code"), + weighting_methodology=d.get("weighting_methodology"), + ) diff --git a/polygon/rest/models/exchanges.py b/massive/rest/models/exchanges.py similarity index 88% rename from polygon/rest/models/exchanges.py rename to massive/rest/models/exchanges.py index cd93a7d9..542b9365 100644 --- a/polygon/rest/models/exchanges.py +++ b/massive/rest/models/exchanges.py @@ -4,7 +4,7 @@ @modelclass class Exchange: - "Exchange contains data for a condition that Polygon.io uses." + "Exchange contains data for a condition that Massive.com uses." acronym: Optional[str] = None asset_class: Optional[str] = None id: Optional[int] = None diff --git a/massive/rest/models/financials.py b/massive/rest/models/financials.py new file mode 100644 index 00000000..2e97eeba --- /dev/null +++ b/massive/rest/models/financials.py @@ -0,0 +1,922 @@ +from dataclasses import dataclass +from typing import Any, Dict, List, Optional +from ...modelclass import modelclass + + +@modelclass +@dataclass +class DataPoint: + """Represents a single numeric or textual data point in the financials.""" + + label: Optional[str] = None + order: Optional[int] = None + unit: Optional[str] = None + value: Optional[float] = None + derived_from: Optional[List[str]] = None + formula: Optional[str] = None + source: Optional[Dict[str, str]] = None + xpath: Optional[str] = None + + @staticmethod + 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 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: 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: + 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: Optional[Dict[str, Any]]) -> "CashFlowStatement": + if not d: + return CashFlowStatement() + return CashFlowStatement( + 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") + ), + ) + + +@dataclass +@modelclass +class ComprehensiveIncome: + comprehensive_income_loss: Optional[DataPoint] = None + comprehensive_income_loss_attributable_to_noncontrolling_interest: Optional[ + DataPoint + ] = 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: Optional[Dict[str, Any]]) -> "ComprehensiveIncome": + if not d: + return ComprehensiveIncome() + return ComprehensiveIncome( + 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") + ), + ) + + +@dataclass +@modelclass +class IncomeStatement: + 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: Optional[Dict[str, Any]]) -> "IncomeStatement": + if not d: + return IncomeStatement() + return IncomeStatement( + 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 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: Optional[Dict[str, Any]]) -> "Financials": + if not d: + return Financials() + return Financials( + 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. + 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 + filing_date: Optional[str] = None + financials: Optional[Financials] = None + fiscal_period: Optional[str] = None + fiscal_year: Optional[str] = None + source_filing_file_url: Optional[str] = None + source_filing_url: Optional[str] = None + start_date: Optional[str] = None + + @staticmethod + def from_dict(d: Optional[Dict[str, Any]]) -> "StockFinancial": + if not d: + return StockFinancial() + return StockFinancial( + 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"), + ) + + +@modelclass +class FinancialBalanceSheet: + accounts_payable: Optional[float] = None + accrued_and_other_current_liabilities: Optional[float] = None + accumulated_other_comprehensive_income: Optional[float] = None + additional_paid_in_capital: Optional[float] = None + cash_and_equivalents: Optional[float] = None + cik: Optional[str] = None + commitments_and_contingencies: Optional[float] = None + common_stock: Optional[float] = None + debt_current: Optional[float] = None + deferred_revenue_current: Optional[float] = None + filing_date: Optional[str] = None + fiscal_quarter: Optional[float] = None + fiscal_year: Optional[float] = None + goodwill: Optional[float] = None + intangible_assets_net: Optional[float] = None + inventories: Optional[float] = None + long_term_debt_and_capital_lease_obligations: Optional[float] = None + noncontrolling_interest: Optional[float] = None + other_assets: Optional[float] = None + other_current_assets: Optional[float] = None + other_equity: Optional[float] = None + other_noncurrent_liabilities: Optional[float] = None + period_end: Optional[str] = None + preferred_stock: Optional[float] = None + property_plant_equipment_net: Optional[float] = None + receivables: Optional[float] = None + retained_earnings_deficit: Optional[float] = None + short_term_investments: Optional[float] = None + tickers: Optional[List[str]] = None + timeframe: Optional[str] = None + total_assets: Optional[float] = None + total_current_assets: Optional[float] = None + total_current_liabilities: Optional[float] = None + total_equity: Optional[float] = None + total_equity_attributable_to_parent: Optional[float] = None + total_liabilities: Optional[float] = None + total_liabilities_and_equity: Optional[float] = None + treasury_stock: Optional[float] = None + + @staticmethod + def from_dict(d): + return FinancialBalanceSheet( + accounts_payable=d.get("accounts_payable"), + accrued_and_other_current_liabilities=d.get( + "accrued_and_other_current_liabilities" + ), + accumulated_other_comprehensive_income=d.get( + "accumulated_other_comprehensive_income" + ), + additional_paid_in_capital=d.get("additional_paid_in_capital"), + cash_and_equivalents=d.get("cash_and_equivalents"), + cik=d.get("cik"), + commitments_and_contingencies=d.get("commitments_and_contingencies"), + common_stock=d.get("common_stock"), + debt_current=d.get("debt_current"), + deferred_revenue_current=d.get("deferred_revenue_current"), + filing_date=d.get("filing_date"), + fiscal_quarter=d.get("fiscal_quarter"), + fiscal_year=d.get("fiscal_year"), + goodwill=d.get("goodwill"), + intangible_assets_net=d.get("intangible_assets_net"), + inventories=d.get("inventories"), + long_term_debt_and_capital_lease_obligations=d.get( + "long_term_debt_and_capital_lease_obligations" + ), + noncontrolling_interest=d.get("noncontrolling_interest"), + other_assets=d.get("other_assets"), + other_current_assets=d.get("other_current_assets"), + other_equity=d.get("other_equity"), + other_noncurrent_liabilities=d.get("other_noncurrent_liabilities"), + period_end=d.get("period_end"), + preferred_stock=d.get("preferred_stock"), + property_plant_equipment_net=d.get("property_plant_equipment_net"), + receivables=d.get("receivables"), + retained_earnings_deficit=d.get("retained_earnings_deficit"), + short_term_investments=d.get("short_term_investments"), + tickers=d.get("tickers"), + timeframe=d.get("timeframe"), + total_assets=d.get("total_assets"), + total_current_assets=d.get("total_current_assets"), + total_current_liabilities=d.get("total_current_liabilities"), + total_equity=d.get("total_equity"), + total_equity_attributable_to_parent=d.get( + "total_equity_attributable_to_parent" + ), + total_liabilities=d.get("total_liabilities"), + total_liabilities_and_equity=d.get("total_liabilities_and_equity"), + treasury_stock=d.get("treasury_stock"), + ) + + +@modelclass +class FinancialCashFlowStatement: + cash_from_operating_activities_continuing_operations: Optional[float] = None + change_in_cash_and_equivalents: Optional[float] = None + change_in_other_operating_assets_and_liabilities_net: Optional[float] = None + cik: Optional[str] = None + depreciation_depletion_and_amortization: Optional[float] = None + dividends: Optional[float] = None + effect_of_currency_exchange_rate: Optional[float] = None + filing_date: Optional[str] = None + fiscal_quarter: Optional[float] = None + fiscal_year: Optional[float] = None + income_loss_from_discontinued_operations: Optional[float] = None + long_term_debt_issuances_repayments: Optional[float] = None + net_cash_from_financing_activities: Optional[float] = None + net_cash_from_financing_activities_continuing_operations: Optional[float] = None + net_cash_from_financing_activities_discontinued_operations: Optional[float] = None + net_cash_from_investing_activities: Optional[float] = None + net_cash_from_investing_activities_continuing_operations: Optional[float] = None + net_cash_from_investing_activities_discontinued_operations: Optional[float] = None + net_cash_from_operating_activities: Optional[float] = None + net_cash_from_operating_activities_discontinued_operations: Optional[float] = None + net_income: Optional[float] = None + noncontrolling_interests: Optional[float] = None + other_cash_adjustments: Optional[float] = None + other_financing_activities: Optional[float] = None + other_investing_activities: Optional[float] = None + other_operating_activities: Optional[float] = None + period_end: Optional[str] = None + purchase_of_property_plant_and_equipment: Optional[float] = None + sale_of_property_plant_and_equipment: Optional[float] = None + short_term_debt_issuances_repayments: Optional[float] = None + tickers: Optional[List[str]] = None + timeframe: Optional[str] = None + + @staticmethod + def from_dict(d): + return FinancialCashFlowStatement( + cash_from_operating_activities_continuing_operations=d.get( + "cash_from_operating_activities_continuing_operations" + ), + change_in_cash_and_equivalents=d.get("change_in_cash_and_equivalents"), + change_in_other_operating_assets_and_liabilities_net=d.get( + "change_in_other_operating_assets_and_liabilities_net" + ), + cik=d.get("cik"), + depreciation_depletion_and_amortization=d.get( + "depreciation_depletion_and_amortization" + ), + dividends=d.get("dividends"), + effect_of_currency_exchange_rate=d.get("effect_of_currency_exchange_rate"), + filing_date=d.get("filing_date"), + fiscal_quarter=d.get("fiscal_quarter"), + fiscal_year=d.get("fiscal_year"), + income_loss_from_discontinued_operations=d.get( + "income_loss_from_discontinued_operations" + ), + long_term_debt_issuances_repayments=d.get( + "long_term_debt_issuances_repayments" + ), + net_cash_from_financing_activities=d.get( + "net_cash_from_financing_activities" + ), + net_cash_from_financing_activities_continuing_operations=d.get( + "net_cash_from_financing_activities_continuing_operations" + ), + net_cash_from_financing_activities_discontinued_operations=d.get( + "net_cash_from_financing_activities_discontinued_operations" + ), + net_cash_from_investing_activities=d.get( + "net_cash_from_investing_activities" + ), + net_cash_from_investing_activities_continuing_operations=d.get( + "net_cash_from_investing_activities_continuing_operations" + ), + net_cash_from_investing_activities_discontinued_operations=d.get( + "net_cash_from_investing_activities_discontinued_operations" + ), + net_cash_from_operating_activities=d.get( + "net_cash_from_operating_activities" + ), + net_cash_from_operating_activities_discontinued_operations=d.get( + "net_cash_from_operating_activities_discontinued_operations" + ), + net_income=d.get("net_income"), + noncontrolling_interests=d.get("noncontrolling_interests"), + other_cash_adjustments=d.get("other_cash_adjustments"), + other_financing_activities=d.get("other_financing_activities"), + other_investing_activities=d.get("other_investing_activities"), + other_operating_activities=d.get("other_operating_activities"), + period_end=d.get("period_end"), + purchase_of_property_plant_and_equipment=d.get( + "purchase_of_property_plant_and_equipment" + ), + sale_of_property_plant_and_equipment=d.get( + "sale_of_property_plant_and_equipment" + ), + short_term_debt_issuances_repayments=d.get( + "short_term_debt_issuances_repayments" + ), + tickers=d.get("tickers"), + timeframe=d.get("timeframe"), + ) + + +@modelclass +class FinancialIncomeStatement: + basic_earnings_per_share: Optional[float] = None + basic_shares_outstanding: Optional[float] = None + cik: Optional[str] = None + consolidated_net_income_loss: Optional[float] = None + cost_of_revenue: Optional[float] = None + depreciation_depletion_amortization: Optional[float] = None + diluted_earnings_per_share: Optional[float] = None + diluted_shares_outstanding: Optional[float] = None + discontinued_operations: Optional[float] = None + ebitda: Optional[float] = None + equity_in_affiliates: Optional[float] = None + extraordinary_items: Optional[float] = None + filing_date: Optional[str] = None + fiscal_quarter: Optional[float] = None + fiscal_year: Optional[float] = None + gross_profit: Optional[float] = None + income_before_income_taxes: Optional[float] = None + income_taxes: Optional[float] = None + interest_expense: Optional[float] = None + interest_income: Optional[float] = None + net_income_loss_attributable_common_shareholders: Optional[float] = None + noncontrolling_interest: Optional[float] = None + operating_income: Optional[float] = None + other_income_expense: Optional[float] = None + other_operating_expenses: Optional[float] = None + period_end: Optional[str] = None + preferred_stock_dividends_declared: Optional[float] = None + research_development: Optional[float] = None + revenue: Optional[float] = None + selling_general_administrative: Optional[float] = None + tickers: Optional[List[str]] = None + timeframe: Optional[str] = None + total_operating_expenses: Optional[float] = None + total_other_income_expense: Optional[float] = None + + @staticmethod + def from_dict(d): + return FinancialIncomeStatement( + basic_earnings_per_share=d.get("basic_earnings_per_share"), + basic_shares_outstanding=d.get("basic_shares_outstanding"), + cik=d.get("cik"), + consolidated_net_income_loss=d.get("consolidated_net_income_loss"), + cost_of_revenue=d.get("cost_of_revenue"), + depreciation_depletion_amortization=d.get( + "depreciation_depletion_amortization" + ), + diluted_earnings_per_share=d.get("diluted_earnings_per_share"), + diluted_shares_outstanding=d.get("diluted_shares_outstanding"), + discontinued_operations=d.get("discontinued_operations"), + ebitda=d.get("ebitda"), + equity_in_affiliates=d.get("equity_in_affiliates"), + extraordinary_items=d.get("extraordinary_items"), + filing_date=d.get("filing_date"), + fiscal_quarter=d.get("fiscal_quarter"), + fiscal_year=d.get("fiscal_year"), + gross_profit=d.get("gross_profit"), + income_before_income_taxes=d.get("income_before_income_taxes"), + income_taxes=d.get("income_taxes"), + interest_expense=d.get("interest_expense"), + interest_income=d.get("interest_income"), + net_income_loss_attributable_common_shareholders=d.get( + "net_income_loss_attributable_common_shareholders" + ), + noncontrolling_interest=d.get("noncontrolling_interest"), + operating_income=d.get("operating_income"), + other_income_expense=d.get("other_income_expense"), + other_operating_expenses=d.get("other_operating_expenses"), + period_end=d.get("period_end"), + preferred_stock_dividends_declared=d.get( + "preferred_stock_dividends_declared" + ), + research_development=d.get("research_development"), + revenue=d.get("revenue"), + selling_general_administrative=d.get("selling_general_administrative"), + tickers=d.get("tickers"), + timeframe=d.get("timeframe"), + total_operating_expenses=d.get("total_operating_expenses"), + total_other_income_expense=d.get("total_other_income_expense"), + ) + + +@modelclass +class FinancialRatio: + average_volume: Optional[float] = None + cash: Optional[float] = None + cik: Optional[str] = None + current: Optional[float] = None + date: Optional[str] = None + debt_to_equity: Optional[float] = None + dividend_yield: Optional[float] = None + earnings_per_share: Optional[float] = None + enterprise_value: Optional[float] = None + ev_to_ebitda: Optional[float] = None + ev_to_sales: Optional[float] = None + free_cash_flow: Optional[float] = None + market_cap: Optional[float] = None + price: Optional[float] = None + price_to_book: Optional[float] = None + price_to_cash_flow: Optional[float] = None + price_to_earnings: Optional[float] = None + price_to_free_cash_flow: Optional[float] = None + price_to_sales: Optional[float] = None + quick: Optional[float] = None + return_on_assets: Optional[float] = None + return_on_equity: Optional[float] = None + ticker: Optional[str] = None + + @staticmethod + def from_dict(d): + return FinancialRatio( + average_volume=d.get("average_volume"), + cash=d.get("cash"), + cik=d.get("cik"), + current=d.get("current"), + date=d.get("date"), + debt_to_equity=d.get("debt_to_equity"), + dividend_yield=d.get("dividend_yield"), + earnings_per_share=d.get("earnings_per_share"), + enterprise_value=d.get("enterprise_value"), + ev_to_ebitda=d.get("ev_to_ebitda"), + ev_to_sales=d.get("ev_to_sales"), + free_cash_flow=d.get("free_cash_flow"), + market_cap=d.get("market_cap"), + price=d.get("price"), + price_to_book=d.get("price_to_book"), + price_to_cash_flow=d.get("price_to_cash_flow"), + price_to_earnings=d.get("price_to_earnings"), + price_to_free_cash_flow=d.get("price_to_free_cash_flow"), + price_to_sales=d.get("price_to_sales"), + quick=d.get("quick"), + return_on_assets=d.get("return_on_assets"), + return_on_equity=d.get("return_on_equity"), + ticker=d.get("ticker"), + ) + + +@modelclass +class FinancialFloat: + effective_date: Optional[str] = None + free_float: Optional[int] = None + free_float_percent: Optional[float] = None + ticker: Optional[str] = None + + @staticmethod + def from_dict(d): + return FinancialFloat( + effective_date=d.get("effective_date"), + free_float=d.get("free_float"), + free_float_percent=d.get("free_float_percent"), + ticker=d.get("ticker"), + ) + + +@modelclass +class RiskFactor: + cik: Optional[str] = None + filing_date: Optional[str] = None + primary_category: Optional[str] = None + secondary_category: Optional[str] = None + supporting_text: Optional[str] = None + tertiary_category: Optional[str] = None + ticker: Optional[str] = None + + @staticmethod + def from_dict(d): + return RiskFactor( + cik=d.get("cik"), + filing_date=d.get("filing_date"), + primary_category=d.get("primary_category"), + secondary_category=d.get("secondary_category"), + supporting_text=d.get("supporting_text"), + tertiary_category=d.get("tertiary_category"), + ticker=d.get("ticker"), + ) + + +@modelclass +class RiskFactorTaxonomy: + description: Optional[str] = None + primary_category: Optional[str] = None + secondary_category: Optional[str] = None + taxonomy: Optional[float] = None + tertiary_category: Optional[str] = None + + @staticmethod + def from_dict(d): + return RiskFactorTaxonomy( + description=d.get("description"), + primary_category=d.get("primary_category"), + secondary_category=d.get("secondary_category"), + taxonomy=d.get("taxonomy"), + tertiary_category=d.get("tertiary_category"), + ) diff --git a/massive/rest/models/futures.py b/massive/rest/models/futures.py new file mode 100644 index 00000000..966defc2 --- /dev/null +++ b/massive/rest/models/futures.py @@ -0,0 +1,415 @@ +from typing import Optional, List +from ...modelclass import modelclass + + +@modelclass +class FuturesAgg: + """ + A single aggregate bar for a futures contract in a given time window. + Corresponds to /futures/vX/aggs/{ticker}. + """ + + ticker: Optional[str] = None + open: Optional[float] = None + high: Optional[float] = None + low: Optional[float] = None + close: Optional[float] = None + volume: Optional[float] = None + dollar_volume: Optional[float] = None + transactions: Optional[int] = None + window_start: Optional[int] = None + session_end_date: Optional[str] = None + settlement_price: Optional[float] = None + + @staticmethod + def from_dict(d): + return FuturesAgg( + ticker=d.get("ticker"), + open=d.get("open"), + high=d.get("high"), + low=d.get("low"), + close=d.get("close"), + volume=d.get("volume"), + dollar_volume=d.get("dollar_volume"), + transactions=d.get("transactions"), + window_start=d.get("window_start"), + session_end_date=d.get("session_end_date"), + settlement_price=d.get("settlement_price"), + ) + + +@modelclass +class FuturesContract: + """ + Represents a single futures contract (or a 'combo' contract). + Corresponds to /futures/vX/contracts endpoints. + """ + + ticker: Optional[str] = None + product_code: Optional[str] = None + trading_venue: Optional[str] = None + name: Optional[str] = None + type: Optional[str] = None + date: Optional[str] = None + active: Optional[bool] = None + first_trade_date: Optional[str] = None + last_trade_date: Optional[str] = None + days_to_maturity: Optional[int] = None + min_order_quantity: Optional[int] = None + max_order_quantity: Optional[int] = None + settlement_date: Optional[str] = None + settlement_tick_size: Optional[float] = None + spread_tick_size: Optional[float] = None + trade_tick_size: Optional[float] = None + group_code: Optional[str] = None + + @staticmethod + def from_dict(d): + return FuturesContract( + ticker=d.get("ticker"), + product_code=d.get("product_code"), + trading_venue=d.get("trading_venue"), + name=d.get("name"), + type=d.get("type"), + date=d.get("date"), + active=d.get("active"), + first_trade_date=d.get("first_trade_date"), + last_trade_date=d.get("last_trade_date"), + days_to_maturity=d.get("days_to_maturity"), + min_order_quantity=d.get("min_order_quantity"), + max_order_quantity=d.get("max_order_quantity"), + settlement_date=d.get("settlement_date"), + settlement_tick_size=d.get("settlement_tick_size"), + spread_tick_size=d.get("spread_tick_size"), + trade_tick_size=d.get("trade_tick_size"), + group_code=d.get("group_code"), + ) + + +@modelclass +class FuturesProduct: + """ + Represents a single futures product (or product 'combo'). + Corresponds to /futures/vX/products endpoints. + """ + + product_code: Optional[str] = None + name: Optional[str] = None + date: Optional[str] = None + trading_venue: Optional[str] = None + asset_class: Optional[str] = None + asset_sub_class: Optional[str] = None + sector: Optional[str] = None + sub_sector: Optional[str] = None + type: Optional[str] = None + last_updated: Optional[str] = None + price_quotation: Optional[str] = None + settlement_currency_code: Optional[str] = None + settlement_method: Optional[str] = None + settlement_type: Optional[str] = None + trade_currency_code: Optional[str] = None + unit_of_measure: Optional[str] = None + unit_of_measure_qty: Optional[float] = None + + @staticmethod + def from_dict(d): + return FuturesProduct( + product_code=d.get("product_code"), + name=d.get("name"), + date=d.get("date"), + trading_venue=d.get("trading_venue"), + asset_class=d.get("asset_class"), + asset_sub_class=d.get("asset_sub_class"), + sector=d.get("sector"), + sub_sector=d.get("sub_sector"), + type=d.get("type"), + last_updated=d.get("last_updated"), + price_quotation=d.get("price_quotation"), + settlement_currency_code=d.get("settlement_currency_code"), + settlement_method=d.get("settlement_method"), + settlement_type=d.get("settlement_type"), + trade_currency_code=d.get("trade_currency_code"), + unit_of_measure=d.get("unit_of_measure"), + unit_of_measure_qty=d.get("unit_of_measure_qty"), + ) + + +@modelclass +class FuturesQuote: + """ + Represents a futures NBBO quote within a given time range. + Corresponds to /futures/vX/quotes/{ticker} + """ + + ticker: Optional[str] = None + timestamp: Optional[int] = None + session_end_date: Optional[str] = None + ask_price: Optional[float] = None + ask_size: Optional[float] = None + ask_timestamp: Optional[int] = None + bid_price: Optional[float] = None + bid_size: Optional[float] = None + bid_timestamp: Optional[int] = None + + @staticmethod + def from_dict(d): + return FuturesQuote( + ticker=d.get("ticker"), + timestamp=d.get("timestamp"), + session_end_date=d.get("session_end_date"), + ask_price=d.get("ask_price"), + ask_size=d.get("ask_size"), + ask_timestamp=d.get("ask_timestamp"), + bid_price=d.get("bid_price"), + bid_size=d.get("bid_size"), + bid_timestamp=d.get("bid_timestamp"), + ) + + +@modelclass +class FuturesTrade: + """ + Represents a futures trade within a given time range. + Corresponds to /futures/vX/trades/{ticker} + """ + + ticker: Optional[str] = None + timestamp: Optional[int] = None + session_end_date: Optional[str] = None + price: Optional[float] = None + size: Optional[float] = None + + @staticmethod + def from_dict(d): + return FuturesTrade( + ticker=d.get("ticker"), + timestamp=d.get("timestamp"), + session_end_date=d.get("session_end_date"), + price=d.get("price"), + size=d.get("size"), + ) + + +@modelclass +class FuturesSchedule: + """ + Represents a single schedule event for a given session_end_date and product. + Corresponds to /futures/vX/schedules + """ + + event: Optional[str] = None + timestamp: Optional[str] = None + session_end_date: Optional[str] = None + product_code: Optional[str] = None + trading_venue: Optional[str] = None + product_name: Optional[str] = None + + @staticmethod + def from_dict(d): + return FuturesSchedule( + event=d.get("event"), + timestamp=d.get("timestamp"), + session_end_date=d.get("session_end_date"), + product_code=d.get("product_code"), + trading_venue=d.get("trading_venue"), + product_name=d.get("product_name"), + ) + + +@modelclass +class FuturesMarketStatus: + market_event: Optional[str] = None + name: Optional[str] = None + product_code: Optional[str] = None + session_end_date: Optional[str] = None + timestamp: Optional[str] = None + trading_venue: Optional[str] = None + + @staticmethod + def from_dict(d): + return FuturesMarketStatus( + market_event=d.get("market_event"), + name=d.get("name"), + product_code=d.get("product_code"), + session_end_date=d.get("session_end_date"), + timestamp=d.get("timestamp"), + trading_venue=d.get("trading_venue"), + ) + + +@modelclass +class FuturesSnapshotDetails: + open_interest: Optional[int] = None + settlement_date: Optional[int] = None + + @staticmethod + def from_dict(d): + return FuturesSnapshotDetails( + open_interest=d.get("open_interest"), + settlement_date=d.get("settlement_date"), + ) + + +@modelclass +class FuturesSnapshotMinute: + close: Optional[float] = None + high: Optional[float] = None + last_updated: Optional[int] = None + low: Optional[float] = None + open: Optional[float] = None + timeframe: Optional[str] = None + volume: Optional[float] = None + + @staticmethod + def from_dict(d): + return FuturesSnapshotMinute( + close=d.get("close"), + high=d.get("high"), + last_updated=d.get("last_updated"), + low=d.get("low"), + open=d.get("open"), + timeframe=d.get("timeframe"), + volume=d.get("volume"), + ) + + +@modelclass +class FuturesSnapshotQuote: + ask: Optional[float] = None + ask_size: Optional[int] = None + ask_timestamp: Optional[int] = None + bid: Optional[float] = None + bid_size: Optional[int] = None + bid_timestamp: Optional[int] = None + last_updated: Optional[int] = None + timeframe: Optional[str] = None + + @staticmethod + def from_dict(d): + return FuturesSnapshotQuote( + ask=d.get("ask"), + ask_size=d.get("ask_size"), + ask_timestamp=d.get("ask_timestamp"), + bid=d.get("bid"), + bid_size=d.get("bid_size"), + bid_timestamp=d.get("bid_timestamp"), + last_updated=d.get("last_updated"), + timeframe=d.get("timeframe"), + ) + + +@modelclass +class FuturesSnapshotTrade: + last_updated: Optional[int] = None + price: Optional[float] = None + size: Optional[int] = None + timeframe: Optional[str] = None + + @staticmethod + def from_dict(d): + return FuturesSnapshotTrade( + last_updated=d.get("last_updated"), + price=d.get("price"), + size=d.get("size"), + timeframe=d.get("timeframe"), + ) + + +@modelclass +class FuturesSnapshotSession: + change: Optional[float] = None + change_percent: Optional[float] = None + close: Optional[float] = None + high: Optional[float] = None + low: Optional[float] = None + open: Optional[float] = None + previous_settlement: Optional[float] = None + settlement_price: Optional[float] = None + volume: Optional[float] = None + + @staticmethod + def from_dict(d): + return FuturesSnapshotSession( + change=d.get("change"), + change_percent=d.get("change_percent"), + close=d.get("close"), + high=d.get("high"), + low=d.get("low"), + open=d.get("open"), + previous_settlement=d.get("previous_settlement"), + settlement_price=d.get("settlement_price"), + volume=d.get("volume"), + ) + + +@modelclass +class FuturesSnapshot: + ticker: Optional[str] = None + product_code: Optional[str] = None + details: Optional[FuturesSnapshotDetails] = None + last_minute: Optional[FuturesSnapshotMinute] = None + last_quote: Optional[FuturesSnapshotQuote] = None + last_trade: Optional[FuturesSnapshotTrade] = None + session: Optional[FuturesSnapshotSession] = None + + @staticmethod + def from_dict(d): + return FuturesSnapshot( + ticker=d.get("ticker"), + product_code=d.get("product_code"), + details=( + FuturesSnapshotDetails.from_dict(d.get("details", {})) + if d.get("details") + else None + ), + last_minute=( + FuturesSnapshotMinute.from_dict(d.get("last_minute", {})) + if d.get("last_minute") + else None + ), + last_quote=( + FuturesSnapshotQuote.from_dict(d.get("last_quote", {})) + if d.get("last_quote") + else None + ), + last_trade=( + FuturesSnapshotTrade.from_dict(d.get("last_trade", {})) + if d.get("last_trade") + else None + ), + session=( + FuturesSnapshotSession.from_dict(d.get("session", {})) + if d.get("session") + else None + ), + ) + + +@modelclass +class FuturesExchange: + """ + Represents a futures exchange or trading venue. + Corresponds to /futures/vX/exchanges endpoint. + """ + + acronym: Optional[str] = None + id: Optional[str] = None + locale: Optional[str] = None + mic: Optional[str] = None + name: Optional[str] = None + operating_mic: Optional[str] = None + type: Optional[str] = None + url: Optional[str] = None + + @staticmethod + def from_dict(d): + return FuturesExchange( + acronym=d.get("acronym"), + id=d.get("id"), + locale=d.get("locale"), + mic=d.get("mic"), + name=d.get("name"), + operating_mic=d.get("operating_mic"), + type=d.get("type"), + url=d.get("url"), + ) diff --git a/massive/rest/models/indicators.py b/massive/rest/models/indicators.py new file mode 100644 index 00000000..ffb3899f --- /dev/null +++ b/massive/rest/models/indicators.py @@ -0,0 +1,82 @@ +from typing import Optional, Any, Dict, List, Union +from ...modelclass import modelclass +from .aggs import Agg + + +@modelclass +class IndicatorValue: + "Contains one datum for indicators with a single value." + timestamp: Optional[int] = None + value: Optional[float] = None + + @staticmethod + def from_dict(d): + return IndicatorValue( + timestamp=d.get("timestamp", None), + value=d.get("value", None), + ) + + +@modelclass +class MACDIndicatorValue: + "Contains one datum for all MACD values." + timestamp: Optional[int] = None + value: Optional[float] = None + signal: Optional[float] = None + histogram: Optional[float] = None + + @staticmethod + def from_dict(d): + return MACDIndicatorValue( + timestamp=d.get("timestamp", None), + value=d.get("value", None), + signal=d.get("signal", None), + histogram=d.get("histogram", None), + ) + + +@modelclass +class IndicatorUnderlying: + "Contains the URL to call to get the aggs used for building the indicator." + url: Optional[str] = None + aggregates: Optional[List[Agg]] = None + + @staticmethod + def from_dict(d): + return IndicatorUnderlying( + url=d.get("url", None), + aggregates=[Agg.from_dict(a) for a in d.get("aggregates", [])], + ) + + +@modelclass +class SingleIndicatorResults: + "Contains indicator values and Underlying." + values: Optional[List[IndicatorValue]] = None + underlying: Optional[IndicatorUnderlying] = None + + @staticmethod + def from_dict(d): + return SingleIndicatorResults( + values=[IndicatorValue.from_dict(v) for v in (d.get("values", []))], + underlying=IndicatorUnderlying.from_dict(d.get("underlying", None)), + ) + + +SMAIndicatorResults = SingleIndicatorResults +EMAIndicatorResults = SingleIndicatorResults +RSIIndicatorResults = SingleIndicatorResults + + +@modelclass +class MACDIndicatorResults: + "Contains indicator values and Underlying." + values: Optional[List[MACDIndicatorValue]] = None + underlying: Optional[IndicatorUnderlying] = None + + @staticmethod + def from_dict(d): + return MACDIndicatorResults( + values=[MACDIndicatorValue.from_dict(v) for v in (d.get("values", []))], + underlying=IndicatorUnderlying.from_dict(d.get("underlying", None)), + ) diff --git a/polygon/rest/models/markets.py b/massive/rest/models/markets.py similarity index 60% rename from polygon/rest/models/markets.py rename to massive/rest/models/markets.py index 541fec88..4e68abd4 100644 --- a/polygon/rest/models/markets.py +++ b/massive/rest/models/markets.py @@ -25,6 +25,25 @@ def from_dict(d): return MarketExchanges(**d) +@modelclass +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 + mstarc: Optional[str] = None + cccy: Optional[str] = None + nasdaq: Optional[str] = None + dow_jones: Optional[str] = None + + @staticmethod + def from_dict(d): + return MarketIndices(**d) + + @modelclass class MarketHoliday: "MarketHoliday contains data for upcoming market holidays and their open/close times." @@ -47,6 +66,7 @@ class MarketStatus: currencies: Optional[MarketCurrencies] = None early_hours: Optional[bool] = None exchanges: Optional[MarketExchanges] = None + indicesGroups: Optional[MarketIndices] = None market: Optional[str] = None server_time: Optional[str] = None @@ -54,13 +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"]), + 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/quotes.py b/massive/rest/models/quotes.py similarity index 100% rename from polygon/rest/models/quotes.py rename to massive/rest/models/quotes.py diff --git a/massive/rest/models/request.py b/massive/rest/models/request.py new file mode 100644 index 00000000..b1c6c236 --- /dev/null +++ b/massive/rest/models/request.py @@ -0,0 +1,101 @@ +from typing import Dict, Optional + +X_MASSIVE_EDGE_ID = "X-Massive-Edge-ID" +X_MASSIVE_EDGE_IP_ADDRESS = "X-Massive-Edge-IP-Address" +X_MASSIVE_EDGE_USER_AGENT = "X-Massive-Edge-User-Agent" + +HEADER = "header" + + +class RequestOptionBuilder: + def __init__( + self, + edge_id: Optional[str] = None, + edge_ip_address: Optional[str] = None, + edge_user: Optional[str] = None, + ): + """ + RequestOptionBuilder is a utility class to build massive api options used in requests. + :param edge_id: is a required Launchpad header. It identifies the Edge User requesting data + :param edge_ip_address: is a required Launchpad header. It denotes the originating IP Address of the Edge User + :param edge_user: is an optional Launchpad header. It denotes the originating UserAgent of the Edge User requesting data. + """ + self.headers: Optional[Dict[str, str]] = None + if edge_id is not None and edge_ip_address is not None: + self.edge_headers( + edge_id=edge_id, edge_ip_address=edge_ip_address, edge_user=edge_user + ) + + def edge_headers( + self, + edge_id: str, + edge_ip_address: str, + edge_user: Optional[str] = None, + ) -> "RequestOptionBuilder": + """ + require_edge_headers adds required headers to the headers' dictionary + :param edge_id: is a required Launchpad header. It identifies the Edge User requesting data + :param edge_ip_address: is a required Launchpad header. It denotes the originating IP Address of the Edge User + requesting data + :param edge_user: user_agent: is an optional Launchpad header. It denotes the originating UserAgent of the Edge + User requesting data + :return ResponseOptionBuilder + """ + edge_headers: Dict[str, str] = { + X_MASSIVE_EDGE_ID: edge_id, + X_MASSIVE_EDGE_IP_ADDRESS: edge_ip_address, + } + + if edge_user is not None: + edge_headers[X_MASSIVE_EDGE_USER_AGENT] = edge_user + + self._add_to_edge_headers(**edge_headers) + + return self + + def update_edge_header( + self, + edge_id: Optional[str] = None, + edge_ip_address: Optional[str] = None, + edge_user: Optional[str] = None, + ) -> "RequestOptionBuilder": + """ + used to change individual edge elements of underlying headers' dictionary. + :param edge_id: is a required Launchpad header. It identifies the Edge User requesting data + :param edge_ip_address: is a required Launchpad header. It denotes the originating IP Address of the Edge User + requesting data + :param edge_user: user_agent: is an optional Launchpad header. It denotes the originating UserAgent of the Edge + User requesting data + :return: + """ + if self.headers is None: + raise RequestOptionError( + "must set required fields prior to using update function." + ) + edge_headers: Dict[str, str] = {} + + if edge_id is not None: + edge_headers[X_MASSIVE_EDGE_ID] = edge_id + + if edge_ip_address is not None: + edge_headers[X_MASSIVE_EDGE_IP_ADDRESS] = edge_ip_address + + if edge_user is not None: + edge_headers[X_MASSIVE_EDGE_USER_AGENT] = edge_user + + self._add_to_edge_headers(**edge_headers) + + return self + + def _add_to_edge_headers(self, **headers): + if self.headers is None: + self.headers = {} + + for k, v in headers.items(): + self.headers[k] = v + + +class RequestOptionError(Exception): + """ + Missing required option. + """ diff --git a/massive/rest/models/snapshot.py b/massive/rest/models/snapshot.py new file mode 100644 index 00000000..3d38abe2 --- /dev/null +++ b/massive/rest/models/snapshot.py @@ -0,0 +1,455 @@ +from typing import Optional, List, Dict +from .aggs import Agg +from .quotes import LastQuote +from .trades import LastTrade +from ...modelclass import modelclass + + +@modelclass +class MinuteSnapshot: + "Most recent minute bar." + accumulated_volume: Optional[float] = None + open: Optional[float] = None + high: Optional[float] = None + low: Optional[float] = None + close: Optional[float] = None + volume: Optional[float] = None + vwap: Optional[float] = None + otc: Optional[bool] = None + timestamp: Optional[int] = None + transactions: Optional[int] = None + + @staticmethod + def from_dict(d): + return MinuteSnapshot( + d.get("av", None), + d.get("o", None), + d.get("h", None), + d.get("l", None), + d.get("c", None), + d.get("v", None), + d.get("vw", None), + d.get("otc", None), + d.get("t", None), + d.get("n", None), + ) + + +@modelclass +class IndicesSession: + "Contains data for the most recent daily bar in an options contract." + change: Optional[float] = None + change_percent: Optional[float] = None + close: Optional[float] = None + high: Optional[float] = None + low: Optional[float] = None + open: Optional[float] = None + previous_close: Optional[float] = None + + @staticmethod + def from_dict(d): + return IndicesSession(**d) + + +@modelclass +class IndicesSnapshot: + value: Optional[float] = None + name: Optional[str] = None + type: Optional[str] = None + ticker: Optional[str] = None + market_status: Optional[str] = None + session: Optional[IndicesSession] = None + error: Optional[str] = None + message: Optional[str] = None + + @staticmethod + def from_dict(d): + return IndicesSnapshot( + value=d.get("value", None), + name=d.get("name", None), + 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"]) + ), + error=d.get("error", None), + message=d.get("message", None), + ) + + +@modelclass +class TickerSnapshot: + "Contains the most up-to-date market data for all traded ticker symbols." + day: Optional[Agg] = None + last_quote: Optional[LastQuote] = None + last_trade: Optional[LastTrade] = None + min: Optional[MinuteSnapshot] = None + prev_day: Optional[Agg] = None + ticker: Optional[str] = None + todays_change: Optional[float] = None + todays_change_percent: Optional[float] = None + updated: Optional[int] = None + fair_market_value: Optional[float] = None + + @staticmethod + 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"]) + ), + 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), + todays_change=d.get("todaysChange", None), + todays_change_percent=d.get("todaysChangePerc", None), + updated=d.get("updated", None), + fair_market_value=d.get("fmv", None), + ) + + +@modelclass +class DayOptionContractSnapshot: + "Contains data for the most recent daily bar in an options contract." + change: Optional[float] = None + change_percent: Optional[float] = None + close: Optional[float] = None + high: Optional[float] = None + last_updated: Optional[int] = None + low: Optional[float] = None + open: Optional[float] = None + previous_close: Optional[float] = None + volume: Optional[float] = None + vwap: Optional[float] = None + + @staticmethod + def from_dict(d): + return DayOptionContractSnapshot(**d) + + +@modelclass +class OptionDetails: + "Contains details for an options contract." + contract_type: Optional[str] = None + exercise_style: Optional[str] = None + expiration_date: Optional[str] = None + shares_per_contract: Optional[float] = None + strike_price: Optional[float] = None + ticker: Optional[str] = None + + @staticmethod + def from_dict(d): + return OptionDetails(**d) + + +@modelclass +class LastQuoteOptionContractSnapshot: + "Contains data for the most recent quote in an options contract." + ask: Optional[float] = None + ask_size: Optional[float] = None + bid: Optional[float] = None + bid_size: Optional[float] = None + last_updated: Optional[int] = None + midpoint: Optional[float] = None + timeframe: Optional[str] = None + + @staticmethod + def from_dict(d): + return LastQuoteOptionContractSnapshot(**d) + + +@modelclass +class LastTradeOptionContractSnapshot: + "Contains data for the most recent trade for an options contract." + price: Optional[float] = None + sip_timestamp: Optional[int] = None + size: Optional[int] = None + conditions: Optional[List[int]] = None + exchange: Optional[int] = None + timeframe: Optional[str] = None + + @staticmethod + def from_dict(d): + return LastTradeOptionContractSnapshot(**d) + + +@modelclass +class Greeks: + "Contains data for the greeks in an options contract." + delta: Optional[float] = None + gamma: Optional[float] = None + theta: Optional[float] = None + vega: Optional[float] = None + + @staticmethod + def from_dict(d): + return Greeks(**d) + + +@modelclass +class UnderlyingAsset: + "Contains data for the underlying stock in an options contract." + change_to_break_even: Optional[float] = None + last_updated: Optional[int] = None + price: Optional[float] = None + value: Optional[float] = None + ticker: Optional[str] = None + timeframe: Optional[str] = None + + @staticmethod + def from_dict(d): + return UnderlyingAsset(**d) + + +@modelclass +class OptionContractSnapshot: + "Contains data for the snapshot of an option contract of a stock equity." + break_even_price: Optional[float] = None + day: Optional[DayOptionContractSnapshot] = None + details: Optional[OptionDetails] = None + greeks: Optional[Greeks] = None + implied_volatility: Optional[float] = None + last_quote: Optional[LastQuoteOptionContractSnapshot] = None + last_trade: Optional[LastTradeOptionContractSnapshot] = None + open_interest: Optional[float] = None + underlying_asset: Optional[UnderlyingAsset] = None + fair_market_value: Optional[float] = None + + @staticmethod + 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"]) + ), + 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"]) + ), + open_interest=d.get("open_interest", None), + underlying_asset=( + None + if "underlying_asset" not in d + else UnderlyingAsset.from_dict(d["underlying_asset"]) + ), + fair_market_value=d.get("fmv", None), + ) + + +@modelclass +class OrderBookQuote: + "Contains data for a book bid or ask." + price: Optional[float] = None + exchange_shares: Optional[Dict[str, float]] = None + + @staticmethod + def from_dict(d): + return OrderBookQuote( + d.get("p", None), + d.get("x", None), + ) + + +@modelclass +class SnapshotTickerFullBook: + "Contains the current level 2 book of a single ticker. This is the combined book from all of the exchanges." + ticker: Optional[str] = None + bids: Optional[List[OrderBookQuote]] = None + asks: Optional[List[OrderBookQuote]] = None + bid_count: Optional[float] = None + ask_count: Optional[float] = None + spread: Optional[float] = None + updated: Optional[int] = None + + @staticmethod + 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"]] + ), + bid_count=d.get("bidCount", None), + ask_count=d.get("askCount", None), + spread=d.get("spread", None), + updated=d.get("updated", None), + ) + + +@modelclass +class UniversalSnapshotSession: + """Contains data about the most recent trading session for an asset.""" + + price: Optional[float] = None + change: Optional[float] = None + 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 + close: Optional[float] = None + high: Optional[float] = None + low: Optional[float] = None + previous_close: Optional[float] = None + volume: Optional[float] = None + + @staticmethod + def from_dict(d): + return UniversalSnapshotSession(**d) + + +@modelclass +class UniversalSnapshotLastQuote: + """Contains the most recent quote for an asset.""" + + ask: Optional[float] = None + ask_size: Optional[float] = None + bid: Optional[float] = None + bid_size: Optional[float] = None + midpoint: Optional[float] = None + exchange: Optional[int] = None + timeframe: Optional[str] = None + last_updated: Optional[int] = None + + @staticmethod + def from_dict(d): + return UniversalSnapshotLastQuote(**d) + + +@modelclass +class UniversalSnapshotLastTrade: + """Contains the most recent trade for an asset.""" + + id: Optional[int] = None + price: Optional[float] = None + size: Optional[int] = None + exchange: Optional[int] = None + conditions: Optional[List[int]] = None + timeframe: Optional[str] = None + last_updated: Optional[int] = None + participant_timestamp: Optional[int] = None + sip_timestamp: Optional[int] = None + + @staticmethod + def from_dict(d): + return UniversalSnapshotLastTrade(**d) + + +@modelclass +class UniversalSnapshotUnderlyingAsset: + """Contains data for the underlying stock in an options contract.""" + + ticker: Optional[str] = None + price: Optional[float] = None + value: Optional[float] = None + change_to_break_even: Optional[float] = None + timeframe: Optional[str] = None + last_updated: Optional[int] = None + + @staticmethod + def from_dict(d): + return UniversalSnapshotUnderlyingAsset(**d) + + +@modelclass +class UniversalSnapshotDetails: + """Contains details for an options contract.""" + + contract_type: Optional[str] = None + exercise_style: Optional[str] = None + expiration_date: Optional[str] = None + shares_per_contract: Optional[float] = None + strike_price: Optional[float] = None + + @staticmethod + def from_dict(d): + return UniversalSnapshotDetails(**d) + + +@modelclass +class UniversalSnapshot: + """Contains snapshot data for an asset.""" + + ticker: Optional[str] = None + type: Optional[str] = None + session: Optional[UniversalSnapshotSession] = None + last_quote: Optional[UniversalSnapshotLastQuote] = None + last_trade: Optional[UniversalSnapshotLastTrade] = None + greeks: Optional[Greeks] = None + underlying_asset: Optional[UniversalSnapshotUnderlyingAsset] = None + details: Optional[UniversalSnapshotDetails] = None + break_even_price: Optional[float] = None + implied_volatility: Optional[float] = None + open_interest: Optional[float] = None + market_status: Optional[str] = None + name: Optional[str] = None + fair_market_value: Optional[float] = None + error: Optional[str] = None + message: Optional[str] = None + + @staticmethod + 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"]) + ), + 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"]) + ), + break_even_price=d.get("break_even_price", None), + implied_volatility=d.get("implied_volatility", None), + open_interest=d.get("open_interest", None), + market_status=d.get("market_status", None), + name=d.get("name", None), + fair_market_value=d.get("fmv", None), + error=d.get("error", None), + message=d.get("message", None), + ) diff --git a/massive/rest/models/splits.py b/massive/rest/models/splits.py new file mode 100644 index 00000000..79482928 --- /dev/null +++ b/massive/rest/models/splits.py @@ -0,0 +1,39 @@ +from typing import Optional +from ...modelclass import modelclass + + +@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 + ticker: Optional[str] = None + + @staticmethod + def from_dict(d): + return Split(**d) + + +@modelclass +class StockSplit: + adjustment_type: Optional[str] = None + execution_date: Optional[str] = None + historical_adjustment_factor: Optional[float] = None + id: Optional[str] = None + split_from: Optional[float] = None + split_to: Optional[float] = None + ticker: Optional[str] = None + + @staticmethod + def from_dict(d): + return StockSplit( + adjustment_type=d.get("adjustment_type"), + execution_date=d.get("execution_date"), + historical_adjustment_factor=d.get("historical_adjustment_factor"), + id=d.get("id"), + split_from=d.get("split_from"), + split_to=d.get("split_to"), + ticker=d.get("ticker"), + ) diff --git a/massive/rest/models/summaries.py b/massive/rest/models/summaries.py new file mode 100644 index 00000000..db49f907 --- /dev/null +++ b/massive/rest/models/summaries.py @@ -0,0 +1,71 @@ +from typing import Optional +from ...modelclass import modelclass +from .tickers import Branding + + +@modelclass +class Session: + "Contains Session data for the summaries endpoint." + change: Optional[float] = None + change_percent: Optional[float] = None + early_trading_change: Optional[float] = None + early_trading_change_percent: Optional[float] = None + late_trading_change: Optional[float] = None + late_trading_change_percent: Optional[float] = None + close: Optional[float] = None + high: Optional[float] = None + low: Optional[float] = None + open: Optional[float] = None + previous_close: Optional[float] = None + volume: Optional[float] = None + + @staticmethod + def from_dict(d): + return Session(**d) + + +@modelclass +class Options: + "Contains options data for the summaries endpoint" + contract_type: Optional[str] = None + exercise_style: Optional[str] = None + expiration_date: Optional[str] = None + shares_per_contract: Optional[float] = None + strike_price: Optional[float] = None + underlying_ticker: Optional[float] = None + + @staticmethod + def from_dict(d): + return Options(**d) + + +@modelclass +class SummaryResult: + "Contains summary result data for a list of tickers" + price: Optional[float] = None + name: Optional[str] = None + ticker: Optional[str] = None + branding: Optional[Branding] = None + market_status: Optional[str] = None + last_updated: Optional[int] = None + type: Optional[str] = None + session: Optional[Session] = None + options: Optional[Options] = None + error: Optional[str] = None + message: Optional[str] = None + + @staticmethod + def from_dict(d): + return SummaryResult( + price=d.get("price", None), + name=d.get("name", None), + ticker=d.get("ticker", None), + branding=None if "branding" not in d else Branding.from_dict(d["branding"]), + market_status=d.get("market_status", None), + last_updated=d.get("last_updated", None), + type=d.get("type", None), + session=None if "session" not in d else Session.from_dict(d["session"]), + options=None if "options" not in d else Options.from_dict(d["options"]), + error=d.get("error", None), + message=d.get("message", None), + ) diff --git a/massive/rest/models/tickers.py b/massive/rest/models/tickers.py new file mode 100644 index 00000000..e065826f --- /dev/null +++ b/massive/rest/models/tickers.py @@ -0,0 +1,377 @@ +from typing import Optional, List +from ...modelclass import modelclass + + +@modelclass +class CompanyAddress: + "Contains address data for a ticker detail." + address1: Optional[str] = None + address2: Optional[str] = None + city: Optional[str] = None + state: Optional[str] = None + country: Optional[str] = None + postal_code: Optional[str] = None + + @staticmethod + def from_dict(d): + return CompanyAddress(**d) + + +@modelclass +class Branding: + "Contains branding data for a ticker detail." + icon_url: Optional[str] = None + logo_url: Optional[str] = None + accent_color: Optional[str] = None + light_color: Optional[str] = None + dark_color: Optional[str] = None + + @staticmethod + 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." + favicon_url: Optional[str] = None + homepage_url: Optional[str] = None + logo_url: Optional[str] = None + name: Optional[str] = None + + @staticmethod + def from_dict(d): + return Publisher(**d) + + +@modelclass +class Ticker: + "Ticker contains data for a specified ticker symbol." + active: Optional[bool] = None + cik: Optional[str] = None + composite_figi: Optional[str] = None + currency_name: Optional[str] = None + currency_symbol: Optional[str] = None + base_currency_symbol: Optional[str] = None + base_currency_name: Optional[str] = None + delisted_utc: Optional[str] = None + last_updated_utc: Optional[str] = None + locale: Optional[str] = None + market: Optional[str] = None + name: Optional[str] = None + primary_exchange: Optional[str] = None + share_class_figi: Optional[str] = None + ticker: Optional[str] = None + type: Optional[str] = None + source_feed: Optional[str] = None + + @staticmethod + def from_dict(d): + return Ticker(**d) + + +@modelclass +class TickerDetails: + "TickerDetails contains data for a specified ticker symbol." + active: Optional[bool] = None + address: Optional[CompanyAddress] = None + branding: Optional[Branding] = None + cik: Optional[str] = None + composite_figi: Optional[str] = None + currency_name: Optional[str] = None + currency_symbol: Optional[str] = None + base_currency_name: Optional[str] = None + base_currency_symbol: Optional[str] = None + delisted_utc: Optional[str] = None + description: Optional[str] = None + ticker_root: Optional[str] = None + ticker_suffix: Optional[str] = None + homepage_url: Optional[str] = None + list_date: Optional[str] = None + locale: Optional[str] = None + market: Optional[str] = None + market_cap: Optional[float] = None + name: Optional[str] = None + phone_number: Optional[str] = None + primary_exchange: Optional[str] = None + share_class_figi: Optional[str] = None + share_class_shares_outstanding: Optional[int] = None + sic_code: Optional[str] = None + sic_description: Optional[str] = None + ticker: Optional[str] = None + total_employees: Optional[int] = None + type: Optional[str] = None + weighted_shares_outstanding: Optional[int] = None + + @staticmethod + def from_dict(d): + return TickerDetails( + active=d.get("active", None), + 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), + currency_name=d.get("currency_name", None), + currency_symbol=d.get("currency_symbol", None), + base_currency_name=d.get("base_currency_name", None), + base_currency_symbol=d.get("base_currency_symbol", None), + delisted_utc=d.get("delisted_utc", None), + description=d.get("description", None), + ticker_root=d.get("ticker_root", None), + ticker_suffix=d.get("ticker_suffix", None), + homepage_url=d.get("homepage_url", None), + list_date=d.get("list_date", None), + locale=d.get("locale", None), + market=d.get("market", None), + market_cap=d.get("market_cap", None), + name=d.get("name", None), + phone_number=d.get("phone_number", None), + primary_exchange=d.get("primary_exchange", None), + share_class_figi=d.get("share_class_figi", None), + share_class_shares_outstanding=d.get( + "share_class_shares_outstanding", None + ), + sic_code=d.get("sic_code", None), + sic_description=d.get("sic_description", None), + ticker=d.get("ticker", None), + total_employees=d.get("total_employees", None), + type=d.get("type", None), + weighted_shares_outstanding=d.get("weighted_shares_outstanding", None), + ) + + +@modelclass +class TickerNews: + "TickerDetails contains data for news articles relating to a stock ticker symbol." + amp_url: Optional[str] = None + article_url: Optional[str] = None + author: Optional[str] = None + 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 + tickers: Optional[List[str]] = None + title: Optional[str] = None + + @staticmethod + def from_dict(d): + return TickerNews( + amp_url=d.get("amp_url", None), + article_url=d.get("article_url", None), + author=d.get("author", None), + 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"]) + ), + tickers=d.get("tickers", None), + title=d.get("title", None), + ) + + +@modelclass +class TickerTypes: + "TickerTypes contains data for ticker types." + asset_class: Optional[str] = None + code: Optional[str] = None + description: Optional[str] = None + locale: Optional[str] = None + + @staticmethod + 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 + + @staticmethod + def from_dict(d): + return TickerChange(**d) + + +@modelclass +class TickerChangeEvent: + type: str + date: str + ticker_change: TickerChange + + @staticmethod + def from_dict(d): + return TickerChangeEvent(**d) + + +@modelclass +class TickerChangeResults: + name: str + composite_figi: str + cik: str + events: Optional[List[TickerChangeEvent]] = None + + @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"), + ) diff --git a/massive/rest/models/tmx.py b/massive/rest/models/tmx.py new file mode 100644 index 00000000..a42bd6b0 --- /dev/null +++ b/massive/rest/models/tmx.py @@ -0,0 +1,33 @@ +from typing import Optional +from ...modelclass import modelclass + + +@modelclass +class TmxCorporateEvent: + company_name: Optional[str] = None + date: Optional[str] = None + isin: Optional[str] = None + name: Optional[str] = None + status: Optional[str] = None + ticker: Optional[str] = None + tmx_company_id: Optional[int] = None + tmx_record_id: Optional[str] = None + trading_venue: Optional[str] = None + type: Optional[str] = None + url: Optional[str] = None + + @staticmethod + def from_dict(d): + return TmxCorporateEvent( + company_name=d.get("company_name"), + date=d.get("date"), + isin=d.get("isin"), + name=d.get("name"), + status=d.get("status"), + ticker=d.get("ticker"), + tmx_company_id=d.get("tmx_company_id"), + tmx_record_id=d.get("tmx_record_id"), + trading_venue=d.get("trading_venue"), + type=d.get("type"), + url=d.get("url"), + ) diff --git a/polygon/rest/models/trades.py b/massive/rest/models/trades.py similarity index 100% rename from polygon/rest/models/trades.py rename to massive/rest/models/trades.py diff --git a/polygon/rest/quotes.py b/massive/rest/quotes.py similarity index 87% rename from polygon/rest/quotes.py rename to massive/rest/quotes.py index ba7ca684..353c21e1 100644 --- a/polygon/rest/quotes.py +++ b/massive/rest/quotes.py @@ -12,7 +12,10 @@ from urllib3 import HTTPResponse from datetime import datetime, date -# https://polygon.io/docs/stocks +from .models.request import RequestOptionBuilder + + +# https://massive.com/docs/stocks class QuotesClient(BaseClient): def list_quotes( self, @@ -27,6 +30,7 @@ def list_quotes( order: Optional[Union[str, Order]] = None, params: Optional[Dict[str, Any]] = None, raw: bool = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[Iterator[Quote], HTTPResponse]: """ Get quotes for a ticker symbol in a given time range. @@ -51,10 +55,15 @@ def list_quotes( params=self._get_params(self.list_quotes, locals()), raw=raw, deserializer=Quote.from_dict, + options=options, ) def get_last_quote( - self, ticker: str, params: Optional[Dict[str, Any]] = None, raw: bool = False + self, + ticker: str, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[LastQuote, HTTPResponse]: """ Get the most recent NBBO (Quote) tick for a given stock. @@ -72,6 +81,7 @@ def get_last_quote( result_key="results", deserializer=LastQuote.from_dict, raw=raw, + options=options, ) def get_last_forex_quote( @@ -80,6 +90,7 @@ def get_last_forex_quote( to: str, params: Optional[Dict[str, Any]] = None, raw: bool = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[LastForexQuote, HTTPResponse]: """ Get the last quote tick for a forex currency pair. @@ -97,16 +108,18 @@ def get_last_forex_quote( params=params, deserializer=LastForexQuote.from_dict, raw=raw, + options=options, ) def get_real_time_currency_conversion( self, from_: str, to: str, - amount: float, + amount: Optional[float] = None, precision: Union[int, Precision] = 2, params: Optional[Dict[str, Any]] = None, raw: bool = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[RealTimeCurrencyConversion, HTTPResponse]: """ Get currency conversions using the latest market conversion rates. @@ -120,13 +133,11 @@ def get_real_time_currency_conversion( :return: Real-Time Currency Conversion """ url = f"/v1/conversion/{from_}/{to}" - if params is None: - params = {} - params["amount"] = amount - params["precision"] = precision + return self._get( path=url, - params=params, + params=self._get_params(self.get_real_time_currency_conversion, locals()), deserializer=RealTimeCurrencyConversion.from_dict, raw=raw, + options=options, ) diff --git a/polygon/rest/reference.py b/massive/rest/reference.py similarity index 55% rename from polygon/rest/reference.py rename to massive/rest/reference.py index e6f5c4f3..446d9f13 100644 --- a/polygon/rest/reference.py +++ b/massive/rest/reference.py @@ -4,15 +4,19 @@ MarketHoliday, MarketStatus, Ticker, + TickerChangeResults, TickerDetails, TickerNews, + RelatedCompany, TickerTypes, Sort, Order, AssetClass, Locale, Split, + StockSplit, Dividend, + StockDividend, DividendType, Frequency, Condition, @@ -20,10 +24,16 @@ SIP, Exchange, OptionsContract, + ShortInterest, + ShortVolume, + RiskFactor, + RiskFactorTaxonomy, ) from urllib3 import HTTPResponse from datetime import date +from .models.request import RequestOptionBuilder + class MarketsClient(BaseClient): def get_market_holidays( @@ -84,9 +94,10 @@ def list_tickers( order: Optional[Union[str, Order]] = "asc", params: Optional[Dict[str, Any]] = None, raw: bool = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[Iterator[Ticker], HTTPResponse]: """ - Query all ticker symbols which are supported by Polygon.io. This API currently includes Stocks/Equities, Crypto, and Forex. + Query all ticker symbols which are supported by Massive.com. This API currently includes Stocks/Equities, Indices, Forex, and Crypto. :param ticker: Specify a ticker symbol. Defaults to empty string which queries all tickers. :param ticker_lt: Ticker less than. @@ -95,7 +106,7 @@ def list_tickers( :param ticker_gte: Ticker greater than or equal to. :param type: Specify the type of the tickers. Find the types that we support via our Ticker Types API. Defaults to empty string which queries all types. :param market: Filter by market type. By default all markets are included. - :param exchange: Specify the primary exchange of the asset in the ISO code format. Find more information about the ISO codes at the ISO org website. Defaults to empty string which queries all exchanges. + :param exchange: Specify the assets primary exchange Market Identifier Code (MIC) according to ISO 10383. Defaults to empty string which queries all exchanges. :param cusip: Specify the CUSIP code of the asset you want to search for. Find more information about CUSIP codes at their website. Defaults to empty string which queries all CUSIPs. :param cik: Specify the CIK of the asset you want to search for. Find more information about CIK codes at their website. Defaults to empty string which queries all CIKs. :param date: Specify a point in time to retrieve tickers available on that date. Defaults to the most recent available date. @@ -115,6 +126,7 @@ def list_tickers( params=self._get_params(self.list_tickers, locals()), raw=raw, deserializer=Ticker.from_dict, + options=options, ) def get_ticker_details( @@ -123,9 +135,10 @@ def get_ticker_details( date: Optional[str] = None, params: Optional[Dict[str, Any]] = None, raw: bool = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[TickerDetails, HTTPResponse]: """ - Get a single ticker supported by Polygon.io. This response will have detailed information about the ticker and the company behind it. + Get a single ticker supported by Massive.com. This response will have detailed information about the ticker and the company behind it. :param ticker: The ticker symbol of the asset. :param date: Specify a point in time to get information about the ticker available on that date. When retrieving information from SEC filings, we compare this date with the period of report date on the SEC filing. @@ -137,10 +150,37 @@ def get_ticker_details( return self._get( path=url, - params=params, + params=self._get_params(self.get_ticker_details, locals()), deserializer=TickerDetails.from_dict, raw=raw, result_key="results", + options=options, + ) + + def get_ticker_events( + self, + ticker: str, + types: Optional[str] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[TickerChangeResults, HTTPResponse]: + """ + Get event history of ticker given particular point in time. + :param ticker: The ticker symbol of the asset. + :param params: Additional query parameters + :param raw: Return raw object instead of results object. + :return: Ticker Event VX + """ + url = f"/vX/reference/tickers/{ticker}/events" + + return self._get( + path=url, + params=self._get_params(self.get_ticker_events, locals()), + deserializer=TickerChangeResults.from_dict, + result_key="results", + raw=raw, + options=options, ) def list_ticker_news( @@ -160,6 +200,7 @@ def list_ticker_news( order: Optional[Union[str, Order]] = None, params: Optional[Dict[str, Any]] = None, raw: bool = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[Iterator[TickerNews], HTTPResponse]: """ Get the most recent news articles relating to a stock ticker symbol, including a summary of the article and a link to the original source. @@ -180,6 +221,7 @@ def list_ticker_news( params=self._get_params(self.list_ticker_news, locals()), raw=raw, deserializer=TickerNews.from_dict, + options=options, ) def get_ticker_types( @@ -188,9 +230,10 @@ def get_ticker_types( locale: Optional[Union[str, Locale]] = None, params: Optional[Dict[str, Any]] = None, raw: bool = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[List[TickerTypes], HTTPResponse]: """ - List all ticker types that Polygon.io has. + List all ticker types that Massive.com has. :param asset_class: Filter by asset class. :param locale: Filter by locale. @@ -202,10 +245,37 @@ def get_ticker_types( return self._get( path=url, - params=params, + params=self._get_params(self.get_ticker_types, locals()), deserializer=TickerTypes.from_dict, raw=raw, result_key="results", + 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, ) @@ -228,6 +298,7 @@ def list_splits( order: Optional[Union[str, Order]] = None, params: Optional[Dict[str, Any]] = None, raw: bool = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[Iterator[Split], HTTPResponse]: """ Get a list of historical stock splits, including the ticker symbol, the execution date, and the factors of the split ratio. @@ -257,6 +328,7 @@ def list_splits( params=self._get_params(self.list_splits, locals()), raw=raw, deserializer=Split.from_dict, + options=options, ) @@ -300,6 +372,7 @@ def list_dividends( order: Optional[Union[str, Order]] = None, params: Optional[Dict[str, Any]] = None, raw: bool = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[Iterator[Dividend], HTTPResponse]: """ Get a list of historical cash dividends, including the ticker symbol, declaration date, ex-dividend date, record date, pay date, frequency, and amount. @@ -346,6 +419,7 @@ def list_dividends( params=self._get_params(self.list_dividends, locals()), raw=raw, deserializer=Dividend.from_dict, + options=options, ) @@ -361,9 +435,10 @@ def list_conditions( order: Optional[Union[str, Order]] = None, params: Optional[Dict[str, Any]] = None, raw: bool = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[Iterator[Condition], HTTPResponse]: """ - List all conditions that Polygon.io uses. + List all conditions that Massive.com uses. :param asset_class: Filter for conditions within a given asset class. :param data_type: Data types that this condition applies to. @@ -383,6 +458,7 @@ def list_conditions( params=self._get_params(self.list_conditions, locals()), raw=raw, deserializer=Condition.from_dict, + options=options, ) @@ -393,9 +469,10 @@ def get_exchanges( locale: Optional[Union[str, Locale]] = None, params: Optional[Dict[str, Any]] = None, raw: bool = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[List[Exchange], HTTPResponse]: """ - List all exchanges that Polygon.io knows about. + List all exchanges that Massive.com knows about. :param asset_class: Filter by asset class. :param locale: Filter by locale. @@ -407,10 +484,11 @@ def get_exchanges( return self._get( path=url, - params=params, + params=self._get_params(self.get_exchanges, locals()), deserializer=Exchange.from_dict, raw=raw, result_key="results", + options=options, ) @@ -418,9 +496,10 @@ class ContractsClient(BaseClient): def get_options_contract( self, ticker: str, - as_of: Union[str, date] = None, + as_of: Optional[Union[str, date]] = None, params: Optional[Dict[str, Any]] = None, raw: bool = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[OptionsContract, HTTPResponse]: """ Get the most recent trade for a ticker. @@ -439,6 +518,7 @@ def get_options_contract( result_key="results", deserializer=OptionsContract.from_dict, raw=raw, + options=options, ) def list_options_contracts( @@ -466,6 +546,7 @@ def list_options_contracts( order: Optional[Union[str, Order]] = None, params: Optional[Dict[str, Any]] = None, raw: bool = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[Iterator[OptionsContract], HTTPResponse]: """ List historical options contracts. @@ -490,4 +571,285 @@ def list_options_contracts( params=self._get_params(self.list_options_contracts, locals()), raw=raw, deserializer=OptionsContract.from_dict, + 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/v1/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/v1/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, + ) + + # Add these functions to financials.py in the FinancialsClient class + + def list_stocks_splits( + self, + ticker: Optional[str] = None, + ticker_any_of: Optional[str] = None, + ticker_gt: Optional[str] = None, + ticker_gte: Optional[str] = None, + ticker_lt: Optional[str] = None, + ticker_lte: Optional[str] = None, + execution_date: Optional[Union[str, date]] = None, + execution_date_gt: Optional[Union[str, date]] = None, + execution_date_gte: Optional[Union[str, date]] = None, + execution_date_lt: Optional[Union[str, date]] = None, + execution_date_lte: Optional[Union[str, date]] = None, + adjustment_type: Optional[str] = None, + adjustment_type_any_of: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[StockSplit], HTTPResponse]: + """ + Endpoint: GET /stocks/v1/splits + """ + url = "/stocks/v1/splits" + return self._paginate( + path=url, + params=self._get_params(self.list_stocks_splits, locals()), + raw=raw, + deserializer=StockSplit.from_dict, + options=options, + ) + + def list_stocks_dividends( + self, + ticker: Optional[str] = None, + ticker_any_of: Optional[str] = None, + ticker_gt: Optional[str] = None, + ticker_gte: Optional[str] = None, + ticker_lt: Optional[str] = None, + ticker_lte: Optional[str] = None, + ex_dividend_date: Optional[Union[str, date]] = None, + ex_dividend_date_gt: Optional[Union[str, date]] = None, + ex_dividend_date_gte: Optional[Union[str, date]] = None, + ex_dividend_date_lt: Optional[Union[str, date]] = None, + ex_dividend_date_lte: Optional[Union[str, date]] = None, + frequency: Optional[int] = None, + frequency_gt: Optional[int] = None, + frequency_gte: Optional[int] = None, + frequency_lt: Optional[int] = None, + frequency_lte: Optional[int] = None, + distribution_type: Optional[str] = None, + distribution_type_any_of: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[StockDividend], HTTPResponse]: + """ + Endpoint: GET /stocks/v1/dividends + """ + url = "/stocks/v1/dividends" + return self._paginate( + path=url, + params=self._get_params(self.list_stocks_dividends, locals()), + raw=raw, + deserializer=StockDividend.from_dict, + options=options, + ) + + def list_stocks_filings_risk_factors( + self, + filing_date: Optional[Union[str, date]] = None, + filing_date_any_of: Optional[str] = None, + filing_date_gt: Optional[Union[str, date]] = None, + filing_date_gte: Optional[Union[str, date]] = None, + filing_date_lt: Optional[Union[str, date]] = None, + filing_date_lte: Optional[Union[str, date]] = None, + ticker: Optional[str] = None, + ticker_any_of: Optional[str] = None, + ticker_gt: Optional[str] = None, + ticker_gte: Optional[str] = None, + ticker_lt: Optional[str] = None, + ticker_lte: Optional[str] = None, + cik: Optional[str] = None, + cik_any_of: Optional[str] = None, + cik_gt: Optional[str] = None, + cik_gte: Optional[str] = None, + cik_lt: Optional[str] = None, + cik_lte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[RiskFactor], HTTPResponse]: + """ + Endpoint: GET /stocks/filings/vX/risk-factors + """ + url = "/stocks/filings/vX/risk-factors" + return self._paginate( + path=url, + params=self._get_params(self.list_stocks_filings_risk_factors, locals()), + raw=raw, + deserializer=RiskFactor.from_dict, + options=options, + ) + + def list_stocks_taxonomies_risk_factors( + self, + taxonomy: Optional[float] = None, + taxonomy_gt: Optional[float] = None, + taxonomy_gte: Optional[float] = None, + taxonomy_lt: Optional[float] = None, + taxonomy_lte: Optional[float] = None, + primary_category: Optional[str] = None, + primary_category_any_of: Optional[str] = None, + primary_category_gt: Optional[str] = None, + primary_category_gte: Optional[str] = None, + primary_category_lt: Optional[str] = None, + primary_category_lte: Optional[str] = None, + secondary_category: Optional[str] = None, + secondary_category_any_of: Optional[str] = None, + secondary_category_gt: Optional[str] = None, + secondary_category_gte: Optional[str] = None, + secondary_category_lt: Optional[str] = None, + secondary_category_lte: Optional[str] = None, + tertiary_category: Optional[str] = None, + tertiary_category_any_of: Optional[str] = None, + tertiary_category_gt: Optional[str] = None, + tertiary_category_gte: Optional[str] = None, + tertiary_category_lt: Optional[str] = None, + tertiary_category_lte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[RiskFactorTaxonomy], HTTPResponse]: + """ + Endpoint: GET /stocks/taxonomies/vX/risk-factors + """ + url = "/stocks/taxonomies/vX/risk-factors" + return self._paginate( + path=url, + params=self._get_params(self.list_stocks_taxonomies_risk_factors, locals()), + raw=raw, + deserializer=RiskFactorTaxonomy.from_dict, + options=options, ) diff --git a/polygon/rest/snapshot.py b/massive/rest/snapshot.py similarity index 56% rename from polygon/rest/snapshot.py rename to massive/rest/snapshot.py index 7b58ab9a..6953090e 100644 --- a/polygon/rest/snapshot.py +++ b/massive/rest/snapshot.py @@ -1,14 +1,20 @@ from .base import BaseClient -from typing import Optional, Any, Dict, List, Union +from typing import Optional, Any, Dict, List, Union, Iterator from .models import ( TickerSnapshot, Direction, OptionContractSnapshot, SnapshotMarketType, SnapshotTickerFullBook, + UniversalSnapshot, + IndicesSnapshot, + Sort, + Order, ) from urllib3 import HTTPResponse +from .models.request import RequestOptionBuilder + def get_locale(market_type: Union[SnapshotMarketType, str]): if market_type == SnapshotMarketType.STOCKS.value: @@ -18,6 +24,54 @@ def get_locale(market_type: Union[SnapshotMarketType, str]): class SnapshotClient(BaseClient): + def list_universal_snapshots( + self, + type: Optional[Union[str, SnapshotMarketType]] = None, + ticker_any_of: Optional[List[str]] = None, + order: Optional[Union[str, Order]] = None, + limit: Optional[int] = 10, + sort: Optional[Union[str, Sort]] = None, + ticker_lt: Optional[str] = None, + ticker_lte: Optional[str] = None, + ticker_gt: Optional[str] = None, + ticker_gte: Optional[str] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[UniversalSnapshot], HTTPResponse]: + """ + Get snapshots for assets of all types + - https://massive.com/docs/stocks/get_v3_snapshot + - https://massive.com/docs/options/get_v3_snapshot + - https://massive.com/docs/indices/get_v3_snapshot + - https://massive.com/docs/forex/get_v3_snapshot + - https://massive.com/docs/crypto/get_v3_snapshot + + :param type: the type of the asset + :param ticker_any_of: Comma-separated list of tickers, up to a maximum of 250. If no tickers are passed then all + :param order: The order to sort the results on. Default is asc (ascending). + :param limit: Limit the size of the response per-page, default is 10 and max is 250. + :param sort: The field to sort the results on. Default is ticker. If the search query parameter is present, sort is ignored and results are ordered by relevance. + results will be returned in a paginated manner. Warning: The maximum number of characters allowed in a URL + are subject to your technology stack. + :param ticker_lt search for tickers less than + :param ticker_lte search for tickers less than or equal to + :param ticker_gt search for tickers greater than + :param ticker_gte search for tickers greater than or equal to + :param raw: returns the raw HTTP response if true, else the response is deserialized into a structured object + :param options: request options + :return: list of Snapshots + """ + url = f"/v3/snapshot" + return self._paginate( + path=url, + params=self._get_params(self.list_universal_snapshots, locals()), + result_key="results", + deserializer=UniversalSnapshot.from_dict, + raw=raw, + options=options, + ) + def get_snapshot_all( self, market_type: Union[str, SnapshotMarketType], @@ -25,6 +79,7 @@ def get_snapshot_all( params: Optional[Dict[str, Any]] = None, raw: bool = False, include_otc: Optional[bool] = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[List[TickerSnapshot], HTTPResponse]: """ Get the most up-to-date market data for all traded stock symbols. @@ -46,6 +101,7 @@ def get_snapshot_all( deserializer=TickerSnapshot.from_dict, raw=raw, result_key="tickers", + options=options, ) def get_snapshot_direction( @@ -55,6 +111,7 @@ def get_snapshot_direction( params: Optional[Dict[str, Any]] = None, include_otc: Optional[bool] = False, raw: bool = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[List[TickerSnapshot], HTTPResponse]: """ Get the most up-to-date market data for the current top 20 gainers or losers of the day in the stocks/equities markets. @@ -76,6 +133,7 @@ def get_snapshot_direction( result_key="tickers", deserializer=TickerSnapshot.from_dict, raw=raw, + options=options, ) def get_snapshot_ticker( @@ -84,6 +142,7 @@ def get_snapshot_ticker( ticker: str, params: Optional[Dict[str, Any]] = None, raw: bool = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[TickerSnapshot, HTTPResponse]: """ Get the most up-to-date market data for all traded stock symbols. @@ -102,6 +161,7 @@ def get_snapshot_ticker( result_key="ticker", deserializer=TickerSnapshot.from_dict, raw=raw, + options=options, ) def get_snapshot_option( @@ -110,6 +170,7 @@ def get_snapshot_option( option_contract: str, params: Optional[Dict[str, Any]] = None, raw: bool = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[OptionContractSnapshot, HTTPResponse]: """ Get the snapshot of an option contract for a stock equity. @@ -125,6 +186,30 @@ def get_snapshot_option( result_key="results", deserializer=OptionContractSnapshot.from_dict, raw=raw, + options=options, + ) + + def list_snapshot_options_chain( + self, + underlying_asset: str, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[OptionContractSnapshot], HTTPResponse]: + """ + Get the snapshot of all options contracts for an underlying ticker. + + :param underlying_asset: The underlying ticker symbol of the option contract. + :return: List of Snapshots + """ + url = f"/v3/snapshot/options/{underlying_asset}" + return self._paginate( + path=url, + params=self._get_params(self.list_snapshot_options_chain, locals()), + result_key="results", + deserializer=OptionContractSnapshot.from_dict, + raw=raw, + options=options, ) def get_snapshot_crypto_book( @@ -132,6 +217,7 @@ def get_snapshot_crypto_book( ticker: str, params: Optional[Dict[str, Any]] = None, raw: bool = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[SnapshotTickerFullBook, HTTPResponse]: """ Get the current level 2 book of a single ticker. This is the combined book from all of the exchanges. @@ -148,4 +234,23 @@ def get_snapshot_crypto_book( result_key="data", deserializer=SnapshotTickerFullBook.from_dict, raw=raw, + options=options, + ) + + def get_snapshot_indices( + self, + ticker_any_of: Optional[Union[str, List[str]]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[List[IndicesSnapshot], HTTPResponse]: + url = f"/v3/snapshot/indices" + + return self._get( + path=url, + params=self._get_params(self.get_snapshot_indices, locals()), + deserializer=IndicesSnapshot.from_dict, + raw=raw, + result_key="results", + options=options, ) diff --git a/massive/rest/summaries.py b/massive/rest/summaries.py new file mode 100644 index 00000000..6af960eb --- /dev/null +++ b/massive/rest/summaries.py @@ -0,0 +1,35 @@ +from massive.rest.models.summaries import SummaryResult +from .base import BaseClient +from typing import Optional, Any, Dict, List, Union +from urllib3 import HTTPResponse + +from .models.request import RequestOptionBuilder + + +class SummariesClient(BaseClient): + def get_summaries( + self, + ticker_any_of: Optional[List[str]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[List[SummaryResult], HTTPResponse]: + """ + GetSummaries retrieves summaries for the ticker list with the given params. + For more details see https://massive.com/docs/stocks/get_v1_summaries. + + :param ticker_any_of: The ticker symbol + :param params: Any additional query params + :param raw: Return raw object instead of results object + :return: SummaryResults + """ + + url = f"/v1/summaries" + return self._get( + path=url, + params=self._get_params(self.get_summaries, locals()), + result_key="results", + deserializer=SummaryResult.from_dict, + raw=raw, + options=options, + ) diff --git a/massive/rest/tmx.py b/massive/rest/tmx.py new file mode 100644 index 00000000..dd5687cd --- /dev/null +++ b/massive/rest/tmx.py @@ -0,0 +1,85 @@ +from typing import Optional, Any, Dict, List, Union, Iterator +from urllib3 import HTTPResponse +from datetime import datetime, date + +from .base import BaseClient +from .models.tmx import ( + TmxCorporateEvent, +) +from .models.common import Sort +from .models.request import RequestOptionBuilder + + +class TmxClient(BaseClient): + """ + Client for the TMX REST Endpoints + (aligned with the paths from /tmx/v1/...) + """ + + def list_tmx_corporate_events( + self, + date: Optional[Union[str, date]] = None, + date_any_of: Optional[str] = None, + date_gt: Optional[Union[str, date]] = None, + date_gte: Optional[Union[str, date]] = None, + date_lt: Optional[Union[str, date]] = None, + date_lte: Optional[Union[str, date]] = None, + type: Optional[str] = None, + type_any_of: Optional[str] = None, + type_gt: Optional[str] = None, + type_gte: Optional[str] = None, + type_lt: Optional[str] = None, + type_lte: Optional[str] = None, + status: Optional[str] = None, + status_any_of: Optional[str] = None, + status_gt: Optional[str] = None, + status_gte: Optional[str] = None, + status_lt: Optional[str] = None, + status_lte: Optional[str] = None, + ticker: Optional[str] = None, + ticker_any_of: Optional[str] = None, + ticker_gt: Optional[str] = None, + ticker_gte: Optional[str] = None, + ticker_lt: Optional[str] = None, + ticker_lte: Optional[str] = None, + isin: Optional[str] = None, + isin_any_of: Optional[str] = None, + isin_gt: Optional[str] = None, + isin_gte: Optional[str] = None, + isin_lt: Optional[str] = None, + isin_lte: Optional[str] = None, + trading_venue: Optional[str] = None, + trading_venue_any_of: Optional[str] = None, + trading_venue_gt: Optional[str] = None, + trading_venue_gte: Optional[str] = None, + trading_venue_lt: Optional[str] = None, + trading_venue_lte: Optional[str] = None, + tmx_company_id: Optional[int] = None, + tmx_company_id_any_of: Optional[str] = None, + tmx_company_id_gt: Optional[int] = None, + tmx_company_id_gte: Optional[int] = None, + tmx_company_id_lt: Optional[int] = None, + tmx_company_id_lte: Optional[int] = None, + tmx_record_id: Optional[str] = None, + tmx_record_id_any_of: Optional[str] = None, + tmx_record_id_gt: Optional[str] = None, + tmx_record_id_gte: Optional[str] = None, + tmx_record_id_lt: Optional[str] = None, + tmx_record_id_lte: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[Union[str, Sort]] = None, + params: Optional[Dict[str, Any]] = None, + raw: bool = False, + options: Optional[RequestOptionBuilder] = None, + ) -> Union[Iterator[TmxCorporateEvent], HTTPResponse]: + """ + Endpoint: GET /tmx/v1/corporate-events + """ + url = "/tmx/v1/corporate-events" + return self._paginate( + path=url, + params=self._get_params(self.list_tmx_corporate_events, locals()), + raw=raw, + deserializer=TmxCorporateEvent.from_dict, + options=options, + ) diff --git a/polygon/rest/trades.py b/massive/rest/trades.py similarity index 92% rename from polygon/rest/trades.py rename to massive/rest/trades.py index 4b3fb287..3aad1d0e 100644 --- a/polygon/rest/trades.py +++ b/massive/rest/trades.py @@ -4,6 +4,8 @@ from urllib3 import HTTPResponse from datetime import datetime, date +from .models.request import RequestOptionBuilder + class TradesClient(BaseClient): def list_trades( @@ -19,6 +21,7 @@ def list_trades( order: Optional[Union[str, Order]] = None, params: Optional[Dict[str, Any]] = None, raw: bool = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[Iterator[Trade], HTTPResponse]: """ Get trades for a ticker symbol in a given time range. @@ -43,6 +46,7 @@ def list_trades( params=self._get_params(self.list_trades, locals()), raw=raw, deserializer=Trade.from_dict, + options=options, ) def get_last_trade( @@ -50,6 +54,7 @@ def get_last_trade( ticker: str, params: Optional[Dict[str, Any]] = None, raw: bool = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[LastTrade, HTTPResponse]: """ Get the most recent trade for a ticker. @@ -67,6 +72,7 @@ def get_last_trade( result_key="results", deserializer=LastTrade.from_dict, raw=raw, + options=options, ) def get_last_crypto_trade( @@ -75,6 +81,7 @@ def get_last_crypto_trade( to: str, params: Optional[Dict[str, Any]] = None, raw: bool = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[CryptoTrade, HTTPResponse]: """ Get the last trade tick for a cryptocurrency pair. @@ -93,4 +100,5 @@ def get_last_crypto_trade( result_key="last", deserializer=CryptoTrade.from_dict, raw=raw, + options=options, ) diff --git a/polygon/rest/vX.py b/massive/rest/vX.py similarity index 59% rename from polygon/rest/vX.py rename to massive/rest/vX.py index 350b0b83..ebd95a1a 100644 --- a/polygon/rest/vX.py +++ b/massive/rest/vX.py @@ -1,8 +1,15 @@ 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, + Timeframe, + Sort, + Order, +) from urllib3 import HTTPResponse from datetime import datetime, date +from .models.request import RequestOptionBuilder class VXClient(BaseClient): @@ -30,6 +37,7 @@ def list_stock_financials( order: Optional[Union[str, Order]] = None, params: Optional[Dict[str, Any]] = None, raw: bool = False, + options: Optional[RequestOptionBuilder] = None, ) -> Union[Iterator[StockFinancial], HTTPResponse]: """ Get historical financial data for a stock ticker. @@ -51,7 +59,7 @@ def list_stock_financials( :param period_of_report_date_gte: period_of_report_date greater than or equal to. :param timeframe: Query by timeframe. :param include_sources: Whether or not to include the xpath and formula attributes for each financial data point. - :param limit: Limit the number of results returned per-page, default is 1 and max is 100. + :param limit: Limit the number of results returned per-page, default is 10 and max is 100. :param sort: Sort field used for ordering. :param order: Order results based on the sort field. :param params: Any additional query params @@ -65,4 +73,50 @@ def list_stock_financials( params=self._get_params(self.list_stock_financials, locals()), raw=raw, 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, ) diff --git a/polygon/websocket/__init__.py b/massive/websocket/__init__.py similarity index 76% rename from polygon/websocket/__init__.py rename to massive/websocket/__init__.py index 21f6bfcb..0d5409cd 100644 --- a/polygon/websocket/__init__.py +++ b/massive/websocket/__init__.py @@ -1,19 +1,19 @@ import os from enum import Enum -from typing import Optional, Union, List, Set, Callable, Awaitable +from typing import Optional, Union, List, Set, Callable, Awaitable, Any import logging import json import asyncio import ssl import certifi from .models import * -from websockets.client import connect, WebSocketClientProtocol +from websockets.asyncio.client import connect, ClientConnection from websockets.exceptions import ConnectionClosedOK, ConnectionClosedError from ..logging import get_logger import logging from ..exceptions import AuthError -env_key = "POLYGON_API_KEY" +env_key = "MASSIVE_API_KEY" logger = get_logger("WebSocketClient") @@ -28,10 +28,11 @@ def __init__( subscriptions: Optional[List[str]] = None, max_reconnects: Optional[int] = 5, secure: bool = True, + custom_json: Optional[Any] = None, **kwargs, ): """ - Initialize a Polygon WebSocketClient. + Initialize a Massive WebSocketClient. :param api_key: Your API key. :param feed: The feed to subscribe to. @@ -39,6 +40,7 @@ def __init__( :param verbose: Whether to log client and server status messages. :param subscriptions: List of subscription parameters. :param max_reconnects: How many times to reconnect on network outage before ending .connect event loop. + :param custom_json: Optional module exposing loads/dumps functions (similar to Python's json module) to be used for JSON conversions. :return: A client. """ if api_key is None: @@ -47,24 +49,31 @@ def __init__( ) self.api_key = api_key self.feed = feed - self.market = market + if isinstance(market, str): + self.market = Market(market) # converts str input to enum + else: + self.market = market + + self.market_value = self.market.value self.raw = raw if verbose: logger.setLevel(logging.DEBUG) self.websocket_cfg = kwargs if isinstance(feed, Enum): feed = feed.value - if isinstance(market, Enum): - market = market.value - self.url = f"ws{'s' if secure else ''}://{feed}/{market}" + self.url = f"ws{'s' if secure else ''}://{feed}/{self.market_value}" self.subscribed = False self.subs: Set[str] = set() self.max_reconnects = max_reconnects - self.websocket: Optional[WebSocketClientProtocol] = None + self.websocket: Optional[ClientConnection] = None if subscriptions is None: subscriptions = [] self.scheduled_subs: Set[str] = set(subscriptions) self.schedule_resub = True + if custom_json: + self.json = custom_json + else: + self.json = json # https://websockets.readthedocs.io/en/stable/reference/client.html#opening-a-connection async def connect( @@ -91,17 +100,24 @@ async def connect( ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) ssl_context.load_verify_locations(certifi.where()) + last_exc = None async for s in connect( - self.url, close_timeout=close_timeout, ssl=ssl_context, **kwargs + self.url, + close_timeout=close_timeout, + ssl=ssl_context, + process_exception=lambda exc: None, + **kwargs, ): self.websocket = s try: msg = await s.recv() logger.debug("connected: %s", msg) logger.debug("authing...") - await s.send(json.dumps({"action": "auth", "params": self.api_key})) + await s.send( + self.json.dumps({"action": "auth", "params": self.api_key}) + ) auth_msg = await s.recv() - auth_msg_parsed = json.loads(auth_msg) + auth_msg_parsed = self.json.loads(auth_msg) logger.debug("authed: %s", auth_msg) if auth_msg_parsed[0]["status"] == "auth_failed": raise AuthError(auth_msg_parsed[0]["message"]) @@ -118,17 +134,21 @@ async def connect( self.subs = set(self.scheduled_subs) self.schedule_resub = False - cmsg: Union[ - List[WebSocketMessage], Union[str, bytes] - ] = await s.recv() - # we know cmsg is Data - msgJson = json.loads(cmsg) # type: ignore - for m in msgJson: - if m["ev"] == "status": - logger.debug("status: %s", m["message"]) - continue + try: + cmsg: Union[List[WebSocketMessage], Union[str, bytes]] = ( + await asyncio.wait_for(s.recv(), timeout=1) + ) + except asyncio.TimeoutError: + continue + if not self.raw: - cmsg = parse(msgJson, logger) + # we know cmsg is Data + msgJson = self.json.loads(cmsg) # type: ignore + for m in msgJson: + if m["ev"] == "status": + logger.debug("status: %s", m["message"]) + continue + cmsg = parse(msgJson, logger, self.market) if len(cmsg) > 0: await processor(cmsg) # type: ignore @@ -136,15 +156,23 @@ async def connect( logger.debug("connection closed (OK): %s", e) return except ConnectionClosedError as e: + last_exc = e logger.debug("connection closed (ERR): %s", e) reconnects += 1 self.scheduled_subs = set(self.subs) self.subs = set() self.schedule_resub = True if self.max_reconnects is not None and reconnects > self.max_reconnects: - return + break continue + if ( + last_exc + and self.max_reconnects is not None + and reconnects > self.max_reconnects + ): + raise last_exc + def run( self, handle_msg: Union[ @@ -172,19 +200,23 @@ async def _subscribe(self, topics: Union[List[str], Set[str]]): return subs = ",".join(topics) logger.debug("subbing: %s", subs) - await self.websocket.send(json.dumps({"action": "subscribe", "params": subs})) + await self.websocket.send( + self.json.dumps({"action": "subscribe", "params": subs}) + ) async def _unsubscribe(self, topics: Union[List[str], Set[str]]): if self.websocket is None or len(topics) == 0: return subs = ",".join(topics) logger.debug("unsubbing: %s", subs) - await self.websocket.send(json.dumps({"action": "unsubscribe", "params": subs})) + await self.websocket.send( + self.json.dumps({"action": "unsubscribe", "params": subs}) + ) @staticmethod def _parse_subscription(s: str): s = s.strip() - split = s.split(".") + split = s.split(".", 1) # Split at the first period if len(split) != 2: logger.warning("invalid subscription:", s) return [None, None] diff --git a/massive/websocket/models/__init__.py b/massive/websocket/models/__init__.py new file mode 100644 index 00000000..629aca87 --- /dev/null +++ b/massive/websocket/models/__init__.py @@ -0,0 +1,121 @@ +from typing import Dict, Any, List, Type, Protocol, cast +from .common import * +from .models import * +import logging + + +# Protocol to define classes with from_dict method +class FromDictProtocol(Protocol): + @classmethod + def from_dict(cls, data: Dict[str, Any]) -> "FromDictProtocol": + pass + + +# Define the mapping of market and event type to model class +MARKET_EVENT_MAP: Dict[Market, Dict[str, Type[FromDictProtocol]]] = { + Market.Stocks: { + "A": EquityAgg, + "AM": EquityAgg, + "T": EquityTrade, + "Q": EquityQuote, + "LULD": LimitUpLimitDown, + "FMV": FairMarketValue, + "NOI": Imbalance, + "LV": LaunchpadValue, + }, + Market.Options: { + "A": EquityAgg, + "AM": EquityAgg, + "T": EquityTrade, + "Q": EquityQuote, + "FMV": FairMarketValue, + "LV": LaunchpadValue, + }, + Market.Indices: { + "A": EquityAgg, + "AM": EquityAgg, + "V": IndexValue, + }, + Market.Futures: { + "A": FuturesAgg, + "AM": FuturesAgg, + "T": FuturesTrade, + "Q": FuturesQuote, + }, + Market.FuturesCME: { + "A": FuturesAgg, + "AM": FuturesAgg, + "T": FuturesTrade, + "Q": FuturesQuote, + }, + Market.FuturesCBOT: { + "A": FuturesAgg, + "AM": FuturesAgg, + "T": FuturesTrade, + "Q": FuturesQuote, + }, + Market.FuturesNYMEX: { + "A": FuturesAgg, + "AM": FuturesAgg, + "T": FuturesTrade, + "Q": FuturesQuote, + }, + Market.FuturesCOMEX: { + "A": FuturesAgg, + "AM": FuturesAgg, + "T": FuturesTrade, + "Q": FuturesQuote, + }, + Market.Crypto: { + "XA": CurrencyAgg, + "XAS": CurrencyAgg, + "XT": CryptoTrade, + "XQ": CryptoQuote, + "XL2": Level2Book, + "FMV": FairMarketValue, + "AM": EquityAgg, + "LV": LaunchpadValue, + }, + Market.Forex: { + "CA": CurrencyAgg, + "CAS": CurrencyAgg, + "C": ForexQuote, + "FMV": FairMarketValue, + "AM": EquityAgg, + "LV": LaunchpadValue, + }, +} + + +def parse_single( + data: Dict[str, Any], logger: logging.Logger, market: Market +) -> Optional[WebSocketMessage]: + event_type = data["ev"] + # Look up the model class based on market and event type + model_class: Optional[Type[FromDictProtocol]] = MARKET_EVENT_MAP.get( + market, {} + ).get(event_type) + if model_class: + parsed = model_class.from_dict(data) + return cast( + WebSocketMessage, parsed + ) # Ensure the return type is WebSocketMessage + else: + # Log a warning for unrecognized event types, unless it's a status message + if event_type != "status": + logger.warning("Unknown event type '%s' for market %s", event_type, market) + return None + + +def parse( + msg: List[Dict[str, Any]], logger: logging.Logger, market: Market +) -> List[WebSocketMessage]: + res = [] + for m in msg: + parsed = parse_single(m, logger, market) + if parsed is None: + if m["ev"] != "status": + logger.warning("could not parse message %s", m) + else: + res.append(parsed) + return res diff --git a/massive/websocket/models/common.py b/massive/websocket/models/common.py new file mode 100644 index 00000000..7efa836e --- /dev/null +++ b/massive/websocket/models/common.py @@ -0,0 +1,60 @@ +from enum import Enum + + +class Feed(Enum): + Delayed = "delayed.massive.com" + RealTime = "socket.massive.com" + Nasdaq = "nasdaqfeed.massive.com" + PolyFeed = "polyfeed.massive.com" + PolyFeedPlus = "polyfeedplus.massive.com" + StarterFeed = "starterfeed.massive.com" + Launchpad = "launchpad.massive.com" + Business = "business.massive.com" + EdgxBusiness = "edgx-business.massive.com" + IEXBusiness = "iex-business.massive.com" + DelayedBusiness = "delayed-business.massive.com" + DelayedEdgxBusiness = "delayed-edgx-business.massive.com" + DelayedNasdaqLastSaleBusiness = "delayed-nasdaq-last-sale-business.massive.com" + DelayedNasdaqBasic = "delayed-nasdaq-basic-business.massive.com" + DelayedFullMarketBusiness = "delayed-fullmarket-business.massive.com" + FullMarketBusiness = "fullmarket-business.massive.com" + NasdaqLastSaleBusiness = "nasdaq-last-sale-business.massive.com" + NasdaqBasicBusiness = "nasdaq-basic-business.massive.com" + + +class Market(Enum): + Stocks = "stocks" + Options = "options" + Forex = "forex" + Crypto = "crypto" + Indices = "indices" + Futures = "futures" # CME, CBOT, NYMEX, and COMEX + FuturesCME = "futures/cme" + FuturesCBOT = "futures/cbot" + FuturesNYMEX = "futures/nymex" + FuturesCOMEX = "futures/comex" + + +class EventType(Enum): + EquityAgg = "A" + EquityAggMin = "AM" + CryptoAgg = "XA" + CryptoAggSec = "XAS" + ForexAgg = "CA" + ForexAggSec = "CAS" + EquityTrade = "T" + CryptoTrade = "XT" + EquityQuote = "Q" + ForexQuote = "C" + CryptoQuote = "XQ" + Imbalances = "NOI" + LimitUpLimitDown = "LULD" + CryptoL2 = "XL2" + Value = "V" + LaunchpadValue = "LV" + LaunchpadAggMin = "AM" + BusinessFairMarketValue = "FMV" + FuturesTrade = "T" + FuturesQuote = "Q" + FuturesAgg = "A" + FuturesAggMin = "AM" diff --git a/polygon/websocket/models/models.py b/massive/websocket/models/models.py similarity index 69% rename from polygon/websocket/models/models.py rename to massive/websocket/models/models.py index ec1cb14a..c0903530 100644 --- a/polygon/websocket/models/models.py +++ b/massive/websocket/models/models.py @@ -5,7 +5,8 @@ @modelclass class EquityAgg: - "EquityAgg contains aggregate data for either stock tickers or option contracts." + """EquityAgg contains aggregate data for either stock tickers, option contracts or index tickers.""" + event_type: Optional[Union[str, EventType]] = None symbol: Optional[str] = None volume: Optional[float] = None @@ -88,6 +89,8 @@ class EquityTrade: conditions: Optional[List[int]] = None timestamp: Optional[int] = None sequence_number: Optional[int] = None + trf_id: Optional[int] = None + trf_timestamp: Optional[int] = None @staticmethod def from_dict(d): @@ -102,6 +105,8 @@ def from_dict(d): d.get("c", None), d.get("t", None), d.get("q", None), + d.get("trfi", None), + d.get("trft", None), ) @@ -149,6 +154,8 @@ class EquityQuote: timestamp: Optional[int] = None tape: Optional[int] = None sequence_number: Optional[int] = None + trf_id: Optional[int] = None + trf_timestamp: Optional[int] = None @staticmethod def from_dict(d): @@ -166,6 +173,8 @@ def from_dict(d): d.get("t", None), d.get("z", None), d.get("q", None), + d.get("trfi", None), + d.get("trft", None), ) @@ -299,6 +308,136 @@ def from_dict(d): ) +@modelclass +class IndexValue: + event_type: Optional[Union[str, EventType]] = None + value: Optional[float] = None + ticker: Optional[str] = None + timestamp: Optional[str] = None + + @staticmethod + def from_dict(d): + return IndexValue( + d.get("ev", None), + d.get("val", None), + d.get("T", None), + d.get("t", None), + ) + + +@modelclass +class LaunchpadValue: + event_type: Optional[Union[str, EventType]] = None + value: Optional[float] = None + symbol: Optional[str] = None + timestamp: Optional[int] = None + + @staticmethod + def from_dict(d): + return LaunchpadValue( + event_type=d.get("ev", None), + value=d.get("val", None), + symbol=d.get("sym", None), + timestamp=d.get("t", None), + ) + + +@modelclass +class FairMarketValue: + event_type: Optional[Union[str, EventType]] = None + fmv: Optional[float] = None + ticker: Optional[str] = None + timestamp: Optional[int] = None + + @staticmethod + def from_dict(d): + return FairMarketValue( + event_type=d.get("ev", None), + fmv=d.get("fmv", None), + ticker=d.get("sym", None), + timestamp=d.get("t", None), + ) + + +@modelclass +class FuturesTrade: + event_type: Optional[str] = None + symbol: Optional[str] = None + price: Optional[float] = None + size: Optional[int] = None + timestamp: Optional[int] = None + sequence_number: Optional[int] = None + + @staticmethod + def from_dict(d): + return FuturesTrade( + event_type=d.get("ev"), + symbol=d.get("sym"), + price=d.get("p"), + size=d.get("s"), + timestamp=d.get("t"), + sequence_number=d.get("q"), + ) + + +@modelclass +class FuturesQuote: + event_type: Optional[str] = None + symbol: Optional[str] = None + bid_price: Optional[float] = None + bid_size: Optional[int] = None + bid_timestamp: Optional[int] = None + ask_price: Optional[float] = None + ask_size: Optional[int] = None + ask_timestamp: Optional[int] = None + sip_timestamp: Optional[int] = None + + @staticmethod + def from_dict(d): + return FuturesQuote( + event_type=d.get("ev"), + symbol=d.get("sym"), + bid_price=d.get("bp"), + bid_size=d.get("bs"), + bid_timestamp=d.get("bt"), + ask_price=d.get("ap"), + ask_size=d.get("as"), + ask_timestamp=d.get("at"), + sip_timestamp=d.get("t"), + ) + + +@modelclass +class FuturesAgg: + event_type: Optional[str] = None + symbol: Optional[str] = None + volume: Optional[int] = None + total_value: Optional[int] = None + open: Optional[float] = None + close: Optional[float] = None + high: Optional[float] = None + low: Optional[float] = None + transactions: Optional[int] = None + start_timestamp: Optional[int] = None + end_timestamp: Optional[int] = None + + @staticmethod + def from_dict(d): + return FuturesAgg( + event_type=d.get("ev"), + symbol=d.get("sym"), + volume=d.get("v"), + total_value=d.get("dv"), + open=d.get("o"), + close=d.get("c"), + high=d.get("h"), + low=d.get("l"), + transactions=d.get("n"), + start_timestamp=d.get("s"), + end_timestamp=d.get("e"), + ) + + WebSocketMessage = NewType( "WebSocketMessage", List[ @@ -313,6 +452,12 @@ def from_dict(d): Imbalance, LimitUpLimitDown, Level2Book, + IndexValue, + LaunchpadValue, + FairMarketValue, + FuturesTrade, + FuturesQuote, + FuturesAgg, ] ], ) diff --git a/poetry.lock b/poetry.lock index 35dbde7a..4494c57f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,111 +1,175 @@ +# This file is automatically @generated by Poetry 2.2.1 and should not be changed by hand. + [[package]] name = "alabaster" -version = "0.7.12" -description = "A configurable sidebar-enabled Sphinx theme" -category = "dev" +version = "0.7.16" +description = "A light, configurable Sphinx theme" optional = false -python-versions = "*" +python-versions = ">=3.9" +groups = ["dev"] +files = [ + {file = "alabaster-0.7.16-py3-none-any.whl", hash = "sha256:b46733c07dce03ae4e150330b975c75737fa60f0a7c591b6c8bf4928a28e2c92"}, + {file = "alabaster-0.7.16.tar.gz", hash = "sha256:75a8b99c28a5dad50dd7f8ccdd447a121ddb3892da9e53d1ca5cca3106d58d65"}, +] [[package]] name = "attrs" -version = "21.4.0" +version = "22.1.0" description = "Classes Without Boilerplate" -category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +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 = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"] -docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] -tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "cloudpickle"] -tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "cloudpickle"] +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 ; 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" -version = "2.10.1" +version = "2.17.0" description = "Internationalization utilities" -category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" +groups = ["dev"] +files = [ + {file = "babel-2.17.0-py3-none-any.whl", hash = "sha256:4d0b53093fdfb4b21c92b5213dba5a1b23885afa8383709427046b21c366e5f2"}, + {file = "babel-2.17.0.tar.gz", hash = "sha256:0c54cffb19f690cdcc52a3b50bcbf71e07a808d1c80d549f2459b9d2cf0afb9d"}, +] -[package.dependencies] -pytz = ">=2015.7" +[package.extras] +dev = ["backports.zoneinfo ; python_version < \"3.9\"", "freezegun (>=1.0,<2.0)", "jinja2 (>=3.0)", "pytest (>=6.0)", "pytest-cov", "pytz", "setuptools", "tzdata ; sys_platform == \"win32\""] [[package]] name = "black" -version = "22.6.0" +version = "24.8.0" description = "The uncompromising code formatter." -category = "dev" optional = false -python-versions = ">=3.6.2" +python-versions = ">=3.8" +groups = ["dev"] +files = [ + {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] click = ">=8.0.0" mypy-extensions = ">=0.4.3" +packaging = ">=22.0" pathspec = ">=0.9.0" platformdirs = ">=2" -tomli = {version = ">=1.1.0", markers = "python_full_version < \"3.11.0a7\""} -typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""} +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} +typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} [package.extras] colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4)"] +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 = "2022.6.15" +version = "2026.1.4" description = "Python package for providing Mozilla's CA Bundle." -category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" +groups = ["main", "dev"] +files = [ + {file = "certifi-2026.1.4-py3-none-any.whl", hash = "sha256:9943707519e4add1115f44c2bc244f782c0249876bf51b6599fee1ffbedd685c"}, + {file = "certifi-2026.1.4.tar.gz", hash = "sha256:ac726dd470482006e014ad384921ed6438c457018f4b3d204aea4281258b2120"}, +] [[package]] name = "charset-normalizer" -version = "2.0.12" +version = "2.1.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "dev" optional = false -python-versions = ">=3.5.0" +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"}, +] [package.extras] -unicode_backport = ["unicodedata2"] +unicode-backport = ["unicodedata2"] [[package]] name = "click" version = "8.1.3" description = "Composable command line interface toolkit" -category = "dev" 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"}, +] [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} [[package]] name = "colorama" -version = "0.4.4" +version = "0.4.6" description = "Cross-platform colored terminal text." -category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +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"}, +] [[package]] name = "docutils" -version = "0.17.1" +version = "0.21.2" description = "Docutils -- Python Documentation Utilities" -category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.9" +groups = ["dev"] +files = [ + {file = "docutils-0.21.2-py3-none-any.whl", hash = "sha256:dafca5b9e384f0e419294eb4d2ff9fa826435bf15f15b7bd45723e8ad76811b2"}, + {file = "docutils-0.21.2.tar.gz", hash = "sha256:3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f"}, +] [[package]] name = "furl" version = "2.1.3" description = "URL manipulation made simple." -category = "dev" 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"}, +] [package.dependencies] orderedmultidict = ">=1.0.1" @@ -113,58 +177,64 @@ six = ">=1.8.0" [[package]] name = "idna" -version = "3.3" +version = "3.7" description = "Internationalized Domain Names in Applications (IDNA)" -category = "dev" optional = false python-versions = ">=3.5" +groups = ["dev"] +files = [ + {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, + {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, +] [[package]] name = "imagesize" -version = "1.3.0" +version = "1.4.1" description = "Getting image size from png/jpeg/jpeg2000/gif file" -category = "dev" 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"}, +] [[package]] name = "importlib-metadata" -version = "4.11.3" +version = "8.7.0" description = "Read metadata from Python packages" -category = "dev" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" +groups = ["dev"] +markers = "python_version == \"3.9\"" +files = [ + {file = "importlib_metadata-8.7.0-py3-none-any.whl", hash = "sha256:e5dd1551894c77868a30651cef00984d50e1002d06942a7101d34870c5f02afd"}, + {file = "importlib_metadata-8.7.0.tar.gz", hash = "sha256:d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000"}, +] [package.dependencies] -zipp = ">=0.5" +zipp = ">=3.20" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\""] +cover = ["pytest-cov"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +enabler = ["pytest-enabler (>=2.2)"] perf = ["ipython"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "importlib-resources (>=1.3)"] - -[[package]] -name = "importlib-resources" -version = "5.7.1" -description = "Read resources from Python packages" -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} - -[package.extras] -docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] +test = ["flufl.flake8", "importlib_resources (>=1.3) ; python_version < \"3.9\"", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] +type = ["pytest-mypy"] [[package]] name = "jinja2" -version = "3.1.2" +version = "3.1.6" description = "A very fast and expressive template engine." -category = "dev" optional = false python-versions = ">=3.7" +groups = ["dev"] +files = [ + {file = "jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67"}, + {file = "jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d"}, +] [package.dependencies] MarkupSafe = ">=2.0" @@ -174,104 +244,398 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "jsonschema" -version = "4.5.1" +version = "4.17.1" description = "An implementation of JSON Schema validation for Python" -category = "dev" 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"}, +] [package.dependencies] attrs = ">=17.4.0" -importlib-resources = {version = ">=1.4.0", markers = "python_version < \"3.9\""} pyrsistent = ">=0.14.0,<0.17.0 || >0.17.0,<0.17.1 || >0.17.1,<0.17.2 || >0.17.2" [package.extras] format = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3987", "uri-template", "webcolors (>=1.11)"] -format_nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "uri-template", "webcolors (>=1.11)"] +format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "uri-template", "webcolors (>=1.11)"] [[package]] -name = "markupsafe" +name = "librt" +version = "0.7.2" +description = "Mypyc runtime library" +optional = false +python-versions = ">=3.9" +groups = ["dev"] +markers = "platform_python_implementation != \"PyPy\"" +files = [ + {file = "librt-0.7.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0090f146caa593f47e641307bd0bef778b76629b1d7a5bec95d3a83ed49d49de"}, + {file = "librt-0.7.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c44321bc013cf4b41169e463a2c441412497cea44dbf79eee0ccad8104d05b7b"}, + {file = "librt-0.7.2-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:8913d92224da3e0ef54e40cdc36f1c0789f375349aa36f7fd44c89dfda1e6d24"}, + {file = "librt-0.7.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f968b951f0713b15ad56090c5499bc63e4718e7636d698e1e1fc2eb66c855f97"}, + {file = "librt-0.7.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:85e8801d41dcfbb76407daa5e35e69ebe7b0fc826b7c63d462cbbab530b5672b"}, + {file = "librt-0.7.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:9672ee71a08c5b1cb5bb92fc5cc07f88c947716ff3c6b8c3bc0f57ee7ddc12fa"}, + {file = "librt-0.7.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:9786b621b5c7e6e2aaab0cacf118c1c3af5f70b9c0e3fe614734b1d9fbc37cd3"}, + {file = "librt-0.7.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:332bd6505e345c0d92ad5ede7419bdd2c96ad7526681be5feb2bb26667819c4f"}, + {file = "librt-0.7.2-cp310-cp310-win32.whl", hash = "sha256:0ca4ff852be76094074bede6fcd1fc75374962ec365aceb396fa7aa3bc733c12"}, + {file = "librt-0.7.2-cp310-cp310-win_amd64.whl", hash = "sha256:dd2b75815270534c62e203ee5755ae1f66540ce4ee08432d4b1e623ddb2fa175"}, + {file = "librt-0.7.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4f8f02d40621f55c659ff1ed7ea91320f8bc16e75fe67f822445cd0e9b5fa1d1"}, + {file = "librt-0.7.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0bc8425c7f9e9bfc16fae651b56b402b11e25c223a90353fb71fa47ed3e1c048"}, + {file = "librt-0.7.2-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:f9a8a6e3cea9c01d2d9c55cf81ab68580b10d01c54b82cab89e85ba036e1d272"}, + {file = "librt-0.7.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:de0aceb7d19f6dd4aa6594be45f82af19c74bd0fcf2fa2d42c116d25826f1625"}, + {file = "librt-0.7.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d29bb29aba2a849ea8255744655b359ce420ab55018c31a9b58c103415e47918"}, + {file = "librt-0.7.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:f172088974eac0101ecbe460d89411c945fa57601e4fc3dc461e718991322e00"}, + {file = "librt-0.7.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:ab4ca61a3b774d3b1886b26f7cc295e75a42ebc26c7a1a04e11c427e5313922f"}, + {file = "librt-0.7.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d891fb657a14d8d77e3b565332e064fbcd67741e99043634e5b7cbded88d9d8e"}, + {file = "librt-0.7.2-cp311-cp311-win32.whl", hash = "sha256:2272e1a4752ad0b9f59793f63ffce06178fbe15a1fd4d2d8ad9ea2fe026d9912"}, + {file = "librt-0.7.2-cp311-cp311-win_amd64.whl", hash = "sha256:eab548b8c771a1846d328a01e83c14ed0414853bf9a91fe7c692f74de513238f"}, + {file = "librt-0.7.2-cp311-cp311-win_arm64.whl", hash = "sha256:0259a726416369e22306177be3404cc29b88fc806d31100802c816fd29f58873"}, + {file = "librt-0.7.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:18d56630bd5793ca860f148cfa6d79a81b3d9c7d5544991c906a8f412eecce63"}, + {file = "librt-0.7.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4076beec27478116ff276731daf676ecd03ceae03fabdefdca400f7e837f477a"}, + {file = "librt-0.7.2-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:7698a3b75f0aa004fa089410b44088628851b3c62c9044822c61a8367fc8caea"}, + {file = "librt-0.7.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e706fdfef8692ee82ac5464c822800d99b436511a9bba402a88e878751b342a9"}, + {file = "librt-0.7.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:39d2b8df134910a2c58d91fbf50cd6ea0b815a50fcdf45de1e21af0a10fcb606"}, + {file = "librt-0.7.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:035c5f2f4bd96326f4528ce48bd60ed19ae35f0c000540971aa597a441e83509"}, + {file = "librt-0.7.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:14798167e2be3cb8202c9617d90d5e4b2b50a92a9c30f8aceb672e12cf26abbf"}, + {file = "librt-0.7.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:f6b564c8e9e768fe79651d626917b4b3d10b3d587779eda2231e235b64caab41"}, + {file = "librt-0.7.2-cp312-cp312-win32.whl", hash = "sha256:605c7bbc94aa30288d33d2ade86d3a70c939efa01f3e64d98d72a72466d43161"}, + {file = "librt-0.7.2-cp312-cp312-win_amd64.whl", hash = "sha256:a48f4c5d3d12eced3462d135ecfe0c4e2a143e64161a471b3f3c1491330fcd74"}, + {file = "librt-0.7.2-cp312-cp312-win_arm64.whl", hash = "sha256:0cbe93690e07c9d4ac76bed107e1be8a612dd6fbc94e21a17a5cff002f5f55d5"}, + {file = "librt-0.7.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0b8fdc5e6eb9698ed66bb652f18fa637853fd03b016864bed098f1a28a8d129d"}, + {file = "librt-0.7.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:66d0f0de87033ab7e54f48bd46c042d047ecc3d4e4d5b7b1071e934f34d97054"}, + {file = "librt-0.7.2-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:9da65ed19f6c7c4bbebd7acb37d4dbb95943792b51a74bc96d35673270853e16"}, + {file = "librt-0.7.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:eeb76e18c2adac6bcc709ba7f728acca2d42baf0c7a3b9eba392bab84d591961"}, + {file = "librt-0.7.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b5d5f8f617fc3db80864f7353f43db69d9282bf9cd74c7e6cf5be1a7e5d5a83f"}, + {file = "librt-0.7.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cae1b429f9077254622d7d12ade5d04a6b326b2ff456d032fa3fa653ef994979"}, + {file = "librt-0.7.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:edd20b266055b41ccee667b9373b3eff9d77b8e0890fd26a469c89ef48b29bf0"}, + {file = "librt-0.7.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:cf748211b5782fb9e85945d7ffdef9587bf303344e2ad3e65dee55b44b1c8ac1"}, + {file = "librt-0.7.2-cp313-cp313-win32.whl", hash = "sha256:c4fefe752dcf30564b031e85e6cbc70d82685e52fbbfffc6fab275a47b5c3de7"}, + {file = "librt-0.7.2-cp313-cp313-win_amd64.whl", hash = "sha256:65cd928b7e0c1142235e54e4b615a0a7f4ad046d1d4cbdd454c311bafca97aed"}, + {file = "librt-0.7.2-cp313-cp313-win_arm64.whl", hash = "sha256:10d6d5d52026e44ddd0f638e822a5d451df0d5b6701cb5112362a3a9f4b00229"}, + {file = "librt-0.7.2-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:0baabd8daa4339f6cbffada3c66795722c37880ce768de83c7cba379d469ee3b"}, + {file = "librt-0.7.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:462d9672a4ade935d78c70713847bcba643bf4d94c013fdf29ea5f153bb15922"}, + {file = "librt-0.7.2-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:838b16343fc4ed6869edb3ed9dc89c4bc9b113b1c6028592bede4a93ad360aa4"}, + {file = "librt-0.7.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7b6ee74bfa7055c07e0acb56226efd49687488486db8fcfdea5da4cf25323a91"}, + {file = "librt-0.7.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a5e3502a543b9b3f906f6d4e88582b7ba13320897e19c60d7c098fa9fda1611f"}, + {file = "librt-0.7.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:cb0f330d6af5bcfba339690694bf7c4aedabfa3dd40b17212a2b94a417962ccf"}, + {file = "librt-0.7.2-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:610a25e8239836fe8eff92628602db13dca5d867e868503239c37f3809b3ce9a"}, + {file = "librt-0.7.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:98854ffd0dd6fd64b8a4be4973593746038152e6c239251de908b5a176d8f64a"}, + {file = "librt-0.7.2-cp314-cp314-win32.whl", hash = "sha256:879f789b22e9534df279a6cd3af12d26f8fd96785c47db0d2508304cfc6fd7d9"}, + {file = "librt-0.7.2-cp314-cp314-win_amd64.whl", hash = "sha256:cba3ee432767960ce1e908c67c1fa136831c25ac3705e1e188e63ddaf1b46a06"}, + {file = "librt-0.7.2-cp314-cp314-win_arm64.whl", hash = "sha256:d775e5de996105c9a85136c18bce94204f57021af77a913644e8f9b17733a917"}, + {file = "librt-0.7.2-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:7fecc4dcc74e0c97ca36435048e3392ee6aa2ae3e77c285394192f9ad1e1a283"}, + {file = "librt-0.7.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:d643941996b678699fed64271d02439fe23d31d8dee45f0e0b02c81ee77a4d79"}, + {file = "librt-0.7.2-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:dcefbd09a5db038693d22adc1962111d4c2df0b838fde2f3a61fceec9953b9c5"}, + {file = "librt-0.7.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:11445c0460d4522c5959f7770015cdcd7dd025ac2c095c50b78e27878f9cab15"}, + {file = "librt-0.7.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c10ae62472a03dc8db52d5dca4a9af5d0935899cf8c550565a39645bf7735d87"}, + {file = "librt-0.7.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:a38575adf344ca7423bfb10c3a7b5df066dfbe9b95e8b35f1f79eb84e4b38cad"}, + {file = "librt-0.7.2-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:2dcae85482674912bdd9dc98c6a236a9698c2c13ee53366a996851e3460da26a"}, + {file = "librt-0.7.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:f02f9a7a8b720ae3c46b4df736a71d2ef07b59f3149180ad1e1eba7fccabaadf"}, + {file = "librt-0.7.2-cp314-cp314t-win32.whl", hash = "sha256:062de7065ec0d060f0541602a16bed566c4b948aa1d8466c483bb949e27e0ef7"}, + {file = "librt-0.7.2-cp314-cp314t-win_amd64.whl", hash = "sha256:fb6a190f76a687b034362e610c4990306ad0d913e98a8e588dcec91486797869"}, + {file = "librt-0.7.2-cp314-cp314t-win_arm64.whl", hash = "sha256:35e1c435ee1e24ba2b018172a3ed1caed5275168a016e560e695057acd532add"}, + {file = "librt-0.7.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9da7e00662b75fe2245f6c709c1a2c3b84e3c70aef0c088d3d25cfcfb6ec13c6"}, + {file = "librt-0.7.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6d412f959d485db6ad02a7b4685f7cbd2d6e80530d95e1add553bc4278c415c5"}, + {file = "librt-0.7.2-cp39-cp39-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:c52990838b821f0fc86a40d244360426550312dac55da984a0878947d62598b6"}, + {file = "librt-0.7.2-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c0e53979afcf7bcc6c4a7d31d61e88feb83ed9f3f00407a835df3283ff450eac"}, + {file = "librt-0.7.2-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ca151523e0ea06015e070ccc5fdea0dc374f292fba62e65ba315aef241296c93"}, + {file = "librt-0.7.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:025871d474b48eae232562d575ee7a82fa69ac12b0aa9c9138c27900178fd8ca"}, + {file = "librt-0.7.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:13b72520500fae1e6d10fb10a8972858a10ed4b6edb7e800f1d11b385803a868"}, + {file = "librt-0.7.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:5292bf3d6756301ff72e578703837afebc6660b235cf338ab9a1074cb3b988fd"}, + {file = "librt-0.7.2-cp39-cp39-win32.whl", hash = "sha256:22a7a751590444a90e3a663205caa582da4a2e6cdbb7515ae579ca7b95e015ae"}, + {file = "librt-0.7.2-cp39-cp39-win_amd64.whl", hash = "sha256:fd612a78cd330c0371d2b918bf73aeb976f2c031562c4b571e0100069626b390"}, + {file = "librt-0.7.2.tar.gz", hash = "sha256:48aa0f311bdf90ec9a63e3669b6aff04967f24f2f67fe9372c570a21dc9ae873"}, +] + +[[package]] +name = "MarkupSafe" version = "2.1.1" description = "Safely add untrusted strings to HTML/XML markup." -category = "dev" 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"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win32.whl", hash = "sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win32.whl", hash = "sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win32.whl", hash = "sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win32.whl", hash = "sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"}, + {file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"}, +] [[package]] name = "mypy" -version = "0.971" +version = "1.19.1" description = "Optional static typing for Python" -category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.9" +groups = ["dev"] +files = [ + {file = "mypy-1.19.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5f05aa3d375b385734388e844bc01733bd33c644ab48e9684faa54e5389775ec"}, + {file = "mypy-1.19.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:022ea7279374af1a5d78dfcab853fe6a536eebfda4b59deab53cd21f6cd9f00b"}, + {file = "mypy-1.19.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee4c11e460685c3e0c64a4c5de82ae143622410950d6be863303a1c4ba0e36d6"}, + {file = "mypy-1.19.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:de759aafbae8763283b2ee5869c7255391fbc4de3ff171f8f030b5ec48381b74"}, + {file = "mypy-1.19.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:ab43590f9cd5108f41aacf9fca31841142c786827a74ab7cc8a2eacb634e09a1"}, + {file = "mypy-1.19.1-cp310-cp310-win_amd64.whl", hash = "sha256:2899753e2f61e571b3971747e302d5f420c3fd09650e1951e99f823bc3089dac"}, + {file = "mypy-1.19.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d8dfc6ab58ca7dda47d9237349157500468e404b17213d44fc1cb77bce532288"}, + {file = "mypy-1.19.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e3f276d8493c3c97930e354b2595a44a21348b320d859fb4a2b9f66da9ed27ab"}, + {file = "mypy-1.19.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2abb24cf3f17864770d18d673c85235ba52456b36a06b6afc1e07c1fdcd3d0e6"}, + {file = "mypy-1.19.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a009ffa5a621762d0c926a078c2d639104becab69e79538a494bcccb62cc0331"}, + {file = "mypy-1.19.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f7cee03c9a2e2ee26ec07479f38ea9c884e301d42c6d43a19d20fb014e3ba925"}, + {file = "mypy-1.19.1-cp311-cp311-win_amd64.whl", hash = "sha256:4b84a7a18f41e167f7995200a1d07a4a6810e89d29859df936f1c3923d263042"}, + {file = "mypy-1.19.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:a8174a03289288c1f6c46d55cef02379b478bfbc8e358e02047487cad44c6ca1"}, + {file = "mypy-1.19.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ffcebe56eb09ff0c0885e750036a095e23793ba6c2e894e7e63f6d89ad51f22e"}, + {file = "mypy-1.19.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b64d987153888790bcdb03a6473d321820597ab8dd9243b27a92153c4fa50fd2"}, + {file = "mypy-1.19.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c35d298c2c4bba75feb2195655dfea8124d855dfd7343bf8b8c055421eaf0cf8"}, + {file = "mypy-1.19.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:34c81968774648ab5ac09c29a375fdede03ba253f8f8287847bd480782f73a6a"}, + {file = "mypy-1.19.1-cp312-cp312-win_amd64.whl", hash = "sha256:b10e7c2cd7870ba4ad9b2d8a6102eb5ffc1f16ca35e3de6bfa390c1113029d13"}, + {file = "mypy-1.19.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e3157c7594ff2ef1634ee058aafc56a82db665c9438fd41b390f3bde1ab12250"}, + {file = "mypy-1.19.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:bdb12f69bcc02700c2b47e070238f42cb87f18c0bc1fc4cdb4fb2bc5fd7a3b8b"}, + {file = "mypy-1.19.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f859fb09d9583a985be9a493d5cfc5515b56b08f7447759a0c5deaf68d80506e"}, + {file = "mypy-1.19.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c9a6538e0415310aad77cb94004ca6482330fece18036b5f360b62c45814c4ef"}, + {file = "mypy-1.19.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:da4869fc5e7f62a88f3fe0b5c919d1d9f7ea3cef92d3689de2823fd27e40aa75"}, + {file = "mypy-1.19.1-cp313-cp313-win_amd64.whl", hash = "sha256:016f2246209095e8eda7538944daa1d60e1e8134d98983b9fc1e92c1fc0cb8dd"}, + {file = "mypy-1.19.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:06e6170bd5836770e8104c8fdd58e5e725cfeb309f0a6c681a811f557e97eac1"}, + {file = "mypy-1.19.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:804bd67b8054a85447c8954215a906d6eff9cabeabe493fb6334b24f4bfff718"}, + {file = "mypy-1.19.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:21761006a7f497cb0d4de3d8ef4ca70532256688b0523eee02baf9eec895e27b"}, + {file = "mypy-1.19.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:28902ee51f12e0f19e1e16fbe2f8f06b6637f482c459dd393efddd0ec7f82045"}, + {file = "mypy-1.19.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:481daf36a4c443332e2ae9c137dfee878fcea781a2e3f895d54bd3002a900957"}, + {file = "mypy-1.19.1-cp314-cp314-win_amd64.whl", hash = "sha256:8bb5c6f6d043655e055be9b542aa5f3bdd30e4f3589163e85f93f3640060509f"}, + {file = "mypy-1.19.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7bcfc336a03a1aaa26dfce9fff3e287a3ba99872a157561cbfcebe67c13308e3"}, + {file = "mypy-1.19.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b7951a701c07ea584c4fe327834b92a30825514c868b1f69c30445093fdd9d5a"}, + {file = "mypy-1.19.1-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b13cfdd6c87fc3efb69ea4ec18ef79c74c3f98b4e5498ca9b85ab3b2c2329a67"}, + {file = "mypy-1.19.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4f28f99c824ecebcdaa2e55d82953e38ff60ee5ec938476796636b86afa3956e"}, + {file = "mypy-1.19.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:c608937067d2fc5a4dd1a5ce92fd9e1398691b8c5d012d66e1ddd430e9244376"}, + {file = "mypy-1.19.1-cp39-cp39-win_amd64.whl", hash = "sha256:409088884802d511ee52ca067707b90c883426bd95514e8cfda8281dc2effe24"}, + {file = "mypy-1.19.1-py3-none-any.whl", hash = "sha256:f1235f5ea01b7db5468d53ece6aaddf1ad0b88d9e7462b86ef96fe04995d7247"}, + {file = "mypy-1.19.1.tar.gz", hash = "sha256:19d88bb05303fe63f71dd2c6270daca27cb9401c4ca8255fe50d1d920e0eb9ba"}, +] [package.dependencies] -mypy-extensions = ">=0.4.3" +librt = {version = ">=0.6.2", markers = "platform_python_implementation != \"PyPy\""} +mypy_extensions = ">=1.0.0" +pathspec = ">=0.9.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typing-extensions = ">=3.10" +typing_extensions = ">=4.6.0" [package.extras] dmypy = ["psutil (>=4.0)"] -python2 = ["typed-ast (>=1.4.0,<2)"] +faster-cache = ["orjson"] +install-types = ["pip"] +mypyc = ["setuptools (>=50)"] reports = ["lxml"] [[package]] name = "mypy-extensions" -version = "0.4.3" -description = "Experimental type system extensions for programs checked with the mypy typechecker." -category = "dev" +version = "1.0.0" +description = "Type system extensions for programs checked with the mypy type checker." optional = false -python-versions = "*" +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"}, +] [[package]] name = "orderedmultidict" version = "1.0.1" description = "Ordered Multivalue Dictionary" -category = "dev" 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"}, +] [package.dependencies] six = ">=1.8.0" +[[package]] +name = "orjson" +version = "3.11.5" +description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy" +optional = false +python-versions = ">=3.9" +groups = ["dev"] +files = [ + {file = "orjson-3.11.5-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:df9eadb2a6386d5ea2bfd81309c505e125cfc9ba2b1b99a97e60985b0b3665d1"}, + {file = "orjson-3.11.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ccc70da619744467d8f1f49a8cadae5ec7bbe054e5232d95f92ed8737f8c5870"}, + {file = "orjson-3.11.5-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:073aab025294c2f6fc0807201c76fdaed86f8fc4be52c440fb78fbb759a1ac09"}, + {file = "orjson-3.11.5-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:835f26fa24ba0bb8c53ae2a9328d1706135b74ec653ed933869b74b6909e63fd"}, + {file = "orjson-3.11.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:667c132f1f3651c14522a119e4dd631fad98761fa960c55e8e7430bb2a1ba4ac"}, + {file = "orjson-3.11.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:42e8961196af655bb5e63ce6c60d25e8798cd4dfbc04f4203457fa3869322c2e"}, + {file = "orjson-3.11.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75412ca06e20904c19170f8a24486c4e6c7887dea591ba18a1ab572f1300ee9f"}, + {file = "orjson-3.11.5-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:6af8680328c69e15324b5af3ae38abbfcf9cbec37b5346ebfd52339c3d7e8a18"}, + {file = "orjson-3.11.5-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:a86fe4ff4ea523eac8f4b57fdac319faf037d3c1be12405e6a7e86b3fbc4756a"}, + {file = "orjson-3.11.5-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e607b49b1a106ee2086633167033afbd63f76f2999e9236f638b06b112b24ea7"}, + {file = "orjson-3.11.5-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7339f41c244d0eea251637727f016b3d20050636695bc78345cce9029b189401"}, + {file = "orjson-3.11.5-cp310-cp310-win32.whl", hash = "sha256:8be318da8413cdbbce77b8c5fac8d13f6eb0f0db41b30bb598631412619572e8"}, + {file = "orjson-3.11.5-cp310-cp310-win_amd64.whl", hash = "sha256:b9f86d69ae822cabc2a0f6c099b43e8733dda788405cba2665595b7e8dd8d167"}, + {file = "orjson-3.11.5-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:9c8494625ad60a923af6b2b0bd74107146efe9b55099e20d7740d995f338fcd8"}, + {file = "orjson-3.11.5-cp311-cp311-macosx_15_0_arm64.whl", hash = "sha256:7bb2ce0b82bc9fd1168a513ddae7a857994b780b2945a8c51db4ab1c4b751ebc"}, + {file = "orjson-3.11.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:67394d3becd50b954c4ecd24ac90b5051ee7c903d167459f93e77fc6f5b4c968"}, + {file = "orjson-3.11.5-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:298d2451f375e5f17b897794bcc3e7b821c0f32b4788b9bcae47ada24d7f3cf7"}, + {file = "orjson-3.11.5-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:aa5e4244063db8e1d87e0f54c3f7522f14b2dc937e65d5241ef0076a096409fd"}, + {file = "orjson-3.11.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1db2088b490761976c1b2e956d5d4e6409f3732e9d79cfa69f876c5248d1baf9"}, + {file = "orjson-3.11.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c2ed66358f32c24e10ceea518e16eb3549e34f33a9d51f99ce23b0251776a1ef"}, + {file = "orjson-3.11.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c2021afda46c1ed64d74b555065dbd4c2558d510d8cec5ea6a53001b3e5e82a9"}, + {file = "orjson-3.11.5-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:b42ffbed9128e547a1647a3e50bc88ab28ae9daa61713962e0d3dd35e820c125"}, + {file = "orjson-3.11.5-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:8d5f16195bb671a5dd3d1dbea758918bada8f6cc27de72bd64adfbd748770814"}, + {file = "orjson-3.11.5-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:c0e5d9f7a0227df2927d343a6e3859bebf9208b427c79bd31949abcc2fa32fa5"}, + {file = "orjson-3.11.5-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:23d04c4543e78f724c4dfe656b3791b5f98e4c9253e13b2636f1af5d90e4a880"}, + {file = "orjson-3.11.5-cp311-cp311-win32.whl", hash = "sha256:c404603df4865f8e0afe981aa3c4b62b406e6d06049564d58934860b62b7f91d"}, + {file = "orjson-3.11.5-cp311-cp311-win_amd64.whl", hash = "sha256:9645ef655735a74da4990c24ffbd6894828fbfa117bc97c1edd98c282ecb52e1"}, + {file = "orjson-3.11.5-cp311-cp311-win_arm64.whl", hash = "sha256:1cbf2735722623fcdee8e712cbaaab9e372bbcb0c7924ad711b261c2eccf4a5c"}, + {file = "orjson-3.11.5-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:334e5b4bff9ad101237c2d799d9fd45737752929753bf4faf4b207335a416b7d"}, + {file = "orjson-3.11.5-cp312-cp312-macosx_15_0_arm64.whl", hash = "sha256:ff770589960a86eae279f5d8aa536196ebda8273a2a07db2a54e82b93bc86626"}, + {file = "orjson-3.11.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed24250e55efbcb0b35bed7caaec8cedf858ab2f9f2201f17b8938c618c8ca6f"}, + {file = "orjson-3.11.5-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a66d7769e98a08a12a139049aac2f0ca3adae989817f8c43337455fbc7669b85"}, + {file = "orjson-3.11.5-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:86cfc555bfd5794d24c6a1903e558b50644e5e68e6471d66502ce5cb5fdef3f9"}, + {file = "orjson-3.11.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a230065027bc2a025e944f9d4714976a81e7ecfa940923283bca7bbc1f10f626"}, + {file = "orjson-3.11.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b29d36b60e606df01959c4b982729c8845c69d1963f88686608be9ced96dbfaa"}, + {file = "orjson-3.11.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c74099c6b230d4261fdc3169d50efc09abf38ace1a42ea2f9994b1d79153d477"}, + {file = "orjson-3.11.5-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e697d06ad57dd0c7a737771d470eedc18e68dfdefcdd3b7de7f33dfda5b6212e"}, + {file = "orjson-3.11.5-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:e08ca8a6c851e95aaecc32bc44a5aa75d0ad26af8cdac7c77e4ed93acf3d5b69"}, + {file = "orjson-3.11.5-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:e8b5f96c05fce7d0218df3fdfeb962d6b8cfff7e3e20264306b46dd8b217c0f3"}, + {file = "orjson-3.11.5-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ddbfdb5099b3e6ba6d6ea818f61997bb66de14b411357d24c4612cf1ebad08ca"}, + {file = "orjson-3.11.5-cp312-cp312-win32.whl", hash = "sha256:9172578c4eb09dbfcf1657d43198de59b6cef4054de385365060ed50c458ac98"}, + {file = "orjson-3.11.5-cp312-cp312-win_amd64.whl", hash = "sha256:2b91126e7b470ff2e75746f6f6ee32b9ab67b7a93c8ba1d15d3a0caaf16ec875"}, + {file = "orjson-3.11.5-cp312-cp312-win_arm64.whl", hash = "sha256:acbc5fac7e06777555b0722b8ad5f574739e99ffe99467ed63da98f97f9ca0fe"}, + {file = "orjson-3.11.5-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:3b01799262081a4c47c035dd77c1301d40f568f77cc7ec1bb7db5d63b0a01629"}, + {file = "orjson-3.11.5-cp313-cp313-macosx_15_0_arm64.whl", hash = "sha256:61de247948108484779f57a9f406e4c84d636fa5a59e411e6352484985e8a7c3"}, + {file = "orjson-3.11.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:894aea2e63d4f24a7f04a1908307c738d0dce992e9249e744b8f4e8dd9197f39"}, + {file = "orjson-3.11.5-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ddc21521598dbe369d83d4d40338e23d4101dad21dae0e79fa20465dbace019f"}, + {file = "orjson-3.11.5-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7cce16ae2f5fb2c53c3eafdd1706cb7b6530a67cc1c17abe8ec747f5cd7c0c51"}, + {file = "orjson-3.11.5-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e46c762d9f0e1cfb4ccc8515de7f349abbc95b59cb5a2bd68df5973fdef913f8"}, + {file = "orjson-3.11.5-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d7345c759276b798ccd6d77a87136029e71e66a8bbf2d2755cbdde1d82e78706"}, + {file = "orjson-3.11.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75bc2e59e6a2ac1dd28901d07115abdebc4563b5b07dd612bf64260a201b1c7f"}, + {file = "orjson-3.11.5-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:54aae9b654554c3b4edd61896b978568c6daa16af96fa4681c9b5babd469f863"}, + {file = "orjson-3.11.5-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:4bdd8d164a871c4ec773f9de0f6fe8769c2d6727879c37a9666ba4183b7f8228"}, + {file = "orjson-3.11.5-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:a261fef929bcf98a60713bf5e95ad067cea16ae345d9a35034e73c3990e927d2"}, + {file = "orjson-3.11.5-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:c028a394c766693c5c9909dec76b24f37e6a1b91999e8d0c0d5feecbe93c3e05"}, + {file = "orjson-3.11.5-cp313-cp313-win32.whl", hash = "sha256:2cc79aaad1dfabe1bd2d50ee09814a1253164b3da4c00a78c458d82d04b3bdef"}, + {file = "orjson-3.11.5-cp313-cp313-win_amd64.whl", hash = "sha256:ff7877d376add4e16b274e35a3f58b7f37b362abf4aa31863dadacdd20e3a583"}, + {file = "orjson-3.11.5-cp313-cp313-win_arm64.whl", hash = "sha256:59ac72ea775c88b163ba8d21b0177628bd015c5dd060647bbab6e22da3aad287"}, + {file = "orjson-3.11.5-cp314-cp314-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:e446a8ea0a4c366ceafc7d97067bfd55292969143b57e3c846d87fc701e797a0"}, + {file = "orjson-3.11.5-cp314-cp314-macosx_15_0_arm64.whl", hash = "sha256:53deb5addae9c22bbe3739298f5f2196afa881ea75944e7720681c7080909a81"}, + {file = "orjson-3.11.5-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:82cd00d49d6063d2b8791da5d4f9d20539c5951f965e45ccf4e96d33505ce68f"}, + {file = "orjson-3.11.5-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3fd15f9fc8c203aeceff4fda211157fad114dde66e92e24097b3647a08f4ee9e"}, + {file = "orjson-3.11.5-cp314-cp314-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9df95000fbe6777bf9820ae82ab7578e8662051bb5f83d71a28992f539d2cda7"}, + {file = "orjson-3.11.5-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:92a8d676748fca47ade5bc3da7430ed7767afe51b2f8100e3cd65e151c0eaceb"}, + {file = "orjson-3.11.5-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aa0f513be38b40234c77975e68805506cad5d57b3dfd8fe3baa7f4f4051e15b4"}, + {file = "orjson-3.11.5-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fa1863e75b92891f553b7922ce4ee10ed06db061e104f2b7815de80cdcb135ad"}, + {file = "orjson-3.11.5-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:d4be86b58e9ea262617b8ca6251a2f0d63cc132a6da4b5fcc8e0a4128782c829"}, + {file = "orjson-3.11.5-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:b923c1c13fa02084eb38c9c065afd860a5cff58026813319a06949c3af5732ac"}, + {file = "orjson-3.11.5-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:1b6bd351202b2cd987f35a13b5e16471cf4d952b42a73c391cc537974c43ef6d"}, + {file = "orjson-3.11.5-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:bb150d529637d541e6af06bbe3d02f5498d628b7f98267ff87647584293ab439"}, + {file = "orjson-3.11.5-cp314-cp314-win32.whl", hash = "sha256:9cc1e55c884921434a84a0c3dd2699eb9f92e7b441d7f53f3941079ec6ce7499"}, + {file = "orjson-3.11.5-cp314-cp314-win_amd64.whl", hash = "sha256:a4f3cb2d874e03bc7767c8f88adaa1a9a05cecea3712649c3b58589ec7317310"}, + {file = "orjson-3.11.5-cp314-cp314-win_arm64.whl", hash = "sha256:38b22f476c351f9a1c43e5b07d8b5a02eb24a6ab8e75f700f7d479d4568346a5"}, + {file = "orjson-3.11.5-cp39-cp39-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:1b280e2d2d284a6713b0cfec7b08918ebe57df23e3f76b27586197afca3cb1e9"}, + {file = "orjson-3.11.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c8d8a112b274fae8c5f0f01954cb0480137072c271f3f4958127b010dfefaec"}, + {file = "orjson-3.11.5-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f0a2ae6f09ac7bd47d2d5a5305c1d9ed08ac057cda55bb0a49fa506f0d2da00"}, + {file = "orjson-3.11.5-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c0d87bd1896faac0d10b4f849016db81a63e4ec5df38757ffae84d45ab38aa71"}, + {file = "orjson-3.11.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:801a821e8e6099b8c459ac7540b3c32dba6013437c57fdcaec205b169754f38c"}, + {file = "orjson-3.11.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:69a0f6ac618c98c74b7fbc8c0172ba86f9e01dbf9f62aa0b1776c2231a7bffe5"}, + {file = "orjson-3.11.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fea7339bdd22e6f1060c55ac31b6a755d86a5b2ad3657f2669ec243f8e3b2bdb"}, + {file = "orjson-3.11.5-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:4dad582bc93cef8f26513e12771e76385a7e6187fd713157e971c784112aad56"}, + {file = "orjson-3.11.5-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:0522003e9f7fba91982e83a97fec0708f5a714c96c4209db7104e6b9d132f111"}, + {file = "orjson-3.11.5-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:7403851e430a478440ecc1258bcbacbfbd8175f9ac1e39031a7121dd0de05ff8"}, + {file = "orjson-3.11.5-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:5f691263425d3177977c8d1dd896cde7b98d93cbf390b2544a090675e83a6a0a"}, + {file = "orjson-3.11.5-cp39-cp39-win32.whl", hash = "sha256:61026196a1c4b968e1b1e540563e277843082e9e97d78afa03eb89315af531f1"}, + {file = "orjson-3.11.5-cp39-cp39-win_amd64.whl", hash = "sha256:09b94b947ac08586af635ef922d69dc9bc63321527a3a04647f4986a73f4bd30"}, + {file = "orjson-3.11.5.tar.gz", hash = "sha256:82393ab47b4fe44ffd0a7659fa9cfaacc717eb617c93cde83795f14af5c2e9d5"}, +] + [[package]] name = "packaging" -version = "21.3" +version = "23.1" description = "Core utilities for Python packages" -category = "dev" optional = false -python-versions = ">=3.6" - -[package.dependencies] -pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" +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"}, +] [[package]] name = "pathspec" -version = "0.9.0" +version = "0.10.2" description = "Utility library for gitignore style pattern matching of file paths." -category = "dev" optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +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"}, +] [[package]] name = "platformdirs" -version = "2.5.2" -description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "dev" +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"}, +] [package.extras] -docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)", "sphinx (>=4)"] -test = ["appdirs (==1.4.4)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)", "pytest (>=6)"] +docs = ["furo (>=2022.9.29)", "proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.4)"] +test = ["appdirs (==1.4.4)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] [[package]] name = "pook" -version = "1.0.2" +version = "2.1.4" description = "HTTP traffic mocking and expectations made easy" -category = "dev" optional = false -python-versions = "*" +python-versions = ">=3.9" +groups = ["dev"] +files = [ + {file = "pook-2.1.4-py3-none-any.whl", hash = "sha256:3f273ab189874dd775a15c3fa1b1bf89f28b001d2619c5f909e4d3f7df66d36e"}, + {file = "pook-2.1.4.tar.gz", hash = "sha256:2bcbc7d58d1d88b6f2da98c711f5391d5f690292bdd5ff2ccda927576500937a"}, +] [package.dependencies] furl = ">=0.5.6" @@ -280,632 +644,477 @@ xmltodict = ">=0.11.0" [[package]] name = "pygments" -version = "2.12.0" +version = "2.19.2" description = "Pygments is a syntax highlighting package written in Python." -category = "dev" optional = false -python-versions = ">=3.6" - -[[package]] -name = "pyparsing" -version = "3.0.9" -description = "pyparsing module - Classes and methods to define and execute parsing grammars" -category = "dev" -optional = false -python-versions = ">=3.6.8" +python-versions = ">=3.8" +groups = ["dev"] +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] [package.extras] -diagrams = ["railroad-diagrams", "jinja2"] +windows-terminal = ["colorama (>=0.4.6)"] [[package]] name = "pyrsistent" -version = "0.18.1" +version = "0.19.2" description = "Persistent/Functional/Immutable data structures" -category = "dev" optional = false python-versions = ">=3.7" - -[[package]] -name = "pytz" -version = "2022.1" -description = "World timezone definitions, modern and historical" -category = "dev" -optional = false -python-versions = "*" +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"}, + {file = "pyrsistent-0.19.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:055ab45d5911d7cae397dc418808d8802fb95262751872c841c170b0dbf51eed"}, + {file = "pyrsistent-0.19.2-cp310-cp310-win32.whl", hash = "sha256:456cb30ca8bff00596519f2c53e42c245c09e1a4543945703acd4312949bfd41"}, + {file = "pyrsistent-0.19.2-cp310-cp310-win_amd64.whl", hash = "sha256:b39725209e06759217d1ac5fcdb510e98670af9e37223985f330b611f62e7425"}, + {file = "pyrsistent-0.19.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2aede922a488861de0ad00c7630a6e2d57e8023e4be72d9d7147a9fcd2d30712"}, + {file = "pyrsistent-0.19.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:879b4c2f4d41585c42df4d7654ddffff1239dc4065bc88b745f0341828b83e78"}, + {file = "pyrsistent-0.19.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c43bec251bbd10e3cb58ced80609c5c1eb238da9ca78b964aea410fb820d00d6"}, + {file = "pyrsistent-0.19.2-cp37-cp37m-win32.whl", hash = "sha256:d690b18ac4b3e3cab73b0b7aa7dbe65978a172ff94970ff98d82f2031f8971c2"}, + {file = "pyrsistent-0.19.2-cp37-cp37m-win_amd64.whl", hash = "sha256:3ba4134a3ff0fc7ad225b6b457d1309f4698108fb6b35532d015dca8f5abed73"}, + {file = "pyrsistent-0.19.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a178209e2df710e3f142cbd05313ba0c5ebed0a55d78d9945ac7a4e09d923308"}, + {file = "pyrsistent-0.19.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e371b844cec09d8dc424d940e54bba8f67a03ebea20ff7b7b0d56f526c71d584"}, + {file = "pyrsistent-0.19.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:111156137b2e71f3a9936baf27cb322e8024dac3dc54ec7fb9f0bcf3249e68bb"}, + {file = "pyrsistent-0.19.2-cp38-cp38-win32.whl", hash = "sha256:e5d8f84d81e3729c3b506657dddfe46e8ba9c330bf1858ee33108f8bb2adb38a"}, + {file = "pyrsistent-0.19.2-cp38-cp38-win_amd64.whl", hash = "sha256:9cd3e9978d12b5d99cbdc727a3022da0430ad007dacf33d0bf554b96427f33ab"}, + {file = "pyrsistent-0.19.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:f1258f4e6c42ad0b20f9cfcc3ada5bd6b83374516cd01c0960e3cb75fdca6770"}, + {file = "pyrsistent-0.19.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21455e2b16000440e896ab99e8304617151981ed40c29e9507ef1c2e4314ee95"}, + {file = "pyrsistent-0.19.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bfd880614c6237243ff53a0539f1cb26987a6dc8ac6e66e0c5a40617296a045e"}, + {file = "pyrsistent-0.19.2-cp39-cp39-win32.whl", hash = "sha256:71d332b0320642b3261e9fee47ab9e65872c2bd90260e5d225dabeed93cbd42b"}, + {file = "pyrsistent-0.19.2-cp39-cp39-win_amd64.whl", hash = "sha256:dec3eac7549869365fe263831f576c8457f6c833937c68542d08fde73457d291"}, + {file = "pyrsistent-0.19.2-py3-none-any.whl", hash = "sha256:ea6b79a02a28550c98b6ca9c35b9f492beaa54d7c5c9e9949555893c8a9234d0"}, + {file = "pyrsistent-0.19.2.tar.gz", hash = "sha256:bfa0351be89c9fcbcb8c9879b826f4353be10f58f8a677efab0c017bf7137ec2"}, +] [[package]] name = "requests" -version = "2.27.1" +version = "2.32.4" description = "Python HTTP for Humans." -category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +python-versions = ">=3.8" +groups = ["dev"] +files = [ + {file = "requests-2.32.4-py3-none-any.whl", hash = "sha256:27babd3cda2a6d50b30443204ee89830707d396671944c998b5975b031ac2b2c"}, + {file = "requests-2.32.4.tar.gz", hash = "sha256:27d0316682c8a29834d3264820024b62a36942083d52caf2f14c0591336d3422"}, +] [package.dependencies] certifi = ">=2017.4.17" -charset-normalizer = {version = ">=2.0.0,<2.1.0", markers = "python_version >= \"3\""} -idna = {version = ">=2.5,<4", markers = "python_version >= \"3\""} -urllib3 = ">=1.21.1,<1.27" +charset_normalizer = ">=2,<4" +idna = ">=2.5,<4" +urllib3 = ">=1.21.1,<3" [package.extras] -socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"] -use_chardet_on_py3 = ["chardet (>=3.0.2,<5)"] +socks = ["PySocks (>=1.5.6,!=1.5.7)"] +use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" -category = "dev" 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"}, +] [[package]] name = "snowballstemmer" version = "2.2.0" description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." -category = "dev" 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"}, +] [[package]] name = "sphinx" -version = "5.1.1" +version = "7.4.7" description = "Python documentation generator" -category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.9" +groups = ["dev"] +files = [ + {file = "sphinx-7.4.7-py3-none-any.whl", hash = "sha256:c2419e2135d11f1951cd994d6eb18a1835bd8fdd8429f9ca375dc1f3281bd239"}, + {file = "sphinx-7.4.7.tar.gz", hash = "sha256:242f92a7ea7e6c5b406fdc2615413890ba9f699114a9c09192d7dfead2ee9cfe"}, +] [package.dependencies] -alabaster = ">=0.7,<0.8" -babel = ">=1.3" -colorama = {version = ">=0.3.5", markers = "sys_platform == \"win32\""} -docutils = ">=0.14,<0.20" -imagesize = "*" -importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""} -Jinja2 = ">=2.3" -packaging = "*" -Pygments = ">=2.0" -requests = ">=2.5.0" -snowballstemmer = ">=1.1" +alabaster = ">=0.7.14,<0.8.0" +babel = ">=2.13" +colorama = {version = ">=0.4.6", markers = "sys_platform == \"win32\""} +docutils = ">=0.20,<0.22" +imagesize = ">=1.3" +importlib-metadata = {version = ">=6.0", markers = "python_version < \"3.10\""} +Jinja2 = ">=3.1" +packaging = ">=23.0" +Pygments = ">=2.17" +requests = ">=2.30.0" +snowballstemmer = ">=2.2" sphinxcontrib-applehelp = "*" sphinxcontrib-devhelp = "*" sphinxcontrib-htmlhelp = ">=2.0.0" sphinxcontrib-jsmath = "*" sphinxcontrib-qthelp = "*" -sphinxcontrib-serializinghtml = ">=1.1.5" +sphinxcontrib-serializinghtml = ">=1.1.9" +tomli = {version = ">=2", markers = "python_version < \"3.11\""} [package.extras] docs = ["sphinxcontrib-websupport"] -lint = ["flake8 (>=3.5.0)", "flake8-comprehensions", "flake8-bugbear", "isort", "mypy (>=0.971)", "sphinx-lint", "docutils-stubs", "types-typed-ast", "types-requests"] -test = ["pytest (>=4.6)", "html5lib", "cython", "typed-ast"] +lint = ["flake8 (>=6.0)", "importlib-metadata (>=6.0)", "mypy (==1.10.1)", "pytest (>=6.0)", "ruff (==0.5.2)", "sphinx-lint (>=0.9)", "tomli (>=2)", "types-docutils (==0.21.0.20240711)", "types-requests (>=2.30.0)"] +test = ["cython (>=3.0)", "defusedxml (>=0.7.1)", "pytest (>=8.0)", "setuptools (>=70.0)", "typing_extensions (>=4.9)"] [[package]] name = "sphinx-autodoc-typehints" -version = "1.19.2" +version = "2.3.0" description = "Type hints (PEP 484) support for the Sphinx autodoc extension" -category = "dev" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" +groups = ["dev"] +files = [ + {file = "sphinx_autodoc_typehints-2.3.0-py3-none-any.whl", hash = "sha256:3098e2c6d0ba99eacd013eb06861acc9b51c6e595be86ab05c08ee5506ac0c67"}, + {file = "sphinx_autodoc_typehints-2.3.0.tar.gz", hash = "sha256:535c78ed2d6a1bad393ba9f3dfa2602cf424e2631ee207263e07874c38fde084"}, +] [package.dependencies] -Sphinx = ">=5.1.1" +sphinx = ">=7.3.5" [package.extras] -testing = ["covdefaults (>=2.2)", "coverage (>=6.4.2)", "diff-cover (>=6.5.1)", "nptyping (>=2.2)", "pytest (>=7.1.2)", "pytest-cov (>=3)", "sphobjinv (>=2.2.2)", "typing-extensions (>=4.3)"] -type_comments = ["typed-ast (>=1.5.4)"] +docs = ["furo (>=2024.1.29)"] +numpy = ["nptyping (>=2.5)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.4.4)", "defusedxml (>=0.7.1)", "diff-cover (>=9)", "pytest (>=8.1.1)", "pytest-cov (>=5)", "sphobjinv (>=2.3.1)", "typing-extensions (>=4.11)"] [[package]] name = "sphinx-rtd-theme" -version = "1.0.0" +version = "3.1.0" description = "Read the Docs theme for Sphinx" -category = "dev" optional = false -python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*" +python-versions = ">=3.8" +groups = ["dev"] +files = [ + {file = "sphinx_rtd_theme-3.1.0-py2.py3-none-any.whl", hash = "sha256:1785824ae8e6632060490f67cf3a72d404a85d2d9fc26bce3619944de5682b89"}, + {file = "sphinx_rtd_theme-3.1.0.tar.gz", hash = "sha256:b44276f2c276e909239a4f6c955aa667aaafeb78597923b1c60babc76db78e4c"}, +] [package.dependencies] -docutils = "<0.18" -sphinx = ">=1.6" +docutils = ">0.18,<0.23" +sphinx = ">=6,<10" +sphinxcontrib-jquery = ">=4,<5" [package.extras] -dev = ["bump2version", "sphinxcontrib-httpdomain", "transifex-client"] +dev = ["bump2version", "transifex-client", "twine", "wheel"] [[package]] name = "sphinxcontrib-applehelp" version = "1.0.2" description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books" -category = "dev" 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"}, +] [package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] -lint = ["docutils-stubs", "mypy", "flake8"] [[package]] name = "sphinxcontrib-devhelp" version = "1.0.2" description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." -category = "dev" 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"}, +] [package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] -lint = ["docutils-stubs", "mypy", "flake8"] [[package]] name = "sphinxcontrib-htmlhelp" version = "2.0.0" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" -category = "dev" 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"}, +] [package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["html5lib", "pytest"] -lint = ["docutils-stubs", "mypy", "flake8"] + +[[package]] +name = "sphinxcontrib-jquery" +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"}, +] + +[package.dependencies] +Sphinx = ">=1.8" [[package]] name = "sphinxcontrib-jsmath" version = "1.0.1" description = "A sphinx extension which renders display math in HTML via JavaScript" -category = "dev" 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"}, +] [package.extras] -test = ["mypy", "flake8", "pytest"] +test = ["flake8", "mypy", "pytest"] [[package]] name = "sphinxcontrib-qthelp" version = "1.0.3" description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." -category = "dev" 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"}, +] [package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] -lint = ["docutils-stubs", "mypy", "flake8"] [[package]] name = "sphinxcontrib-serializinghtml" -version = "1.1.5" -description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." -category = "dev" +version = "2.0.0" +description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)" optional = false -python-versions = ">=3.5" +python-versions = ">=3.9" +groups = ["dev"] +files = [ + {file = "sphinxcontrib_serializinghtml-2.0.0-py3-none-any.whl", hash = "sha256:6e2cb0eef194e10c27ec0023bfeb25badbbb5868244cf5bc5bdc04e4464bf331"}, + {file = "sphinxcontrib_serializinghtml-2.0.0.tar.gz", hash = "sha256:e9d912827f872c029017a53f0ef2180b327c3f7fd23c87229f7a8e8b70031d4d"}, +] [package.extras] +lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] +standalone = ["Sphinx (>=5)"] test = ["pytest"] -lint = ["docutils-stubs", "mypy", "flake8"] [[package]] name = "tomli" version = "2.0.1" description = "A lil' TOML parser" -category = "dev" 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"}, +] [[package]] name = "types-certifi" version = "2021.10.8.3" description = "Typing stubs for certifi" -category = "dev" 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"}, +] [[package]] name = "types-setuptools" -version = "65.1.0" +version = "80.9.0.20251223" description = "Typing stubs for setuptools" -category = "dev" optional = false -python-versions = "*" +python-versions = ">=3.9" +groups = ["dev"] +files = [ + {file = "types_setuptools-80.9.0.20251223-py3-none-any.whl", hash = "sha256:1b36db79d724c2287d83dc052cf887b47c0da6a2fff044378be0b019545f56e6"}, + {file = "types_setuptools-80.9.0.20251223.tar.gz", hash = "sha256:d3411059ae2f5f03985217d86ac6084efea2c9e9cacd5f0869ef950f308169b2"}, +] [[package]] name = "types-urllib3" -version = "1.26.23" +version = "1.26.25.14" description = "Typing stubs for urllib3" -category = "dev" 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"}, +] [[package]] name = "typing-extensions" -version = "4.2.0" -description = "Backported and Experimental Type Hints for Python 3.7+" -category = "dev" +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.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.12" +version = "2.6.3" description = "HTTP library with thread-safe connection pooling, file post, and more." -category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4" +python-versions = ">=3.9" +groups = ["main", "dev"] +files = [ + {file = "urllib3-2.6.3-py3-none-any.whl", hash = "sha256:bf272323e553dfb2e87d9bfd225ca7b0f467b919d7bbd355436d3fd37cb0acd4"}, + {file = "urllib3-2.6.3.tar.gz", hash = "sha256:1b62b6884944a57dbe321509ab94fd4d3b307075e0c2eae991ac71ee15ad38ed"}, +] [package.extras] -brotli = ["brotlicffi (>=0.8.0)", "brotli (>=1.0.9)", "brotlipy (>=0.6.0)"] -secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "urllib3-secure-extra", "ipaddress"] -socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] +brotli = ["brotli (>=1.2.0) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=1.2.0.0) ; platform_python_implementation != \"CPython\""] +h2 = ["h2 (>=4,<5)"] +socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] +zstd = ["backports-zstd (>=1.0.0) ; python_version < \"3.14\""] [[package]] name = "websockets" -version = "10.3" +version = "15.0.1" description = "An implementation of the WebSocket Protocol (RFC 6455 & 7692)" -category = "main" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "websockets-15.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d63efaa0cd96cf0c5fe4d581521d9fa87744540d4bc999ae6e08595a1014b45b"}, + {file = "websockets-15.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ac60e3b188ec7574cb761b08d50fcedf9d77f1530352db4eef1707fe9dee7205"}, + {file = "websockets-15.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5756779642579d902eed757b21b0164cd6fe338506a8083eb58af5c372e39d9a"}, + {file = "websockets-15.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0fdfe3e2a29e4db3659dbd5bbf04560cea53dd9610273917799f1cde46aa725e"}, + {file = "websockets-15.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c2529b320eb9e35af0fa3016c187dffb84a3ecc572bcee7c3ce302bfeba52bf"}, + {file = "websockets-15.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac1e5c9054fe23226fb11e05a6e630837f074174c4c2f0fe442996112a6de4fb"}, + {file = "websockets-15.0.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:5df592cd503496351d6dc14f7cdad49f268d8e618f80dce0cd5a36b93c3fc08d"}, + {file = "websockets-15.0.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0a34631031a8f05657e8e90903e656959234f3a04552259458aac0b0f9ae6fd9"}, + {file = "websockets-15.0.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:3d00075aa65772e7ce9e990cab3ff1de702aa09be3940d1dc88d5abf1ab8a09c"}, + {file = "websockets-15.0.1-cp310-cp310-win32.whl", hash = "sha256:1234d4ef35db82f5446dca8e35a7da7964d02c127b095e172e54397fb6a6c256"}, + {file = "websockets-15.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:39c1fec2c11dc8d89bba6b2bf1556af381611a173ac2b511cf7231622058af41"}, + {file = "websockets-15.0.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:823c248b690b2fd9303ba00c4f66cd5e2d8c3ba4aa968b2779be9532a4dad431"}, + {file = "websockets-15.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678999709e68425ae2593acf2e3ebcbcf2e69885a5ee78f9eb80e6e371f1bf57"}, + {file = "websockets-15.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d50fd1ee42388dcfb2b3676132c78116490976f1300da28eb629272d5d93e905"}, + {file = "websockets-15.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d99e5546bf73dbad5bf3547174cd6cb8ba7273062a23808ffea025ecb1cf8562"}, + {file = "websockets-15.0.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66dd88c918e3287efc22409d426c8f729688d89a0c587c88971a0faa2c2f3792"}, + {file = "websockets-15.0.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8dd8327c795b3e3f219760fa603dcae1dcc148172290a8ab15158cf85a953413"}, + {file = "websockets-15.0.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8fdc51055e6ff4adeb88d58a11042ec9a5eae317a0a53d12c062c8a8865909e8"}, + {file = "websockets-15.0.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:693f0192126df6c2327cce3baa7c06f2a117575e32ab2308f7f8216c29d9e2e3"}, + {file = "websockets-15.0.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:54479983bd5fb469c38f2f5c7e3a24f9a4e70594cd68cd1fa6b9340dadaff7cf"}, + {file = "websockets-15.0.1-cp311-cp311-win32.whl", hash = "sha256:16b6c1b3e57799b9d38427dda63edcbe4926352c47cf88588c0be4ace18dac85"}, + {file = "websockets-15.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:27ccee0071a0e75d22cb35849b1db43f2ecd3e161041ac1ee9d2352ddf72f065"}, + {file = "websockets-15.0.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:3e90baa811a5d73f3ca0bcbf32064d663ed81318ab225ee4f427ad4e26e5aff3"}, + {file = "websockets-15.0.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:592f1a9fe869c778694f0aa806ba0374e97648ab57936f092fd9d87f8bc03665"}, + {file = "websockets-15.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0701bc3cfcb9164d04a14b149fd74be7347a530ad3bbf15ab2c678a2cd3dd9a2"}, + {file = "websockets-15.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8b56bdcdb4505c8078cb6c7157d9811a85790f2f2b3632c7d1462ab5783d215"}, + {file = "websockets-15.0.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0af68c55afbd5f07986df82831c7bff04846928ea8d1fd7f30052638788bc9b5"}, + {file = "websockets-15.0.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:64dee438fed052b52e4f98f76c5790513235efaa1ef7f3f2192c392cd7c91b65"}, + {file = "websockets-15.0.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d5f6b181bb38171a8ad1d6aa58a67a6aa9d4b38d0f8c5f496b9e42561dfc62fe"}, + {file = "websockets-15.0.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:5d54b09eba2bada6011aea5375542a157637b91029687eb4fdb2dab11059c1b4"}, + {file = "websockets-15.0.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3be571a8b5afed347da347bfcf27ba12b069d9d7f42cb8c7028b5e98bbb12597"}, + {file = "websockets-15.0.1-cp312-cp312-win32.whl", hash = "sha256:c338ffa0520bdb12fbc527265235639fb76e7bc7faafbb93f6ba80d9c06578a9"}, + {file = "websockets-15.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:fcd5cf9e305d7b8338754470cf69cf81f420459dbae8a3b40cee57417f4614a7"}, + {file = "websockets-15.0.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ee443ef070bb3b6ed74514f5efaa37a252af57c90eb33b956d35c8e9c10a1931"}, + {file = "websockets-15.0.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5a939de6b7b4e18ca683218320fc67ea886038265fd1ed30173f5ce3f8e85675"}, + {file = "websockets-15.0.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:746ee8dba912cd6fc889a8147168991d50ed70447bf18bcda7039f7d2e3d9151"}, + {file = "websockets-15.0.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:595b6c3969023ecf9041b2936ac3827e4623bfa3ccf007575f04c5a6aa318c22"}, + {file = "websockets-15.0.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3c714d2fc58b5ca3e285461a4cc0c9a66bd0e24c5da9911e30158286c9b5be7f"}, + {file = "websockets-15.0.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f3c1e2ab208db911594ae5b4f79addeb3501604a165019dd221c0bdcabe4db8"}, + {file = "websockets-15.0.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:229cf1d3ca6c1804400b0a9790dc66528e08a6a1feec0d5040e8b9eb14422375"}, + {file = "websockets-15.0.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:756c56e867a90fb00177d530dca4b097dd753cde348448a1012ed6c5131f8b7d"}, + {file = "websockets-15.0.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:558d023b3df0bffe50a04e710bc87742de35060580a293c2a984299ed83bc4e4"}, + {file = "websockets-15.0.1-cp313-cp313-win32.whl", hash = "sha256:ba9e56e8ceeeedb2e080147ba85ffcd5cd0711b89576b83784d8605a7df455fa"}, + {file = "websockets-15.0.1-cp313-cp313-win_amd64.whl", hash = "sha256:e09473f095a819042ecb2ab9465aee615bd9c2028e4ef7d933600a8401c79561"}, + {file = "websockets-15.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:5f4c04ead5aed67c8a1a20491d54cdfba5884507a48dd798ecaf13c74c4489f5"}, + {file = "websockets-15.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:abdc0c6c8c648b4805c5eacd131910d2a7f6455dfd3becab248ef108e89ab16a"}, + {file = "websockets-15.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a625e06551975f4b7ea7102bc43895b90742746797e2e14b70ed61c43a90f09b"}, + {file = "websockets-15.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d591f8de75824cbb7acad4e05d2d710484f15f29d4a915092675ad3456f11770"}, + {file = "websockets-15.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:47819cea040f31d670cc8d324bb6435c6f133b8c7a19ec3d61634e62f8d8f9eb"}, + {file = "websockets-15.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac017dd64572e5c3bd01939121e4d16cf30e5d7e110a119399cf3133b63ad054"}, + {file = "websockets-15.0.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:4a9fac8e469d04ce6c25bb2610dc535235bd4aa14996b4e6dbebf5e007eba5ee"}, + {file = "websockets-15.0.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:363c6f671b761efcb30608d24925a382497c12c506b51661883c3e22337265ed"}, + {file = "websockets-15.0.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:2034693ad3097d5355bfdacfffcbd3ef5694f9718ab7f29c29689a9eae841880"}, + {file = "websockets-15.0.1-cp39-cp39-win32.whl", hash = "sha256:3b1ac0d3e594bf121308112697cf4b32be538fb1444468fb0a6ae4feebc83411"}, + {file = "websockets-15.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:b7643a03db5c95c799b89b31c036d5f27eeb4d259c798e878d6937d71832b1e4"}, + {file = "websockets-15.0.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0c9e74d766f2818bb95f84c25be4dea09841ac0f734d1966f415e4edfc4ef1c3"}, + {file = "websockets-15.0.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:1009ee0c7739c08a0cd59de430d6de452a55e42d6b522de7aa15e6f67db0b8e1"}, + {file = "websockets-15.0.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76d1f20b1c7a2fa82367e04982e708723ba0e7b8d43aa643d3dcd404d74f1475"}, + {file = "websockets-15.0.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f29d80eb9a9263b8d109135351caf568cc3f80b9928bccde535c235de55c22d9"}, + {file = "websockets-15.0.1-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b359ed09954d7c18bbc1680f380c7301f92c60bf924171629c5db97febb12f04"}, + {file = "websockets-15.0.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:cad21560da69f4ce7658ca2cb83138fb4cf695a2ba3e475e0559e05991aa8122"}, + {file = "websockets-15.0.1-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:7f493881579c90fc262d9cdbaa05a6b54b3811c2f300766748db79f098db9940"}, + {file = "websockets-15.0.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:47b099e1f4fbc95b701b6e85768e1fcdaf1630f3cbe4765fa216596f12310e2e"}, + {file = "websockets-15.0.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:67f2b6de947f8c757db2db9c71527933ad0019737ec374a8a6be9a956786aaf9"}, + {file = "websockets-15.0.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d08eb4c2b7d6c41da6ca0600c077e93f5adcfd979cd777d747e9ee624556da4b"}, + {file = "websockets-15.0.1-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b826973a4a2ae47ba357e4e82fa44a463b8f168e1ca775ac64521442b19e87f"}, + {file = "websockets-15.0.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:21c1fa28a6a7e3cbdc171c694398b6df4744613ce9b36b1a498e816787e28123"}, + {file = "websockets-15.0.1-py3-none-any.whl", hash = "sha256:f7a866fbc1e97b5c617ee4116daaa09b722101d4a3c170c787450ba409f9736f"}, + {file = "websockets-15.0.1.tar.gz", hash = "sha256:82544de02076bafba038ce055ee6412d68da13ab47f0c60cab827346de828dee"}, +] [[package]] name = "xmltodict" version = "0.13.0" description = "Makes working with XML feel like you are working with JSON" -category = "dev" 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"}, +] [[package]] name = "zipp" -version = "3.8.0" +version = "3.23.0" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "dev" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" +groups = ["dev"] +markers = "python_version == \"3.9\"" +files = [ + {file = "zipp-3.23.0-py3-none-any.whl", hash = "sha256:071652d6115ed432f5ce1d34c336c0adfd6a884660d1e9712a256d3d3bd4b14e"}, + {file = "zipp-3.23.0.tar.gz", hash = "sha256:a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166"}, +] [package.extras] -docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\""] +cover = ["pytest-cov"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +enabler = ["pytest-enabler (>=2.2)"] +test = ["big-O", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more_itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] +type = ["pytest-mypy"] [metadata] -lock-version = "1.1" -python-versions = "^3.8" -content-hash = "153672ed6b62a1b12aeede22533449822e209a52086d276e16b1c62979fe2d83" - -[metadata.files] -alabaster = [ - {file = "alabaster-0.7.12-py2.py3-none-any.whl", hash = "sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359"}, - {file = "alabaster-0.7.12.tar.gz", hash = "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"}, -] -attrs = [ - {file = "attrs-21.4.0-py2.py3-none-any.whl", hash = "sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4"}, - {file = "attrs-21.4.0.tar.gz", hash = "sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd"}, -] -babel = [ - {file = "Babel-2.10.1-py3-none-any.whl", hash = "sha256:3f349e85ad3154559ac4930c3918247d319f21910d5ce4b25d439ed8693b98d2"}, - {file = "Babel-2.10.1.tar.gz", hash = "sha256:98aeaca086133efb3e1e2aad0396987490c8425929ddbcfe0550184fdc54cd13"}, -] -black = [ - {file = "black-22.6.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f586c26118bc6e714ec58c09df0157fe2d9ee195c764f630eb0d8e7ccce72e69"}, - {file = "black-22.6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b270a168d69edb8b7ed32c193ef10fd27844e5c60852039599f9184460ce0807"}, - {file = "black-22.6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6797f58943fceb1c461fb572edbe828d811e719c24e03375fd25170ada53825e"}, - {file = "black-22.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c85928b9d5f83b23cee7d0efcb310172412fbf7cb9d9ce963bd67fd141781def"}, - {file = "black-22.6.0-cp310-cp310-win_amd64.whl", hash = "sha256:f6fe02afde060bbeef044af7996f335fbe90b039ccf3f5eb8f16df8b20f77666"}, - {file = "black-22.6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:cfaf3895a9634e882bf9d2363fed5af8888802d670f58b279b0bece00e9a872d"}, - {file = "black-22.6.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94783f636bca89f11eb5d50437e8e17fbc6a929a628d82304c80fa9cd945f256"}, - {file = "black-22.6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:2ea29072e954a4d55a2ff58971b83365eba5d3d357352a07a7a4df0d95f51c78"}, - {file = "black-22.6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e439798f819d49ba1c0bd9664427a05aab79bfba777a6db94fd4e56fae0cb849"}, - {file = "black-22.6.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:187d96c5e713f441a5829e77120c269b6514418f4513a390b0499b0987f2ff1c"}, - {file = "black-22.6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:074458dc2f6e0d3dab7928d4417bb6957bb834434516f21514138437accdbe90"}, - {file = "black-22.6.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a218d7e5856f91d20f04e931b6f16d15356db1c846ee55f01bac297a705ca24f"}, - {file = "black-22.6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:568ac3c465b1c8b34b61cd7a4e349e93f91abf0f9371eda1cf87194663ab684e"}, - {file = "black-22.6.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6c1734ab264b8f7929cef8ae5f900b85d579e6cbfde09d7387da8f04771b51c6"}, - {file = "black-22.6.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c9a3ac16efe9ec7d7381ddebcc022119794872abce99475345c5a61aa18c45ad"}, - {file = "black-22.6.0-cp38-cp38-win_amd64.whl", hash = "sha256:b9fd45787ba8aa3f5e0a0a98920c1012c884622c6c920dbe98dbd05bc7c70fbf"}, - {file = "black-22.6.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7ba9be198ecca5031cd78745780d65a3f75a34b2ff9be5837045dce55db83d1c"}, - {file = "black-22.6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a3db5b6409b96d9bd543323b23ef32a1a2b06416d525d27e0f67e74f1446c8f2"}, - {file = "black-22.6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:560558527e52ce8afba936fcce93a7411ab40c7d5fe8c2463e279e843c0328ee"}, - {file = "black-22.6.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b154e6bbde1e79ea3260c4b40c0b7b3109ffcdf7bc4ebf8859169a6af72cd70b"}, - {file = "black-22.6.0-cp39-cp39-win_amd64.whl", hash = "sha256:4af5bc0e1f96be5ae9bd7aaec219c901a94d6caa2484c21983d043371c733fc4"}, - {file = "black-22.6.0-py3-none-any.whl", hash = "sha256:ac609cf8ef5e7115ddd07d85d988d074ed00e10fbc3445aee393e70164a2219c"}, - {file = "black-22.6.0.tar.gz", hash = "sha256:6c6d39e28aed379aec40da1c65434c77d75e65bb59a1e1c283de545fb4e7c6c9"}, -] -certifi = [ - {file = "certifi-2022.6.15-py3-none-any.whl", hash = "sha256:fe86415d55e84719d75f8b69414f6438ac3547d2078ab91b67e779ef69378412"}, - {file = "certifi-2022.6.15.tar.gz", hash = "sha256:84c85a9078b11105f04f3036a9482ae10e4621616db313fe045dd24743a0820d"}, -] -charset-normalizer = [ - {file = "charset-normalizer-2.0.12.tar.gz", hash = "sha256:2857e29ff0d34db842cd7ca3230549d1a697f96ee6d3fb071cfa6c7393832597"}, - {file = "charset_normalizer-2.0.12-py3-none-any.whl", hash = "sha256:6881edbebdb17b39b4eaaa821b438bf6eddffb4468cf344f09f89def34a8b1df"}, -] -click = [ - {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, - {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, -] -colorama = [ - {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, - {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, -] -docutils = [ - {file = "docutils-0.17.1-py2.py3-none-any.whl", hash = "sha256:cf316c8370a737a022b72b56874f6602acf974a37a9fba42ec2876387549fc61"}, - {file = "docutils-0.17.1.tar.gz", hash = "sha256:686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125"}, -] -furl = [ - {file = "furl-2.1.3-py2.py3-none-any.whl", hash = "sha256:9ab425062c4217f9802508e45feb4a83e54324273ac4b202f1850363309666c0"}, - {file = "furl-2.1.3.tar.gz", hash = "sha256:5a6188fe2666c484a12159c18be97a1977a71d632ef5bb867ef15f54af39cc4e"}, -] -idna = [ - {file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"}, - {file = "idna-3.3.tar.gz", hash = "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"}, -] -imagesize = [ - {file = "imagesize-1.3.0-py2.py3-none-any.whl", hash = "sha256:1db2f82529e53c3e929e8926a1fa9235aa82d0bd0c580359c67ec31b2fddaa8c"}, - {file = "imagesize-1.3.0.tar.gz", hash = "sha256:cd1750d452385ca327479d45b64d9c7729ecf0b3969a58148298c77092261f9d"}, -] -importlib-metadata = [ - {file = "importlib_metadata-4.11.3-py3-none-any.whl", hash = "sha256:1208431ca90a8cca1a6b8af391bb53c1a2db74e5d1cef6ddced95d4b2062edc6"}, - {file = "importlib_metadata-4.11.3.tar.gz", hash = "sha256:ea4c597ebf37142f827b8f39299579e31685c31d3a438b59f469406afd0f2539"}, -] -importlib-resources = [ - {file = "importlib_resources-5.7.1-py3-none-any.whl", hash = "sha256:e447dc01619b1e951286f3929be820029d48c75eb25d265c28b92a16548212b8"}, - {file = "importlib_resources-5.7.1.tar.gz", hash = "sha256:b6062987dfc51f0fcb809187cffbd60f35df7acb4589091f154214af6d0d49d3"}, -] -jinja2 = [ - {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, - {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, -] -jsonschema = [ - {file = "jsonschema-4.5.1-py3-none-any.whl", hash = "sha256:71b5e39324422543546572954ce71c67728922c104902cb7ce252e522235b33f"}, - {file = "jsonschema-4.5.1.tar.gz", hash = "sha256:7c6d882619340c3347a1bf7315e147e6d3dae439033ae6383d6acb908c101dfc"}, -] -markupsafe = [ - {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"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-win32.whl", hash = "sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-win32.whl", hash = "sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-win32.whl", hash = "sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-win32.whl", hash = "sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"}, - {file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"}, -] -mypy = [ - {file = "mypy-0.971-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f2899a3cbd394da157194f913a931edfd4be5f274a88041c9dc2d9cdcb1c315c"}, - {file = "mypy-0.971-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:98e02d56ebe93981c41211c05adb630d1d26c14195d04d95e49cd97dbc046dc5"}, - {file = "mypy-0.971-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:19830b7dba7d5356d3e26e2427a2ec91c994cd92d983142cbd025ebe81d69cf3"}, - {file = "mypy-0.971-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:02ef476f6dcb86e6f502ae39a16b93285fef97e7f1ff22932b657d1ef1f28655"}, - {file = "mypy-0.971-cp310-cp310-win_amd64.whl", hash = "sha256:25c5750ba5609a0c7550b73a33deb314ecfb559c350bb050b655505e8aed4103"}, - {file = "mypy-0.971-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d3348e7eb2eea2472db611486846742d5d52d1290576de99d59edeb7cd4a42ca"}, - {file = "mypy-0.971-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3fa7a477b9900be9b7dd4bab30a12759e5abe9586574ceb944bc29cddf8f0417"}, - {file = "mypy-0.971-cp36-cp36m-win_amd64.whl", hash = "sha256:2ad53cf9c3adc43cf3bea0a7d01a2f2e86db9fe7596dfecb4496a5dda63cbb09"}, - {file = "mypy-0.971-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:855048b6feb6dfe09d3353466004490b1872887150c5bb5caad7838b57328cc8"}, - {file = "mypy-0.971-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:23488a14a83bca6e54402c2e6435467a4138785df93ec85aeff64c6170077fb0"}, - {file = "mypy-0.971-cp37-cp37m-win_amd64.whl", hash = "sha256:4b21e5b1a70dfb972490035128f305c39bc4bc253f34e96a4adf9127cf943eb2"}, - {file = "mypy-0.971-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:9796a2ba7b4b538649caa5cecd398d873f4022ed2333ffde58eaf604c4d2cb27"}, - {file = "mypy-0.971-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:5a361d92635ad4ada1b1b2d3630fc2f53f2127d51cf2def9db83cba32e47c856"}, - {file = "mypy-0.971-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b793b899f7cf563b1e7044a5c97361196b938e92f0a4343a5d27966a53d2ec71"}, - {file = "mypy-0.971-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d1ea5d12c8e2d266b5fb8c7a5d2e9c0219fedfeb493b7ed60cd350322384ac27"}, - {file = "mypy-0.971-cp38-cp38-win_amd64.whl", hash = "sha256:23c7ff43fff4b0df93a186581885c8512bc50fc4d4910e0f838e35d6bb6b5e58"}, - {file = "mypy-0.971-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:1f7656b69974a6933e987ee8ffb951d836272d6c0f81d727f1d0e2696074d9e6"}, - {file = "mypy-0.971-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d2022bfadb7a5c2ef410d6a7c9763188afdb7f3533f22a0a32be10d571ee4bbe"}, - {file = "mypy-0.971-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ef943c72a786b0f8d90fd76e9b39ce81fb7171172daf84bf43eaf937e9f220a9"}, - {file = "mypy-0.971-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d744f72eb39f69312bc6c2abf8ff6656973120e2eb3f3ec4f758ed47e414a4bf"}, - {file = "mypy-0.971-cp39-cp39-win_amd64.whl", hash = "sha256:77a514ea15d3007d33a9e2157b0ba9c267496acf12a7f2b9b9f8446337aac5b0"}, - {file = "mypy-0.971-py3-none-any.whl", hash = "sha256:0d054ef16b071149917085f51f89555a576e2618d5d9dd70bd6eea6410af3ac9"}, - {file = "mypy-0.971.tar.gz", hash = "sha256:40b0f21484238269ae6a57200c807d80debc6459d444c0489a102d7c6a75fa56"}, -] -mypy-extensions = [ - {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, - {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, -] -orderedmultidict = [ - {file = "orderedmultidict-1.0.1-py2.py3-none-any.whl", hash = "sha256:43c839a17ee3cdd62234c47deca1a8508a3f2ca1d0678a3bf791c87cf84adbf3"}, - {file = "orderedmultidict-1.0.1.tar.gz", hash = "sha256:04070bbb5e87291cc9bfa51df413677faf2141c73c61d2a5f7b26bea3cd882ad"}, -] -packaging = [ - {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, - {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, -] -pathspec = [ - {file = "pathspec-0.9.0-py2.py3-none-any.whl", hash = "sha256:7d15c4ddb0b5c802d161efc417ec1a2558ea2653c2e8ad9c19098201dc1c993a"}, - {file = "pathspec-0.9.0.tar.gz", hash = "sha256:e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1"}, -] -platformdirs = [ - {file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"}, - {file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"}, -] -pook = [ - {file = "pook-1.0.2-py2-none-any.whl", hash = "sha256:cd3cbfe280d544e672f41a5b9482883841ba247f865858b57fd59f729e37616a"}, - {file = "pook-1.0.2-py3-none-any.whl", hash = "sha256:2e16d231ec9fe071c14cad7fe41261f65b401f6cb30935a169cf6fc229bd0a1d"}, - {file = "pook-1.0.2.tar.gz", hash = "sha256:f28112db062d17db245b351c80f2bb5bf1e56ebfa93d3d75cc44f500c15c40eb"}, -] -pygments = [ - {file = "Pygments-2.12.0-py3-none-any.whl", hash = "sha256:dc9c10fb40944260f6ed4c688ece0cd2048414940f1cea51b8b226318411c519"}, - {file = "Pygments-2.12.0.tar.gz", hash = "sha256:5eb116118f9612ff1ee89ac96437bb6b49e8f04d8a13b514ba26f620208e26eb"}, -] -pyparsing = [ - {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, - {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, -] -pyrsistent = [ - {file = "pyrsistent-0.18.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:df46c854f490f81210870e509818b729db4488e1f30f2a1ce1698b2295a878d1"}, - {file = "pyrsistent-0.18.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d45866ececf4a5fff8742c25722da6d4c9e180daa7b405dc0a2a2790d668c26"}, - {file = "pyrsistent-0.18.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4ed6784ceac462a7d6fcb7e9b663e93b9a6fb373b7f43594f9ff68875788e01e"}, - {file = "pyrsistent-0.18.1-cp310-cp310-win32.whl", hash = "sha256:e4f3149fd5eb9b285d6bfb54d2e5173f6a116fe19172686797c056672689daf6"}, - {file = "pyrsistent-0.18.1-cp310-cp310-win_amd64.whl", hash = "sha256:636ce2dc235046ccd3d8c56a7ad54e99d5c1cd0ef07d9ae847306c91d11b5fec"}, - {file = "pyrsistent-0.18.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e92a52c166426efbe0d1ec1332ee9119b6d32fc1f0bbfd55d5c1088070e7fc1b"}, - {file = "pyrsistent-0.18.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7a096646eab884bf8bed965bad63ea327e0d0c38989fc83c5ea7b8a87037bfc"}, - {file = "pyrsistent-0.18.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cdfd2c361b8a8e5d9499b9082b501c452ade8bbf42aef97ea04854f4a3f43b22"}, - {file = "pyrsistent-0.18.1-cp37-cp37m-win32.whl", hash = "sha256:7ec335fc998faa4febe75cc5268a9eac0478b3f681602c1f27befaf2a1abe1d8"}, - {file = "pyrsistent-0.18.1-cp37-cp37m-win_amd64.whl", hash = "sha256:6455fc599df93d1f60e1c5c4fe471499f08d190d57eca040c0ea182301321286"}, - {file = "pyrsistent-0.18.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:fd8da6d0124efa2f67d86fa70c851022f87c98e205f0594e1fae044e7119a5a6"}, - {file = "pyrsistent-0.18.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bfe2388663fd18bd8ce7db2c91c7400bf3e1a9e8bd7d63bf7e77d39051b85ec"}, - {file = "pyrsistent-0.18.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0e3e1fcc45199df76053026a51cc59ab2ea3fc7c094c6627e93b7b44cdae2c8c"}, - {file = "pyrsistent-0.18.1-cp38-cp38-win32.whl", hash = "sha256:b568f35ad53a7b07ed9b1b2bae09eb15cdd671a5ba5d2c66caee40dbf91c68ca"}, - {file = "pyrsistent-0.18.1-cp38-cp38-win_amd64.whl", hash = "sha256:d1b96547410f76078eaf66d282ddca2e4baae8964364abb4f4dcdde855cd123a"}, - {file = "pyrsistent-0.18.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:f87cc2863ef33c709e237d4b5f4502a62a00fab450c9e020892e8e2ede5847f5"}, - {file = "pyrsistent-0.18.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bc66318fb7ee012071b2792024564973ecc80e9522842eb4e17743604b5e045"}, - {file = "pyrsistent-0.18.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:914474c9f1d93080338ace89cb2acee74f4f666fb0424896fcfb8d86058bf17c"}, - {file = "pyrsistent-0.18.1-cp39-cp39-win32.whl", hash = "sha256:1b34eedd6812bf4d33814fca1b66005805d3640ce53140ab8bbb1e2651b0d9bc"}, - {file = "pyrsistent-0.18.1-cp39-cp39-win_amd64.whl", hash = "sha256:e24a828f57e0c337c8d8bb9f6b12f09dfdf0273da25fda9e314f0b684b415a07"}, - {file = "pyrsistent-0.18.1.tar.gz", hash = "sha256:d4d61f8b993a7255ba714df3aca52700f8125289f84f704cf80916517c46eb96"}, -] -pytz = [ - {file = "pytz-2022.1-py2.py3-none-any.whl", hash = "sha256:e68985985296d9a66a881eb3193b0906246245294a881e7c8afe623866ac6a5c"}, - {file = "pytz-2022.1.tar.gz", hash = "sha256:1e760e2fe6a8163bc0b3d9a19c4f84342afa0a2affebfaa84b01b978a02ecaa7"}, -] -requests = [ - {file = "requests-2.27.1-py2.py3-none-any.whl", hash = "sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d"}, - {file = "requests-2.27.1.tar.gz", hash = "sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61"}, -] -six = [ - {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, - {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, -] -snowballstemmer = [ - {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, - {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, -] -sphinx = [ - {file = "Sphinx-5.1.1-py3-none-any.whl", hash = "sha256:309a8da80cb6da9f4713438e5b55861877d5d7976b69d87e336733637ea12693"}, - {file = "Sphinx-5.1.1.tar.gz", hash = "sha256:ba3224a4e206e1fbdecf98a4fae4992ef9b24b85ebf7b584bb340156eaf08d89"}, -] -sphinx-autodoc-typehints = [ - {file = "sphinx_autodoc_typehints-1.19.2-py3-none-any.whl", hash = "sha256:3d761de928d5a86901331133d6d4a2552afa2e798ebcfc0886791792aeb4dd9a"}, - {file = "sphinx_autodoc_typehints-1.19.2.tar.gz", hash = "sha256:872fb2d7b3d794826c28e36edf6739e93549491447dcabeb07c58855e9f914de"}, -] -sphinx-rtd-theme = [ - {file = "sphinx_rtd_theme-1.0.0-py2.py3-none-any.whl", hash = "sha256:4d35a56f4508cfee4c4fb604373ede6feae2a306731d533f409ef5c3496fdbd8"}, - {file = "sphinx_rtd_theme-1.0.0.tar.gz", hash = "sha256:eec6d497e4c2195fa0e8b2016b337532b8a699a68bcb22a512870e16925c6a5c"}, -] -sphinxcontrib-applehelp = [ - {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"}, -] -sphinxcontrib-devhelp = [ - {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"}, -] -sphinxcontrib-htmlhelp = [ - {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"}, -] -sphinxcontrib-jsmath = [ - {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"}, -] -sphinxcontrib-qthelp = [ - {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"}, -] -sphinxcontrib-serializinghtml = [ - {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"}, -] -tomli = [ - {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, - {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, -] -types-certifi = [ - {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"}, -] -types-setuptools = [ - {file = "types-setuptools-65.1.0.tar.gz", hash = "sha256:57f7d89eaa52a40ccb97f2cbe6178c6ad90f843afb67680933f8ef1472da53f8"}, - {file = "types_setuptools-65.1.0-py3-none-any.whl", hash = "sha256:050ccaff1d0fecc1b1269168fe4da396c2a0743f0d287af391a9312c18a8b095"}, -] -types-urllib3 = [ - {file = "types-urllib3-1.26.23.tar.gz", hash = "sha256:b78e819f0e350221d0689a5666162e467ba3910737bafda14b5c2c85e9bb1e56"}, - {file = "types_urllib3-1.26.23-py3-none-any.whl", hash = "sha256:333e675b188a1c1fd980b4b352f9e40572413a4c1ac689c23cd546e96310070a"}, -] -typing-extensions = [ - {file = "typing_extensions-4.2.0-py3-none-any.whl", hash = "sha256:6657594ee297170d19f67d55c05852a874e7eb634f4f753dbd667855e07c1708"}, - {file = "typing_extensions-4.2.0.tar.gz", hash = "sha256:f1c24655a0da0d1b67f07e17a5e6b2a105894e6824b92096378bb3668ef02376"}, -] -urllib3 = [ - {file = "urllib3-1.26.12-py2.py3-none-any.whl", hash = "sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997"}, - {file = "urllib3-1.26.12.tar.gz", hash = "sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e"}, -] -websockets = [ - {file = "websockets-10.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:661f641b44ed315556a2fa630239adfd77bd1b11cb0b9d96ed8ad90b0b1e4978"}, - {file = "websockets-10.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b529fdfa881b69fe563dbd98acce84f3e5a67df13de415e143ef053ff006d500"}, - {file = "websockets-10.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f351c7d7d92f67c0609329ab2735eee0426a03022771b00102816a72715bb00b"}, - {file = "websockets-10.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:379e03422178436af4f3abe0aa8f401aa77ae2487843738542a75faf44a31f0c"}, - {file = "websockets-10.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:e904c0381c014b914136c492c8fa711ca4cced4e9b3d110e5e7d436d0fc289e8"}, - {file = "websockets-10.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e7e6f2d6fd48422071cc8a6f8542016f350b79cc782752de531577d35e9bd677"}, - {file = "websockets-10.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b9c77f0d1436ea4b4dc089ed8335fa141e6a251a92f75f675056dac4ab47a71e"}, - {file = "websockets-10.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e6fa05a680e35d0fcc1470cb070b10e6fe247af54768f488ed93542e71339d6f"}, - {file = "websockets-10.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:2f94fa3ae454a63ea3a19f73b95deeebc9f02ba2d5617ca16f0bbdae375cda47"}, - {file = "websockets-10.3-cp310-cp310-win32.whl", hash = "sha256:6ed1d6f791eabfd9808afea1e068f5e59418e55721db8b7f3bfc39dc831c42ae"}, - {file = "websockets-10.3-cp310-cp310-win_amd64.whl", hash = "sha256:347974105bbd4ea068106ec65e8e8ebd86f28c19e529d115d89bd8cc5cda3079"}, - {file = "websockets-10.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:fab7c640815812ed5f10fbee7abbf58788d602046b7bb3af9b1ac753a6d5e916"}, - {file = "websockets-10.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:994cdb1942a7a4c2e10098d9162948c9e7b235df755de91ca33f6e0481366fdb"}, - {file = "websockets-10.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:aad5e300ab32036eb3fdc350ad30877210e2f51bceaca83fb7fef4d2b6c72b79"}, - {file = "websockets-10.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e49ea4c1a9543d2bd8a747ff24411509c29e4bdcde05b5b0895e2120cb1a761d"}, - {file = "websockets-10.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:6ea6b300a6bdd782e49922d690e11c3669828fe36fc2471408c58b93b5535a98"}, - {file = "websockets-10.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:ef5ce841e102278c1c2e98f043db99d6755b1c58bde475516aef3a008ed7f28e"}, - {file = "websockets-10.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d1655a6fc7aecd333b079d00fb3c8132d18988e47f19740c69303bf02e9883c6"}, - {file = "websockets-10.3-cp37-cp37m-win32.whl", hash = "sha256:83e5ca0d5b743cde3d29fda74ccab37bdd0911f25bd4cdf09ff8b51b7b4f2fa1"}, - {file = "websockets-10.3-cp37-cp37m-win_amd64.whl", hash = "sha256:da4377904a3379f0c1b75a965fff23b28315bcd516d27f99a803720dfebd94d4"}, - {file = "websockets-10.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a1e15b230c3613e8ea82c9fc6941b2093e8eb939dd794c02754d33980ba81e36"}, - {file = "websockets-10.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:31564a67c3e4005f27815634343df688b25705cccb22bc1db621c781ddc64c69"}, - {file = "websockets-10.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:c8d1d14aa0f600b5be363077b621b1b4d1eb3fbf90af83f9281cda668e6ff7fd"}, - {file = "websockets-10.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8fbd7d77f8aba46d43245e86dd91a8970eac4fb74c473f8e30e9c07581f852b2"}, - {file = "websockets-10.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:210aad7fdd381c52e58777560860c7e6110b6174488ef1d4b681c08b68bf7f8c"}, - {file = "websockets-10.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6075fd24df23133c1b078e08a9b04a3bc40b31a8def4ee0b9f2c8865acce913e"}, - {file = "websockets-10.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:7f6d96fdb0975044fdd7953b35d003b03f9e2bcf85f2d2cf86285ece53e9f991"}, - {file = "websockets-10.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:c7250848ce69559756ad0086a37b82c986cd33c2d344ab87fea596c5ac6d9442"}, - {file = "websockets-10.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:28dd20b938a57c3124028680dc1600c197294da5db4292c76a0b48efb3ed7f76"}, - {file = "websockets-10.3-cp38-cp38-win32.whl", hash = "sha256:54c000abeaff6d8771a4e2cef40900919908ea7b6b6a30eae72752607c6db559"}, - {file = "websockets-10.3-cp38-cp38-win_amd64.whl", hash = "sha256:7ab36e17af592eec5747c68ef2722a74c1a4a70f3772bc661079baf4ae30e40d"}, - {file = "websockets-10.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:a141de3d5a92188234afa61653ed0bbd2dde46ad47b15c3042ffb89548e77094"}, - {file = "websockets-10.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:97bc9d41e69a7521a358f9b8e44871f6cdeb42af31815c17aed36372d4eec667"}, - {file = "websockets-10.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d6353ba89cfc657a3f5beabb3b69be226adbb5c6c7a66398e17809b0ce3c4731"}, - {file = "websockets-10.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ec2b0ab7edc8cd4b0eb428b38ed89079bdc20c6bdb5f889d353011038caac2f9"}, - {file = "websockets-10.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:85506b3328a9e083cc0a0fb3ba27e33c8db78341b3eb12eb72e8afd166c36680"}, - {file = "websockets-10.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:8af75085b4bc0b5c40c4a3c0e113fa95e84c60f4ed6786cbb675aeb1ee128247"}, - {file = "websockets-10.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:07cdc0a5b2549bcfbadb585ad8471ebdc7bdf91e32e34ae3889001c1c106a6af"}, - {file = "websockets-10.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:5b936bf552e4f6357f5727579072ff1e1324717902127ffe60c92d29b67b7be3"}, - {file = "websockets-10.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e4e08305bfd76ba8edab08dcc6496f40674f44eb9d5e23153efa0a35750337e8"}, - {file = "websockets-10.3-cp39-cp39-win32.whl", hash = "sha256:bb621ec2dbbbe8df78a27dbd9dd7919f9b7d32a73fafcb4d9252fc4637343582"}, - {file = "websockets-10.3-cp39-cp39-win_amd64.whl", hash = "sha256:51695d3b199cd03098ae5b42833006a0f43dc5418d3102972addc593a783bc02"}, - {file = "websockets-10.3-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:907e8247480f287aa9bbc9391bd6de23c906d48af54c8c421df84655eef66af7"}, - {file = "websockets-10.3-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8b1359aba0ff810d5830d5ab8e2c4a02bebf98a60aa0124fb29aa78cfdb8031f"}, - {file = "websockets-10.3-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:93d5ea0b5da8d66d868b32c614d2b52d14304444e39e13a59566d4acb8d6e2e4"}, - {file = "websockets-10.3-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:7934e055fd5cd9dee60f11d16c8d79c4567315824bacb1246d0208a47eca9755"}, - {file = "websockets-10.3-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:3eda1cb7e9da1b22588cefff09f0951771d6ee9fa8dbe66f5ae04cc5f26b2b55"}, - {file = "websockets-10.3.tar.gz", hash = "sha256:fc06cc8073c8e87072138ba1e431300e2d408f054b27047d047b549455066ff4"}, -] -xmltodict = [ - {file = "xmltodict-0.13.0-py2.py3-none-any.whl", hash = "sha256:aa89e8fd76320154a40d19a0df04a4695fb9dc5ba977cbb68ab3e4eb225e7852"}, - {file = "xmltodict-0.13.0.tar.gz", hash = "sha256:341595a488e3e01a85a9d8911d8912fd922ede5fecc4dce437eb4b6c8d037e56"}, -] -zipp = [ - {file = "zipp-3.8.0-py3-none-any.whl", hash = "sha256:c4f6e5bbf48e74f7a38e7cc5b0480ff42b0ae5178957d564d18932525d5cf099"}, - {file = "zipp-3.8.0.tar.gz", hash = "sha256:56bf8aadb83c24db6c4b577e13de374ccfb67da2078beba1d037c17980bf43ad"}, -] +lock-version = "2.1" +python-versions = "^3.9" +content-hash = "a107a664db6e290f90c70e0ef2f9bd71a553895783c6c62599c6ff9c0f4954d5" diff --git a/polygon/modelclass.py b/polygon/modelclass.py deleted file mode 100644 index 179e2689..00000000 --- a/polygon/modelclass.py +++ /dev/null @@ -1,23 +0,0 @@ -import inspect -from dataclasses import dataclass - - -def modelclass(cls): - cls = dataclass(cls) - attributes = [ - a - for a in cls.__dict__["__annotations__"].keys() - if not a.startswith("__") and not inspect.isroutine(a) - ] - - def init(self, *args, **kwargs): - for (i, a) in enumerate(args): - if i < len(attributes): - self.__dict__[attributes[i]] = a - for (k, v) in kwargs.items(): - if k in attributes: - self.__dict__[k] = v - - cls.__init__ = init - - return cls diff --git a/polygon/rest/base.py b/polygon/rest/base.py deleted file mode 100644 index 8afbd330..00000000 --- a/polygon/rest/base.py +++ /dev/null @@ -1,185 +0,0 @@ -import certifi -import json -import urllib3 -import inspect -from enum import Enum -from typing import Optional, Any, Dict -from datetime import datetime -import pkg_resources # part of setuptools -from ..logging import get_logger -import logging -from ..exceptions import AuthError, BadResponse, NoResultsError - -logger = get_logger("RESTClient") -version = "unknown" -try: - version = pkg_resources.require("polygon-api-client")[0].version -except: - pass - - -class BaseClient: - def __init__( - self, - api_key: Optional[str], - connect_timeout: float, - read_timeout: float, - num_pools: int, - retries: int, - base: str, - verbose: bool, - ): - if api_key is None: - raise AuthError( - f"Must specify env var POLYGON_API_KEY or pass api_key in constructor" - ) - self.API_KEY = api_key - self.BASE = base - - # 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={ - "Authorization": "Bearer " + self.API_KEY, - "User-Agent": f"Polygon.io PythonClient/{version}", - }, - ca_certs=certifi.where(), - cert_reqs="CERT_REQUIRED", - ) - self.timeout = urllib3.Timeout(connect=connect_timeout, read=read_timeout) - self.retries = retries - if verbose: - logger.setLevel(logging.DEBUG) - - def _decode(self, resp): - return json.loads(resp.data.decode("utf-8")) - - def _get( - self, - path: str, - params: Optional[dict] = None, - result_key: Optional[str] = None, - deserializer=None, - raw: bool = False, - ) -> Any: - if params is None: - params = {} - params = {str(k): str(v) for k, v in params.items() if v is not None} - logger.debug("_get %s params %s", path, params) - resp = self.client.request( - "GET", - self.BASE + path, - fields=params, - retries=self.retries, - ) - - if resp.status != 200: - raise BadResponse(resp.data.decode("utf-8")) - - if raw: - return resp - - obj = self._decode(resp) - - if result_key: - if result_key not in obj: - raise NoResultsError( - f'Expected key "{result_key}" in response {obj}.' - + "Make sure you have sufficient permissions and your request parameters are valid." - + f"This is the url that returned no results: {resp.geturl()}" - ) - obj = obj[result_key] - - if deserializer: - if type(obj) == list: - obj = [deserializer(o) for o in obj] - else: - obj = deserializer(obj) - - return obj - - @staticmethod - def time_mult(timestamp_res: str) -> int: - if timestamp_res == "nanos": - return 1000000000 - elif timestamp_res == "micros": - return 1000000 - elif timestamp_res == "millis": - return 1000 - - return 1 - - def _get_params( - self, fn, caller_locals: Dict[str, Any], datetime_res: str = "nanos" - ): - params = caller_locals["params"] - if params is None: - params = {} - # https://docs.python.org/3.8/library/inspect.html#inspect.Signature - for argname, v in inspect.signature(fn).parameters.items(): - # https://docs.python.org/3.8/library/inspect.html#inspect.Parameter - if argname in ["params", "raw"]: - continue - if v.default != v.empty: - # timestamp_lt -> timestamp.lt - val = caller_locals.get(argname, v.default) - if isinstance(val, Enum): - val = val.value - elif isinstance(val, datetime): - val = int(val.timestamp() * self.time_mult(datetime_res)) - if val is not None: - if ( - argname.endswith("_lt") - or argname.endswith("_lte") - or argname.endswith("_gt") - or argname.endswith("_gte") - ): - argname = ".".join(argname.rsplit("_", 1)) - params[argname] = val - - return params - - def _paginate_iter( - self, - path: str, - params: dict, - deserializer, - result_key: str = "results", - ): - while True: - resp = self._get( - path=path, - params=params, - deserializer=deserializer, - result_key=result_key, - raw=True, - ) - decoded = self._decode(resp) - for t in decoded[result_key]: - yield deserializer(t) - if "next_url" in decoded: - path = decoded["next_url"].replace(self.BASE, "") - params = {} - else: - return - - def _paginate( - self, - path: str, - params: dict, - raw: bool, - deserializer, - result_key: str = "results", - ): - if raw: - return self._get( - path=path, params=params, deserializer=deserializer, raw=True - ) - - return self._paginate_iter( - path=path, - params=params, - deserializer=deserializer, - result_key=result_key, - ) diff --git a/polygon/rest/models/dividends.py b/polygon/rest/models/dividends.py deleted file mode 100644 index 1abe5dc5..00000000 --- a/polygon/rest/models/dividends.py +++ /dev/null @@ -1,19 +0,0 @@ -from typing import Optional -from ...modelclass import modelclass - - -@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." - cash_amount: Optional[float] = None - declaration_date: Optional[str] = None - dividend_type: Optional[str] = None - ex_dividend_date: Optional[str] = None - frequency: Optional[int] = None - pay_date: Optional[str] = None - record_date: Optional[str] = None - ticker: Optional[str] = None - - @staticmethod - def from_dict(d): - return Dividend(**d) diff --git a/polygon/rest/models/financials.py b/polygon/rest/models/financials.py deleted file mode 100644 index 85a63e37..00000000 --- a/polygon/rest/models/financials.py +++ /dev/null @@ -1,322 +0,0 @@ -from typing import Optional, Dict -from ...modelclass import modelclass - - -@modelclass -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 - - @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." - 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 NetCashFlow(**d) - - -@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 - - @staticmethod - def from_dict(d): - return NetCashFlowFromFinancingActivities(**d) - - -@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 - - @staticmethod - def from_dict(d): - 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"] - ), - ) - - -@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) - - -@modelclass -class ComprehensiveIncome: - "Contains comprehensive income data." - comprehensive_income_loss: Optional[ComprehensiveIncomeLoss] = None - comprehensive_income_loss_attributable_to_parent: Optional[ - ComprehensiveIncomeLossAttributableToParent - ] = None - other_comprehensive_income_loss: Optional[OtherComprehensiveIncomeLoss] = None - - @staticmethod - def from_dict(d): - 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"] - ), - ) - - -@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) - - -@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 - - @staticmethod - def from_dict(d): - 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"]), - ) - - -@modelclass -class Financials: - "Contains financial data." - balance_sheet: Optional[Dict[str, DataPoint]] = None - cash_flow_statement: Optional[CashFlowStatement] = None - comprehensive_income: Optional[ComprehensiveIncome] = None - income_statement: Optional[IncomeStatement] = None - - @staticmethod - def from_dict(d): - 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"]), - ) - - -@modelclass -class StockFinancial: - "StockFinancial contains historical financial data for a stock ticker." - cik: Optional[str] = None - company_name: Optional[str] = None - end_date: Optional[str] = None - filing_date: Optional[str] = None - financials: Optional[Financials] = None - fiscal_period: Optional[str] = None - fiscal_year: Optional[str] = None - source_filing_file_url: Optional[str] = None - source_filing_url: Optional[str] = None - start_date: Optional[str] = None - - @staticmethod - def from_dict(d): - 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), - ) diff --git a/polygon/rest/models/snapshot.py b/polygon/rest/models/snapshot.py deleted file mode 100644 index 676becb9..00000000 --- a/polygon/rest/models/snapshot.py +++ /dev/null @@ -1,216 +0,0 @@ -from typing import Optional, List, Dict -from .aggs import Agg -from .quotes import LastQuote -from .trades import LastTrade -from ...modelclass import modelclass - - -@modelclass -class MinuteSnapshot: - "Most recent minute bar." - accumulated_volume: Optional[float] = None - open: Optional[float] = None - high: Optional[float] = None - low: Optional[float] = None - close: Optional[float] = None - volume: Optional[float] = None - vwap: Optional[float] = None - otc: Optional[bool] = None - - @staticmethod - def from_dict(d): - return MinuteSnapshot( - d.get("av", None), - d.get("o", None), - d.get("h", None), - d.get("l", None), - d.get("c", None), - d.get("v", None), - d.get("vw", None), - d.get("otc", None), - ) - - -@modelclass -class TickerSnapshot: - "Contains the most up-to-date market data for all traded ticker symbols." - day: Optional[Agg] = None - last_quote: Optional[LastQuote] = None - last_trade: Optional[LastTrade] = None - min: Optional[MinuteSnapshot] = None - prev_day: Optional[Agg] = None - ticker: Optional[str] = None - todays_change: Optional[float] = None - todays_change_percent: Optional[float] = None - updated: Optional[int] = None - - @staticmethod - 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"]), - 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), - todays_change=d.get("todaysChange", None), - todays_change_percent=d.get("todaysChangePerc", None), - updated=d.get("updated", None), - ) - - -@modelclass -class DayOptionContractSnapshot: - "Contains data for the most recent daily bar in an options contract." - change: Optional[float] = None - change_percent: Optional[float] = None - close: Optional[float] = None - high: Optional[float] = None - last_updated: Optional[int] = None - low: Optional[float] = None - open: Optional[float] = None - previous_close: Optional[float] = None - volume: Optional[float] = None - vwap: Optional[float] = None - - @staticmethod - def from_dict(d): - return DayOptionContractSnapshot(**d) - - -@modelclass -class OptionDetails: - "Contains details for an options contract." - contract_type: Optional[str] = None - exercise_style: Optional[str] = None - expiration_date: Optional[str] = None - shares_per_contract: Optional[float] = None - strike_price: Optional[float] = None - ticker: Optional[str] = None - - @staticmethod - def from_dict(d): - return OptionDetails(**d) - - -@modelclass -class LastQuoteOptionContractSnapshot: - "Contains data for the most recent quote in an options contract." - ask: Optional[float] = None - ask_size: Optional[float] = None - bid: Optional[float] = None - bid_size: Optional[float] = None - last_updated: Optional[int] = None - midpoint: Optional[float] = None - timeframe: Optional[str] = None - - @staticmethod - def from_dict(d): - return LastQuoteOptionContractSnapshot(**d) - - -@modelclass -class Greeks: - "Contains data for the greeks in an options contract." - delta: Optional[float] = None - gamma: Optional[float] = None - theta: Optional[float] = None - vega: Optional[float] = None - - @staticmethod - def from_dict(d): - return Greeks(**d) - - -@modelclass -class UnderlyingAsset: - "Contains data for the underlying stock in an options contract." - change_to_break_even: Optional[float] = None - last_updated: Optional[int] = None - price: Optional[float] = None - ticker: Optional[str] = None - timeframe: Optional[str] = None - - @staticmethod - def from_dict(d): - return UnderlyingAsset(**d) - - -@modelclass -class OptionContractSnapshot: - "Contains data for the snapshot of an option contract of a stock equity." - break_even_price: Optional[float] = None - day: Optional[DayOptionContractSnapshot] = None - details: Optional[OptionDetails] = None - greeks: Optional[Greeks] = None - implied_volatility: Optional[float] = None - last_quote: Optional[LastQuoteOptionContractSnapshot] = None - open_interest: Optional[float] = None - underlying_asset: Optional[UnderlyingAsset] = None - - @staticmethod - 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"]), - 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"]), - open_interest=d.get("open_interest", None), - underlying_asset=None - if "underlying_asset" not in d - else UnderlyingAsset.from_dict(d["underlying_asset"]), - ) - - -@modelclass -class OrderBookQuote: - "Contains data for a book bid or ask." - price: Optional[float] = None - exchange_shares: Optional[Dict[str, float]] = None - - @staticmethod - def from_dict(d): - return OrderBookQuote( - d.get("p", None), - d.get("x", None), - ) - - -@modelclass -class SnapshotTickerFullBook: - "Contains the current level 2 book of a single ticker. This is the combined book from all of the exchanges." - ticker: Optional[str] = None - bids: Optional[List[OrderBookQuote]] = None - asks: Optional[List[OrderBookQuote]] = None - bid_count: Optional[float] = None - ask_count: Optional[float] = None - spread: Optional[float] = None - updated: Optional[int] = None - - @staticmethod - 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"]], - bid_count=d.get("bidCount", None), - ask_count=d.get("askCount", None), - spread=d.get("spread", None), - updated=d.get("updated", None), - ) diff --git a/polygon/rest/models/splits.py b/polygon/rest/models/splits.py deleted file mode 100644 index 93244c50..00000000 --- a/polygon/rest/models/splits.py +++ /dev/null @@ -1,15 +0,0 @@ -from typing import Optional -from ...modelclass import modelclass - - -@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." - execution_date: Optional[str] = None - split_from: Optional[int] = None - split_to: Optional[int] = None - ticker: Optional[str] = None - - @staticmethod - def from_dict(d): - return Split(**d) diff --git a/polygon/rest/models/tickers.py b/polygon/rest/models/tickers.py deleted file mode 100644 index 831429ad..00000000 --- a/polygon/rest/models/tickers.py +++ /dev/null @@ -1,187 +0,0 @@ -from typing import Optional, List - -from ...modelclass import modelclass - - -@modelclass -class CompanyAddress: - "Contains address data for a ticker detail." - address1: Optional[str] = None - address2: Optional[str] = None - city: Optional[str] = None - state: Optional[str] = None - country: Optional[str] = None - postal_code: Optional[str] = None - - @staticmethod - def from_dict(d): - return CompanyAddress(**d) - - -@modelclass -class Branding: - "Contains branding data for a ticker detail." - icon_url: Optional[str] = None - logo_url: Optional[str] = None - accent_color: Optional[str] = None - light_color: Optional[str] = None - dark_color: Optional[str] = None - - @staticmethod - def from_dict(d): - return Branding(**d) - - -@modelclass -class Publisher: - "Contains publisher data for ticker news." - favicon_url: Optional[str] = None - homepage_url: Optional[str] = None - logo_url: Optional[str] = None - name: Optional[str] = None - - @staticmethod - def from_dict(d): - return Publisher(**d) - - -@modelclass -class Ticker: - "Ticker contains data for a specified ticker symbol." - active: Optional[bool] = None - cik: Optional[str] = None - composite_figi: Optional[str] = None - currency_name: Optional[str] = None - currency_symbol: Optional[str] = None - base_currency_symbol: Optional[str] = None - base_currency_name: Optional[str] = None - delisted_utc: Optional[str] = None - last_updated_utc: Optional[str] = None - locale: Optional[str] = None - market: Optional[str] = None - name: Optional[str] = None - primary_exchange: Optional[str] = None - share_class_figi: Optional[str] = None - ticker: Optional[str] = None - type: Optional[str] = None - - @staticmethod - def from_dict(d): - return Ticker(**d) - - -@modelclass -class TickerDetails: - "TickerDetails contains data for a specified ticker symbol." - active: Optional[bool] = None - address: Optional[CompanyAddress] = None - branding: Optional[Branding] = None - cik: Optional[str] = None - composite_figi: Optional[str] = None - currency_name: Optional[str] = None - currency_symbol: Optional[str] = None - base_currency_name: Optional[str] = None - base_currency_symbol: Optional[str] = None - delisted_utc: Optional[str] = None - description: Optional[str] = None - ticker_root: Optional[str] = None - homepage_url: Optional[str] = None - list_date: Optional[str] = None - locale: Optional[str] = None - market: Optional[str] = None - market_cap: Optional[float] = None - name: Optional[str] = None - phone_number: Optional[str] = None - primary_exchange: Optional[str] = None - share_class_figi: Optional[str] = None - share_class_shares_outstanding: Optional[int] = None - sic_code: Optional[str] = None - sic_description: Optional[str] = None - ticker: Optional[str] = None - total_employees: Optional[int] = None - type: Optional[str] = None - weighted_shares_outstanding: Optional[int] = None - - @staticmethod - def from_dict(d): - return TickerDetails( - active=d.get("active", None), - 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), - currency_name=d.get("currency_name", None), - currency_symbol=d.get("currency_symbol", None), - base_currency_name=d.get("base_currency_name", None), - base_currency_symbol=d.get("base_currency_symbol", None), - delisted_utc=d.get("delisted_utc", None), - description=d.get("description", None), - ticker_root=d.get("ticker_root", None), - homepage_url=d.get("homepage_url", None), - list_date=d.get("list_date", None), - locale=d.get("locale", None), - market=d.get("market", None), - market_cap=d.get("market_cap", None), - name=d.get("name", None), - phone_number=d.get("phone_number", None), - primary_exchange=d.get("primary_exchange", None), - share_class_figi=d.get("share_class_figi", None), - share_class_shares_outstanding=d.get( - "share_class_shares_outstanding", None - ), - sic_code=d.get("sic_code", None), - sic_description=d.get("sic_description", None), - ticker=d.get("ticker", None), - total_employees=d.get("total_employees", None), - type=d.get("type", None), - weighted_shares_outstanding=d.get("weighted_shares_outstanding", None), - ) - - -@modelclass -class TickerNews: - "TickerDetails contains data for news articles relating to a stock ticker symbol." - amp_url: Optional[str] = None - article_url: Optional[str] = None - author: Optional[str] = None - description: Optional[str] = None - id: Optional[str] = None - image_url: Optional[str] = None - keywords: Optional[List[str]] = None - published_utc: Optional[str] = None - publisher: Optional[Publisher] = None - tickers: Optional[List[str]] = None - title: Optional[str] = None - - @staticmethod - def from_dict(d): - return TickerNews( - amp_url=d.get("amp_url", None), - article_url=d.get("article_url", None), - author=d.get("author", None), - description=d.get("description", None), - id=d.get("id", None), - image_url=d.get("image_url", 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"]), - tickers=d.get("tickers", None), - title=d.get("title", None), - ) - - -@modelclass -class TickerTypes: - "TickerTypes contains data for ticker types." - asset_class: Optional[str] = None - code: Optional[str] = None - description: Optional[str] = None - locale: Optional[str] = None - - @staticmethod - def from_dict(d): - return TickerTypes(**d) diff --git a/polygon/websocket/models/__init__.py b/polygon/websocket/models/__init__.py deleted file mode 100644 index 184acba9..00000000 --- a/polygon/websocket/models/__init__.py +++ /dev/null @@ -1,41 +0,0 @@ -from typing import Dict, Any, List -from .common import * -from .models import * -import logging - - -def parse_single(data: Dict[str, Any]): - event_type = data["ev"] - if event_type in [EventType.EquityAgg.value, EventType.EquityAggMin.value]: - return EquityAgg.from_dict(data) - elif event_type in [EventType.CryptoAgg.value, EventType.ForexAgg.value]: - return CurrencyAgg.from_dict(data) - elif event_type == EventType.EquityTrade.value: - return EquityTrade.from_dict(data) - elif event_type == EventType.CryptoTrade.value: - return CryptoTrade.from_dict(data) - elif event_type == EventType.EquityQuote.value: - return EquityQuote.from_dict(data) - elif event_type == EventType.ForexQuote.value: - return ForexQuote.from_dict(data) - elif event_type == EventType.CryptoQuote.value: - return CryptoQuote.from_dict(data) - elif event_type == EventType.Imbalances.value: - return Imbalance.from_dict(data) - elif event_type == EventType.LimitUpLimitDown.value: - return LimitUpLimitDown.from_dict(data) - elif event_type == EventType.CryptoL2.value: - return Level2Book.from_dict(data) - return None - - -def parse(msg: List[Dict[str, Any]], logger: logging.Logger) -> List[WebSocketMessage]: - res = [] - for m in msg: - parsed = parse_single(m) - if parsed is None: - if m["ev"] != "status": - logger.warning("could not parse message %s", m) - else: - res.append(parsed) - return res diff --git a/polygon/websocket/models/common.py b/polygon/websocket/models/common.py deleted file mode 100644 index b37573f7..00000000 --- a/polygon/websocket/models/common.py +++ /dev/null @@ -1,32 +0,0 @@ -from enum import Enum - - -class Feed(Enum): - Delayed = "delayed.polygon.io" - RealTime = "socket.polygon.io" - Nasdaq = "nasdaqfeed.polygon.io" - PolyFeed = "polyfeed.polygon.io" - PolyFeedPlus = "polyfeedplus.polygon.io" - StarterFeed = "starterfeed.polygon.io" - - -class Market(Enum): - Stocks = "stocks" - Options = "options" - Forex = "forex" - Crypto = "crypto" - - -class EventType(Enum): - EquityAgg = "A" - EquityAggMin = "AM" - CryptoAgg = "XA" - ForexAgg = "CA" - EquityTrade = "T" - CryptoTrade = "XT" - EquityQuote = "Q" - ForexQuote = "C" - CryptoQuote = "XQ" - Imbalances = "NOI" - LimitUpLimitDown = "LULD" - CryptoL2 = "XL2" diff --git a/pyproject.toml b/pyproject.toml index f0aee66e..7372e96b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,45 +1,46 @@ [tool.poetry] -name = "polygon-api-client" +name = "massive" version = "0.0.0" -description = "Official Polygon.io REST and Websocket client." -authors = ["polygon.io"] +description = "Official Massive (formerly Polygon.io) REST and Websocket client." +authors = ["massive.com"] license = "MIT" -homepage = "https://polygon.io" -repository = "https://github.com/polygon-io/client-python" -documentation = "https://polygon.io/docs" +homepage = "https://massive.com" +repository = "https://github.com/massive-com/client-python" +documentation = "https://massive.com/docs" keywords = [ - "polygon", + "massive", "free", "rest", "stock", "market", "data", "api", - "polygon.io", + "massive.com", "websocket", "client" ] packages = [ - { include = "polygon" } + { include = "massive" } ] [tool.poetry.dependencies] -python = "^3.8" -urllib3 = "^1.26.9" -websockets = "^10.3" -certifi = "^2022.5.18" +python = "^3.9" +urllib3 = ">=1.26.9" +websockets = ">=14.0" +certifi = ">=2022.5.18,<2027.0.0" [tool.poetry.dev-dependencies] -black = "^22.6.0" -mypy = "^0.971" -types-urllib3 = "^1.26.23" -Sphinx = "^5.1.1" -sphinx-rtd-theme = "^1.0.0" +black = "^24.8.0" +mypy = "^1.19" +types-urllib3 = "^1.26.25" +Sphinx = "^7.4.7" +sphinx-rtd-theme = "^3.1.0" # keep this in sync with docs/requirements.txt for readthedocs.org -sphinx-autodoc-typehints = "^1.19.2" +sphinx-autodoc-typehints = "^2.3.0" types-certifi = "^2021.10.8" -types-setuptools = "^65.1.0" -pook = "^1.0.2" +types-setuptools = "^80.9.0" +pook = "^2.1.4" +orjson = "^3.11.5" [build-system] requires = ["poetry-core>=1.0.0"] diff --git a/test_rest/base.py b/test_rest/base.py index 45aa168e..40854146 100644 --- a/test_rest/base.py +++ b/test_rest/base.py @@ -1,4 +1,4 @@ -from polygon import RESTClient +from massive import RESTClient import os import re diff --git a/test_rest/mocks/v1/indicators/ema/AAPL&window=5&adjusted=false×tamp.lte=1478393873000×tamp.gte=1477972800000.json b/test_rest/mocks/v1/indicators/ema/AAPL&window=5&adjusted=false×tamp.lte=1478393873000×tamp.gte=1477972800000.json new file mode 100644 index 00000000..333016cb --- /dev/null +++ b/test_rest/mocks/v1/indicators/ema/AAPL&window=5&adjusted=false×tamp.lte=1478393873000×tamp.gte=1477972800000.json @@ -0,0 +1,27 @@ +{ + "results": { + "underlying": { + "url": "http://localhost:8081/v2/aggs/ticker/AAPL/range/1/day/1477368000000/1478393873000?adjusted=false\u0026limit=50000\u0026sort=desc" + }, + "values": [ + { + "timestamp": 1478232000000, + "value": 110.96883950617286 + }, + { + "timestamp": 1478145600000, + "value": 112.03325925925927 + }, + { + "timestamp": 1478059200000, + "value": 113.1348888888889 + }, + { + "timestamp": 1477972800000, + "value": 113.90733333333334 + } + ] + }, + "status": "OK", + "request_id": "aaa162ba-e0b6-4c4a-aa05-dcac472aea71" +} \ No newline at end of file diff --git a/test_rest/mocks/v1/indicators/macd/SPY&signal_window=10&long_window=20×tamp.gt=2022-08-09.json b/test_rest/mocks/v1/indicators/macd/SPY&signal_window=10&long_window=20×tamp.gt=2022-08-09.json new file mode 100644 index 00000000..8c44e7ca --- /dev/null +++ b/test_rest/mocks/v1/indicators/macd/SPY&signal_window=10&long_window=20×tamp.gt=2022-08-09.json @@ -0,0 +1,59 @@ +{ + "results": { + "underlying": { + "url": "http://localhost:8081/v2/aggs/ticker/SPY/range/1/day/1657670400000/1660926503659?limit=50000&sort=desc" + }, + "values": [ + { + "timestamp": 1660881600000, + "value": 6.912856964275647, + "signal": 49.504484615884834, + "histogram": -42.59162765160919 + }, + { + "timestamp": 1660795200000, + "value": 7.509881940545313, + "signal": 58.96929076068688, + "histogram": -51.45940882014157 + }, + { + "timestamp": 1660708800000, + "value": 7.734132135566654, + "signal": 70.40471494294057, + "histogram": -62.67058280737392 + }, + { + "timestamp": 1660622400000, + "value": 7.973958808765531, + "signal": 84.331511122357, + "histogram": -76.35755231359147 + }, + { + "timestamp": 1660536000000, + "value": 7.90112075397235, + "signal": 101.2998560809329, + "histogram": -93.39873532696055 + }, + { + "timestamp": 1660276800000, + "value": 7.719066821080332, + "signal": 122.05513059803525, + "histogram": -114.33606377695492 + }, + { + "timestamp": 1660190400000, + "value": 7.468267821253335, + "signal": 147.4631447706919, + "histogram": -139.99487694943858 + }, + { + "timestamp": 1660104000000, + "value": 7.542041992364375, + "signal": 178.5731174261227, + "histogram": -171.03107543375833 + } + ] + }, + "status": "OK", + "request_id": "b5163e30-64c6-4298-8217-aab3152ea79f" +} diff --git a/test_rest/mocks/v1/indicators/rsi/AAPL&window=20×pan=minute&adjusted=true×tamp.gt=2022-08-18.json b/test_rest/mocks/v1/indicators/rsi/AAPL&window=20×pan=minute&adjusted=true×tamp.gt=2022-08-18.json new file mode 100644 index 00000000..5db7d4ca --- /dev/null +++ b/test_rest/mocks/v1/indicators/rsi/AAPL&window=20×pan=minute&adjusted=true×tamp.gt=2022-08-18.json @@ -0,0 +1,159 @@ +{ + "results": { + "underlying": { + "url": "https://api.massive.com/v2/aggs/ticker/AAPL/range/15/minute/1660521600000/1660928746001?limit=50000&sort=desc" + }, + "values": [ + { + "timestamp": 1660928400000, + "value": 172.46568754351864 + }, + { + "timestamp": 1660927500000, + "value": 172.43049675862588 + }, + { + "timestamp": 1660926600000, + "value": 172.39791747006018 + }, + { + "timestamp": 1660925700000, + "value": 172.37032983532967 + }, + { + "timestamp": 1660924800000, + "value": 172.39246981799596 + }, + { + "timestamp": 1660923900000, + "value": 172.4199719041008 + }, + { + "timestamp": 1660923000000, + "value": 172.4462847361114 + }, + { + "timestamp": 1660922100000, + "value": 172.48168312938628 + }, + { + "timestamp": 1660921200000, + "value": 172.5318603009006 + }, + { + "timestamp": 1660920300000, + "value": 172.60100349046908 + }, + { + "timestamp": 1660919400000, + "value": 172.68216175262373 + }, + { + "timestamp": 1660918500000, + "value": 172.7343682528999 + }, + { + "timestamp": 1660917600000, + "value": 172.7937754374157 + }, + { + "timestamp": 1660916700000, + "value": 172.8239623255647 + }, + { + "timestamp": 1660915800000, + "value": 172.82964257036102 + }, + { + "timestamp": 1660914900000, + "value": 172.8215102093464 + }, + { + "timestamp": 1660914000000, + "value": 172.7816691787513 + }, + { + "timestamp": 1660913100000, + "value": 172.79237119756723 + }, + { + "timestamp": 1660912200000, + "value": 172.8094629025743 + }, + { + "timestamp": 1660911300000, + "value": 172.82942741863474 + }, + { + "timestamp": 1660910400000, + "value": 172.85463030480682 + }, + { + "timestamp": 1660909500000, + "value": 172.88038086320753 + }, + { + "timestamp": 1660908600000, + "value": 172.91094726986097 + }, + { + "timestamp": 1660907700000, + "value": 172.95420487721478 + }, + { + "timestamp": 1660906800000, + "value": 172.99148960113214 + }, + { + "timestamp": 1660905900000, + "value": 173.03796219072498 + }, + { + "timestamp": 1660905000000, + "value": 173.0998529476434 + }, + { + "timestamp": 1660904100000, + "value": 173.17457431055323 + }, + { + "timestamp": 1660903200000, + "value": 173.23505581692726 + }, + { + "timestamp": 1660902300000, + "value": 173.3166406397617 + }, + { + "timestamp": 1660901400000, + "value": 173.3920764965787 + }, + { + "timestamp": 1660900500000, + "value": 173.4628213909554 + }, + { + "timestamp": 1660899600000, + "value": 173.5494341689507 + }, + { + "timestamp": 1660898700000, + "value": 173.63884829199816 + }, + { + "timestamp": 1660897800000, + "value": 173.73872705957692 + }, + { + "timestamp": 1660896900000, + "value": 173.8480667500587 + }, + { + "timestamp": 1660896000000, + "value": 173.97207377638065 + } + ] + }, + "status": "OK", + "request_id": "e0ee044f-88e9-4b18-a44e-a64923ac1c39" +} diff --git a/test_rest/mocks/v1/indicators/sma/AAPL&window=30×pan=quarter×tamp=1483958600&expand_underlying=true.json b/test_rest/mocks/v1/indicators/sma/AAPL&window=30×pan=quarter×tamp=1483958600&expand_underlying=true.json new file mode 100644 index 00000000..1a07fea0 --- /dev/null +++ b/test_rest/mocks/v1/indicators/sma/AAPL&window=30×pan=quarter×tamp=1483958600&expand_underlying=true.json @@ -0,0 +1,46 @@ +{ + "status": "OK", + "request_id": "6a7e466379af0a71039d60cc78e72282", + "next_url": "https://api.massive.com/v1/indicators/sma/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZ", + "results": { + "values":[ + { + "timestamp": 1578027600, + "value": 141.34 + }, + { + "timestamp": 1578035600, + "value": 139.33 + }, + { + "timestamp": 1578049600, + "value": 138.22 + } + ], + "underlying": { + "aggregates": [ + { + "v": 135647456, + "vw": 74.6099, + "o": 74.06, + "c": 75.0875, + "h": 75.15, + "l": 73.7975, + "t": 1577941200000, + "n": 1 + }, + { + "v": 146535512, + "vw": 74.7026, + "o": 74.2875, + "c": 74.3575, + "h": 75.145, + "l": 74.125, + "t": 1578027600000, + "n": 1 + } + ], + "url": "https://api.massive.com/v2/aggs/ticker/AAPL/range/1/day/1626912000000/1629590400000?adjusted=true&limit=50000&sort=desc" + } + } +} \ No newline at end of file diff --git a/test_rest/mocks/v1/open-close/AAPL/2005-04-01&adjusted=True.json b/test_rest/mocks/v1/open-close/AAPL/2005-04-01&adjusted=true.json similarity index 100% rename from test_rest/mocks/v1/open-close/AAPL/2005-04-01&adjusted=True.json rename to test_rest/mocks/v1/open-close/AAPL/2005-04-01&adjusted=true.json diff --git a/test_rest/mocks/v1/summaries&ticker.any_of=NCLH%2CO%3ANCLH221014C00005000%2CC%3AEURUSD%2CX%3ABTCUSD%2CAPx.json b/test_rest/mocks/v1/summaries&ticker.any_of=NCLH%2CO%3ANCLH221014C00005000%2CC%3AEURUSD%2CX%3ABTCUSD%2CAPx.json new file mode 100644 index 00000000..5aeb3952 --- /dev/null +++ b/test_rest/mocks/v1/summaries&ticker.any_of=NCLH%2CO%3ANCLH221014C00005000%2CC%3AEURUSD%2CX%3ABTCUSD%2CAPx.json @@ -0,0 +1,101 @@ +{ + "request_id":"abc123", + "results":[ + { + "branding":{ + "icon_url":"https://api.massive.com/icon.png", + "logo_url":"https://api.massive.com/logo.svg" + }, + "market_status":"closed", + "name":"Norwegian Cruise Lines", + "price":22.3, + "session":{ + "change":-1.05, + "change_percent":-4.67, + "close":21.4, + "early_trading_change":-0.39, + "early_trading_change_percent":-0.07, + "high":22.49, + "late_trading_change":1.2, + "late_trading_change_percent":3.92, + "low":21.35, + "open":22.49, + "previous_close":22.45, + "volume":37 + }, + "ticker":"NCLH", + "type":"stocks" + }, + { + "market_status":"closed", + "name":"NCLH $5 Call", + "options":{ + "contract_type":"call", + "exercise_style":"american", + "expiration_date":"2022-10-14", + "shares_per_contract":100, + "strike_price":5, + "underlying_ticker":"NCLH" + }, + "price":6.6, + "session":{ + "change":-0.05, + "change_percent":-1.07, + "close":6.65, + "early_trading_change":-0.01, + "early_trading_change_percent":-0.03, + "high":7.01, + "late_trading_change":-0.4, + "late_trading_change_percent":-0.02, + "low":5.42, + "open":6.7, + "previous_close":6.71, + "volume":67 + }, + "ticker":"O:NCLH221014C00005000", + "type":"options" + }, + { + "market_status":"open", + "name":"Euro - United States Dollar", + "price":0.97989, + "session":{ + "change":-0.0001, + "change_percent":-0.67, + "close":0.97989, + "high":0.98999, + "low":0.96689, + "open":0.97889, + "previous_close":0.98001 + }, + "ticker":"C:EURUSD", + "type":"fx" + }, + { + "branding":{ + "icon_url":"https://api.massive.com/icon.png", + "logo_url":"https://api.massive.com/logo.svg" + }, + "market_status":"open", + "name":"Bitcoin - United States Dollar", + "price":32154.68, + "session":{ + "change":-201.23, + "change_percent":-0.77, + "close":32154.68, + "high":33124.28, + "low":28182.88, + "open":31129.32, + "previous_close":33362.18 + }, + "ticker":"X:BTCUSD", + "type":"crypto" + }, + { + "error":"NOT_FOUND", + "message":"Ticker not found.", + "ticker":"APx" + } + ], + "status":"OK" +} \ No newline at end of file diff --git a/test_rest/mocks/v2/aggs/grouped/locale/us/market/stocks/2005-04-04&adjusted=True.json b/test_rest/mocks/v2/aggs/grouped/locale/us/market/stocks/2005-04-04&adjusted=true.json similarity index 100% rename from test_rest/mocks/v2/aggs/grouped/locale/us/market/stocks/2005-04-04&adjusted=True.json rename to test_rest/mocks/v2/aggs/grouped/locale/us/market/stocks/2005-04-04&adjusted=true.json diff --git a/test_rest/mocks/v2/aggs/ticker/AAPL/range/1/day/2005-04-02/2005-04-04.json b/test_rest/mocks/v2/aggs/ticker/AAPL/range/1/day/2005-04-02/2005-04-04.json new file mode 100644 index 00000000..82c09f8b --- /dev/null +++ b/test_rest/mocks/v2/aggs/ticker/AAPL/range/1/day/2005-04-02/2005-04-04.json @@ -0,0 +1,31 @@ +{ + "ticker": "AAPL", + "queryCount": 2, + "resultsCount": 2, + "adjusted": true, + "results": [ + { + "v": 642646396.0, + "vw": 1.469, + "o": 1.5032, + "c": 1.4604, + "h": 1.5064, + "l": 1.4489, + "t": 1112331600000, + "n": 82132 + }, + { + "v": 578172308.0, + "vw": 1.4589, + "o": 1.4639, + "c": 1.4675, + "h": 1.4754, + "l": 1.4343, + "t": 1112587200000, + "n": 65543 + } + ], + "status": "OK", + "request_id": "12afda77aab3b1936c5fb6ef4241ae42", + "count": 2 +} \ No newline at end of file diff --git a/test_rest/mocks/v2/reference/news&ticker=NFLX.json b/test_rest/mocks/v2/reference/news&ticker=NFLX.json index 84fa63ba..313b2756 100644 --- a/test_rest/mocks/v2/reference/news&ticker=NFLX.json +++ b/test_rest/mocks/v2/reference/news&ticker=NFLX.json @@ -5,8 +5,8 @@ "publisher": { "name": "MarketWatch", "homepage_url": "https://www.marketwatch.com/", - "logo_url": "https://s3.polygon.io/public/assets/news/logos/marketwatch.svg", - "favicon_url": "https://s3.polygon.io/public/assets/news/favicons/marketwatch.ico" + "logo_url": "https://s3.massive.com/public/assets/news/logos/marketwatch.svg", + "favicon_url": "https://s3.massive.com/public/assets/news/favicons/marketwatch.ico" }, "title": "Theres a big hole in the Feds theory of inflation\u2014incomes are falling at a record 10.9 rate", "author": "MarketWatch", diff --git a/test_rest/mocks/v2/snapshot/locale/us/markets/stocks/gainers.json b/test_rest/mocks/v2/snapshot/locale/us/markets/stocks/gainers.json index a4778bdc..c41d2b54 100644 --- a/test_rest/mocks/v2/snapshot/locale/us/markets/stocks/gainers.json +++ b/test_rest/mocks/v2/snapshot/locale/us/markets/stocks/gainers.json @@ -35,7 +35,9 @@ "l": 6.42, "o": 6.49, "v": 2671, - "vw": 6.4604 + "vw": 6.4604, + "t": 1684428600000, + "n": 5 }, "prevDay": { "c": 0.29, @@ -81,7 +83,9 @@ "l": 4.2107, "o": 4.2107, "v": 1012, - "vw": 4.2107 + "vw": 4.2107, + "t": 1684428600000, + "n": 5 }, "prevDay": { "c": 0.1953, diff --git a/test_rest/mocks/v2/snapshot/locale/us/markets/stocks/tickers/AAPL.json b/test_rest/mocks/v2/snapshot/locale/us/markets/stocks/tickers/AAPL.json index 396fdd7e..fb382df2 100644 --- a/test_rest/mocks/v2/snapshot/locale/us/markets/stocks/tickers/AAPL.json +++ b/test_rest/mocks/v2/snapshot/locale/us/markets/stocks/tickers/AAPL.json @@ -10,6 +10,7 @@ "v": 68840127, "vw": 162.7124 }, + "fmv": 160.315, "lastQuote": { "P": 159.99, "S": 5, @@ -32,7 +33,9 @@ "l": 160.3, "o": 160.71, "v": 197226, - "vw": 160.5259 + "vw": 160.5259, + "t": 1684428600000, + "n": 5 }, "prevDay": { "c": 163.64, diff --git a/test_rest/mocks/v2/snapshot/locale/us/markets/stocks/tickers/index.json b/test_rest/mocks/v2/snapshot/locale/us/markets/stocks/tickers/index.json index 5aabb0ae..4316f2cc 100644 --- a/test_rest/mocks/v2/snapshot/locale/us/markets/stocks/tickers/index.json +++ b/test_rest/mocks/v2/snapshot/locale/us/markets/stocks/tickers/index.json @@ -11,6 +11,7 @@ "v": 37216, "vw": 20.616 }, + "fmv": 20.5, "lastQuote": { "P": 20.6, "S": 22, @@ -36,7 +37,9 @@ "l": 20.506, "o": 20.506, "v": 5000, - "vw": 20.5105 + "vw": 20.5105, + "t": 1684428600000, + "n": 5 }, "prevDay": { "c": 20.63, diff --git a/test_rest/mocks/v3/quotes/AAPL.json b/test_rest/mocks/v3/quotes/AAPL.json index 3fbb9d19..4b521bee 100644 --- a/test_rest/mocks/v3/quotes/AAPL.json +++ b/test_rest/mocks/v3/quotes/AAPL.json @@ -123,5 +123,5 @@ ], "status": "OK", "request_id": "280bc9f4c6d0ba24a819f0d153b15d85", - "next_url": "https://api.polygon.io/v3/quotes/AAPL?cursor=YXA9MTkyODgxNjYmYXM9JmxpbWl0PTEwJm9yZGVyPWRlc2Mmc29ydD10aW1lc3RhbXAmdGltZXN0YW1wLmx0ZT0yMDIyLTA1LTEwVDE0JTNBMTElM0ExMi42OTA2NjExODla" + "next_url": "https://api.massive.com/v3/quotes/AAPL?cursor=YXA9MTkyODgxNjYmYXM9JmxpbWl0PTEwJm9yZGVyPWRlc2Mmc29ydD10aW1lc3RhbXAmdGltZXN0YW1wLmx0ZT0yMDIyLTA1LTEwVDE0JTNBMTElM0ExMi42OTA2NjExODla" } \ No newline at end of file diff --git a/test_rest/mocks/v3/reference/options/contracts.json b/test_rest/mocks/v3/reference/options/contracts.json index 639c5cf5..fa45ff44 100644 --- a/test_rest/mocks/v3/reference/options/contracts.json +++ b/test_rest/mocks/v3/reference/options/contracts.json @@ -113,5 +113,5 @@ ], "status": "OK", "request_id": "30ece14c74dcfc5ad4785b08fd21456d", - "next_url": "https://api.polygon.io/v3/reference/options/contracts?cursor=YXA9JTdCJTIySUQlMjIlM0ElMjIy" + "next_url": "https://api.massive.com/v3/reference/options/contracts?cursor=YXA9JTdCJTIySUQlMjIlM0ElMjIy" } \ No newline at end of file diff --git a/test_rest/mocks/v3/reference/tickers.json b/test_rest/mocks/v3/reference/tickers.json index 0dd09f5c..68ee2fa9 100644 --- a/test_rest/mocks/v3/reference/tickers.json +++ b/test_rest/mocks/v3/reference/tickers.json @@ -32,5 +32,5 @@ "status": "OK", "request_id": "37089bb3b4ef99a796cdc82ff971e447", "count": 2, - "next_url": "https://api.polygon.io/v3/reference/tickers?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIyLTA0LTI3JmxpbWl0PTImb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUFBJTdDZjEyMmJjYmY4YWQwNzRmZmJlMTZmNjkxOWQ0ZDc3NjZlMzA3MWNmNmU1Nzg3OGE0OGU1NjQ1YzQyM2U3NzJhOSZzb3J0PXRpY2tlcg" + "next_url": "https://api.massive.com/v3/reference/tickers?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIyLTA0LTI3JmxpbWl0PTImb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUFBJTdDZjEyMmJjYmY4YWQwNzRmZmJlMTZmNjkxOWQ0ZDc3NjZlMzA3MWNmNmU1Nzg3OGE0OGU1NjQ1YzQyM2U3NzJhOSZzb3J0PXRpY2tlcg" } \ No newline at end of file diff --git a/test_rest/mocks/v3/reference/tickers/AAPL&date=2020-10-01.json b/test_rest/mocks/v3/reference/tickers/AAPL&date=2020-10-01.json new file mode 100644 index 00000000..5cd69b5e --- /dev/null +++ b/test_rest/mocks/v3/reference/tickers/AAPL&date=2020-10-01.json @@ -0,0 +1,38 @@ +{ + "results": { + "ticker": "AAPL", + "name": "Apple Inc.", + "market": "stocks", + "locale": "us", + "primary_exchange": "XNAS", + "type": "CS", + "active": true, + "currency_name": "usd", + "cik": "0000320193", + "composite_figi": "BBG000B9XRY4", + "share_class_figi": "BBG001S5N8V8", + "market_cap": 1916103105630, + "phone_number": "(408) 996-1010", + "address": { + "address1": "ONE APPLE PARK WAY", + "city": "CUPERTINO", + "state": "CA", + "postal_code": "95014" + }, + "description": "Apple designs a wide variety of consumer electronic devices, including smartphones (iPhone), tablets (iPad), PCs (Mac), smartwatches (Apple Watch), AirPods, and TV boxes (Apple TV), among others. The iPhone makes up the majority of Apple's total revenue. In addition, Apple offers its customers a variety of services such as Apple Music, iCloud, Apple Care, Apple TV+, Apple Arcade, Apple Card, and Apple Pay, among others. Apple's products run internally developed software and semiconductors, and the firm is well known for its integration of hardware, software and services. Apple's products are distributed online as well as through company-owned stores and third-party retailers. The company generates roughly 40% of its revenue from the Americas, with the remainder earned internationally.", + "sic_code": "3571", + "sic_description": "ELECTRONIC COMPUTERS", + "ticker_root": "AAPL", + "homepage_url": "https://www.apple.com", + "total_employees": 154000, + "list_date": "1980-12-12", + "branding": { + "logo_url": "https://api.massive.com/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-05-01_logo.svg", + "icon_url": "https://api.massive.com/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-05-01_icon.png" + }, + "share_class_shares_outstanding": 16319440000, + "weighted_shares_outstanding": 16185181000 + }, + "status": "OK", + "request_id": "ce8688b5f3a571351376ebd77acd146e" +} diff --git a/test_rest/mocks/v3/reference/tickers/AAPL.json b/test_rest/mocks/v3/reference/tickers/AAPL.json index 306fb384..95f80ff8 100644 --- a/test_rest/mocks/v3/reference/tickers/AAPL.json +++ b/test_rest/mocks/v3/reference/tickers/AAPL.json @@ -27,8 +27,8 @@ "total_employees": 154000, "list_date": "1980-12-12", "branding": { - "logo_url": "https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-05-01_logo.svg", - "icon_url": "https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-05-01_icon.png" + "logo_url": "https://api.massive.com/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-05-01_logo.svg", + "icon_url": "https://api.massive.com/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-05-01_icon.png" }, "share_class_shares_outstanding": 16319440000, "weighted_shares_outstanding": 16185181000 diff --git a/test_rest/mocks/v3/snapshot.json b/test_rest/mocks/v3/snapshot.json new file mode 100644 index 00000000..9a09706c --- /dev/null +++ b/test_rest/mocks/v3/snapshot.json @@ -0,0 +1,115 @@ +{ + "request_id": "abc123", + "results": [ + { + "break_even_price": 171.075, + "details": { + "contract_type": "call", + "exercise_style": "american", + "expiration_date": "2022-10-14", + "shares_per_contract": 100, + "strike_price": 5, + "underlying_ticker": "NCLH" + }, + "fmv": 20.5, + "greeks": { + "delta": 0.5520187372272933, + "gamma": 0.00706756515659829, + "theta": -0.018532772783847958, + "vega": 0.7274811132998142 + }, + "implied_volatility": 0.3048997097864957, + "last_quote": { + "ask": 21.25, + "ask_size": 110, + "bid": 20.9, + "bid_size": 172, + "last_updated": 1636573458756383500, + "midpoint": 21.075, + "timeframe": "REAL-TIME" + }, + "last_trade": { + "conditions": [ + 209 + ], + "exchange": 316, + "price": 0.05, + "sip_timestamp": 1675280958783136800, + "size": 2, + "timeframe": "REAL-TIME" + }, + "market_status": "closed", + "name": "NCLH $5 Call", + "open_interest": 8921, + "session": { + "change": -0.05, + "change_percent": -1.07, + "close": 6.65, + "early_trading_change": -0.01, + "early_trading_change_percent": -0.03, + "high": 7.01, + "late_trading_change": -0.4, + "late_trading_change_percent": -0.02, + "low": 5.42, + "open": 6.7, + "previous_close": 6.71, + "volume": 67 + }, + "ticker": "O:NCLH221014C00005000", + "type": "options", + "underlying_asset": { + "change_to_break_even": 23.123999999999995, + "last_updated": 1636573459862384600, + "price": 147.951, + "ticker": "AAPL", + "timeframe": "REAL-TIME" + } + }, + { + "fmv": 0.05, + "last_quote": { + "ask": 21.25, + "ask_size": 110, + "bid": 20.9, + "bid_size": 172, + "last_updated": 1636573458756383500, + "timeframe": "REAL-TIME" + }, + "last_trade": { + "conditions": [ + 209 + ], + "exchange": 316, + "id": "4064", + "last_updated": 1675280958783136800, + "price": 0.05, + "size": 2, + "timeframe": "REAL-TIME" + }, + "market_status": "closed", + "name": "Apple Inc.", + "session": { + "change": -1.05, + "change_percent": -4.67, + "close": 21.4, + "early_trading_change": -0.39, + "early_trading_change_percent": -0.07, + "high": 22.49, + "late_trading_change": 1.2, + "late_trading_change_percent": 3.92, + "low": 21.35, + "open": 22.49, + "previous_close": 22.45, + "volume": 37 + }, + "ticker": "AAPL", + "type": "stocks" + }, + { + "error": "NOT_FOUND", + "message": "Ticker not found.", + "ticker": "TSLAAPL" + } + ], + "status": "OK" +} \ No newline at end of file diff --git a/test_rest/mocks/v3/snapshot/indices&ticker.any_of=SPX%2CAPx%2CAPy.json b/test_rest/mocks/v3/snapshot/indices&ticker.any_of=SPX%2CAPx%2CAPy.json new file mode 100644 index 00000000..09ad9f12 --- /dev/null +++ b/test_rest/mocks/v3/snapshot/indices&ticker.any_of=SPX%2CAPx%2CAPy.json @@ -0,0 +1,30 @@ +{ + "results": [ + { + "value": 3822.39, + "name": "S&P 500", + "ticker": "SPX", + "type": "indices", + "market_status": "closed", + "session": { + "change": -50.01, + "change_percent": -1.45, + "close": 3822.39, + "high": 3834.41, + "low": 38217.11, + "open": 3827.38, + "previous_close": 3812.19 + } + }, + { + "ticker": "APx", + "error": "NOT_FOUND", + "message": "Ticker not found." + }, + { + "ticker": "APy", + "error": "NOT_ENTITLED", + "message": "Not entitled to this ticker." + } + ] +} \ No newline at end of file diff --git a/test_rest/mocks/v3/snapshot/options/AAPL.json b/test_rest/mocks/v3/snapshot/options/AAPL.json new file mode 100644 index 00000000..84e38b93 --- /dev/null +++ b/test_rest/mocks/v3/snapshot/options/AAPL.json @@ -0,0 +1,61 @@ + + { + "request_id": "104d9b901d0c9e81d284cb8b41c5cdd3", + "results": [{ + "break_even_price": 179.075, + "day": { + "change": -2.3999999999999986, + "change_percent": -7.643312101910824, + "close": 29, + "high": 32.25, + "last_updated": 1651204800000000000, + "low": 29, + "open": 29.99, + "previous_close": 31.4, + "volume": 8, + "vwap": 30.7738 + }, + "details": { + "contract_type": "call", + "exercise_style": "american", + "expiration_date": "2023-06-16", + "shares_per_contract": 100, + "strike_price": 150, + "ticker": "O:AAPL230616C00150000" + }, + "fmv": 20.5, + "greeks": { + "delta": 0.6436614934293701, + "gamma": 0.0061735291012820675, + "theta": -0.028227189324641973, + "vega": 0.6381159723175714 + }, + "implied_volatility": 0.3570277203465058, + "last_quote": { + "ask": 29.25, + "ask_size": 209, + "bid": 28.9, + "bid_size": 294, + "last_updated": 1651254260800059648, + "midpoint": 29.075, + "timeframe": "REAL-TIME" + }, + "last_trade":{ + "price": 29.25, + "sip_timestamp": 1678718527714665700, + "size": 1, + "conditions": [209], + "exchange": 309, + "timeframe": "REAL-TIME" + }, + "open_interest": 8133, + "underlying_asset": { + "change_to_break_even": 19.11439999999999, + "last_updated": 1651254263172073152, + "price": 159.9606, + "ticker": "AAPL", + "timeframe": "REAL-TIME" + } + }], + "status": "OK" +} diff --git a/test_rest/mocks/v3/snapshot/options/AAPL/O;AAPL230616C00150000.json b/test_rest/mocks/v3/snapshot/options/AAPL/O;AAPL230616C00150000.json index da4210f8..d63e980e 100644 --- a/test_rest/mocks/v3/snapshot/options/AAPL/O;AAPL230616C00150000.json +++ b/test_rest/mocks/v3/snapshot/options/AAPL/O;AAPL230616C00150000.json @@ -22,6 +22,7 @@ "strike_price": 150, "ticker": "O:AAPL230616C00150000" }, + "fmv": 29.2, "greeks": { "delta": 0.6436614934293701, "gamma": 0.0061735291012820675, @@ -38,6 +39,14 @@ "midpoint": 29.075, "timeframe": "REAL-TIME" }, + "last_trade":{ + "price": 29.25, + "sip_timestamp": 1678718527714665700, + "size": 1, + "conditions": [209], + "exchange": 309, + "timeframe": "REAL-TIME" + }, "open_interest": 8133, "underlying_asset": { "change_to_break_even": 19.11439999999999, @@ -48,4 +57,4 @@ } }, "status": "OK" -} \ No newline at end of file +} diff --git a/test_rest/mocks/vX/reference/financials.json b/test_rest/mocks/vX/reference/financials.json index c5e18621..eeb46f28 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, @@ -306,8 +300,8 @@ "company_name": "NXP Semiconductors N.V.", "fiscal_period": "Q1", "fiscal_year": "2022", - "source_filing_url": "https://api.polygon.io/v1/reference/sec/filings/0001413447-22-000014", - "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.massive.com/v1/reference/sec/filings/0001413447-22-000014", + "source_filing_file_url": "https://api.massive.com/v1/reference/sec/filings/0001413447-22-000014/files/nxpi-20220403_htm.xml" } ], "status": "OK", diff --git a/test_rest/mocks/vX/reference/tickers/META/events&types=ticker_change.json b/test_rest/mocks/vX/reference/tickers/META/events&types=ticker_change.json new file mode 100644 index 00000000..19e4cec0 --- /dev/null +++ b/test_rest/mocks/vX/reference/tickers/META/events&types=ticker_change.json @@ -0,0 +1,25 @@ +{ + "results": { + "name": "Meta Platforms, Inc. Class A Common Stock", + "composite_figi": "BBG000MM2P62", + "cik": "0001326801", + "events": [ + { + "ticker_change": { + "ticker": "META" + }, + "type": "ticker_change", + "date": "2022-06-11" + }, + { + "ticker_change": { + "ticker": "FB" + }, + "type": "ticker_change", + "date": "2012-05-18" + } + ] + }, + "status": "OK", + "request_id": "8c911ff1-5ca8-41e8-9bbf-e625141caacc" +} diff --git a/test_rest/models/test_requests.py b/test_rest/models/test_requests.py new file mode 100644 index 00000000..38feeead --- /dev/null +++ b/test_rest/models/test_requests.py @@ -0,0 +1,103 @@ +import unittest + +from massive import RESTClient +from massive.rest.models.request import ( + RequestOptionBuilder, + X_MASSIVE_EDGE_ID, + X_MASSIVE_EDGE_USER_AGENT, + X_MASSIVE_EDGE_IP_ADDRESS, +) + + +class RequestTest(unittest.TestCase): + def test_empty_request_options(self): + options = RequestOptionBuilder() + + expected_edge_headers = None + assert expected_edge_headers == options.headers + + def test_request_options_with_initialized_values(self): + options = RequestOptionBuilder( + edge_id="test", edge_ip_address="test", edge_user="test" + ) + + expected_object = { + X_MASSIVE_EDGE_ID: "test", + X_MASSIVE_EDGE_IP_ADDRESS: "test", + X_MASSIVE_EDGE_USER_AGENT: "test", + } + + assert expected_object == options.headers + + def test_request_options_builder(self): + options = RequestOptionBuilder().edge_headers( + edge_id="test", edge_ip_address="test" + ) + + required_options = { + X_MASSIVE_EDGE_ID: "test", + X_MASSIVE_EDGE_IP_ADDRESS: "test", + } + print(options.headers, required_options) + self.assertDictEqual(required_options, options.headers) + + all_options = { + X_MASSIVE_EDGE_ID: "test", + X_MASSIVE_EDGE_IP_ADDRESS: "test", + X_MASSIVE_EDGE_USER_AGENT: "test", + } + + options = options.update_edge_header(edge_user="test") + self.assertDictEqual(all_options, options.headers) + + def test_header_update(self): + options = RequestOptionBuilder( + edge_id="test", edge_ip_address="test", edge_user="test" + ) + + # this mocks the expected behavior during the request.get function call + # in the BaseClient. + headers = options.headers + + expected_headers = { + "X-Massive-Edge-ID": "test", + "X-Massive-Edge-IP-Address": "test", + "X-Massive-Edge-User-Agent": "test", + } + + self.assertDictEqual(headers, expected_headers) + + expected_headers = { + "X-Massive-Edge-ID": "test2", + "X-Massive-Edge-IP-Address": "test2", + "X-Massive-Edge-User-Agent": "test2", + } + + options = options.update_edge_header( + edge_id="test2", edge_ip_address="test2", edge_user="test2" + ) + + self.assertDictEqual(options.headers, expected_headers) + + def test_clint_headers_concat(self): + client = RESTClient(api_key="test") + options = RequestOptionBuilder("test", "test", "test") + concat_headers = client._concat_headers(options.headers) + + expected = { + "Authorization": "Bearer test", + "User-Agent": "Massive.com PythonClient/0.0.0", + "X-Massive-Edge-ID": "test", + "X-Massive-Edge-IP-Address": "test", + "X-Massive-Edge-User-Agent": "test", + } + + self.assertDictEqual(concat_headers, expected) + + headers = None + expected = { + "Authorization": "Bearer test", + "User-Agent": "Massive.com PythonClient/0.0.0", + } + + self.assertDictEqual(expected, client._concat_headers(headers)) diff --git a/test_rest/test_aggs.py b/test_rest/test_aggs.py index 08706c53..850a00da 100644 --- a/test_rest/test_aggs.py +++ b/test_rest/test_aggs.py @@ -1,5 +1,5 @@ from base import BaseTest -from polygon.rest.models import ( +from massive.rest.models import ( Agg, GroupedDailyAgg, DailyOpenCloseAgg, @@ -8,6 +8,34 @@ class AggsTest(BaseTest): + def test_list_aggs(self): + aggs = [ + a for a in self.c.list_aggs("AAPL", 1, "day", "2005-04-02", "2005-04-04") + ] + expected = [ + Agg( + open=1.5032, + high=1.5064, + low=1.4489, + close=1.4604, + volume=642646396.0, + vwap=1.469, + timestamp=1112331600000, + transactions=82132, + ), + Agg( + open=1.4639, + high=1.4754, + low=1.4343, + close=1.4675, + volume=578172308.0, + vwap=1.4589, + timestamp=1112587200000, + transactions=65543, + ), + ] + self.assertEqual(aggs, expected) + def test_get_aggs(self): aggs = self.c.get_aggs("AAPL", 1, "day", "2005-04-01", "2005-04-04") expected = [ diff --git a/test_rest/test_conditions.py b/test_rest/test_conditions.py index 3ec5bb00..76adb932 100644 --- a/test_rest/test_conditions.py +++ b/test_rest/test_conditions.py @@ -1,4 +1,4 @@ -from polygon.rest.models import ( +from massive.rest.models import ( Condition, SipMapping, UpdateRules, diff --git a/test_rest/test_contracts.py b/test_rest/test_contracts.py index 98c836a6..ab2ea1fb 100644 --- a/test_rest/test_contracts.py +++ b/test_rest/test_contracts.py @@ -1,4 +1,4 @@ -from polygon.rest.models import OptionsContract +from massive.rest.models import OptionsContract from base import BaseTest diff --git a/test_rest/test_dividends.py b/test_rest/test_dividends.py index 3c422425..24dc9470 100644 --- a/test_rest/test_dividends.py +++ b/test_rest/test_dividends.py @@ -1,4 +1,4 @@ -from polygon.rest.models import Dividend +from massive.rest.models import Dividend from base import BaseTest diff --git a/test_rest/test_exchanges.py b/test_rest/test_exchanges.py index ab51cd58..8ca8b7ae 100644 --- a/test_rest/test_exchanges.py +++ b/test_rest/test_exchanges.py @@ -1,4 +1,4 @@ -from polygon.rest.models import Exchange +from massive.rest.models import Exchange from base import BaseTest 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) diff --git a/test_rest/test_indicators.py b/test_rest/test_indicators.py new file mode 100644 index 00000000..f7a831cf --- /dev/null +++ b/test_rest/test_indicators.py @@ -0,0 +1,206 @@ +from base import BaseTest +from massive.rest.models.aggs import Agg +from massive.rest.models.indicators import ( + SingleIndicatorResults, + SMAIndicatorResults, + EMAIndicatorResults, + RSIIndicatorResults, + MACDIndicatorResults, + IndicatorValue, + MACDIndicatorValue, + IndicatorUnderlying, +) + + +class IndicatorsTest(BaseTest): + def test_get_sma_indicators(self): + indicators = self.c.get_sma( + ticker="AAPL", + window=30, + timespan="quarter", + timestamp="1483958600", + expand_underlying=True, + ) + expected = SMAIndicatorResults( + values=[ + IndicatorValue(timestamp=1578027600, value=141.34), + IndicatorValue(timestamp=1578035600, value=139.33), + IndicatorValue(timestamp=1578049600, value=138.22), + ], + underlying=IndicatorUnderlying( + url="https://api.massive.com/v2/aggs/ticker/AAPL/range/1/day/1626912000000/1629590400000?adjusted=true&limit=50000&sort=desc", + aggregates=[ + Agg( + open=74.06, + high=75.15, + low=73.7975, + close=75.0875, + volume=135647456, + vwap=74.6099, + timestamp=1577941200000, + transactions=1, + otc=None, + ), + Agg( + open=74.2875, + high=75.145, + low=74.125, + close=74.3575, + volume=146535512, + vwap=74.7026, + timestamp=1578027600000, + transactions=1, + otc=None, + ), + ], + ), + ) + self.assertEqual(indicators, expected) + + def test_get_ema_indicators(self): + indicators = self.c.get_ema( + ticker="AAPL", + timestamp_lte="1478393873000", + window=5, + adjusted=False, + timestamp_gte="1477972800000", + ) + + expected = EMAIndicatorResults( + values=[ + IndicatorValue(timestamp=1478232000000, value=110.96883950617286), + IndicatorValue(timestamp=1478145600000, value=112.03325925925927), + IndicatorValue(timestamp=1478059200000, value=113.1348888888889), + IndicatorValue(timestamp=1477972800000, value=113.90733333333334), + ], + underlying=IndicatorUnderlying( + url="http://localhost:8081/v2/aggs/ticker/AAPL/range/1/day/1477368000000/1478393873000?adjusted=false&limit=50000&sort=desc", + aggregates=[], + ), + ) + + self.assertEqual(indicators, expected) + + def test_get_macd_indicators(self): + indicators = self.c.get_macd( + ticker="SPY", + signal_window=10, + long_window=20, + timestamp_gt="2022-08-09", + ) + + expected = MACDIndicatorResults( + values=[ + MACDIndicatorValue( + timestamp=1660881600000, + value=6.912856964275647, + signal=49.504484615884834, + histogram=-42.59162765160919, + ), + MACDIndicatorValue( + timestamp=1660795200000, + value=7.509881940545313, + signal=58.96929076068688, + histogram=-51.45940882014157, + ), + MACDIndicatorValue( + timestamp=1660708800000, + value=7.734132135566654, + signal=70.40471494294057, + histogram=-62.67058280737392, + ), + MACDIndicatorValue( + timestamp=1660622400000, + value=7.973958808765531, + signal=84.331511122357, + histogram=-76.35755231359147, + ), + MACDIndicatorValue( + timestamp=1660536000000, + value=7.90112075397235, + signal=101.2998560809329, + histogram=-93.39873532696055, + ), + MACDIndicatorValue( + timestamp=1660276800000, + value=7.719066821080332, + signal=122.05513059803525, + histogram=-114.33606377695492, + ), + MACDIndicatorValue( + timestamp=1660190400000, + value=7.468267821253335, + signal=147.4631447706919, + histogram=-139.99487694943858, + ), + MACDIndicatorValue( + timestamp=1660104000000, + value=7.542041992364375, + signal=178.5731174261227, + histogram=-171.03107543375833, + ), + ], + underlying=IndicatorUnderlying( + url="http://localhost:8081/v2/aggs/ticker/SPY/range/1/day/1657670400000/1660926503659?limit=50000&sort=desc", + aggregates=[], + ), + ) + + self.assertEqual(indicators, expected) + + def test_get_rsi_indicators(self): + indicators = self.c.get_rsi( + ticker="AAPL", + window=20, + timespan="minute", + adjusted=True, + timestamp_gt="2022-08-18", + ) + + expected = RSIIndicatorResults( + values=[ + IndicatorValue(timestamp=1660928400000, value=172.46568754351864), + IndicatorValue(timestamp=1660927500000, value=172.43049675862588), + IndicatorValue(timestamp=1660926600000, value=172.39791747006018), + IndicatorValue(timestamp=1660925700000, value=172.37032983532967), + IndicatorValue(timestamp=1660924800000, value=172.39246981799596), + IndicatorValue(timestamp=1660923900000, value=172.4199719041008), + IndicatorValue(timestamp=1660923000000, value=172.4462847361114), + IndicatorValue(timestamp=1660922100000, value=172.48168312938628), + IndicatorValue(timestamp=1660921200000, value=172.5318603009006), + IndicatorValue(timestamp=1660920300000, value=172.60100349046908), + IndicatorValue(timestamp=1660919400000, value=172.68216175262373), + IndicatorValue(timestamp=1660918500000, value=172.7343682528999), + IndicatorValue(timestamp=1660917600000, value=172.7937754374157), + IndicatorValue(timestamp=1660916700000, value=172.8239623255647), + IndicatorValue(timestamp=1660915800000, value=172.82964257036102), + IndicatorValue(timestamp=1660914900000, value=172.8215102093464), + IndicatorValue(timestamp=1660914000000, value=172.7816691787513), + IndicatorValue(timestamp=1660913100000, value=172.79237119756723), + IndicatorValue(timestamp=1660912200000, value=172.8094629025743), + IndicatorValue(timestamp=1660911300000, value=172.82942741863474), + IndicatorValue(timestamp=1660910400000, value=172.85463030480682), + IndicatorValue(timestamp=1660909500000, value=172.88038086320753), + IndicatorValue(timestamp=1660908600000, value=172.91094726986097), + IndicatorValue(timestamp=1660907700000, value=172.95420487721478), + IndicatorValue(timestamp=1660906800000, value=172.99148960113214), + IndicatorValue(timestamp=1660905900000, value=173.03796219072498), + IndicatorValue(timestamp=1660905000000, value=173.0998529476434), + IndicatorValue(timestamp=1660904100000, value=173.17457431055323), + IndicatorValue(timestamp=1660903200000, value=173.23505581692726), + IndicatorValue(timestamp=1660902300000, value=173.3166406397617), + IndicatorValue(timestamp=1660901400000, value=173.3920764965787), + IndicatorValue(timestamp=1660900500000, value=173.4628213909554), + IndicatorValue(timestamp=1660899600000, value=173.5494341689507), + IndicatorValue(timestamp=1660898700000, value=173.63884829199816), + IndicatorValue(timestamp=1660897800000, value=173.73872705957692), + IndicatorValue(timestamp=1660896900000, value=173.8480667500587), + IndicatorValue(timestamp=1660896000000, value=173.97207377638065), + ], + underlying=IndicatorUnderlying( + url="https://api.massive.com/v2/aggs/ticker/AAPL/range/15/minute/1660521600000/1660928746001?limit=50000&sort=desc", + aggregates=[], + ), + ) + + self.assertEqual(indicators, expected) diff --git a/test_rest/test_markets.py b/test_rest/test_markets.py index e9de8514..97fe7fc6 100644 --- a/test_rest/test_markets.py +++ b/test_rest/test_markets.py @@ -1,4 +1,4 @@ -from polygon.rest.models import ( +from massive.rest.models import ( MarketHoliday, MarketStatus, MarketCurrencies, diff --git a/test_rest/test_modelclass.py b/test_rest/test_modelclass.py index 651a6393..111df6c9 100644 --- a/test_rest/test_modelclass.py +++ b/test_rest/test_modelclass.py @@ -1,4 +1,4 @@ -from polygon.rest.models import Agg +from massive.rest.models import Agg from base import BaseTest diff --git a/test_rest/test_quotes.py b/test_rest/test_quotes.py index 17b701b6..1086bdb5 100644 --- a/test_rest/test_quotes.py +++ b/test_rest/test_quotes.py @@ -1,5 +1,5 @@ from base import BaseTest -from polygon.rest.models import ( +from massive.rest.models import ( Quote, LastQuote, ForexQuote, diff --git a/test_rest/test_snapshots.py b/test_rest/test_snapshots.py index 498fb966..3b016d71 100644 --- a/test_rest/test_snapshots.py +++ b/test_rest/test_snapshots.py @@ -1,4 +1,5 @@ -from polygon.rest.models import ( +from base import BaseTest +from massive.rest.models import ( TickerSnapshot, OptionContractSnapshot, SnapshotTickerFullBook, @@ -9,14 +10,131 @@ OrderBookQuote, UnderlyingAsset, LastQuoteOptionContractSnapshot, + LastTradeOptionContractSnapshot, Greeks, OptionDetails, DayOptionContractSnapshot, + UniversalSnapshot, + UniversalSnapshotDetails, + UniversalSnapshotLastQuote, + UniversalSnapshotLastTrade, + UniversalSnapshotUnderlyingAsset, + UniversalSnapshotSession, + IndicesSnapshot, + IndicesSession, ) -from base import BaseTest class SnapshotsTest(BaseTest): + def test_list_universal_snapshots(self): + expected = [ + UniversalSnapshot( + ticker="O:NCLH221014C00005000", + implied_volatility=0.3048997097864957, + type="options", + market_status="closed", + name="NCLH $5 Call", + open_interest=8921, + break_even_price=171.075, + details=UniversalSnapshotDetails( + contract_type="call", + exercise_style="american", + expiration_date="2022-10-14", + shares_per_contract=100, + strike_price=5, + underlying_ticker="NCLH", + ), + fair_market_value=20.5, + greeks=Greeks( + delta=0.5520187372272933, + gamma=0.00706756515659829, + theta=-0.018532772783847958, + vega=0.7274811132998142, + ), + last_quote=UniversalSnapshotLastQuote( + ask=21.25, + ask_size=110, + bid=20.9, + bid_size=172, + last_updated=1636573458756383500, + midpoint=21.075, + timeframe="REAL-TIME", + ), + last_trade=UniversalSnapshotLastTrade( + conditions=[209], + exchange=316, + price=0.05, + sip_timestamp=1675280958783136800, + size=2, + timeframe="REAL-TIME", + ), + session=UniversalSnapshotSession( + change=-0.05, + change_percent=-1.07, + close=6.65, + early_trading_change=-0.01, + early_trading_change_percent=-0.03, + high=7.01, + late_trading_change=-0.4, + late_trading_change_percent=-0.02, + low=5.42, + open=6.7, + previous_close=6.71, + volume=67, + ), + underlying_asset=UniversalSnapshotUnderlyingAsset( + change_to_break_even=23.123999999999995, + last_updated=1636573459862384600, + price=147.951, + ticker="AAPL", + timeframe="REAL-TIME", + ), + ), + UniversalSnapshot( + fair_market_value=0.05, + last_quote=UniversalSnapshotLastQuote( + ask=21.25, + ask_size=110, + bid=20.9, + bid_size=172, + last_updated=1636573458756383500, + timeframe="REAL-TIME", + ), + last_trade=UniversalSnapshotLastTrade( + conditions=[209], + exchange=316, + id="4064", + last_updated=1675280958783136800, + price=0.05, + size=2, + timeframe="REAL-TIME", + ), + market_status="closed", + name="Apple Inc.", + session=UniversalSnapshotSession( + change=-1.05, + change_percent=-4.67, + close=21.4, + early_trading_change=-0.39, + early_trading_change_percent=-0.07, + high=22.49, + late_trading_change=1.2, + late_trading_change_percent=3.92, + low=21.35, + open=22.49, + previous_close=22.45, + volume=37, + ), + ticker="AAPL", + type="stocks", + ), + UniversalSnapshot( + error="NOT_FOUND", message="Ticker not found.", ticker="TSLAAPL" + ), + ] + snapshots = [s for s in self.c.list_universal_snapshots()] + self.assertEqual(snapshots, expected) + def test_get_snapshot_all(self): snapshots = self.c.get_snapshot_all("stocks") expected = [ @@ -31,6 +149,7 @@ def test_get_snapshot_all(self): timestamp=None, transactions=None, ), + fair_market_value=20.5, last_quote=LastQuote( ticker=None, trf_timestamp=None, @@ -70,6 +189,8 @@ def test_get_snapshot_all(self): close=20.506, volume=5000, vwap=20.5105, + timestamp=1684428600000, + transactions=5, ), prev_day=Agg( open=20.79, @@ -102,6 +223,7 @@ def test_get_snapshot_ticker(self): timestamp=None, transactions=None, ), + fair_market_value=160.315, last_quote=LastQuote( ticker=None, trf_timestamp=None, @@ -141,6 +263,8 @@ def test_get_snapshot_ticker(self): close=160.3, volume=197226, vwap=160.5259, + timestamp=1684428600000, + transactions=5, ), prev_day=Agg( open=159.25, @@ -183,6 +307,7 @@ def test_get_snapshot_option(self): strike_price=150, ticker="O:AAPL230616C00150000", ), + fair_market_value=29.2, greeks=Greeks( delta=0.6436614934293701, gamma=0.0061735291012820675, @@ -199,6 +324,14 @@ def test_get_snapshot_option(self): midpoint=29.075, timeframe="REAL-TIME", ), + last_trade=LastTradeOptionContractSnapshot( + price=29.25, + sip_timestamp=1678718527714665700, + size=1, + conditions=[209], + exchange=309, + timeframe="REAL-TIME", + ), open_interest=8133, underlying_asset=UnderlyingAsset( change_to_break_even=19.11439999999999, @@ -210,6 +343,68 @@ def test_get_snapshot_option(self): ) self.assertEqual(snapshots, expected) + def test_list_snapshot_options_chain(self): + snapshots = [s for s in self.c.list_snapshot_options_chain("AAPL")] + expected = [ + OptionContractSnapshot( + break_even_price=179.075, + day=DayOptionContractSnapshot( + change=-2.3999999999999986, + change_percent=-7.643312101910824, + close=29, + high=32.25, + last_updated=1651204800000000000, + low=29, + open=29.99, + previous_close=31.4, + volume=8, + vwap=30.7738, + ), + details=OptionDetails( + contract_type="call", + exercise_style="american", + expiration_date="2023-06-16", + shares_per_contract=100, + strike_price=150, + ticker="O:AAPL230616C00150000", + ), + fair_market_value=20.5, + greeks=Greeks( + delta=0.6436614934293701, + gamma=0.0061735291012820675, + theta=-0.028227189324641973, + vega=0.6381159723175714, + ), + implied_volatility=0.3570277203465058, + last_quote=LastQuoteOptionContractSnapshot( + ask=29.25, + ask_size=209, + bid=28.9, + bid_size=294, + last_updated=1651254260800059648, + midpoint=29.075, + timeframe="REAL-TIME", + ), + last_trade=LastTradeOptionContractSnapshot( + price=29.25, + sip_timestamp=1678718527714665700, + size=1, + conditions=[209], + exchange=309, + timeframe="REAL-TIME", + ), + open_interest=8133, + underlying_asset=UnderlyingAsset( + change_to_break_even=19.11439999999999, + last_updated=1651254263172073152, + price=159.9606, + ticker="AAPL", + timeframe="REAL-TIME", + ), + ) + ] + self.assertEqual(snapshots, expected) + def test_get_snapshot_crypto_book(self): snapshots = self.c.get_snapshot_crypto_book("X:BTCUSD") expected = SnapshotTickerFullBook( @@ -230,3 +425,36 @@ def test_get_snapshot_crypto_book(self): updated=1605295074162, ) self.assertEqual(snapshots, expected) + + def test_get_snapshot_indices(self): + ticker_any_of = ["SPX", "APx", "APy"] + summary_results = self.c.get_snapshot_indices(ticker_any_of) + expected = [ + IndicesSnapshot( + value=3822.39, + name="S&P 500", + type="indices", + ticker="SPX", + market_status="closed", + session=IndicesSession( + change=-50.01, + change_percent=-1.45, + close=3822.39, + high=3834.41, + low=38217.11, + open=3827.38, + previous_close=3812.19, + ), + ), + IndicesSnapshot( + ticker="APx", + message="Ticker not found.", + error="NOT_FOUND", + ), + IndicesSnapshot( + ticker="APy", + error="NOT_ENTITLED", + message="Not entitled to this ticker.", + ), + ] + self.assertEqual(summary_results, expected) diff --git a/test_rest/test_splits.py b/test_rest/test_splits.py index 4635e45e..03e84448 100644 --- a/test_rest/test_splits.py +++ b/test_rest/test_splits.py @@ -1,4 +1,4 @@ -from polygon.rest.models import Split +from massive.rest.models import Split from base import BaseTest diff --git a/test_rest/test_summaries.py b/test_rest/test_summaries.py new file mode 100644 index 00000000..e1e17a97 --- /dev/null +++ b/test_rest/test_summaries.py @@ -0,0 +1,106 @@ +from massive.rest.models import SummaryResult, Branding, Session, Options +from base import BaseTest + + +class SummariesTest(BaseTest): + def test_get_summaries_list(self): + ticker_any_of = ["NCLH", "O:NCLH221014C00005000", "C:EURUSD", "X:BTCUSD", "APx"] + summary_results = self.c.get_summaries(ticker_any_of) + expected = [ + SummaryResult( + price=22.3, + name="Norwegian Cruise Lines", + ticker="NCLH", + branding=Branding( + icon_url="https://api.massive.com/icon.png", + logo_url="https://api.massive.com/logo.svg", + ), + market_status="closed", + type="stocks", + session=Session( + change=-1.05, + change_percent=-4.67, + close=21.4, + early_trading_change=-0.39, + early_trading_change_percent=-0.07, + high=22.49, + late_trading_change=1.2, + late_trading_change_percent=3.92, + low=21.35, + open=22.49, + previous_close=22.45, + volume=37, + ), + ), + SummaryResult( + price=6.6, + name="NCLH $5 Call", + ticker="O:NCLH221014C00005000", + market_status="closed", + type="options", + session=Session( + change=-0.05, + change_percent=-1.07, + close=6.65, + early_trading_change=-0.01, + early_trading_change_percent=-0.03, + high=7.01, + late_trading_change=-0.4, + late_trading_change_percent=-0.02, + low=5.42, + open=6.7, + previous_close=6.71, + volume=67, + ), + options=Options( + contract_type="call", + exercise_style="american", + expiration_date="2022-10-14", + shares_per_contract=100, + strike_price=5, + underlying_ticker="NCLH", + ), + ), + SummaryResult( + price=0.97989, + name="Euro - United States Dollar", + ticker="C:EURUSD", + market_status="open", + type="fx", + session=Session( + change=-0.0001, + change_percent=-0.67, + close=0.97989, + high=0.98999, + low=0.96689, + open=0.97889, + previous_close=0.98001, + ), + ), + SummaryResult( + price=32154.68, + name="Bitcoin - United States Dollar", + ticker="X:BTCUSD", + branding=Branding( + icon_url="https://api.massive.com/icon.png", + logo_url="https://api.massive.com/logo.svg", + ), + market_status="open", + type="crypto", + session=Session( + change=-201.23, + change_percent=-0.77, + close=32154.68, + high=33124.28, + low=28182.88, + open=31129.32, + previous_close=33362.18, + ), + ), + SummaryResult( + ticker="APx", + error="NOT_FOUND", + message="Ticker not found.", + ), + ] + self.assertEqual(summary_results, expected) diff --git a/test_rest/test_tickers.py b/test_rest/test_tickers.py index b965753e..684f9299 100644 --- a/test_rest/test_tickers.py +++ b/test_rest/test_tickers.py @@ -1,8 +1,10 @@ -from polygon.rest.models import ( +from massive.rest.models import ( Ticker, TickerDetails, TickerNews, TickerTypes, + TickerChangeEvent, + TickerChangeResults, Publisher, Branding, CompanyAddress, @@ -100,8 +102,8 @@ def test_get_ticker_details(self): postal_code="95014", ), branding=Branding( - icon_url="https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-05-01_icon.png", - logo_url="https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-05-01_logo.svg", + icon_url="https://api.massive.com/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-05-01_icon.png", + logo_url="https://api.massive.com/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-05-01_logo.svg", ), cik="0000320193", composite_figi="BBG000B9XRY4", @@ -128,6 +130,11 @@ def test_get_ticker_details(self): ) self.assertEqual(details, expected) + expected.market_cap = 1916103105630 + details = self.c.get_ticker_details("AAPL", date="2020-10-01") + + self.assertEqual(details, expected) + def test_list_ticker_news(self): news = [t for t in self.c.list_ticker_news("NFLX")] expected = [ @@ -141,9 +148,9 @@ def test_list_ticker_news(self): keywords=None, published_utc="2022-04-28T17:08:00Z", publisher=Publisher( - favicon_url="https://s3.polygon.io/public/assets/news/favicons/marketwatch.ico", + favicon_url="https://s3.massive.com/public/assets/news/favicons/marketwatch.ico", homepage_url="https://www.marketwatch.com/", - logo_url="https://s3.polygon.io/public/assets/news/logos/marketwatch.svg", + logo_url="https://s3.massive.com/public/assets/news/logos/marketwatch.svg", name="MarketWatch", ), tickers=["MSFT", "TSN", "NFLX", "AMZN"], @@ -230,3 +237,25 @@ def test_get_ticker_types(self): ] self.assertEqual(types, expected) + + def test_get_ticker_events_ticker_change(self): + events = self.c.get_ticker_events(ticker="META", types="ticker_change") + expected = TickerChangeResults( + name="Meta Platforms, Inc. Class A Common Stock", + composite_figi="BBG000MM2P62", + cik="0001326801", + events=[ + { + "ticker_change": {"ticker": "META"}, + "type": "ticker_change", + "date": "2022-06-11", + }, + { + "ticker_change": {"ticker": "FB"}, + "type": "ticker_change", + "date": "2012-05-18", + }, + ], + ) + + self.assertEqual(expected, events) diff --git a/test_rest/test_trades.py b/test_rest/test_trades.py index 6acc73b0..a27cc96f 100644 --- a/test_rest/test_trades.py +++ b/test_rest/test_trades.py @@ -1,5 +1,5 @@ from base import BaseTest -from polygon.rest.models import ( +from massive.rest.models import ( Trade, LastTrade, CryptoTrade, diff --git a/test_websocket/base_ws.py b/test_websocket/base_ws.py index c4a6acad..a21bc4d8 100644 --- a/test_websocket/base_ws.py +++ b/test_websocket/base_ws.py @@ -2,7 +2,7 @@ import asyncio from mock_server import run_mock_server from typing import List -from polygon.websocket import WebSocketMessage +from massive.websocket import WebSocketMessage unittest.util._MAX_LENGTH = 30000 # type: ignore diff --git a/test_websocket/test_conn.py b/test_websocket/test_conn.py index 2fcfd464..4f8ad3d8 100644 --- a/test_websocket/test_conn.py +++ b/test_websocket/test_conn.py @@ -1,8 +1,8 @@ -from polygon import WebSocketClient +from massive import WebSocketClient from base_ws import BaseTest from mock_server import subs, port import asyncio -from polygon.websocket import EquityTrade +from massive.websocket import EquityTrade class WebSocketsTest(BaseTest):