diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 02c7785c..d7105d15 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1 +1 @@
-* @jbonzo @mmoghaddam385 @justinpolygon
+* @justinpolygon @penelopus @davidwf-polygonio
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 313c2716..f0767d70 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -7,7 +7,7 @@ on:
branches:
- master
schedule:
- - cron: '33 12 * * 3'
+ - cron: "33 12 * * 3"
jobs:
analyze:
name: analyze
@@ -19,15 +19,15 @@ jobs:
strategy:
fail-fast: false
matrix:
- language: [ 'python' ]
+ language: ["python"]
steps:
- - name: Checkout repository
- uses: actions/checkout@v3
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v2
- with:
- languages: ${{ matrix.language }}
- - name: Autobuild
- uses: github/codeql-action/autobuild@v2
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v2
+ - name: Checkout repository
+ uses: actions/checkout@v3
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v3
+ with:
+ languages: ${{ matrix.language }}
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v3
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v3
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index c906b0d3..2c573262 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -6,20 +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
+ - 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 f87d2e29..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:
diff --git a/.polygon/rest.json b/.massive/rest.json
similarity index 86%
rename from .polygon/rest.json
rename to .massive/rest.json
index 1925b814..3d088556 100644
--- a/.polygon/rest.json
+++ b/.massive/rest.json
@@ -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\nAggregate Data API Improvements.\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",
@@ -63,7 +63,7 @@
},
"AggregateTimeTo": {
"description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2023-01-09",
+ "example": "2023-02-10",
"in": "path",
"name": "to",
"required": true,
@@ -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",
@@ -130,7 +153,7 @@
},
"IndicesAggregateTimeFrom": {
"description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2023-03-10",
+ "example": "2023-03-13",
"in": "path",
"name": "from",
"required": true,
@@ -140,7 +163,7 @@
},
"IndicesAggregateTimeTo": {
"description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2023-03-10",
+ "example": "2023-03-24",
"in": "path",
"name": "to",
"required": true,
@@ -150,7 +173,7 @@
},
"IndicesTickerPathParam": {
"description": "The ticker symbol of Index.",
- "example": "I:DJI",
+ "example": "I:NDX",
"in": "path",
"name": "indicesTicker",
"required": true,
@@ -219,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",
@@ -229,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": {
@@ -262,7 +285,7 @@
"AskExchangeId": {
"allOf": [
{
- "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.",
"type": "integer"
},
{
@@ -282,7 +305,7 @@
"BidExchangeId": {
"allOf": [
{
- "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.",
"type": "integer"
},
{
@@ -420,7 +443,7 @@
"type": "array"
},
"type": {
- "description": "The type or class of the security. (Full List of Ticker Types)",
+ "description": "The type or class of the security. (Full List of Ticker Types)",
"type": "string"
},
"updated": {
@@ -438,7 +461,7 @@
"ConditionTypeMap": {
"properties": {
"condition": {
- "description": "Polygon.io's mapping for condition codes. For more information, see our Trade Conditions Glossary.\n",
+ "description": "Massive.com's mapping for condition codes. For more information, see our Trade Conditions Glossary.\n",
"type": "string"
}
},
@@ -447,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"
@@ -460,7 +483,7 @@
"items": {
"properties": {
"id": {
- "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.",
"type": "integer"
},
"market": {
@@ -580,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"
@@ -604,7 +627,7 @@
"type": "integer"
},
"x": {
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
"type": "integer"
}
},
@@ -637,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 Exchanges 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": {
@@ -693,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"
@@ -717,7 +740,7 @@
"type": "integer"
},
"x": {
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
"type": "integer"
}
},
@@ -753,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"
@@ -777,7 +800,7 @@
"type": "integer"
},
"x": {
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
"type": "integer"
}
},
@@ -826,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",
@@ -848,7 +879,9 @@
"l",
"c",
"v",
- "vw"
+ "vw",
+ "t",
+ "n"
],
"type": "object"
},
@@ -900,6 +933,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"
+ },
"lastTrade": {
"allOf": [
{
@@ -932,7 +970,7 @@
"type": "integer"
},
"x": {
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
"type": "integer"
}
},
@@ -966,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",
@@ -988,7 +1034,9 @@
"l",
"c",
"v",
- "vw"
+ "vw",
+ "t",
+ "n"
],
"type": "object"
},
@@ -1203,6 +1251,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"
+ },
"lastTrade": {
"allOf": [
{
@@ -1235,7 +1288,7 @@
"type": "integer"
},
"x": {
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
"type": "integer"
}
},
@@ -1269,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",
@@ -1291,7 +1352,9 @@
"l",
"c",
"v",
- "vw"
+ "vw",
+ "t",
+ "n"
],
"type": "object"
},
@@ -1380,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"
@@ -1404,7 +1467,7 @@
"type": "integer"
},
"x": {
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
"type": "integer"
}
},
@@ -1419,7 +1482,7 @@
"type": "object"
},
"CryptoTradeExchange": {
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
"type": "integer"
},
"Date": {
@@ -1438,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": {
@@ -1471,7 +1534,7 @@
"type": "array"
},
"ExchangeId": {
- "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.",
"type": "integer"
},
"Financial": {
@@ -1956,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": {
@@ -1985,7 +2053,7 @@
"type": "number"
},
"exchange": {
- "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.",
"type": "integer"
},
"timestamp": {
@@ -2015,7 +2083,7 @@
"type": "object"
},
"ForexExchangeId": {
- "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.",
"type": "integer"
},
"ForexGroupedResults": {
@@ -2119,7 +2187,7 @@
"type": "integer"
},
"x": {
- "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.",
"type": "integer"
}
},
@@ -2158,7 +2226,7 @@
"type": "number"
},
"exchange": {
- "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.",
"type": "integer"
},
"timestamp": {
@@ -2362,6 +2430,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"
+ },
"lastQuote": {
"description": "The most recent quote for this ticker.",
"properties": {
@@ -2410,24 +2483,25 @@
"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"
}
},
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v"
- ],
"type": "object"
},
"prevDay": {
@@ -2551,6 +2625,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"
+ },
"lastQuote": {
"description": "The most recent quote for this ticker.",
"properties": {
@@ -2599,24 +2678,25 @@
"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"
}
},
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v"
- ],
"type": "object"
},
"prevDay": {
@@ -2796,7 +2876,7 @@
"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"
@@ -3273,6 +3353,44 @@
"format": "double",
"type": "number"
},
+ "SnapshotMinOHLCV": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
"SnapshotOHLCV": {
"properties": {
"c": {
@@ -3506,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": {
@@ -3657,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",
@@ -3680,7 +3806,9 @@
"l",
"c",
"v",
- "vw"
+ "vw",
+ "t",
+ "n"
],
"type": "object"
},
@@ -3705,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",
@@ -3714,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",
@@ -3732,7 +3868,9 @@
"l",
"c",
"v",
- "vw"
+ "vw",
+ "t",
+ "n"
],
"type": "object"
},
@@ -3788,6 +3926,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"
+ },
"lastQuote": {
"description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
"properties": {
@@ -3851,7 +3994,7 @@
"type": "integer"
},
"x": {
- "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.",
"type": "integer"
}
},
@@ -3887,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",
@@ -3896,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",
@@ -3914,7 +4065,9 @@
"l",
"c",
"v",
- "vw"
+ "vw",
+ "t",
+ "n"
],
"type": "object"
},
@@ -4043,6 +4196,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"
+ },
"lastQuote": {
"description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
"properties": {
@@ -4106,7 +4264,7 @@
"type": "integer"
},
"x": {
- "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.",
"type": "integer"
}
},
@@ -4142,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",
@@ -4151,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",
@@ -4169,7 +4335,9 @@
"l",
"c",
"v",
- "vw"
+ "vw",
+ "t",
+ "n"
],
"type": "object"
},
@@ -4392,7 +4560,7 @@
"X": {
"allOf": [
{
- "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.",
"type": "integer"
},
{
@@ -4403,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"
@@ -4428,7 +4596,7 @@
"x": {
"allOf": [
{
- "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.",
"type": "integer"
},
{
@@ -4508,7 +4676,7 @@
"X": {
"allOf": [
{
- "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.",
"type": "integer"
},
{
@@ -4519,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"
@@ -4544,7 +4712,7 @@
"x": {
"allOf": [
{
- "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.",
"type": "integer"
},
{
@@ -4617,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"
@@ -4645,7 +4813,7 @@
"type": "number"
},
"x": {
- "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.",
"type": "integer"
},
"z": {
@@ -4710,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"
@@ -4738,7 +4906,7 @@
"type": "number"
},
"x": {
- "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.",
"type": "integer"
},
"z": {
@@ -5012,7 +5180,7 @@
},
"info": {
"description": "The future of fintech.",
- "title": "Polygon API",
+ "title": "Massive API",
"version": "1.0.0"
},
"openapi": "3.0.3",
@@ -5047,9 +5215,8 @@
"example": 100,
"in": "query",
"name": "amount",
- "required": true,
"schema": {
- "default": 100,
+ "default": 1,
"type": "number"
}
},
@@ -5085,7 +5252,9 @@
"exchange": 48,
"timestamp": 1605555313000
},
+ "request_id": "a73a29dbcab4613eeaf48583d3baacf0",
"status": "success",
+ "symbol": "AUD/USD",
"to": "USD"
},
"schema": {
@@ -5103,7 +5272,7 @@
"description": "The amount to convert.",
"format": "double",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
},
@@ -5120,20 +5289,26 @@
"type": "number"
},
"exchange": {
- "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.",
"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"
}
}
},
+ "required": [
+ "exchange",
+ "timestamp",
+ "ask",
+ "bid"
+ ],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "LastQuoteCurrencies"
}
},
@@ -5154,6 +5329,15 @@
"type": "string"
}
},
+ "required": [
+ "status",
+ "request_id",
+ "from",
+ "to",
+ "symbol",
+ "initialAmount",
+ "converted"
+ ],
"type": "object"
}
},
@@ -5174,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"
}
@@ -5306,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"
@@ -5330,7 +5514,7 @@
"type": "integer"
},
"x": {
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
"type": "integer"
}
},
@@ -5370,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"
}
@@ -5527,7 +5711,7 @@
"type": "integer"
},
"x": {
- "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.",
"type": "integer"
}
},
@@ -5565,18 +5749,18 @@
"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"
}
@@ -5596,7 +5780,7 @@
"schema": {
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-go-id": "Ticker"
},
{
"description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
@@ -5605,7 +5789,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -5688,7 +5872,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -5696,7 +5880,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -5704,7 +5888,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -5712,7 +5896,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -5725,11 +5909,11 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v1/indicators/ema/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "next_url": "https://api.massive.com/v1/indicators/ema/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": {
"underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25"
+ "url": "https://api.massive.com/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25"
},
"values": [
{
@@ -5812,9 +5996,9 @@
"n"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array"
@@ -5833,16 +6017,16 @@
"description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
"format": "int64",
"type": "integer",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
},
"value": {
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
}
@@ -5853,7 +6037,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "EMAResults"
}
},
@@ -5877,18 +6061,18 @@
},
"summary": "Exponential Moving Average (EMA)",
"tags": [
- "crpyto:aggregates"
+ "crypto:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "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-polygon-ignore": true
+ "x-massive-ignore": true
},
"/v1/indicators/ema/{fxTicker}": {
"get": {
@@ -5897,14 +6081,14 @@
"parameters": [
{
"description": "The ticker symbol for which to get exponential moving average (EMA) data.",
- "example": "C:EUR-USD",
+ "example": "C:EURUSD",
"in": "path",
"name": "fxTicker",
"required": true,
"schema": {
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-go-id": "Ticker"
},
{
"description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
@@ -5913,7 +6097,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -6006,7 +6190,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -6014,7 +6198,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -6022,7 +6206,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -6030,7 +6214,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -6043,11 +6227,11 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v1/indicators/ema/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "next_url": "https://api.massive.com/v1/indicators/ema/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": {
"underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25"
+ "url": "https://api.massive.com/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25"
},
"values": [
{
@@ -6130,9 +6314,9 @@
"n"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array"
@@ -6151,16 +6335,16 @@
"description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
"format": "int64",
"type": "integer",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
},
"value": {
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
}
@@ -6171,7 +6355,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "EMAResults"
}
},
@@ -6197,16 +6381,16 @@
"tags": [
"fx:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "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-polygon-ignore": true
+ "x-massive-ignore": true
},
"/v1/indicators/ema/{indicesTicker}": {
"get": {
@@ -6215,14 +6399,14 @@
"parameters": [
{
"description": "The ticker symbol for which to get exponential moving average (EMA) data.",
- "example": "I:DJI",
+ "example": "I:NDX",
"in": "path",
"name": "indicesTicker",
"required": true,
"schema": {
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-go-id": "Ticker"
},
{
"description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
@@ -6231,7 +6415,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -6324,7 +6508,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -6332,7 +6516,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -6340,7 +6524,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -6348,7 +6532,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -6361,16 +6545,16 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v1/indicators/ema/I:DJI?cursor=YWRqdXN0ZWQ9dHJ1ZSZhcD0lN0IlMjJ2JTIyJTNBMCUyQyUyMm8lMjIlM0EwJTJDJTIyYyUyMiUzQTQwNDcuNDEwMDAwMDAwMDAwMyUyQyUyMmglMjIlM0EwJTJDJTIybCUyMiUzQTAlMkMlMjJ0JTIyJTNBMTY3ODA4MjQwMDAwMCU3RCZhcz0mZXhwYW5kX3VuZGVybHlpbmc9ZmFsc2UmbGltaXQ9MTAmb3JkZXI9ZGVzYyZzZXJpZXNfdHlwZT1jbG9zZSZ0aW1lc3Bhbj1kYXkmdGltZXN0YW1wLmx0PTE2NzgxNjUyMDAwMDAmd2luZG93PTU",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "next_url": "https://api.massive.com/v1/indicators/ema/I:NDX?cursor=YWRqdXN0ZWQ9dHJ1ZSZhcD0lN0IlMjJ2JTIyJTNBMCUyQyUyMm8lMjIlM0EwJTJDJTIyYyUyMiUzQTE1MDg0Ljk5OTM4OTgyMDAzJTJDJTIyaCUyMiUzQTAlMkMlMjJsJTIyJTNBMCUyQyUyMnQlMjIlM0ExNjg3MjE5MjAwMDAwJTdEJmFzPSZleHBhbmRfdW5kZXJseWluZz1mYWxzZSZsaW1pdD0xJm9yZGVyPWRlc2Mmc2VyaWVzX3R5cGU9Y2xvc2UmdGltZXNwYW49ZGF5JnRpbWVzdGFtcC5sdD0xNjg3MjM3MjAwMDAwJndpbmRvdz01MA",
+ "request_id": "b9201816341441eed663a90443c0623a",
"results": {
"underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/I:DJI/range/1/day/1063281600000/1678726291180?limit=35&sort=desc"
+ "url": "https://api.massive.com/v2/aggs/ticker/I:NDX/range/1/day/1678338000000/1687366449650?limit=226&sort=desc"
},
"values": [
{
- "timestamp": 1681966800000,
- "value": 33355.64416487007
+ "timestamp": 1687237200000,
+ "value": 14452.002555459003
}
]
},
@@ -6448,9 +6632,9 @@
"n"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array"
@@ -6469,16 +6653,16 @@
"description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
"format": "int64",
"type": "integer",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
},
"value": {
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
}
@@ -6489,7 +6673,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "EMAResults"
}
},
@@ -6509,16 +6693,17 @@
"tags": [
"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": {
+ "x-massive-entitlement-market-type": {
"description": "Indices data",
"name": "indices"
}
},
- "x-polygon-ignore": true
+ "x-massive-ignore": true
},
"/v1/indicators/ema/{optionsTicker}": {
"get": {
@@ -6534,7 +6719,7 @@
"schema": {
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-go-id": "Ticker"
},
{
"description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
@@ -6543,7 +6728,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -6636,7 +6821,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -6644,7 +6829,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -6652,7 +6837,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -6660,7 +6845,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -6673,11 +6858,11 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v1/indicators/ema/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "next_url": "https://api.massive.com/v1/indicators/ema/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": {
"underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25"
+ "url": "https://api.massive.com/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25"
},
"values": [
{
@@ -6760,9 +6945,9 @@
"n"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array"
@@ -6781,16 +6966,16 @@
"description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
"format": "int64",
"type": "integer",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
},
"value": {
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
}
@@ -6801,7 +6986,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "EMAResults"
}
},
@@ -6827,16 +7012,16 @@
"tags": [
"options:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
+ "x-massive-entitlement-market-type": {
"description": "Options data",
"name": "options"
}
},
- "x-polygon-ignore": true
+ "x-massive-ignore": true
},
"/v1/indicators/ema/{stockTicker}": {
"get": {
@@ -6844,7 +7029,7 @@
"operationId": "EMA",
"parameters": [
{
- "description": "The ticker symbol for which to get exponential moving average (EMA) data.",
+ "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",
@@ -6852,7 +7037,7 @@
"schema": {
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-go-id": "Ticker"
},
{
"description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
@@ -6861,7 +7046,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -6954,7 +7139,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -6962,7 +7147,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -6970,7 +7155,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -6978,7 +7163,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -6991,11 +7176,11 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v1/indicators/ema/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "next_url": "https://api.massive.com/v1/indicators/ema/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": {
"underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25"
+ "url": "https://api.massive.com/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25"
},
"values": [
{
@@ -7078,9 +7263,9 @@
"n"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array"
@@ -7099,16 +7284,16 @@
"description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
"format": "int64",
"type": "integer",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
},
"value": {
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
}
@@ -7119,7 +7304,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "EMAResults"
}
},
@@ -7145,11 +7330,11 @@
"tags": [
"stocks:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -7169,7 +7354,7 @@
"schema": {
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-go-id": "Ticker"
},
{
"description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
@@ -7178,7 +7363,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -7281,7 +7466,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -7289,7 +7474,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -7297,7 +7482,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -7305,7 +7490,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -7318,11 +7503,11 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v1/indicators/macd/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "next_url": "https://api.massive.com/v1/indicators/macd/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": {
"underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25"
+ "url": "https://api.massive.com/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25"
},
"values": [
{
@@ -7413,9 +7598,9 @@
"n"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array"
@@ -7434,7 +7619,7 @@
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
},
@@ -7442,7 +7627,7 @@
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
},
@@ -7450,16 +7635,16 @@
"description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
"format": "int64",
"type": "integer",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
},
"value": {
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
}
@@ -7470,7 +7655,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "MACDResults"
}
},
@@ -7496,16 +7681,16 @@
"tags": [
"crypto:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "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-polygon-ignore": true
+ "x-massive-ignore": true
},
"/v1/indicators/macd/{fxTicker}": {
"get": {
@@ -7514,14 +7699,14 @@
"parameters": [
{
"description": "The ticker symbol for which to get MACD data.",
- "example": "C:EUR-USD",
+ "example": "C:EURUSD",
"in": "path",
"name": "fxTicker",
"required": true,
"schema": {
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-go-id": "Ticker"
},
{
"description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
@@ -7530,7 +7715,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -7643,7 +7828,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -7651,7 +7836,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -7659,7 +7844,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -7667,7 +7852,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -7680,11 +7865,11 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v1/indicators/macd/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "next_url": "https://api.massive.com/v1/indicators/macd/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": {
"underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25"
+ "url": "https://api.massive.com/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25"
},
"values": [
{
@@ -7775,9 +7960,9 @@
"n"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array"
@@ -7796,7 +7981,7 @@
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
},
@@ -7804,7 +7989,7 @@
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
},
@@ -7812,16 +7997,16 @@
"description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
"format": "int64",
"type": "integer",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
},
"value": {
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
}
@@ -7832,7 +8017,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "MACDResults"
}
},
@@ -7858,16 +8043,16 @@
"tags": [
"fx:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "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-polygon-ignore": true
+ "x-massive-ignore": true
},
"/v1/indicators/macd/{indicesTicker}": {
"get": {
@@ -7876,14 +8061,14 @@
"parameters": [
{
"description": "The ticker symbol for which to get MACD data.",
- "example": "I:DJI",
+ "example": "I:NDX",
"in": "path",
"name": "indicesTicker",
"required": true,
"schema": {
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-go-id": "Ticker"
},
{
"description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
@@ -7892,7 +8077,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -8005,7 +8190,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -8013,7 +8198,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -8021,7 +8206,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -8029,7 +8214,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -8042,24 +8227,24 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v1/indicators/macd/I:DJI?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "next_url": "https://api.massive.com/v1/indicators/macd/I:NDX?cursor=YWRqdXN0ZWQ9dHJ1ZSZhcD0lN0IlMjJ2JTIyJTNBMCUyQyUyMm8lMjIlM0EwJTJDJTIyYyUyMiUzQTE1MDg0Ljk5OTM4OTgyMDAzJTJDJTIyaCUyMiUzQTAlMkMlMjJsJTIyJTNBMCUyQyUyMnQlMjIlM0ExNjg3MTUwODAwMDAwJTdEJmFzPSZleHBhbmRfdW5kZXJseWluZz1mYWxzZSZsaW1pdD0yJmxvbmdfd2luZG93PTI2Jm9yZGVyPWRlc2Mmc2VyaWVzX3R5cGU9Y2xvc2Umc2hvcnRfd2luZG93PTEyJnNpZ25hbF93aW5kb3c9OSZ0aW1lc3Bhbj1kYXkmdGltZXN0YW1wLmx0PTE2ODcyMTkyMDAwMDA",
+ "request_id": "2eeda0be57e83cbc64cc8d1a74e84dbd",
"results": {
"underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/I:DJI/range/1/day/1063281600000/1678726155743?limit=129&sort=desc"
+ "url": "https://api.massive.com/v2/aggs/ticker/I:NDX/range/1/day/1678338000000/1687366537196?limit=121&sort=desc"
},
"values": [
{
- "histogram": -48.29157370302107,
- "signal": 225.60959338746886,
- "timestamp": 1681966800000,
- "value": 177.3180196844478
+ "histogram": -4.7646219788108795,
+ "signal": 220.7596784587801,
+ "timestamp": 1687237200000,
+ "value": 215.9950564799692
},
{
- "histogram": -37.55634001543484,
- "signal": 237.6824868132241,
- "timestamp": 1681963200000,
- "value": 200.12614679778926
+ "histogram": 3.4518937661882205,
+ "signal": 221.9508339534828,
+ "timestamp": 1687219200000,
+ "value": 225.40272771967102
}
]
},
@@ -8137,9 +8322,9 @@
"n"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array"
@@ -8158,7 +8343,7 @@
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
},
@@ -8166,7 +8351,7 @@
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
},
@@ -8174,16 +8359,16 @@
"description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
"format": "int64",
"type": "integer",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
},
"value": {
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
}
@@ -8194,7 +8379,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "MACDResults"
}
},
@@ -8214,16 +8399,17 @@
"tags": [
"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": {
+ "x-massive-entitlement-market-type": {
"description": "Indices data",
"name": "indices"
}
},
- "x-polygon-ignore": true
+ "x-massive-ignore": true
},
"/v1/indicators/macd/{optionsTicker}": {
"get": {
@@ -8239,7 +8425,7 @@
"schema": {
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-go-id": "Ticker"
},
{
"description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
@@ -8248,7 +8434,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -8361,7 +8547,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -8369,7 +8555,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -8377,7 +8563,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -8385,7 +8571,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -8398,11 +8584,11 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v1/indicators/macd/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "next_url": "https://api.massive.com/v1/indicators/macd/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": {
"underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25"
+ "url": "https://api.massive.com/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25"
},
"values": [
{
@@ -8493,9 +8679,9 @@
"n"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array"
@@ -8514,7 +8700,7 @@
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
},
@@ -8522,7 +8708,7 @@
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
},
@@ -8530,16 +8716,16 @@
"description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
"format": "int64",
"type": "integer",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
},
"value": {
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
}
@@ -8550,7 +8736,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "MACDResults"
}
},
@@ -8576,16 +8762,16 @@
"tags": [
"options:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
+ "x-massive-entitlement-market-type": {
"description": "Options data",
"name": "options"
}
},
- "x-polygon-ignore": true
+ "x-massive-ignore": true
},
"/v1/indicators/macd/{stockTicker}": {
"get": {
@@ -8593,7 +8779,7 @@
"operationId": "MACD",
"parameters": [
{
- "description": "The ticker symbol for which to get MACD data.",
+ "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": "stockTicker",
@@ -8601,7 +8787,7 @@
"schema": {
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-go-id": "Ticker"
},
{
"description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
@@ -8610,7 +8796,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -8723,7 +8909,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -8731,7 +8917,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -8739,7 +8925,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -8747,7 +8933,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -8760,11 +8946,11 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v1/indicators/macd/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "next_url": "https://api.massive.com/v1/indicators/macd/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": {
"underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25"
+ "url": "https://api.massive.com/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25"
},
"values": [
{
@@ -8855,9 +9041,9 @@
"n"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array"
@@ -8876,7 +9062,7 @@
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
},
@@ -8884,7 +9070,7 @@
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
},
@@ -8892,16 +9078,16 @@
"description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
"format": "int64",
"type": "integer",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
},
"value": {
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
}
@@ -8912,7 +9098,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "MACDResults"
}
},
@@ -8938,11 +9124,11 @@
"tags": [
"stocks:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -8962,7 +9148,7 @@
"schema": {
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-go-id": "Ticker"
},
{
"description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
@@ -8971,7 +9157,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -9054,7 +9240,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -9062,7 +9248,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -9070,7 +9256,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -9078,7 +9264,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -9091,16 +9277,16 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v1/indicators/rsi/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "next_url": "https://api.massive.com/v1/indicators/rsi/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": {
"underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25"
+ "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
+ "value": 82.19
}
]
},
@@ -9178,9 +9364,9 @@
"n"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array"
@@ -9199,16 +9385,16 @@
"description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
"format": "int64",
"type": "integer",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
},
"value": {
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
}
@@ -9219,7 +9405,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "RSIResults"
}
},
@@ -9243,18 +9429,18 @@
},
"summary": "Relative Strength Index (RSI)",
"tags": [
- "crpyto:aggregates"
+ "crypto:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "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-polygon-ignore": true
+ "x-massive-ignore": true
},
"/v1/indicators/rsi/{fxTicker}": {
"get": {
@@ -9263,14 +9449,14 @@
"parameters": [
{
"description": "The ticker symbol for which to get relative strength index (RSI) data.",
- "example": "C:EUR-USD",
+ "example": "C:EURUSD",
"in": "path",
"name": "fxTicker",
"required": true,
"schema": {
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-go-id": "Ticker"
},
{
"description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
@@ -9279,7 +9465,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -9372,7 +9558,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -9380,7 +9566,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -9388,7 +9574,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -9396,7 +9582,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -9409,16 +9595,16 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v1/indicators/rsi/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "next_url": "https://api.massive.com/v1/indicators/rsi/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": {
"underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25"
+ "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
+ "value": 82.19
}
]
},
@@ -9496,9 +9682,9 @@
"n"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array"
@@ -9517,16 +9703,16 @@
"description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
"format": "int64",
"type": "integer",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
},
"value": {
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
}
@@ -9537,7 +9723,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "RSIResults"
}
},
@@ -9563,16 +9749,16 @@
"tags": [
"fx:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "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-polygon-ignore": true
+ "x-massive-ignore": true
},
"/v1/indicators/rsi/{indicesTicker}": {
"get": {
@@ -9581,14 +9767,14 @@
"parameters": [
{
"description": "The ticker symbol for which to get relative strength index (RSI) data.",
- "example": "I:DJI",
+ "example": "I:NDX",
"in": "path",
"name": "indicesTicker",
"required": true,
"schema": {
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-go-id": "Ticker"
},
{
"description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
@@ -9597,7 +9783,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -9690,7 +9876,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -9698,7 +9884,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -9706,7 +9892,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -9714,7 +9900,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -9727,16 +9913,16 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v1/indicators/rsi/I:DJI?cursor=YWRqdXN0ZWQ9dHJ1ZSZhcD0lN0IlMjJ2JTIyJTNBMCUyQyUyMm8lMjIlM0EwJTJDJTIyYyUyMiUzQTQwNDcuNDEwMDAwMDAwMDAwMyUyQyUyMmglMjIlM0EwJTJDJTIybCUyMiUzQTAlMkMlMjJ0JTIyJTNBMTY3ODA4MjQwMDAwMCU3RCZhcz0mZXhwYW5kX3VuZGVybHlpbmc9ZmFsc2UmbGltaXQ9MTAmb3JkZXI9ZGVzYyZzZXJpZXNfdHlwZT1jbG9zZSZ0aW1lc3Bhbj1kYXkmdGltZXN0YW1wLmx0PTE2NzgxNjUyMDAwMDAmd2luZG93PTU",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "next_url": "https://api.massive.com/v1/indicators/rsi/I:NDX?cursor=YWRqdXN0ZWQ9dHJ1ZSZhcD0lN0IlMjJ2JTIyJTNBMCUyQyUyMm8lMjIlM0EwJTJDJTIyYyUyMiUzQTE1MDg0Ljk5OTM4OTgyMDAzJTJDJTIyaCUyMiUzQTAlMkMlMjJsJTIyJTNBMCUyQyUyMnQlMjIlM0ExNjg3MjE5MjAwMDAwJTdEJmFzPSZleHBhbmRfdW5kZXJseWluZz1mYWxzZSZsaW1pdD0xJm9yZGVyPWRlc2Mmc2VyaWVzX3R5cGU9Y2xvc2UmdGltZXNwYW49ZGF5JnRpbWVzdGFtcC5sdD0xNjg3MjM3MjAwMDAwJndpbmRvdz0xNA",
+ "request_id": "28a8417f521f98e1d08f6ed7d1fbcad3",
"results": {
"underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/I:DJI/range/1/day/1063281600000/1678725829099?limit=35&sort=desc"
+ "url": "https://api.massive.com/v2/aggs/ticker/I:NDX/range/1/day/1678338000000/1687366658253?limit=66&sort=desc"
},
"values": [
{
- "timestamp": 1681966800000,
- "value": 55.89394103205648
+ "timestamp": 1687237200000,
+ "value": 73.98019439047955
}
]
},
@@ -9814,9 +10000,9 @@
"n"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array"
@@ -9835,16 +10021,16 @@
"description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
"format": "int64",
"type": "integer",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
},
"value": {
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
}
@@ -9855,7 +10041,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "RSIResults"
}
},
@@ -9875,16 +10061,17 @@
"tags": [
"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": {
+ "x-massive-entitlement-market-type": {
"description": "Indices data",
"name": "indices"
}
},
- "x-polygon-ignore": true
+ "x-massive-ignore": true
},
"/v1/indicators/rsi/{optionsTicker}": {
"get": {
@@ -9900,7 +10087,7 @@
"schema": {
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-go-id": "Ticker"
},
{
"description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
@@ -9909,7 +10096,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -10002,7 +10189,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -10010,7 +10197,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -10018,7 +10205,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -10026,7 +10213,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -10039,16 +10226,16 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v1/indicators/rsi/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "next_url": "https://api.massive.com/v1/indicators/rsi/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": {
"underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25"
+ "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
+ "value": 82.19
}
]
},
@@ -10126,9 +10313,9 @@
"n"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array"
@@ -10147,16 +10334,16 @@
"description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
"format": "int64",
"type": "integer",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
},
"value": {
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
}
@@ -10167,7 +10354,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "RSIResults"
}
},
@@ -10193,16 +10380,16 @@
"tags": [
"options:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
+ "x-massive-entitlement-market-type": {
"description": "Options data",
"name": "options"
}
},
- "x-polygon-ignore": true
+ "x-massive-ignore": true
},
"/v1/indicators/rsi/{stockTicker}": {
"get": {
@@ -10210,7 +10397,7 @@
"operationId": "RSI",
"parameters": [
{
- "description": "The ticker symbol for which to get relative strength index (RSI) data.",
+ "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": "stockTicker",
@@ -10218,7 +10405,7 @@
"schema": {
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-go-id": "Ticker"
},
{
"description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
@@ -10227,7 +10414,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -10320,7 +10507,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -10328,7 +10515,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -10336,7 +10523,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -10344,7 +10531,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -10357,16 +10544,16 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v1/indicators/rsi/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "next_url": "https://api.massive.com/v1/indicators/rsi/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": {
"underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25"
+ "url": "https://api.massive.com/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25"
},
"values": [
{
"timestamp": 1517562000016,
- "value": 140.139
+ "value": 82.19
}
]
},
@@ -10444,9 +10631,9 @@
"n"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array"
@@ -10465,16 +10652,16 @@
"description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
"format": "int64",
"type": "integer",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
},
"value": {
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
}
@@ -10485,7 +10672,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "RSIResults"
}
},
@@ -10511,11 +10698,11 @@
"tags": [
"stocks:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -10535,7 +10722,7 @@
"schema": {
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-go-id": "Ticker"
},
{
"description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
@@ -10544,7 +10731,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -10627,7 +10814,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -10635,7 +10822,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -10643,7 +10830,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -10651,7 +10838,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -10664,7 +10851,7 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v1/indicators/sma/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "next_url": "https://api.massive.com/v1/indicators/sma/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": {
"underlying": {
@@ -10690,7 +10877,7 @@
"vw": 74.7026
}
],
- "url": "https://api.polygon.io/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25"
+ "url": "https://api.massive.com/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25"
},
"values": [
{
@@ -10773,9 +10960,9 @@
"n"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array"
@@ -10794,16 +10981,16 @@
"description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
"format": "int64",
"type": "integer",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
},
"value": {
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
}
@@ -10814,7 +11001,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "SMAResults"
}
},
@@ -10838,18 +11025,18 @@
},
"summary": "Simple Moving Average (SMA)",
"tags": [
- "crpyto:aggregates"
+ "crypto:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "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-polygon-ignore": true
+ "x-massive-ignore": true
},
"/v1/indicators/sma/{fxTicker}": {
"get": {
@@ -10858,14 +11045,14 @@
"parameters": [
{
"description": "The ticker symbol for which to get simple moving average (SMA) data.",
- "example": "C:EUR-USD",
+ "example": "C:EURUSD",
"in": "path",
"name": "fxTicker",
"required": true,
"schema": {
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-go-id": "Ticker"
},
{
"description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
@@ -10874,7 +11061,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -10967,7 +11154,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -10975,7 +11162,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -10983,7 +11170,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -10991,7 +11178,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -11004,7 +11191,7 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v1/indicators/sma/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "next_url": "https://api.massive.com/v1/indicators/sma/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": {
"underlying": {
@@ -11030,7 +11217,7 @@
"vw": 74.7026
}
],
- "url": "https://api.polygon.io/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25"
+ "url": "https://api.massive.com/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25"
},
"values": [
{
@@ -11113,9 +11300,9 @@
"n"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array"
@@ -11134,16 +11321,16 @@
"description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
"format": "int64",
"type": "integer",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
},
"value": {
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
}
@@ -11154,7 +11341,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "SMAResults"
}
},
@@ -11180,16 +11367,16 @@
"tags": [
"fx:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "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-polygon-ignore": true
+ "x-massive-ignore": true
},
"/v1/indicators/sma/{indicesTicker}": {
"get": {
@@ -11198,14 +11385,14 @@
"parameters": [
{
"description": "The ticker symbol for which to get simple moving average (SMA) data.",
- "example": "I:DJI",
+ "example": "I:NDX",
"in": "path",
"name": "indicesTicker",
"required": true,
"schema": {
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-go-id": "Ticker"
},
{
"description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
@@ -11214,7 +11401,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -11307,7 +11494,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -11315,7 +11502,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -11323,7 +11510,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -11331,7 +11518,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -11344,16 +11531,16 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v1/indicators/sma/I:DJI?cursor=YWRqdXN0ZWQ9dHJ1ZSZhcD0lN0IlMjJ2JTIyJTNBMCUyQyUyMm8lMjIlM0EwJTJDJTIyYyUyMiUzQTQwNDcuNDEwMDAwMDAwMDAwMyUyQyUyMmglMjIlM0EwJTJDJTIybCUyMiUzQTAlMkMlMjJ0JTIyJTNBMTY3ODA4MjQwMDAwMCU3RCZhcz0mZXhwYW5kX3VuZGVybHlpbmc9ZmFsc2UmbGltaXQ9MTAmb3JkZXI9ZGVzYyZzZXJpZXNfdHlwZT1jbG9zZSZ0aW1lc3Bhbj1kYXkmdGltZXN0YW1wLmx0PTE2NzgxNjUyMDAwMDAmd2luZG93PTU",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "next_url": "https://api.massive.com/v1/indicators/sma/I:NDX?cursor=YWRqdXN0ZWQ9dHJ1ZSZhcD0lN0IlMjJ2JTIyJTNBMCUyQyUyMm8lMjIlM0EwJTJDJTIyYyUyMiUzQTE1MDg0Ljk5OTM4OTgyMDAzJTJDJTIyaCUyMiUzQTAlMkMlMjJsJTIyJTNBMCUyQyUyMnQlMjIlM0ExNjg3MjE5MjAwMDAwJTdEJmFzPSZleHBhbmRfdW5kZXJseWluZz1mYWxzZSZsaW1pdD0xJm9yZGVyPWRlc2Mmc2VyaWVzX3R5cGU9Y2xvc2UmdGltZXNwYW49ZGF5JnRpbWVzdGFtcC5sdD0xNjg3MjM3MjAwMDAwJndpbmRvdz01Mw",
+ "request_id": "4cae270008cb3f947e3f92c206e3888a",
"results": {
"underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/I:DJI/range/1/day/1063281600000/1678725829099?limit=35&sort=desc"
+ "url": "https://api.massive.com/v2/aggs/ticker/I:NDX/range/1/day/1678338000000/1687366378997?limit=240&sort=desc"
},
"values": [
{
- "timestamp": 1681966800000,
- "value": 33236.3424
+ "timestamp": 1687237200000,
+ "value": 14362.676417589264
}
]
},
@@ -11431,9 +11618,9 @@
"n"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array"
@@ -11452,16 +11639,16 @@
"description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
"format": "int64",
"type": "integer",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
},
"value": {
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
}
@@ -11472,7 +11659,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "SMAResults"
}
},
@@ -11492,16 +11679,17 @@
"tags": [
"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": {
+ "x-massive-entitlement-market-type": {
"description": "Indices data",
"name": "indices"
}
},
- "x-polygon-ignore": true
+ "x-massive-ignore": true
},
"/v1/indicators/sma/{optionsTicker}": {
"get": {
@@ -11517,7 +11705,7 @@
"schema": {
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-go-id": "Ticker"
},
{
"description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
@@ -11526,7 +11714,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -11619,7 +11807,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -11627,7 +11815,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -11635,7 +11823,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -11643,7 +11831,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -11656,7 +11844,7 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v1/indicators/sma/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "next_url": "https://api.massive.com/v1/indicators/sma/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": {
"underlying": {
@@ -11682,7 +11870,7 @@
"vw": 74.7026
}
],
- "url": "https://api.polygon.io/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25"
+ "url": "https://api.massive.com/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25"
},
"values": [
{
@@ -11765,9 +11953,9 @@
"n"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array"
@@ -11786,16 +11974,16 @@
"description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
"format": "int64",
"type": "integer",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
},
"value": {
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
}
@@ -11806,7 +11994,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "SMAResults"
}
},
@@ -11832,16 +12020,16 @@
"tags": [
"options:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
+ "x-massive-entitlement-market-type": {
"description": "Options data",
"name": "options"
}
},
- "x-polygon-ignore": true
+ "x-massive-ignore": true
},
"/v1/indicators/sma/{stockTicker}": {
"get": {
@@ -11849,7 +12037,7 @@
"operationId": "SMA",
"parameters": [
{
- "description": "The ticker symbol for which to get simple moving average (SMA) data.",
+ "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": "stockTicker",
@@ -11857,7 +12045,7 @@
"schema": {
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-go-id": "Ticker"
},
{
"description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
@@ -11866,7 +12054,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -11959,7 +12147,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -11967,7 +12155,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -11975,7 +12163,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -11983,7 +12171,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -11996,7 +12184,7 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v1/indicators/sma/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "next_url": "https://api.massive.com/v1/indicators/sma/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": {
"underlying": {
@@ -12022,7 +12210,7 @@
"vw": 74.7026
}
],
- "url": "https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25"
+ "url": "https://api.massive.com/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25"
},
"values": [
{
@@ -12105,9 +12293,9 @@
"n"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Aggregate",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array"
@@ -12126,16 +12314,16 @@
"description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
"format": "int64",
"type": "integer",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "IMicroseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
},
"value": {
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
}
@@ -12146,7 +12334,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "SMAResults"
}
},
@@ -12172,11 +12360,11 @@
"tags": [
"stocks:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -12233,17 +12421,17 @@
"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",
- "x-polygon-go-type": {
+ "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.",
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.",
"type": "integer"
},
"price": {
@@ -12259,14 +12447,20 @@
"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"
}
}
},
+ "required": [
+ "exchange",
+ "price",
+ "size",
+ "timestamp"
+ ],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "LastTradeCrypto"
}
},
@@ -12283,6 +12477,11 @@
"type": "string"
}
},
+ "required": [
+ "status",
+ "request_id",
+ "symbol"
+ ],
"type": "object"
}
},
@@ -12303,11 +12502,11 @@
"tags": [
"crypto:last:trade"
],
- "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"
}
@@ -12369,20 +12568,26 @@
"type": "number"
},
"exchange": {
- "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.",
"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"
}
}
},
+ "required": [
+ "ask",
+ "bid",
+ "exchange",
+ "timestamp"
+ ],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "LastQuoteCurrencies"
}
},
@@ -12399,6 +12604,11 @@
"type": "string"
}
},
+ "required": [
+ "status",
+ "request_id",
+ "symbol"
+ ],
"type": "object"
}
},
@@ -12419,11 +12629,11 @@
"tags": [
"fx:last:quote"
],
- "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"
}
@@ -12431,7 +12641,8 @@
},
"/v1/marketstatus/now": {
"get": {
- "description": "Get the current trading status of the exchanges and overall financial markets.\n",
+ "description": "Get the current trading status of the exchanges and overall financial markets.",
+ "operationId": "GetMarketStatus",
"responses": {
"200": {
"content": {
@@ -12449,13 +12660,16 @@
"otc": "closed"
},
"market": "extended-hours",
- "serverTime": "2020-11-10T22:37:37.000Z"
+ "serverTime": "2020-11-10T17:37:37-05:00"
},
"schema": {
"properties": {
"afterHours": {
"description": "Whether or not the market is in post-market hours.",
- "type": "boolean"
+ "type": "boolean",
+ "x-massive-go-type": {
+ "name": "*bool"
+ }
},
"currencies": {
"properties": {
@@ -12468,11 +12682,17 @@
"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"
+ "type": "boolean",
+ "x-massive-go-type": {
+ "name": "*bool"
+ }
},
"exchanges": {
"properties": {
@@ -12489,15 +12709,64 @@
"type": "string"
}
},
- "type": "object"
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "Exchanges"
+ }
+ },
+ "indicesGroups": {
+ "properties": {
+ "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",
+ "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.",
- "format": "date-time",
+ "description": "The current time of the server, returned as a date-time in RFC3339 format.",
"type": "string"
}
},
@@ -12505,23 +12774,14 @@
}
}
},
- "description": "Status of the market and each exchange"
- },
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
- },
- "404": {
- "description": "The specified resource was not found"
- },
- "409": {
- "description": "Parameter is invalid or incorrect."
+ "description": "OK"
}
},
"summary": "Market Status",
"tags": [
"reference:stocks:market"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Reference data",
"name": "reference"
}
@@ -12529,33 +12789,34 @@
},
"/v1/marketstatus/upcoming": {
"get": {
- "description": "Get upcoming market holidays and their open/close times.\n",
+ "description": "Get upcoming market holidays and their open/close times.",
+ "operationId": "GetMarketHolidays",
"responses": {
"200": {
"content": {
"application/json": {
"example": [
{
- "date": "2020-11-26T00:00:00.000Z",
+ "date": "2020-11-26",
"exchange": "NYSE",
"name": "Thanksgiving",
"status": "closed"
},
{
- "date": "2020-11-26T00:00:00.000Z",
+ "date": "2020-11-26",
"exchange": "NASDAQ",
"name": "Thanksgiving",
"status": "closed"
},
{
- "date": "2020-11-26T00:00:00.000Z",
+ "date": "2020-11-26",
"exchange": "OTC",
"name": "Thanksgiving",
"status": "closed"
},
{
"close": "2020-11-27T18:00:00.000Z",
- "date": "2020-11-27T00:00:00.000Z",
+ "date": "2020-11-27",
"exchange": "NASDAQ",
"name": "Thanksgiving",
"open": "2020-11-27T14:30:00.000Z",
@@ -12563,7 +12824,7 @@
},
{
"close": "2020-11-27T18:00:00.000Z",
- "date": "2020-11-27T00:00:00.000Z",
+ "date": "2020-11-27",
"exchange": "NYSE",
"name": "Thanksgiving",
"open": "2020-11-27T14:30:00.000Z",
@@ -12575,12 +12836,10 @@
"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": {
@@ -12593,7 +12852,6 @@
},
"open": {
"description": "The market open time on the holiday (if it's not closed).",
- "format": "date-time",
"type": "string"
},
"status": {
@@ -12601,29 +12859,23 @@
"type": "string"
}
},
- "type": "object"
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "MarketHoliday"
+ }
},
"type": "array"
}
}
},
- "description": "Holidays for each market in the near future."
- },
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
- },
- "404": {
- "description": "The specified resource was not found"
- },
- "409": {
- "description": "Parameter is invalid or incorrect."
+ "description": "OK"
}
},
"summary": "Market Holidays",
"tags": [
"reference:stocks:market"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Reference data",
"name": "reference"
}
@@ -12742,7 +12994,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"
@@ -12766,7 +13018,7 @@
"type": "integer"
},
"x": {
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
"type": "integer"
}
},
@@ -12802,7 +13054,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"
@@ -12826,7 +13078,7 @@
"type": "integer"
},
"x": {
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
"type": "integer"
}
},
@@ -12876,11 +13128,11 @@
"tags": [
"crypto:open-close"
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -12892,7 +13144,7 @@
"parameters": [
{
"description": "The ticker symbol of Index.",
- "example": "I:DJI",
+ "example": "I:NDX",
"in": "path",
"name": "indicesTicker",
"required": true,
@@ -12907,7 +13159,6 @@
"name": "date",
"required": true,
"schema": {
- "format": "date",
"type": "string"
}
}
@@ -12917,15 +13168,15 @@
"content": {
"application/json": {
"example": {
- "afterHours": 31909.64,
- "close": 32245.14,
- "from": "2023-03-10",
- "high": 32988.26,
- "low": 32200.66,
- "open": 32922.75,
- "preMarket": 32338.23,
+ "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",
- "symbol": "I:DJI"
+ "symbol": "I:NDX"
},
"schema": {
"properties": {
@@ -12983,6 +13234,12 @@
],
"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."
@@ -12995,11 +13252,12 @@
"tags": [
"stocks:open-close"
],
- "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": {
+ "x-massive-entitlement-market-type": {
"description": "Indices data",
"name": "indices"
}
@@ -13140,11 +13398,11 @@
"tags": [
"options:open-close"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
+ "x-massive-entitlement-market-type": {
"description": "Options data",
"name": "options"
}
@@ -13155,7 +13413,7 @@
"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",
@@ -13285,11 +13543,11 @@
"tags": [
"stocks:open-close"
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -13323,7 +13581,7 @@
"pattern": "^[0-9]{8}$",
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -13337,7 +13595,7 @@
"pattern": "^[0-9]{8}$",
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -13349,7 +13607,7 @@
"nullable": true,
"type": "boolean"
},
- "x-polygon-go-id": "HasXBRL"
+ "x-massive-go-id": "HasXBRL"
},
{
"description": "Query by entity company name.",
@@ -13359,7 +13617,7 @@
"example": "Facebook Inc",
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"search": true
}
},
@@ -13584,9 +13842,9 @@
"sic"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "SECCompanyData",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"relation": {
@@ -13601,9 +13859,9 @@
"relation"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "SECFilingEntity",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array"
@@ -13653,13 +13911,12 @@
"files_count",
"source_url",
"download_url",
- "entities",
- "acceptance_datetime"
+ "entities"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "SECFiling",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array"
@@ -13685,11 +13942,11 @@
"tags": [
"reference:sec:filings"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Reference data",
"name": "reference"
},
- "x-polygon-paginate": {
+ "x-massive-paginate": {
"sort": {
"default": "filing_date",
"enum": [
@@ -13699,7 +13956,7 @@
}
}
},
- "x-polygon-draft": true
+ "x-massive-draft": true
},
"/v1/reference/sec/filings/{filing_id}": {
"get": {
@@ -13724,121 +13981,125 @@
"example": {},
"schema": {
"properties": {
- "acceptance_datetime": {
- "description": "The datetime when the filing was accepted by EDGAR in EST (format: YYYYMMDDHHMMSS)",
- "type": "string"
- },
- "accession_number": {
- "description": "Filing Accession Number",
- "type": "string"
- },
- "entities": {
- "description": "Entities related to the filing (e.g. the document filers).",
- "items": {
- "description": "A filing entity (e.g. the document filer).",
- "properties": {
- "company_data": {
+ "results": {
+ "properties": {
+ "acceptance_datetime": {
+ "description": "The datetime when the filing was accepted by EDGAR in EST (format: YYYYMMDDHHMMSS)",
+ "type": "string"
+ },
+ "accession_number": {
+ "description": "Filing Accession Number",
+ "type": "string"
+ },
+ "entities": {
+ "description": "Entities related to the filing (e.g. the document filers).",
+ "items": {
+ "description": "A filing entity (e.g. the document filer).",
"properties": {
- "cik": {
- "description": "Central Index Key (CIK) Number",
- "type": "string"
- },
- "name": {
- "example": "Facebook Inc",
- "type": "string"
- },
- "sic": {
- "description": "Standard Industrial Classification (SIC)",
- "type": "string"
+ "company_data": {
+ "properties": {
+ "cik": {
+ "description": "Central Index Key (CIK) Number",
+ "type": "string"
+ },
+ "name": {
+ "example": "Facebook Inc",
+ "type": "string"
+ },
+ "sic": {
+ "description": "Standard Industrial Classification (SIC)",
+ "type": "string"
+ },
+ "ticker": {
+ "description": "Ticker",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "cik",
+ "sic"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "SECCompanyData",
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
+ }
},
- "ticker": {
- "description": "Ticker",
+ "relation": {
+ "description": "Relationship of this entity to the filing.",
+ "enum": [
+ "filer"
+ ],
"type": "string"
}
},
"required": [
- "name",
- "cik",
- "sic"
+ "relation"
],
"type": "object",
- "x-polygon-go-type": {
- "name": "SECCompanyData",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "x-massive-go-type": {
+ "name": "SECFilingEntity",
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
- "relation": {
- "description": "Relationship of this entity to the filing.",
- "enum": [
- "filer"
- ],
- "type": "string"
- }
+ "type": "array"
},
- "required": [
- "relation"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "SECFilingEntity",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "files_count": {
+ "description": "The number of files associated with the filing.",
+ "format": "int64",
+ "type": "integer"
+ },
+ "filing_date": {
+ "description": "The date when the filing was filed in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ },
+ "id": {
+ "description": "Unique identifier for the filing.",
+ "type": "string"
+ },
+ "period_of_report_date": {
+ "description": "The period of report for the filing in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ },
+ "source_url": {
+ "description": "The source URL is a link back to the upstream source for this filing\ndocument.",
+ "example": "https://www.sec.gov/Archives/edgar/data/0001326801/000132680119000037/0001326801-19-000037-index.html",
+ "format": "uri",
+ "type": "string"
+ },
+ "type": {
+ "description": "Filing Type",
+ "enum": [
+ "10-K",
+ "10-Q"
+ ],
+ "type": "string"
}
},
- "type": "array"
- },
- "files_count": {
- "description": "The number of files associated with the filing.",
- "format": "int64",
- "type": "integer"
- },
- "filing_date": {
- "description": "The date when the filing was filed in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- },
- "id": {
- "description": "Unique identifier for the filing.",
- "type": "string"
- },
- "period_of_report_date": {
- "description": "The period of report for the filing in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- },
- "source_url": {
- "description": "The source URL is a link back to the upstream source for this filing\ndocument.",
- "example": "https://www.sec.gov/Archives/edgar/data/0001326801/000132680119000037/0001326801-19-000037-index.html",
- "format": "uri",
- "type": "string"
- },
- "type": {
- "description": "Filing Type",
- "enum": [
- "10-K",
- "10-Q"
+ "required": [
+ "id",
+ "accession_number",
+ "type",
+ "filing_date",
+ "period_of_report_date",
+ "files_count",
+ "source_url",
+ "download_url",
+ "entities"
],
- "type": "string"
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "SECFiling",
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
+ }
}
},
- "required": [
- "id",
- "accession_number",
- "type",
- "filing_date",
- "period_of_report_date",
- "files_count",
- "source_url",
- "download_url",
- "entities",
- "acceptance_datetime"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "SECFiling",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
+ "type": "object"
}
}
},
@@ -13849,12 +14110,12 @@
"tags": [
"reference:sec:filing"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Reference data",
"name": "reference"
}
},
- "x-polygon-draft": true
+ "x-massive-draft": true
},
"/v1/reference/sec/filings/{filing_id}/files": {
"get": {
@@ -13881,7 +14142,7 @@
"min": 1,
"type": "integer"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -13893,7 +14154,7 @@
"description": "The name for the file.",
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -14087,9 +14348,9 @@
"source_url"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "SECFilingFile",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array"
@@ -14115,11 +14376,11 @@
"tags": [
"reference:sec:filing:files"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Reference data",
"name": "reference"
},
- "x-polygon-paginate": {
+ "x-massive-paginate": {
"sort": {
"default": "sequence",
"enum": [
@@ -14129,7 +14390,7 @@
}
}
},
- "x-polygon-draft": true
+ "x-massive-draft": true
},
"/v1/reference/sec/filings/{filing_id}/files/{file_id}": {
"get": {
@@ -14208,9 +14469,9 @@
"source_url"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "SECFilingFile",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
}
}
@@ -14222,12 +14483,120 @@
"tags": [
"reference:sec:filing:file"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Reference data",
"name": "reference"
}
},
- "x-polygon-draft": true
+ "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": {
@@ -14235,7 +14604,7 @@
"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.",
+ "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",
@@ -14253,9 +14622,10 @@
"results": [
{
"branding": {
- "icon_url": "https://api.polygon.io/icon.png",
- "logo_url": "https://api.polygon.io/logo.svg"
+ "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,
@@ -14274,9 +14644,10 @@
"volume": 37
},
"ticker": "NCLH",
- "type": "stock"
+ "type": "stocks"
},
{
+ "last_updated": 1679597116344223500,
"market_status": "closed",
"name": "NCLH $5 Call",
"options": {
@@ -14306,6 +14677,7 @@
"type": "options"
},
{
+ "last_updated": 1679597116344223500,
"market_status": "open",
"name": "Euro - United States Dollar",
"price": 0.97989,
@@ -14323,9 +14695,10 @@
},
{
"branding": {
- "icon_url": "https://api.polygon.io/icon.png",
- "logo_url": "https://api.polygon.io/logo.svg"
+ "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,
@@ -14369,7 +14742,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Branding"
}
},
@@ -14377,6 +14750,15 @@
"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"
@@ -14413,9 +14795,9 @@
"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"
+ "x-massive-go-type": {
+ "name": "IDaysMassiveDateString",
+ "path": "github.com/massive-com/ptime"
}
},
"shares_per_contract": {
@@ -14424,7 +14806,7 @@
"type": "number"
},
"strike_price": {
- "description": "The strike price of the option contract",
+ "description": "The strike price of the option contract.",
"format": "double",
"type": "number"
},
@@ -14442,7 +14824,7 @@
"underlying_ticker"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Options"
}
},
@@ -14469,12 +14851,12 @@
"type": "number"
},
"early_trading_change": {
- "description": "Today\u2019s early trading change amount, difference between price and previous close if in early trading hours, otherwise difference between last price during early trading and previous close.",
+ "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\u2019s early trading change as a percentage.",
+ "description": "Today's early trading change as a percentage.",
"format": "double",
"type": "number"
},
@@ -14484,12 +14866,12 @@
"type": "number"
},
"late_trading_change": {
- "description": "Today\u2019s late trading change amount, difference between price and today\u2019s close if in late trading hours, otherwise difference between last price during late trading and today\u2019s close.",
+ "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\u2019s late trading change as a percentage.",
+ "description": "Today's late trading change as a percentage.",
"format": "double",
"type": "number"
},
@@ -14508,6 +14890,21 @@
"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",
@@ -14524,7 +14921,7 @@
"previous_close"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Session"
}
},
@@ -14544,17 +14941,10 @@
}
},
"required": [
- "ticker",
- "name",
- "price",
- "branding",
- "market_status",
- "type",
- "session",
- "options"
+ "ticker"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "SummaryResult"
}
},
@@ -14577,11 +14967,11 @@
}
},
"summary": "Summaries",
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -14774,11 +15164,11 @@
"tags": [
"crypto:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -14971,11 +15361,11 @@
"tags": [
"fx:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -15130,7 +15520,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": {
@@ -15180,11 +15570,11 @@
"tags": [
"stocks:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -15368,11 +15758,11 @@
"tags": [
"crypto:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -15410,6 +15800,7 @@
"required": true,
"schema": {
"enum": [
+ "second",
"minute",
"hour",
"day",
@@ -15433,7 +15824,7 @@
},
{
"description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2023-01-09",
+ "example": "2023-02-10",
"in": "path",
"name": "to",
"required": true,
@@ -15463,7 +15854,7 @@
}
},
{
- "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",
+ "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",
@@ -15631,11 +16022,11 @@
"tags": [
"crypto:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -15820,11 +16211,11 @@
"tags": [
"fx:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -15862,6 +16253,7 @@
"required": true,
"schema": {
"enum": [
+ "second",
"minute",
"hour",
"day",
@@ -15885,7 +16277,7 @@
},
{
"description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2023-01-09",
+ "example": "2023-02-10",
"in": "path",
"name": "to",
"required": true,
@@ -15915,7 +16307,7 @@
}
},
{
- "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",
+ "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",
@@ -16073,11 +16465,11 @@
"tags": [
"fx:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -16089,7 +16481,7 @@
"parameters": [
{
"description": "The ticker symbol of Index.",
- "example": "I:DJI",
+ "example": "I:NDX",
"in": "path",
"name": "indicesTicker",
"required": true,
@@ -16107,17 +16499,17 @@
"request_id": "b2170df985474b6d21a6eeccfb6bee67",
"results": [
{
- "T": "I:DJI",
- "c": 33786.62,
- "h": 33786.62,
- "l": 33677.74,
- "o": 33677.74,
- "t": 1682020800000
+ "T": "I:NDX",
+ "c": 15070.14948566977,
+ "h": 15127.4195807999,
+ "l": 14946.7243781848,
+ "o": 15036.48391066877,
+ "t": 1687291200000
}
],
"resultsCount": 1,
"status": "OK",
- "ticker": "I:DJI"
+ "ticker": "I:NDX"
},
"schema": {
"allOf": [
@@ -16206,6 +16598,12 @@
}
]
}
+ },
+ "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."
@@ -16218,11 +16616,12 @@
"tags": [
"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": {
+ "x-massive-entitlement-market-type": {
"description": "Indices data",
"name": "indices"
}
@@ -16234,7 +16633,7 @@
"parameters": [
{
"description": "The ticker symbol of Index.",
- "example": "I:DJI",
+ "example": "I:NDX",
"in": "path",
"name": "indicesTicker",
"required": true,
@@ -16260,6 +16659,7 @@
"required": true,
"schema": {
"enum": [
+ "second",
"minute",
"hour",
"day",
@@ -16273,7 +16673,7 @@
},
{
"description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2023-03-10",
+ "example": "2023-03-13",
"in": "path",
"name": "from",
"required": true,
@@ -16283,7 +16683,7 @@
},
{
"description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2023-03-10",
+ "example": "2023-03-24",
"in": "path",
"name": "to",
"required": true,
@@ -16304,7 +16704,7 @@
}
},
{
- "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",
+ "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",
@@ -16323,22 +16723,22 @@
"request_id": "0cf72b6da685bcd386548ffe2895904a",
"results": [
{
- "c": 32245.14,
- "h": 32988.26,
- "l": 32200.66,
- "o": 32922.75,
+ "c": 11995.88235998666,
+ "h": 12340.44936267155,
+ "l": 11970.34221717375,
+ "o": 12230.83658266843,
"t": 1678341600000
},
{
- "c": 31787.7,
- "h": 32422.100000000002,
- "l": 31786.06,
- "o": 32198.9,
+ "c": 11830.28178808306,
+ "h": 12069.62262033557,
+ "l": 11789.85923449393,
+ "o": 12001.69552583921,
"t": 1678428000000
}
],
"status": "OK",
- "ticker": "I:DJI"
+ "ticker": "I:NDX"
},
"schema": {
"allOf": [
@@ -16427,6 +16827,12 @@
}
]
}
+ },
+ "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."
@@ -16439,11 +16845,12 @@
"tags": [
"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": {
+ "x-massive-entitlement-market-type": {
"description": "Indices data",
"name": "indices"
}
@@ -16623,11 +17030,11 @@
"tags": [
"options:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
+ "x-massive-entitlement-market-type": {
"description": "Options data",
"name": "options"
}
@@ -16665,6 +17072,7 @@
"required": true,
"schema": {
"enum": [
+ "second",
"minute",
"hour",
"day",
@@ -16688,7 +17096,7 @@
},
{
"description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2023-01-09",
+ "example": "2023-02-10",
"in": "path",
"name": "to",
"required": true,
@@ -16718,7 +17126,7 @@
}
},
{
- "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",
+ "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",
@@ -16887,11 +17295,11 @@
"tags": [
"options:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
+ "x-massive-entitlement-market-type": {
"description": "Options data",
"name": "options"
}
@@ -16902,7 +17310,7 @@
"description": "Get the previous day's open, high, low, and close (OHLC) for the specified stock ticker.\n",
"parameters": [
{
- "description": "The ticker symbol of the stock/equity.",
+ "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.",
"example": "AAPL",
"in": "path",
"name": "stocksTicker",
@@ -17070,11 +17478,11 @@
"tags": [
"stocks:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -17085,7 +17493,7 @@
"description": "Get aggregate bars for a stock over a given date range in custom time window sizes.\n \n \nFor example, if timespan = \u2018minute\u2019 and multiplier = \u20185\u2019 then 5-minute bars will be returned.\n",
"parameters": [
{
- "description": "The ticker symbol of the stock/equity.",
+ "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.",
"example": "AAPL",
"in": "path",
"name": "stocksTicker",
@@ -17112,6 +17520,7 @@
"required": true,
"schema": {
"enum": [
+ "second",
"minute",
"hour",
"day",
@@ -17135,7 +17544,7 @@
},
{
"description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2023-01-09",
+ "example": "2023-02-10",
"in": "path",
"name": "to",
"required": true,
@@ -17165,7 +17574,7 @@
}
},
{
- "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",
+ "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",
@@ -17180,7 +17589,7 @@
"application/json": {
"example": {
"adjusted": true,
- "next_url": "https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/1578114000000/2020-01-10?cursor=bGltaXQ9MiZzb3J0PWFzYw",
+ "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": [
@@ -17347,11 +17756,11 @@
"tags": [
"stocks:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -17371,7 +17780,7 @@
"schema": {
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-go-id": "Ticker"
}
],
"responses": {
@@ -17417,18 +17826,18 @@
"type": "string"
},
"X": {
- "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.",
"type": "integer"
},
"c": {
"description": "A list of condition codes.",
"items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
+ "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-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Int32Array"
}
},
@@ -17439,12 +17848,12 @@
"i": {
"description": "A list of indicator codes.",
"items": {
- "description": "The indicator codes. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).",
+ "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-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Int32Array"
}
},
@@ -17467,7 +17876,7 @@
"type": "integer"
},
"x": {
- "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.",
"type": "integer"
},
"y": {
@@ -17479,8 +17888,14 @@
"type": "integer"
}
},
+ "required": [
+ "T",
+ "t",
+ "y",
+ "q"
+ ],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "LastQuoteResult"
}
},
@@ -17489,6 +17904,10 @@
"type": "string"
}
},
+ "required": [
+ "status",
+ "request_id"
+ ],
"type": "object"
}
},
@@ -17512,7 +17931,7 @@
"tags": [
"stocks:last:quote"
],
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"description": "Real Time Data",
"name": "realtime"
@@ -17522,11 +17941,11 @@
"name": "delayed"
}
],
- "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": "Stocks data",
"name": "stocks"
}
@@ -17566,7 +17985,8 @@
"r": 202,
"s": 25,
"t": 1617901342969834000,
- "x": 312
+ "x": 312,
+ "y": 1617901342969834000
},
"status": "OK"
},
@@ -17585,12 +18005,12 @@
"c": {
"description": "A list of condition codes.",
"items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
+ "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-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Int32Array"
}
},
@@ -17630,7 +18050,7 @@
"type": "integer"
},
"x": {
- "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.",
"type": "integer"
},
"y": {
@@ -17642,8 +18062,17 @@
"type": "integer"
}
},
+ "required": [
+ "T",
+ "t",
+ "y",
+ "q",
+ "i",
+ "p",
+ "x"
+ ],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "LastTradeResult"
}
},
@@ -17652,6 +18081,10 @@
"type": "string"
}
},
+ "required": [
+ "status",
+ "request_id"
+ ],
"type": "object"
}
},
@@ -17675,7 +18108,7 @@
"tags": [
"options:last:trade"
],
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"description": "Real Time Data",
"name": "realtime"
@@ -17685,16 +18118,16 @@
"name": "delayed"
}
],
- "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": "Options data",
"name": "options"
}
},
- "x-polygon-ignore": true
+ "x-massive-ignore": true
},
"/v2/last/trade/{stocksTicker}": {
"get": {
@@ -17710,7 +18143,7 @@
"schema": {
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-go-id": "Ticker"
}
],
"responses": {
@@ -17752,12 +18185,12 @@
"c": {
"description": "A list of condition codes.",
"items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
+ "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-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Int32Array"
}
},
@@ -17797,7 +18230,7 @@
"type": "integer"
},
"x": {
- "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.",
"type": "integer"
},
"y": {
@@ -17809,8 +18242,17 @@
"type": "integer"
}
},
+ "required": [
+ "T",
+ "t",
+ "y",
+ "q",
+ "i",
+ "p",
+ "x"
+ ],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "LastTradeResult"
}
},
@@ -17819,6 +18261,10 @@
"type": "string"
}
},
+ "required": [
+ "status",
+ "request_id"
+ ],
"type": "object"
}
},
@@ -17842,7 +18288,7 @@
"tags": [
"stocks:last:trade"
],
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"description": "Real Time Data",
"name": "realtime"
@@ -17852,11 +18298,11 @@
"name": "delayed"
}
],
- "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": "Stocks data",
"name": "stocks"
}
@@ -17868,14 +18314,14 @@
"operationId": "ListNews",
"parameters": [
{
- "description": "Return results that contain this ticker.",
+ "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.",
"in": "query",
"name": "ticker",
"schema": {
"description": "The exchange symbol that this item is traded under.",
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -17895,7 +18341,7 @@
}
]
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -18048,56 +18494,39 @@
"application/json": {
"example": {
"count": 1,
- "next_url": "https://api.polygon.io:443/v2/reference/news?cursor=eyJsaW1pdCI6MSwic29ydCI6InB1Ymxpc2hlZF91dGMiLCJvcmRlciI6ImFzY2VuZGluZyIsInRpY2tlciI6e30sInB1Ymxpc2hlZF91dGMiOnsiZ3RlIjoiMjAyMS0wNC0yNiJ9LCJzZWFyY2hfYWZ0ZXIiOlsxNjE5NDA0Mzk3MDAwLG51bGxdfQ",
+ "next_url": "https://api.massive.com:443/v2/reference/news?cursor=eyJsaW1pdCI6MSwic29ydCI6InB1Ymxpc2hlZF91dGMiLCJvcmRlciI6ImFzY2VuZGluZyIsInRpY2tlciI6e30sInB1Ymxpc2hlZF91dGMiOnsiZ3RlIjoiMjAyMS0wNC0yNiJ9LCJzZWFyY2hfYWZ0ZXIiOlsxNjE5NDA0Mzk3MDAwLG51bGxdfQ",
"request_id": "831afdb0b8078549fed053476984947a",
"results": [
{
- "amp_url": "https://amp.benzinga.com/amp/content/20784086",
- "article_url": "https://www.benzinga.com/markets/cryptocurrency/21/04/20784086/cathie-wood-adds-more-coinbase-skillz-trims-square",
- "author": "Rachit Vats",
- "description": "
Cathie Wood-led Ark Investment Management on Friday snapped up another 221,167 shares of the cryptocurrency exchange Coinbase Global Inc (NASDAQ COIN) worth about $64.49 million on the stock’s Friday’s dip and also its fourth-straight loss.
\n
The investment firm’s Ark Innovation ETF (NYSE ARKK) bought the shares of the company that closed 0.63% lower at $291.60 on Friday, giving the cryptocurrency exchange a market cap of $58.09 billion. Coinbase’s market cap has dropped from $85.8 billion on its blockbuster listing earlier this month.
\n
The New York-based company also added another 3,873 shares of the mobile gaming company Skillz Inc (NYSE SKLZ), just a day after snapping 1.2 million shares of the stock.
\n
ARKK bought the shares of the company which closed ...
",
- "id": "nJsSJJdwViHZcw5367rZi7_qkXLfMzacXBfpv-vD9UA",
- "image_url": "https://cdn2.benzinga.com/files/imagecache/og_image_social_share_1200x630/images/story/2012/andre-francois-mckenzie-auhr4gcqcce-unsplash.jpg?width=720",
+ "amp_url": "https://m.uk.investing.com/news/stock-market-news/markets-are-underestimating-fed-cuts-ubs-3559968?ampMode=1",
+ "article_url": "https://uk.investing.com/news/stock-market-news/markets-are-underestimating-fed-cuts-ubs-3559968",
+ "author": "Sam Boughedda",
+ "description": "UBS analysts warn that markets are underestimating the extent of future interest rate cuts by the Federal Reserve, as the weakening economy is likely to justify more cuts than currently anticipated.",
+ "id": "8ec638777ca03b553ae516761c2a22ba2fdd2f37befae3ab6fdab74e9e5193eb",
+ "image_url": "https://i-invdn-com.investing.com/news/LYNXNPEC4I0AL_L.jpg",
+ "insights": [
+ {
+ "sentiment": "positive",
+ "sentiment_reasoning": "UBS analysts are providing a bullish outlook on the extent of future Federal Reserve rate cuts, suggesting that markets are underestimating the number of cuts that will occur.",
+ "ticker": "UBS"
+ }
+ ],
"keywords": [
- "Sector ETFs",
- "Penny Stocks",
- "Cryptocurrency",
- "Small Cap",
- "Markets",
- "Trading Ideas",
- "ETFs"
+ "Federal Reserve",
+ "interest rates",
+ "economic data"
],
- "published_utc": "2021-04-26T02:33:17Z",
+ "published_utc": "2024-06-24T18:33:53Z",
"publisher": {
- "favicon_url": "https://s3.polygon.io/public/public/assets/news/favicons/benzinga.ico",
- "homepage_url": "https://www.benzinga.com/",
- "logo_url": "https://s3.polygon.io/public/public/assets/news/logos/benzinga.svg",
- "name": "Benzinga"
+ "favicon_url": "https://s3.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": [
- "DOCU",
- "DDD",
- "NIU",
- "ARKF",
- "NVDA",
- "SKLZ",
- "PCAR",
- "MASS",
- "PSTI",
- "SPFR",
- "TREE",
- "PHR",
- "IRDM",
- "BEAM",
- "ARKW",
- "ARKK",
- "ARKG",
- "PSTG",
- "SQ",
- "IONS",
- "SYRS"
+ "UBS"
],
- "title": "Cathie Wood Adds More Coinbase, Skillz, Trims Square"
+ "title": "Markets are underestimating Fed cuts: UBS By Investing.com - Investing.com UK"
}
],
"status": "OK"
@@ -18143,11 +18572,42 @@
"description": "The article's image URL.",
"type": "string"
},
- "keywords": {
- "description": "The keywords associated with the article (which will vary depending on\nthe publishing source).",
+ "insights": {
+ "description": "The insights related to the article.",
"items": {
- "type": "string"
- },
+ "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": {
@@ -18204,13 +18664,13 @@
"tickers"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "NewsArticleMetadata",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "ListNewsArticlesResults"
}
},
@@ -18223,7 +18683,7 @@
}
},
"text/csv": {
- "example": "id,publisher_name,publisher_homepage_url,publisher_logo_url,publisher_favicon_url,title,author,published_utc,article_url,tickers,amp_url,image_url,description,keywords\nnJsSJJdwViHZcw5367rZi7_qkXLfMzacXBfpv-vD9UA,Benzinga,https://www.benzinga.com/,https://s3.polygon.io/public/public/assets/news/logos/benzinga.svg,https://s3.polygon.io/public/public/assets/news/favicons/benzinga.ico,\"Cathie Wood Adds More Coinbase, Skillz, Trims Square\",Rachit Vats,2021-04-26T02:33:17Z,https://www.benzinga.com/markets/cryptocurrency/21/04/20784086/cathie-wood-adds-more-coinbase-skillz-trims-square,\"DOCU,DDD,NIU,ARKF,NVDA,SKLZ,PCAR,MASS,PSTI,SPFR,TREE,PHR,IRDM,BEAM,ARKW,ARKK,ARKG,PSTG,SQ,IONS,SYRS\",https://amp.benzinga.com/amp/content/20784086,https://cdn2.benzinga.com/files/imagecache/og_image_social_share_1200x630/images/story/2012/andre-francois-mckenzie-auhr4gcqcce-unsplash.jpg?width=720,\"
Cathie Wood-led Ark Investment Management on Friday snapped up another 221,167 shares of the cryptocurrency exchange Coinbase Global Inc (NASDAQ COIN) worth about $64.49 million on the stock’s Friday’s dip and also its fourth-straight loss.
The investment firm’s Ark Innovation ETF (NYSE ARKK) bought the shares of the company that closed 0.63% lower at $291.60 on Friday, giving the cryptocurrency exchange a market cap of $58.09 billion. Coinbase’s market cap has dropped from $85.8 billion on its blockbuster listing earlier this month.
The New York-based company also added another 3,873 shares of the mobile gaming company Skillz Inc (NYSE SKLZ), just a day after snapping 1.2 million shares of the stock.
ARKK bought the shares of the company which closed ...
\",\"Sector ETFs,Penny Stocks,Cryptocurrency,Small Cap,Markets,Trading Ideas,ETFs\"\n",
+ "example": "id,publisher_name,publisher_homepage_url,publisher_logo_url,publisher_favicon_url,title,author,published_utc,article_url,ticker,amp_url,image_url,description,keywords,sentiment,sentiment_reasoning\n8ec638777ca03b553ae516761c2a22ba2fdd2f37befae3ab6fdab74e9e5193eb,Investing.com,https://www.investing.com/,https://s3.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"
}
@@ -18242,11 +18702,11 @@
"tags": [
"reference:news"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Reference data",
"name": "reference"
},
- "x-polygon-paginate": {
+ "x-massive-paginate": {
"sort": {
"default": "published_utc",
"enum": [
@@ -18266,7 +18726,7 @@
"description": "Get the current minute, day, and previous day\u2019s aggregate, as well as the last trade and quote for all traded cryptocurrency symbols.\n \n \nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n",
"parameters": [
{
- "description": "A comma separated list of tickers to get snapshots for.",
+ "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": {
@@ -18307,7 +18767,9 @@
"c": 0.296,
"h": 0.296,
"l": 0.294,
+ "n": 2,
"o": 0.296,
+ "t": 1684427880000,
"v": 123.4866,
"vw": 0
},
@@ -18389,6 +18851,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"
+ },
"lastTrade": {
"allOf": [
{
@@ -18421,7 +18888,7 @@
"type": "integer"
},
"x": {
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
"type": "integer"
}
},
@@ -18455,11 +18922,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",
@@ -18477,7 +18952,9 @@
"l",
"c",
"v",
- "vw"
+ "vw",
+ "t",
+ "n"
],
"type": "object"
},
@@ -18581,7 +19058,7 @@
"tags": [
"crypto:snapshot"
],
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"description": "Real Time Data",
"name": "realtime"
@@ -18591,11 +19068,11 @@
"name": "delayed"
}
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -18646,7 +19123,9 @@
"c": 16235.1,
"h": 16264.29,
"l": 16129.3,
+ "n": 558,
"o": 16257.51,
+ "t": 1684428960000,
"v": 19.30791925,
"vw": 0
},
@@ -18738,6 +19217,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"
+ },
"lastTrade": {
"allOf": [
{
@@ -18770,7 +19254,7 @@
"type": "integer"
},
"x": {
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
"type": "integer"
}
},
@@ -18804,11 +19288,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",
@@ -18826,7 +19318,9 @@
"l",
"c",
"v",
- "vw"
+ "vw",
+ "t",
+ "n"
],
"type": "object"
},
@@ -18928,7 +19422,7 @@
"tags": [
"crypto:snapshot"
],
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"description": "Real Time Data",
"name": "realtime"
@@ -18938,11 +19432,11 @@
"name": "delayed"
}
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -19116,7 +19610,10 @@
"tags": [
"crypto:snapshot"
],
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-deprecation": {
+ "date": 1719838800000
+ },
+ "x-massive-entitlement-allowed-timeframes": [
{
"description": "Real Time Data",
"name": "realtime"
@@ -19126,11 +19623,11 @@
"name": "delayed"
}
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -19185,7 +19682,9 @@
"c": 0.062377,
"h": 0.062377,
"l": 0.062377,
+ "n": 2,
"o": 0.062377,
+ "t": 1684426740000,
"v": 35420,
"vw": 0
},
@@ -19259,6 +19758,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"
+ },
"lastTrade": {
"allOf": [
{
@@ -19291,7 +19795,7 @@
"type": "integer"
},
"x": {
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
"type": "integer"
}
},
@@ -19325,11 +19829,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",
@@ -19347,7 +19859,9 @@
"l",
"c",
"v",
- "vw"
+ "vw",
+ "t",
+ "n"
],
"type": "object"
},
@@ -19451,7 +19965,7 @@
"tags": [
"crypto:snapshot"
],
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"description": "Real Time Data",
"name": "realtime"
@@ -19461,11 +19975,11 @@
"name": "delayed"
}
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -19476,7 +19990,7 @@
"description": "Get the current minute, day, and previous day\u2019s aggregate, as well as the last trade and quote for all traded forex symbols.\n \n \nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n",
"parameters": [
{
- "description": "A comma separated list of tickers to get snapshots for.",
+ "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": {
@@ -19512,7 +20026,9 @@
"c": 0.117769,
"h": 0.11779633,
"l": 0.11773698,
+ "n": 1,
"o": 0.11778,
+ "t": 1684422000000,
"v": 202
},
"prevDay": {
@@ -19587,6 +20103,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"
+ },
"lastQuote": {
"description": "The most recent quote for this ticker.",
"properties": {
@@ -19635,24 +20156,25 @@
"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"
}
},
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v"
- ],
"type": "object"
},
"prevDay": {
@@ -19755,7 +20277,7 @@
"tags": [
"fx:snapshot"
],
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"description": "Real Time Data",
"name": "realtime"
@@ -19765,11 +20287,11 @@
"name": "delayed"
}
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -19816,7 +20338,9 @@
"c": 1.18396,
"h": 1.18423,
"l": 1.1838,
+ "n": 85,
"o": 1.18404,
+ "t": 1684422000000,
"v": 41
},
"prevDay": {
@@ -19901,6 +20425,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"
+ },
"lastQuote": {
"description": "The most recent quote for this ticker.",
"properties": {
@@ -19949,24 +20478,25 @@
"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"
}
},
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v"
- ],
"type": "object"
},
"prevDay": {
@@ -20067,7 +20597,7 @@
"tags": [
"fx:snapshot"
],
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"description": "Real Time Data",
"name": "realtime"
@@ -20077,11 +20607,11 @@
"name": "delayed"
}
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -20131,7 +20661,9 @@
"c": 0.886156,
"h": 0.886156,
"l": 0.886156,
+ "n": 1,
"o": 0.886156,
+ "t": 1684422000000,
"v": 1
},
"prevDay": {
@@ -20206,6 +20738,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"
+ },
"lastQuote": {
"description": "The most recent quote for this ticker.",
"properties": {
@@ -20254,24 +20791,25 @@
"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"
}
},
- "required": [
- "o",
- "h",
- "l",
- "c",
- "v"
- ],
"type": "object"
},
"prevDay": {
@@ -20376,7 +20914,7 @@
"tags": [
"fx:snapshot"
],
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"description": "Real Time Data",
"name": "realtime"
@@ -20386,11 +20924,11 @@
"name": "delayed"
}
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -20401,7 +20939,7 @@
"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 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": {
@@ -20460,7 +20998,9 @@
"c": 20.506,
"h": 20.506,
"l": 20.506,
+ "n": 1,
"o": 20.506,
+ "t": 1684428600000,
"v": 5000,
"vw": 20.5105
},
@@ -20550,6 +21090,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"
+ },
"lastQuote": {
"description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
"properties": {
@@ -20613,7 +21158,7 @@
"type": "integer"
},
"x": {
- "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.",
"type": "integer"
}
},
@@ -20649,6 +21194,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",
@@ -20658,6 +21207,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",
@@ -20676,7 +21229,9 @@
"l",
"c",
"v",
- "vw"
+ "vw",
+ "t",
+ "n"
],
"type": "object"
},
@@ -20774,7 +21329,7 @@
"tags": [
"stocks:snapshot"
],
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"description": "Real Time Data",
"name": "realtime"
@@ -20784,11 +21339,11 @@
"name": "delayed"
}
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -20799,7 +21354,7 @@
"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": "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",
@@ -20848,7 +21403,9 @@
"c": 120.4201,
"h": 120.468,
"l": 120.37,
+ "n": 762,
"o": 120.435,
+ "t": 1684428720000,
"v": 270796,
"vw": 120.4129
},
@@ -20944,6 +21501,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"
+ },
"lastQuote": {
"description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
"properties": {
@@ -21007,7 +21569,7 @@
"type": "integer"
},
"x": {
- "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.",
"type": "integer"
}
},
@@ -21043,6 +21605,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",
@@ -21052,6 +21618,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",
@@ -21070,7 +21640,9 @@
"l",
"c",
"v",
- "vw"
+ "vw",
+ "t",
+ "n"
],
"type": "object"
},
@@ -21166,7 +21738,7 @@
"tags": [
"stocks:snapshot"
],
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"description": "Real Time Data",
"name": "realtime"
@@ -21176,11 +21748,11 @@
"name": "delayed"
}
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -21188,7 +21760,7 @@
},
"/v2/snapshot/locale/us/markets/stocks/{direction}": {
"get": {
- "description": "Get the most up-to-date market data for the current top 20 gainers or losers of the day in the stocks/equities markets.\n \n \nTop gainers are those tickers whose price has increased by the highest percentage since the previous day's close.\nTop losers are those tickers whose price has decreased by the highest percentage since the previous day's close.\n \n \nNote: Snapshot data is cleared at 3:30am EST and gets populated as data is received from the exchanges.\n",
+ "description": "Get the most up-to-date market data for the current top 20 gainers or losers of the day in the stocks/equities markets.\n \n \nTop gainers are those tickers whose price has increased by the highest percentage since the previous day's close.\nTop losers are those tickers whose price has decreased by the highest percentage since the previous day's close.\nThis output will only include tickers with a trading volume of 10,000 or more.\n \n \nNote: Snapshot data is cleared at 3:30am EST and gets populated as data is received from the exchanges.\n",
"parameters": [
{
"description": "The direction of the snapshot results to return.\n",
@@ -21251,7 +21823,9 @@
"c": 14.2284,
"h": 14.325,
"l": 14.2,
+ "n": 5,
"o": 14.28,
+ "t": 1684428600000,
"v": 6108,
"vw": 14.2426
},
@@ -21337,6 +21911,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"
+ },
"lastQuote": {
"description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
"properties": {
@@ -21400,7 +21979,7 @@
"type": "integer"
},
"x": {
- "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.",
"type": "integer"
}
},
@@ -21436,6 +22015,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",
@@ -21445,6 +22028,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",
@@ -21463,7 +22050,9 @@
"l",
"c",
"v",
- "vw"
+ "vw",
+ "t",
+ "n"
],
"type": "object"
},
@@ -21561,7 +22150,7 @@
"tags": [
"stocks:snapshot"
],
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"description": "Real Time Data",
"name": "realtime"
@@ -21571,11 +22160,11 @@
"name": "delayed"
}
],
- "x-polygon-entitlement-data-type": {
+ "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"
}
@@ -21812,7 +22401,7 @@
"X": {
"allOf": [
{
- "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.",
"type": "integer"
},
{
@@ -21823,13 +22412,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"
@@ -21848,7 +22437,7 @@
"x": {
"allOf": [
{
- "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.",
"type": "integer"
},
{
@@ -21895,18 +22484,18 @@
"tags": [
"stocks:quotes"
],
- "x-polygon-deprecation": {
+ "x-massive-deprecation": {
"date": 1654056060000,
"replaces": {
"name": "Quotes (NBBO) v3",
"path": "get_v3_quotes__stockticker"
}
},
- "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": "Stocks data",
"name": "stocks"
}
@@ -22132,7 +22721,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"
@@ -22160,7 +22749,7 @@
"type": "number"
},
"x": {
- "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.",
"type": "integer"
},
"z": {
@@ -22201,18 +22790,18 @@
"tags": [
"stocks:trades"
],
- "x-polygon-deprecation": {
+ "x-massive-deprecation": {
"date": 1654056060000,
"replaces": {
"name": "Trades v3",
"path": "get_v3_trades__stockticker"
}
},
- "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": "Stocks data",
"name": "stocks"
}
@@ -22240,12 +22829,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": {
@@ -22253,7 +22842,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -22261,7 +22850,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -22269,7 +22858,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -22291,11 +22880,11 @@
}
},
{
- "description": "Limit the number of results returned, default is 10 and max is 50000.",
+ "description": "Limit the number of results returned, default is 1000 and max is 50000.",
"in": "query",
"name": "limit",
"schema": {
- "default": 10,
+ "default": 1000,
"example": 10,
"maximum": 50000,
"minimum": 1,
@@ -22321,21 +22910,21 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v3/quotes/C:EUR-USD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "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,",
+ "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,",
+ "ask_exchange": 48,
+ "ask_price": 1.18565,
+ "bid_exchange": 48,
+ "bid_price": 1.18559,
"participant_timestamp": 1625097600000000000
}
],
@@ -22372,12 +22961,15 @@
"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": {
+ "x-massive-go-type": {
"name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
}
},
+ "required": [
+ "participant_timestamp"
+ ],
"type": "object"
},
"type": "array"
@@ -22387,6 +22979,9 @@
"type": "string"
}
},
+ "required": [
+ "status"
+ ],
"type": "object"
}
},
@@ -22404,16 +22999,18 @@
"tags": [
"fx:quotes"
],
- "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"
},
- "x-polygon-paginate": {
+ "x-massive-paginate": {
"limit": {
+ "default": 1000,
+ "example": 10,
"max": 50000
},
"order": {
@@ -22426,7 +23023,7 @@
]
}
},
- "x-polygon-replaces": {
+ "x-massive-replaces": {
"date": 1654056060000,
"replaces": {
"name": "Historic Forex Ticks",
@@ -22434,7 +23031,7 @@
}
}
},
- "x-polygon-ignore": true
+ "x-massive-ignore": true
},
"/v3/quotes/{optionsTicker}": {
"get": {
@@ -22450,7 +23047,7 @@
"schema": {
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-go-id": "Ticker"
},
{
"description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
@@ -22459,12 +23056,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": {
@@ -22472,7 +23069,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -22480,7 +23077,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -22488,7 +23085,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -22510,11 +23107,11 @@
}
},
{
- "description": "Limit the number of results returned, default is 10 and max is 50000.",
+ "description": "Limit the number of results returned, default is 1000 and max is 50000.",
"in": "query",
"name": "limit",
"schema": {
- "default": 10,
+ "default": 1000,
"example": 10,
"maximum": 50000,
"minimum": 1,
@@ -22540,7 +23137,7 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v3/quotes/O:SPY241220P00720000?cursor=YXA9NzY5Nzg0NzAxJmFzPSZsaW1pdD0xMCZvcmRlcj1kZXNjJnNvcnQ9dGltZXN0YW1wJnRpbWVzdGFtcC5sdGU9MjAyMi0wMi0xN1QxNyUzQTI1JTNBMTMuMDA5MzU2MDMyWg",
+ "next_url": "https://api.massive.com/v3/quotes/O:SPY241220P00720000?cursor=YXA9NzY5Nzg0NzAxJmFzPSZsaW1pdD0xMCZvcmRlcj1kZXNjJnNvcnQ9dGltZXN0YW1wJnRpbWVzdGFtcC5sdGU9MjAyMi0wMi0xN1QxNyUzQTI1JTNBMTMuMDA5MzU2MDMyWg",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": [
{
@@ -22612,12 +23209,16 @@
"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": {
+ "x-massive-go-type": {
"name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
}
},
+ "required": [
+ "sip_timestamp",
+ "sequence_number"
+ ],
"type": "object"
},
"type": "array"
@@ -22627,6 +23228,9 @@
"type": "string"
}
},
+ "required": [
+ "status"
+ ],
"type": "object"
}
},
@@ -22644,16 +23248,18 @@
"tags": [
"options:quotes"
],
- "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": "Options data",
"name": "options"
},
- "x-polygon-paginate": {
+ "x-massive-paginate": {
"limit": {
+ "default": 1000,
+ "example": 10,
"max": 50000
},
"order": {
@@ -22667,7 +23273,7 @@
}
}
},
- "x-polygon-ignore": true
+ "x-massive-ignore": true
},
"/v3/quotes/{stockTicker}": {
"get": {
@@ -22683,7 +23289,7 @@
"schema": {
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-go-id": "Ticker"
},
{
"description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
@@ -22692,12 +23298,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": {
@@ -22705,7 +23311,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -22713,7 +23319,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -22721,7 +23327,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -22743,11 +23349,11 @@
}
},
{
- "description": "Limit the number of results returned, default is 10 and max is 50000.",
+ "description": "Limit the number of results returned, default is 1000 and max is 50000.",
"in": "query",
"name": "limit",
"schema": {
- "default": 10,
+ "default": 1000,
"example": 10,
"maximum": 50000,
"minimum": 1,
@@ -22773,7 +23379,7 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v3/quotes/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "next_url": "https://api.massive.com/v3/quotes/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": [
{
@@ -22849,24 +23455,24 @@
"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",
- "x-polygon-go-type": {
+ "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://polygon.io/glossary/us/stocks/conditions-indicators).",
+ "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-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Int32Array"
}
},
@@ -22874,9 +23480,9 @@
"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": {
+ "x-massive-go-type": {
"name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
},
"sequence_number": {
@@ -22888,9 +23494,9 @@
"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": {
+ "x-massive-go-type": {
"name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
},
"tape": {
@@ -22902,13 +23508,21 @@
"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": {
+ "x-massive-go-type": {
"name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
}
},
- "type": "object"
+ "required": [
+ "participant_timestamp",
+ "sequence_number",
+ "sip_timestamp"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "CommonQuote"
+ }
},
"type": "array"
},
@@ -22917,6 +23531,9 @@
"type": "string"
}
},
+ "required": [
+ "status"
+ ],
"type": "object"
}
},
@@ -22934,16 +23551,18 @@
"tags": [
"stocks:quotes"
],
- "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": "Stocks data",
"name": "stocks"
},
- "x-polygon-paginate": {
+ "x-massive-paginate": {
"limit": {
+ "default": 1000,
+ "example": 10,
"max": 50000
},
"order": {
@@ -22956,7 +23575,7 @@
]
}
},
- "x-polygon-replaces": {
+ "x-massive-replaces": {
"date": 1654056060000,
"replaces": {
"name": "Quotes (NBBO)",
@@ -22967,7 +23586,7 @@
},
"/v3/reference/conditions": {
"get": {
- "description": "List all conditions that Polygon.io uses.",
+ "description": "List all conditions that Massive.com uses.",
"operationId": "ListConditions",
"parameters": [
{
@@ -23006,7 +23625,7 @@
"in": "query",
"name": "id",
"schema": {
- "description": "An identifier used by Polygon.io for this condition. Unique per data type.",
+ "description": "An identifier used by Massive.com for this condition. Unique per data type.",
"example": 1,
"type": "integer"
}
@@ -23161,11 +23780,11 @@
"type": "string"
},
"exchange": {
- "description": "If present, mapping this condition from a Polygon.io code to a SIP symbol depends on this attribute.\nIn other words, data with this condition attached comes exclusively from the given exchange.",
+ "description": "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 Polygon.io for this condition. Unique per data type.",
+ "description": "An identifier used by Massive.com for this condition. Unique per data type.",
"example": 1,
"type": "integer"
},
@@ -23358,11 +23977,11 @@
"type": "string"
},
"exchange": {
- "description": "If present, mapping this condition from a Polygon.io code to a SIP symbol depends on this attribute.\nIn other words, data with this condition attached comes exclusively from the given exchange.",
+ "description": "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 Polygon.io for this condition. Unique per data type.",
+ "description": "An identifier used by Massive.com for this condition. Unique per data type.",
"example": 1,
"type": "integer"
},
@@ -23549,11 +24168,11 @@
"type": "string"
},
"exchange": {
- "description": "If present, mapping this condition from a Polygon.io code to a SIP symbol depends on this attribute.\nIn other words, data with this condition attached comes exclusively from the given exchange.",
+ "description": "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 Polygon.io for this condition. Unique per data type.",
+ "description": "An identifier used by Massive.com for this condition. Unique per data type.",
"example": 1,
"type": "integer"
},
@@ -23687,11 +24306,11 @@
"tags": [
"reference:conditions"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Reference data",
"name": "reference"
},
- "x-polygon-paginate": {
+ "x-massive-paginate": {
"limit": {
"default": 10,
"max": 1000
@@ -23716,13 +24335,13 @@
"operationId": "ListDividends",
"parameters": [
{
- "description": "Return the dividends that contain this ticker.",
+ "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.",
"in": "query",
"name": "ticker",
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true,
"type": "string"
}
@@ -23735,7 +24354,7 @@
"format": "date",
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true,
"type": "string"
}
@@ -23748,7 +24367,7 @@
"format": "date",
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true,
"type": "string"
}
@@ -23761,7 +24380,7 @@
"format": "date",
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true,
"type": "string"
}
@@ -23774,7 +24393,7 @@
"format": "date",
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true,
"type": "string"
}
@@ -23801,7 +24420,7 @@
"schema": {
"type": "number"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true,
"type": "number"
}
@@ -23819,7 +24438,7 @@
"ST"
],
"type": "string",
- "x-polygon-go-field-tags": {
+ "x-massive-go-field-tags": {
"tags": [
{
"key": "binding",
@@ -23830,7 +24449,7 @@
}
},
{
- "description": "Search by ticker.",
+ "description": "Range by ticker.",
"in": "query",
"name": "ticker.gte",
"schema": {
@@ -23838,7 +24457,7 @@
}
},
{
- "description": "Search by ticker.",
+ "description": "Range by ticker.",
"in": "query",
"name": "ticker.gt",
"schema": {
@@ -23846,7 +24465,7 @@
}
},
{
- "description": "Search by ticker.",
+ "description": "Range by ticker.",
"in": "query",
"name": "ticker.lte",
"schema": {
@@ -23854,7 +24473,7 @@
}
},
{
- "description": "Search by ticker.",
+ "description": "Range by ticker.",
"in": "query",
"name": "ticker.lt",
"schema": {
@@ -23862,7 +24481,7 @@
}
},
{
- "description": "Search by ex_dividend_date.",
+ "description": "Range by ex_dividend_date.",
"in": "query",
"name": "ex_dividend_date.gte",
"schema": {
@@ -23871,7 +24490,7 @@
}
},
{
- "description": "Search by ex_dividend_date.",
+ "description": "Range by ex_dividend_date.",
"in": "query",
"name": "ex_dividend_date.gt",
"schema": {
@@ -23880,7 +24499,7 @@
}
},
{
- "description": "Search by ex_dividend_date.",
+ "description": "Range by ex_dividend_date.",
"in": "query",
"name": "ex_dividend_date.lte",
"schema": {
@@ -23889,7 +24508,7 @@
}
},
{
- "description": "Search by ex_dividend_date.",
+ "description": "Range by ex_dividend_date.",
"in": "query",
"name": "ex_dividend_date.lt",
"schema": {
@@ -23898,7 +24517,7 @@
}
},
{
- "description": "Search by record_date.",
+ "description": "Range by record_date.",
"in": "query",
"name": "record_date.gte",
"schema": {
@@ -23907,7 +24526,7 @@
}
},
{
- "description": "Search by record_date.",
+ "description": "Range by record_date.",
"in": "query",
"name": "record_date.gt",
"schema": {
@@ -23916,7 +24535,7 @@
}
},
{
- "description": "Search by record_date.",
+ "description": "Range by record_date.",
"in": "query",
"name": "record_date.lte",
"schema": {
@@ -23925,7 +24544,7 @@
}
},
{
- "description": "Search by record_date.",
+ "description": "Range by record_date.",
"in": "query",
"name": "record_date.lt",
"schema": {
@@ -23934,7 +24553,7 @@
}
},
{
- "description": "Search by declaration_date.",
+ "description": "Range by declaration_date.",
"in": "query",
"name": "declaration_date.gte",
"schema": {
@@ -23943,7 +24562,7 @@
}
},
{
- "description": "Search by declaration_date.",
+ "description": "Range by declaration_date.",
"in": "query",
"name": "declaration_date.gt",
"schema": {
@@ -23952,7 +24571,7 @@
}
},
{
- "description": "Search by declaration_date.",
+ "description": "Range by declaration_date.",
"in": "query",
"name": "declaration_date.lte",
"schema": {
@@ -23961,7 +24580,7 @@
}
},
{
- "description": "Search by declaration_date.",
+ "description": "Range by declaration_date.",
"in": "query",
"name": "declaration_date.lt",
"schema": {
@@ -23970,7 +24589,7 @@
}
},
{
- "description": "Search by pay_date.",
+ "description": "Range by pay_date.",
"in": "query",
"name": "pay_date.gte",
"schema": {
@@ -23979,7 +24598,7 @@
}
},
{
- "description": "Search by pay_date.",
+ "description": "Range by pay_date.",
"in": "query",
"name": "pay_date.gt",
"schema": {
@@ -23988,7 +24607,7 @@
}
},
{
- "description": "Search by pay_date.",
+ "description": "Range by pay_date.",
"in": "query",
"name": "pay_date.lte",
"schema": {
@@ -23997,7 +24616,7 @@
}
},
{
- "description": "Search by pay_date.",
+ "description": "Range by pay_date.",
"in": "query",
"name": "pay_date.lt",
"schema": {
@@ -24006,7 +24625,7 @@
}
},
{
- "description": "Search by cash_amount.",
+ "description": "Range by cash_amount.",
"in": "query",
"name": "cash_amount.gte",
"schema": {
@@ -24014,7 +24633,7 @@
}
},
{
- "description": "Search by cash_amount.",
+ "description": "Range by cash_amount.",
"in": "query",
"name": "cash_amount.gt",
"schema": {
@@ -24022,7 +24641,7 @@
}
},
{
- "description": "Search by cash_amount.",
+ "description": "Range by cash_amount.",
"in": "query",
"name": "cash_amount.lte",
"schema": {
@@ -24030,7 +24649,7 @@
}
},
{
- "description": "Search by cash_amount.",
+ "description": "Range by cash_amount.",
"in": "query",
"name": "cash_amount.lt",
"schema": {
@@ -24088,7 +24707,7 @@
"schema": {
"description": "A list of dividends.",
"example": {
- "next_url": "https://api.polygon.io/v3/reference/dividends/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "next_url": "https://api.massive.com/v3/reference/dividends/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"results": [
{
"cash_amount": 0.22,
@@ -24096,6 +24715,7 @@
"dividend_type": "CD",
"ex_dividend_date": "2021-11-05",
"frequency": 4,
+ "id": "E8e3c4f794613e9205e2f178a36c53fcc57cdabb55e1988c87b33f9e52e221444",
"pay_date": "2021-11-11",
"record_date": "2021-11-08",
"ticker": "AAPL"
@@ -24106,6 +24726,7 @@
"dividend_type": "CD",
"ex_dividend_date": "2021-08-06",
"frequency": 4,
+ "id": "E6436c5475706773f03490acf0b63fdb90b2c72bfeed329a6eb4afc080acd80ae",
"pay_date": "2021-08-12",
"record_date": "2021-08-09",
"ticker": "AAPL"
@@ -24127,7 +24748,7 @@
"cash_amount": {
"description": "The cash amount of the dividend per share owned.",
"type": "number",
- "x-polygon-go-field-tags": {
+ "x-massive-go-field-tags": {
"tags": [
{
"key": "binding",
@@ -24139,7 +24760,7 @@
"currency": {
"description": "The currency in which the dividend is paid.",
"type": "string",
- "x-polygon-go-field-tags": {
+ "x-massive-go-field-tags": {
"tags": [
{
"key": "binding",
@@ -24161,7 +24782,7 @@
"ST"
],
"type": "string",
- "x-polygon-go-field-tags": {
+ "x-massive-go-field-tags": {
"tags": [
{
"key": "binding",
@@ -24173,7 +24794,7 @@
"ex_dividend_date": {
"description": "The date that the stock first trades without the dividend, determined by the exchange.",
"type": "string",
- "x-polygon-go-field-tags": {
+ "x-massive-go-field-tags": {
"tags": [
{
"key": "binding",
@@ -24185,7 +24806,7 @@
"frequency": {
"description": "The number of times per year the dividend is paid out. Possible values are 0 (one-time), 1 (annually), 2 (bi-annually), 4 (quarterly), and 12 (monthly).",
"type": "integer",
- "x-polygon-go-field-tags": {
+ "x-massive-go-field-tags": {
"tags": [
{
"key": "binding",
@@ -24194,6 +24815,10 @@
]
}
},
+ "id": {
+ "description": "The unique identifier of the dividend.",
+ "type": "string"
+ },
"pay_date": {
"description": "The date that the dividend is paid out.",
"type": "string"
@@ -24205,7 +24830,7 @@
"ticker": {
"description": "The ticker symbol of the dividend.",
"type": "string",
- "x-polygon-go-field-tags": {
+ "x-massive-go-field-tags": {
"tags": [
{
"key": "binding",
@@ -24220,10 +24845,11 @@
"ex_dividend_date",
"frequency",
"cash_amount",
- "dividend_type"
+ "dividend_type",
+ "id"
],
"type": "object",
- "x-polygon-go-struct-tags": {
+ "x-massive-go-struct-tags": {
"tags": [
"db"
]
@@ -24255,11 +24881,11 @@
"tags": [
"reference:dividends"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Reference data",
"name": "reference"
},
- "x-polygon-paginate": {
+ "x-massive-paginate": {
"limit": {
"default": 10,
"max": 1000
@@ -24276,384 +24902,41 @@
]
}
}
- },
- "post": {
- "description": "Manually add Polygon a dividend.",
- "operationId": "CreateDividend",
+ }
+ },
+ "/v3/reference/exchanges": {
+ "get": {
+ "description": "List all exchanges that Massive.com knows about.",
+ "operationId": "ListExchanges",
"parameters": [
{
- "description": "If true don't trigger overlay",
+ "description": "Filter by asset class.",
"in": "query",
- "name": "skip_overlay_trigger",
+ "name": "asset_class",
"schema": {
- "default": false,
- "type": "boolean"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "cash_amount": {
- "description": "The cash amount of the dividend per share owned.",
- "type": "number",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "currency": {
- "description": "The currency in which the dividend is paid.",
- "type": "string",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "declaration_date": {
- "description": "The date that the dividend was announced.",
- "type": "string"
- },
- "dividend_type": {
- "description": "The type of dividend. Dividends that have been paid and/or are expected to be paid on consistent schedules are denoted as CD.\nSpecial Cash dividends that have been paid that are infrequent or unusual, and/or can not be expected to occur in the future are denoted as SC.\nLong-Term and Short-Term capital gain distributions are denoted as LT and ST, respectively.",
- "enum": [
- "CD",
- "SC",
- "LT",
- "ST"
- ],
- "type": "string",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "ex_dividend_date": {
- "description": "The date that the stock first trades without the dividend, determined by the exchange.",
- "type": "string",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "frequency": {
- "description": "The number of times per year the dividend is paid out. Possible values are 0 (one-time), 1 (annually), 2 (bi-annually), 4 (quarterly), and 12 (monthly).",
- "type": "integer",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "pay_date": {
- "description": "The date that the dividend is paid out.",
- "type": "string"
- },
- "record_date": {
- "description": "The date that the stock must be held to receive the dividend, set by the company.",
- "type": "string"
- },
- "ticker": {
- "description": "The ticker symbol of the dividend.",
- "type": "string",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- }
- },
- "required": [
- "ticker",
- "ex_dividend_date",
- "frequency",
- "cash_amount",
- "dividend_type"
- ],
- "type": "object",
- "x-polygon-go-struct-tags": {
- "tags": [
- "db"
- ]
- }
- }
- }
- },
- "description": "Pass the desired dividend in the request body.",
- "required": true
- },
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "request_id": {
- "type": "string"
- },
- "results": {
- "properties": {
- "cash_amount": {
- "description": "The cash amount of the dividend per share owned.",
- "type": "number",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "currency": {
- "description": "The currency in which the dividend is paid.",
- "type": "string",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "declaration_date": {
- "description": "The date that the dividend was announced.",
- "type": "string"
- },
- "dividend_type": {
- "description": "The type of dividend. Dividends that have been paid and/or are expected to be paid on consistent schedules are denoted as CD.\nSpecial Cash dividends that have been paid that are infrequent or unusual, and/or can not be expected to occur in the future are denoted as SC.\nLong-Term and Short-Term capital gain distributions are denoted as LT and ST, respectively.",
- "enum": [
- "CD",
- "SC",
- "LT",
- "ST"
- ],
- "type": "string",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "ex_dividend_date": {
- "description": "The date that the stock first trades without the dividend, determined by the exchange.",
- "type": "string",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "frequency": {
- "description": "The number of times per year the dividend is paid out. Possible values are 0 (one-time), 1 (annually), 2 (bi-annually), 4 (quarterly), and 12 (monthly).",
- "type": "integer",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- },
- "pay_date": {
- "description": "The date that the dividend is paid out.",
- "type": "string"
- },
- "record_date": {
- "description": "The date that the stock must be held to receive the dividend, set by the company.",
- "type": "string"
- },
- "ticker": {
- "description": "The ticker symbol of the dividend.",
- "type": "string",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
- }
- },
- "required": [
- "ticker",
- "ex_dividend_date",
- "frequency",
- "cash_amount",
- "dividend_type"
- ],
- "type": "object",
- "x-polygon-go-struct-tags": {
- "tags": [
- "db"
- ]
- }
- },
- "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": {
- "get": {
- "description": "List all exchanges that Polygon.io knows about.",
- "operationId": "ListExchanges",
- "parameters": [
- {
- "description": "Filter by asset class.",
- "in": "query",
- "name": "asset_class",
- "schema": {
- "description": "An identifier for a group of similar financial instruments.",
- "enum": [
- "stocks",
- "options",
- "crypto",
- "fx"
- ],
- "example": "stocks",
- "type": "string"
- }
- },
- {
- "description": "Filter by locale.",
- "in": "query",
- "name": "locale",
- "schema": {
- "description": "An identifier for a geographical location.",
- "enum": [
- "us",
- "global"
- ],
- "example": "us",
- "type": "string"
+ "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"
}
}
],
@@ -24694,7 +24977,7 @@
"type": "string"
},
"id": {
- "description": "A unique identifier used by Polygon.io for this exchange.",
+ "description": "A unique identifier used by Massive.com for this exchange.",
"example": 1,
"type": "integer"
},
@@ -24708,7 +24991,7 @@
"type": "string"
},
"mic": {
- "description": "The Market Identifer Code of this exchange (see ISO 10383).",
+ "description": "The Market Identifier Code of this exchange (see ISO 10383).",
"example": "XASE",
"type": "string"
},
@@ -24843,7 +25126,7 @@
"tags": [
"reference:exchanges"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Reference data",
"name": "reference"
}
@@ -24855,7 +25138,7 @@
"operationId": "ListOptionsContracts",
"parameters": [
{
- "description": "This parameter has been deprecated. To search by specific options ticker, use the Options Contract endpoint [here](https://polygon.io/docs/options/get_v3_reference_options_contracts__options_ticker).",
+ "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": {
@@ -24869,7 +25152,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true,
"type": "string"
}
@@ -24893,7 +25176,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -24912,7 +25195,7 @@
"schema": {
"type": "number"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true,
"type": "number"
}
@@ -24926,7 +25209,7 @@
}
},
{
- "description": "Search by underlying_ticker.",
+ "description": "Range by underlying_ticker.",
"in": "query",
"name": "underlying_ticker.gte",
"schema": {
@@ -24934,7 +25217,7 @@
}
},
{
- "description": "Search by underlying_ticker.",
+ "description": "Range by underlying_ticker.",
"in": "query",
"name": "underlying_ticker.gt",
"schema": {
@@ -24942,7 +25225,7 @@
}
},
{
- "description": "Search by underlying_ticker.",
+ "description": "Range by underlying_ticker.",
"in": "query",
"name": "underlying_ticker.lte",
"schema": {
@@ -24950,7 +25233,7 @@
}
},
{
- "description": "Search by underlying_ticker.",
+ "description": "Range by underlying_ticker.",
"in": "query",
"name": "underlying_ticker.lt",
"schema": {
@@ -24958,7 +25241,7 @@
}
},
{
- "description": "Search by expiration_date.",
+ "description": "Range by expiration_date.",
"in": "query",
"name": "expiration_date.gte",
"schema": {
@@ -24966,7 +25249,7 @@
}
},
{
- "description": "Search by expiration_date.",
+ "description": "Range by expiration_date.",
"in": "query",
"name": "expiration_date.gt",
"schema": {
@@ -24974,7 +25257,7 @@
}
},
{
- "description": "Search by expiration_date.",
+ "description": "Range by expiration_date.",
"in": "query",
"name": "expiration_date.lte",
"schema": {
@@ -24982,7 +25265,7 @@
}
},
{
- "description": "Search by expiration_date.",
+ "description": "Range by expiration_date.",
"in": "query",
"name": "expiration_date.lt",
"schema": {
@@ -24990,7 +25273,7 @@
}
},
{
- "description": "Search by strike_price.",
+ "description": "Range by strike_price.",
"in": "query",
"name": "strike_price.gte",
"schema": {
@@ -24998,7 +25281,7 @@
}
},
{
- "description": "Search by strike_price.",
+ "description": "Range by strike_price.",
"in": "query",
"name": "strike_price.gt",
"schema": {
@@ -25006,7 +25289,7 @@
}
},
{
- "description": "Search by strike_price.",
+ "description": "Range by strike_price.",
"in": "query",
"name": "strike_price.lte",
"schema": {
@@ -25014,7 +25297,7 @@
}
},
{
- "description": "Search by strike_price.",
+ "description": "Range by strike_price.",
"in": "query",
"name": "strike_price.lt",
"schema": {
@@ -25137,12 +25420,12 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "AdditionalUnderlying"
}
},
"type": "array",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "AdditionalUnderlyings"
}
},
@@ -25170,9 +25453,9 @@
"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"
+ "x-massive-go-type": {
+ "name": "IDaysMassiveDateString",
+ "path": "github.com/massive-com/ptime"
}
},
"primary_exchange": {
@@ -25197,7 +25480,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "OptionsContract"
}
},
@@ -25224,11 +25507,11 @@
"tags": [
"reference:options:contracts: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,
"max": 1000
@@ -25251,8 +25534,8 @@
"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",
+ "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,
@@ -25325,12 +25608,12 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "AdditionalUnderlying"
}
},
"type": "array",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "AdditionalUnderlyings"
}
},
@@ -25358,9 +25641,9 @@
"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"
+ "x-massive-go-type": {
+ "name": "IDaysMassiveDateString",
+ "path": "github.com/massive-com/ptime"
}
},
"primary_exchange": {
@@ -25385,7 +25668,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "OptionsContract"
}
},
@@ -25410,7 +25693,7 @@
"tags": [
"reference:options:contract"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Reference data",
"name": "reference"
}
@@ -25422,13 +25705,13 @@
"operationId": "ListStockSplits",
"parameters": [
{
- "description": "Return the stock splits 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"
}
@@ -25441,7 +25724,7 @@
"format": "date",
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true,
"type": "string"
}
@@ -25456,7 +25739,7 @@
}
},
{
- "description": "Search by ticker.",
+ "description": "Range by ticker.",
"in": "query",
"name": "ticker.gte",
"schema": {
@@ -25464,7 +25747,7 @@
}
},
{
- "description": "Search by ticker.",
+ "description": "Range by ticker.",
"in": "query",
"name": "ticker.gt",
"schema": {
@@ -25472,7 +25755,7 @@
}
},
{
- "description": "Search by ticker.",
+ "description": "Range by ticker.",
"in": "query",
"name": "ticker.lte",
"schema": {
@@ -25480,7 +25763,7 @@
}
},
{
- "description": "Search by ticker.",
+ "description": "Range by ticker.",
"in": "query",
"name": "ticker.lt",
"schema": {
@@ -25488,7 +25771,7 @@
}
},
{
- "description": "Search by execution_date.",
+ "description": "Range by execution_date.",
"in": "query",
"name": "execution_date.gte",
"schema": {
@@ -25497,7 +25780,7 @@
}
},
{
- "description": "Search by execution_date.",
+ "description": "Range by execution_date.",
"in": "query",
"name": "execution_date.gt",
"schema": {
@@ -25506,7 +25789,7 @@
}
},
{
- "description": "Search by execution_date.",
+ "description": "Range by execution_date.",
"in": "query",
"name": "execution_date.lte",
"schema": {
@@ -25515,7 +25798,7 @@
}
},
{
- "description": "Search by execution_date.",
+ "description": "Range by execution_date.",
"in": "query",
"name": "execution_date.lt",
"schema": {
@@ -25568,16 +25851,18 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v3/splits/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "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"
@@ -25601,6 +25886,10 @@
"description": "The execution date of the stock split. On this date the stock split was applied.",
"type": "string"
},
+ "id": {
+ "description": "The unique identifier for this stock split.",
+ "type": "string"
+ },
"split_from": {
"description": "The second number in the split ratio.\n\nFor example: In a 2-for-1 split, split_from would be 1.",
"format": "float",
@@ -25618,7 +25907,10 @@
},
"required": [
"split_from",
- "split_to"
+ "split_to",
+ "id",
+ "ticker",
+ "execution_date"
],
"type": "object"
},
@@ -25646,11 +25938,11 @@
"tags": [
"reference:stocks"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Reference data",
"name": "reference"
},
- "x-polygon-paginate": {
+ "x-massive-paginate": {
"limit": {
"default": 10,
"max": 1000
@@ -25667,7 +25959,7 @@
},
"/v3/reference/tickers": {
"get": {
- "description": "Query all ticker symbols which are supported by Polygon.io. This API currently includes Stocks/Equities, Crypto, and Forex.",
+ "description": "Query all ticker symbols which are supported by Massive.com. This API currently includes Stocks/Equities, Indices, Forex, and Crypto.",
"operationId": "ListTickers",
"parameters": [
{
@@ -25677,12 +25969,12 @@
"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.",
+ "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": "type",
"schema": {
@@ -25780,7 +26072,7 @@
}
},
{
- "description": "Search by ticker.",
+ "description": "Range by ticker.",
"in": "query",
"name": "ticker.gte",
"schema": {
@@ -25788,7 +26080,7 @@
}
},
{
- "description": "Search by ticker.",
+ "description": "Range by ticker.",
"in": "query",
"name": "ticker.gt",
"schema": {
@@ -25796,7 +26088,7 @@
}
},
{
- "description": "Search by ticker.",
+ "description": "Range by ticker.",
"in": "query",
"name": "ticker.lte",
"schema": {
@@ -25804,7 +26096,7 @@
}
},
{
- "description": "Search by ticker.",
+ "description": "Range by ticker.",
"in": "query",
"name": "ticker.lt",
"schema": {
@@ -25870,7 +26162,7 @@
"application/json": {
"example": {
"count": 1,
- "next_url": "https://api.polygon.io/v3/reference/tickers?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "next_url": "https://api.massive.com/v3/reference/tickers?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "e70013d92930de90e089dc8fa098888e",
"results": [
{
@@ -25917,7 +26209,7 @@
"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)",
+ "description": "The composite OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/about/figi)",
"type": "string"
},
"currency_name": {
@@ -25962,7 +26254,7 @@
"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)",
+ "description": "The share Class OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/about/figi)",
"type": "string"
},
"ticker": {
@@ -25970,7 +26262,7 @@
"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).",
+ "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"
}
},
@@ -25981,9 +26273,9 @@
"locale"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "ReferenceTicker",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"type": "array"
@@ -26013,11 +26305,11 @@
"tags": [
"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": 100,
"max": 1000
@@ -26047,7 +26339,7 @@
},
"/v3/reference/tickers/types": {
"get": {
- "description": "List all ticker types that Polygon.io has.",
+ "description": "List all ticker types that Massive.com has.",
"operationId": "ListTickerTypes",
"parameters": [
{
@@ -26115,7 +26407,7 @@
"type": "string"
},
"code": {
- "description": "A code used by Polygon.io to refer to this ticker type.",
+ "description": "A code used by Massive.com to refer to this ticker type.",
"example": "CS",
"type": "string"
},
@@ -26233,7 +26525,7 @@
"tags": [
"reference:tickers:types"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Reference data",
"name": "reference"
}
@@ -26241,7 +26533,7 @@
},
"/v3/reference/tickers/{ticker}": {
"get": {
- "description": "Get a single ticker supported by Polygon.io. This response will have detailed information about the ticker and the company behind it.",
+ "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": [
{
@@ -26279,8 +26571,8 @@
"state": "CA"
},
"branding": {
- "icon_url": "https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_icon.png",
- "logo_url": "https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_logo.svg"
+ "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",
@@ -26330,6 +26622,10 @@
"description": "The first line of the company's headquarters address.",
"type": "string"
},
+ "address2": {
+ "description": "The second line of the company's headquarters address, if applicable.",
+ "type": "string"
+ },
"city": {
"description": "The city of the company's headquarters address.",
"type": "string"
@@ -26363,7 +26659,7 @@
"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)",
+ "description": "The composite OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/about/figi)",
"type": "string"
},
"currency_name": {
@@ -26429,7 +26725,7 @@
"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)",
+ "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": {
@@ -26462,7 +26758,7 @@
"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).",
+ "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": {
@@ -26480,9 +26776,9 @@
"currency_name"
],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "ReferenceTicker",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
"status": {
@@ -26494,7 +26790,7 @@
}
},
"text/csv": {
- "example": "ticker,name,market,locale,primary_exchange,type,active,currency_name,cik,composite_figi,share_class_figi,share_class_shares_outstanding,weighted_shares_outstanding,round_lot,market_cap,phone_number,address1,city,state,postal_code,sic_code,sic_description,ticker_root,total_employees,list_date,homepage_url,description,branding/logo_url,branding/icon_url\nAAPL,Apple Inc.,stocks,us,XNAS,CS,true,usd,0000320193,BBG000B9XRY4,BBG001S5N8V8,16406400000,16334371000,100,2771126040150,(408) 996-1010,One Apple Park Way,Cupertino,CA,95014,3571,ELECTRONIC COMPUTERS,AAPL,154000,1980-12-12,https://www.apple.com,\"Apple designs a wide variety of consumer electronic devices, including smartphones (iPhone), tablets (iPad), PCs (Mac), smartwatches (Apple Watch), AirPods, and TV boxes (Apple TV), among others. The iPhone makes up the majority of Apple's total revenue. In addition, Apple offers its customers a variety of services such as Apple Music, iCloud, Apple Care, Apple TV+, Apple Arcade, Apple Card, and Apple Pay, among others. Apple's products run internally developed software and semiconductors, and the firm is well known for its integration of hardware, software and services. Apple's products are distributed online as well as through company-owned stores and third-party retailers. The company generates roughly 40% of its revenue from the Americas, with the remainder earned internationally.\",https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_logo.svg,https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_icon.png\n",
+ "example": "ticker,name,market,locale,primary_exchange,type,active,currency_name,cik,composite_figi,share_class_figi,share_class_shares_outstanding,weighted_shares_outstanding,round_lot,market_cap,phone_number,address1,address2,city,state,postal_code,sic_code,sic_description,ticker_root,total_employees,list_date,homepage_url,description,branding/logo_url,branding/icon_url\nAAPL,Apple Inc.,stocks,us,XNAS,CS,true,usd,0000320193,BBG000B9XRY4,BBG001S5N8V8,16406400000,16334371000,100,2771126040150,(408) 996-1010,One Apple Park Way,,Cupertino,CA,95014,3571,ELECTRONIC COMPUTERS,AAPL,154000,1980-12-12,https://www.apple.com,\"Apple designs a wide variety of consumer electronic devices, including smartphones (iPhone), tablets (iPad), PCs (Mac), smartwatches (Apple Watch), AirPods, and TV boxes (Apple TV), among others. The iPhone makes up the majority of Apple's total revenue. In addition, Apple offers its customers a variety of services such as Apple Music, iCloud, Apple Care, Apple TV+, Apple Arcade, Apple Card, and Apple Pay, among others. Apple's products run internally developed software and semiconductors, and the firm is well known for its integration of hardware, software and services. Apple's products are distributed online as well as through company-owned stores and third-party retailers. The company generates roughly 40% of its revenue from the Americas, with the remainder earned internationally.\",https://api.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"
}
@@ -26510,307 +26806,85 @@
"tags": [
"reference:tickers:get"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Reference data",
"name": "reference"
}
}
},
- "/v3/snapshot/indices": {
+ "/v3/snapshot": {
"get": {
- "description": "Get a Snapshot of indices data for said tickers",
- "operationId": "IndicesSnapshot",
+ "description": "Get snapshots for assets of all types",
+ "operationId": "Snapshots",
"parameters": [
{
- "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:SPX",
"in": "query",
- "name": "ticker.any_of",
+ "name": "ticker",
"schema": {
"type": "string"
+ },
+ "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"
}
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "request_id": "6a7e466379af0a71039d60cc78e72282",
- "results": [
- {
- "market_status": "closed",
- "name": "S&P 500",
- "session": {
- "change": -50.01,
- "change_percent": -1.45,
- "close": 3822.39,
- "high": 3834.41,
- "low": 38217.11,
- "open": 3827.38,
- "previous_close": 3812.19
- },
- "ticker": "I:SPX",
- "timeframe": "REAL-TIME",
- "type": "indices",
- "value": 3822.39
- },
- {
- "error": "NOT_FOUND",
- "message": "Ticker not found.",
- "ticker": "APx"
- },
- {
- "error": "NOT_ENTITLED",
- "message": "Not entitled to this ticker.",
- "ticker": "APy"
- }
- ],
- "status": "OK"
- },
- "schema": {
- "properties": {
- "request_id": {
- "type": "string"
- },
- "results": {
- "items": {
- "properties": {
- "error": {
- "description": "The error while looking for this ticker.",
- "type": "string"
- },
- "market_status": {
- "description": "The market status for the market that trades this ticker.",
- "type": "string"
- },
- "message": {
- "description": "The error message while looking for this ticker.",
- "type": "string"
- },
- "name": {
- "description": "Name of Index.",
- "type": "string"
- },
- "session": {
- "properties": {
- "change": {
- "description": "The value of the change for the index from the previous trading day.",
- "format": "double",
- "type": "number"
- },
- "change_percent": {
- "description": "The percent of the change for the index from the previous trading day.",
- "format": "double",
- "type": "number"
- },
- "close": {
- "description": "The closing value for the index of the day.",
- "format": "double",
- "type": "number"
- },
- "high": {
- "description": "The highest value for the index of the day.",
- "format": "double",
- "type": "number"
- },
- "low": {
- "description": "The lowest value for the index of the day.",
- "format": "double",
- "type": "number"
- },
- "open": {
- "description": "The open value for the index of the day.",
- "format": "double",
- "type": "number"
- },
- "previous_close": {
- "description": "The closing value for the index of previous trading day.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "IndicesSession"
- }
- },
- "ticker": {
- "description": "Ticker of asset queried.",
- "type": "string"
- },
- "type": {
- "description": "The indices market.",
- "enum": [
- "indices"
- ],
- "type": "string"
- },
- "value": {
- "description": "Value of Index.",
- "type": "number"
- }
- },
- "required": [
- "ticker"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "IndicesResult"
- }
- },
- "type": "array"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "required": [
- "status",
- "request_id"
- ],
- "type": "object"
- }
- }
- },
- "description": "Snapshots for indices data of the underlying ticker"
- }
- },
- "summary": "Indices Snapshot",
- "tags": [
- "indices:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Indices data",
- "name": "indices"
- }
- }
- },
- "/v3/snapshot/options/{underlyingAsset}": {
- "get": {
- "description": "Get the snapshot of all options contracts for an underlying ticker.",
- "operationId": "OptionsChain",
- "parameters": [
- {
- "description": "The underlying ticker symbol of the option contract.",
- "example": "AAPL",
- "in": "path",
- "name": "underlyingAsset",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Query by strike price of a contract.",
- "in": "query",
- "name": "strike_price",
- "schema": {
- "type": "number"
- },
- "x-polygon-filter-field": {
- "range": true,
- "type": "number"
- }
- },
- {
- "description": "Query by contract expiration with date format YYYY-MM-DD.",
- "in": "query",
- "name": "expiration_date",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
},
{
- "description": "Query by the type of contract.",
+ "description": "Query by the type of asset.",
"in": "query",
- "name": "contract_type",
+ "name": "type",
"schema": {
"enum": [
- "call",
- "put"
+ "stocks",
+ "options",
+ "crypto",
+ "fx",
+ "indices"
],
"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.",
+ "description": "Range by ticker.",
"in": "query",
- "name": "strike_price.lt",
+ "name": "ticker.gte",
"schema": {
- "type": "number"
+ "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"
}
@@ -26847,9 +26921,7 @@
"schema": {
"default": "ticker",
"enum": [
- "ticker",
- "expiration_date",
- "strike_price"
+ "ticker"
],
"example": "ticker",
"type": "string"
@@ -26861,44 +26933,36 @@
"content": {
"application/json": {
"example": {
- "request_id": "6a7e466379af0a71039d60cc78e72282",
+ "request_id": "abc123",
"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
- },
+ "break_even_price": 171.075,
"details": {
"contract_type": "call",
"exercise_style": "american",
- "expiration_date": "2022-01-21",
+ "expiration_date": "2022-10-14",
"shares_per_contract": 100,
- "strike_price": 150,
- "ticker": "O:AAPL211022C000150000"
+ "strike_price": 5,
+ "underlying_ticker": "NCLH"
},
+ "fmv": 0.05,
"greeks": {
- "delta": 1,
- "gamma": 0,
- "theta": 0.00229,
- "vega": 0
+ "delta": 0.5520187372272933,
+ "gamma": 0.00706756515659829,
+ "theta": -0.018532772783847958,
+ "vega": 0.7274811132998142
},
- "implied_volatility": 5,
+ "implied_volatility": 0.3048997097864957,
"last_quote": {
- "ask": 120.3,
- "ask_size": 4,
- "bid": 120.28,
- "bid_size": 8,
- "last_updated": 1605195918507251700,
- "midpoint": 120.29
+ "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": [
@@ -26910,21 +26974,86 @@
"size": 2,
"timeframe": "REAL-TIME"
},
- "open_interest": 1543,
- "underlying_asset": {
- "change_to_break_even": 4.2,
- "last_updated": 1605195918507251700,
- "price": 147,
- "ticker": "AAPL",
- "timeframe": "DELAYED"
- }
- }
- ],
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
+ "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_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"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
"description": "If present, this value can be used to fetch the next page of data.",
"type": "string"
},
@@ -26935,87 +27064,12 @@
"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)",
+ "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-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "low": {
- "description": "The lowest price for the contract of the day.",
- "format": "double",
- "type": "number"
- },
- "open": {
- "description": "The open price for the contract of the day.",
- "format": "double",
- "type": "number"
- },
- "previous_close": {
- "description": "The closing price for the contract of previous trading day.",
- "format": "double",
- "type": "number"
- },
- "volume": {
- "description": "The trading volume for the contract of the day.",
- "format": "double",
- "type": "number"
- },
- "vwap": {
- "description": "The trading volume weighted average price for the contract of the day.",
- "format": "double",
- "type": "number",
- "x-polygon-go-id": "VWAP"
- }
- },
- "required": [
- "last_updated",
- "open",
- "high",
- "low",
- "close",
- "previous_close",
- "volume",
- "vwap",
- "change_percent",
- "change"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Day"
- }
- },
"details": {
+ "description": "The details for this contract.",
"properties": {
"contract_type": {
"description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".",
@@ -27039,9 +27093,9 @@
"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"
+ "x-massive-go-type": {
+ "name": "IDaysMassiveDateString",
+ "path": "github.com/massive-com/ptime"
}
},
"shares_per_contract": {
@@ -27052,27 +27106,27 @@
"description": "The strike price of the option contract.",
"format": "double",
"type": "number"
- },
- "ticker": {
- "description": "The ticker for the option contract.",
- "type": "string"
}
},
"required": [
- "ticker",
"contract_type",
"exercise_style",
"expiration_date",
"shares_per_contract",
"strike_price"
],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Details"
- }
+ "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. This is only returned if your current plan includes 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.",
@@ -27095,8 +27149,14 @@
"type": "number"
}
},
+ "required": [
+ "delta",
+ "gamma",
+ "theta",
+ "vega"
+ ],
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "Greeks"
}
},
@@ -27113,8 +27173,12 @@
"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.",
+ "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"
},
@@ -27123,8 +27187,12 @@
"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.",
+ "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"
},
@@ -27132,9 +27200,9 @@
"description": "The nanosecond timestamp of when this information was updated.",
"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"
}
},
"midpoint": {
@@ -27152,35 +27220,54 @@
}
},
"required": [
- "last_updated",
- "timeframe",
"ask",
- "ask_size",
- "bid_size",
"bid",
- "midpoint"
+ "last_updated",
+ "timeframe"
],
"type": "object",
- "x-polygon-go-type": {
- "name": "LastQuote"
+ "x-massive-go-type": {
+ "name": "SnapshotLastQuote"
}
},
"last_trade": {
- "description": "The most recent trade for this contract. This is only returned if your current plan includes trades.",
+ "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://polygon.io/docs/options/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"
},
"exchange": {
- "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.",
"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",
@@ -27206,88 +27293,200 @@
}
},
"required": [
- "timeframe",
- "exchange",
"price",
- "sip_timestamp",
"size"
],
"type": "object",
- "x-polygon-go-type": {
- "name": "OptionsLastTrade"
+ "x-massive-go-type": {
+ "name": "SnapshotLastTrade"
}
},
+ "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"
+ },
+ "message": {
+ "description": "The error message while looking for this ticker.",
+ "type": "string"
+ },
+ "name": {
+ "description": "The name of this contract.",
+ "type": "string"
+ },
"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.",
+ "session": {
"properties": {
- "change_to_break_even": {
- "description": "The change in price for the contract to break even.",
+ "change": {
+ "description": "The value of the price change for the asset from the previous trading 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"
- }
+ "change_percent": {
+ "description": "The percent of the price change for the asset from the previous trading day.",
+ "format": "double",
+ "type": "number"
},
- "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.",
+ "close": {
+ "description": "The closing price of the asset for the day.",
"format": "double",
"type": "number"
},
- "ticker": {
- "description": "The ticker symbol for the contract's underlying asset.",
- "type": "string"
+ "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"
},
- "timeframe": {
- "description": "The time relevance of the data.",
- "enum": [
- "DELAYED",
- "REAL-TIME"
- ],
- "type": "string"
+ "early_trading_change_percent": {
+ "description": "Today's early trading change as a percentage.",
+ "format": "double",
+ "type": "number"
},
- "value": {
- "description": "The value of the underlying index.",
+ "high": {
+ "description": "The highest price of the asset for the day.",
"format": "double",
"type": "number"
- }
- },
- "required": [
- "last_updated",
- "timeframe",
- "ticker",
- "change_to_break_even"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "UnderlyingAsset"
- }
- }
- },
- "required": [
- "day",
- "last_quote",
- "underlying_asset",
- "details",
- "break_even_price",
- "implied_volatility",
- "open_interest"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "OptionSnapshotResult"
- }
- },
+ },
+ "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": {
+ "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 ticker symbol for the contract's underlying asset.",
+ "type": "string"
+ },
+ "timeframe": {
+ "description": "The time relevance of the data.",
+ "enum": [
+ "DELAYED",
+ "REAL-TIME"
+ ],
+ "type": "string"
+ },
+ "value": {
+ "description": "The value of the underlying index.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "ticker",
+ "change_to_break_even"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "UnderlyingAsset"
+ }
+ },
+ "value": {
+ "description": "Value of Index.",
+ "type": "number"
+ }
+ },
+ "required": [
+ "ticker"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "SnapshotResponseModel"
+ }
+ },
"type": "array"
},
"status": {
@@ -27303,14 +27502,11 @@
}
}
},
- "description": "Snapshots for options contracts of the underlying ticker"
+ "description": "Snapshots for the ticker list"
}
},
- "summary": "Options Chain",
- "tags": [
- "options:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
+ "summary": "Universal Snapshot",
+ "x-massive-entitlement-allowed-timeframes": [
{
"description": "Real Time Data",
"name": "realtime"
@@ -27320,52 +27516,122 @@
"name": "delayed"
}
],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
+ "x-massive-entitlement-data-type": {
+ "description": "Snapshot data",
+ "name": "snapshots"
},
- "x-polygon-entitlement-market-type": {
- "description": "Options data",
- "name": "options"
+ "x-massive-entitlement-market-type": {
+ "description": "All asset classes",
+ "name": "universal"
},
- "x-polygon-paginate": {
+ "x-massive-paginate": {
"limit": {
"default": 10,
- "max": 250
+ "max": 250,
+ "min": 1
},
"sort": {
"default": "ticker",
"enum": [
- "ticker",
- "expiration_date",
- "strike_price"
+ "ticker"
]
}
}
}
},
- "/v3/snapshot/options/{underlyingAsset}/{optionContract}": {
+ "/v3/snapshot/indices": {
"get": {
- "description": "Get the snapshot of an option contract for a stock equity.",
- "operationId": "OptionContract",
+ "description": "Get a Snapshot of indices data for said tickers",
+ "operationId": "IndicesSnapshot",
"parameters": [
{
- "description": "The underlying ticker symbol of the option contract.",
- "example": "AAPL",
- "in": "path",
- "name": "underlyingAsset",
- "required": true,
+ "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.any_of",
"schema": {
"type": "string"
}
},
{
- "description": "The option contract identifier.",
- "example": "O:AAPL230616C00150000",
- "in": "path",
- "name": "optionContract",
- "required": true,
+ "description": "Search a range of tickers lexicographically.",
+ "in": "query",
+ "name": "ticker",
+ "schema": {
+ "type": "string"
+ },
+ "x-massive-filter-field": {
+ "range": true,
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by ticker.",
+ "in": "query",
+ "name": "ticker.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by ticker.",
+ "in": "query",
+ "name": "ticker.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by ticker.",
+ "in": "query",
+ "name": "ticker.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by ticker.",
+ "in": "query",
+ "name": "ticker.lt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 250.",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "example": 10,
+ "maximum": 250,
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
"schema": {
+ "default": "ticker",
+ "enum": [
+ "ticker"
+ ],
+ "example": "ticker",
"type": "string"
}
}
@@ -27375,64 +27641,37 @@
"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"
+ "request_id": "6a7e466379af0a71039d60cc78e72282",
+ "results": [
+ {
+ "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
},
- "last_trade": {
- "conditions": [
- 209
- ],
- "exchange": 316,
- "price": 0.05,
- "sip_timestamp": 1675280958783136800,
- "size": 2,
- "timeframe": "REAL-TIME"
+ {
+ "error": "NOT_FOUND",
+ "message": "Ticker not found.",
+ "ticker": "APx"
},
- "open_interest": 8921,
- "underlying_asset": {
- "change_to_break_even": 23.123999999999995,
- "last_updated": 1636573459862384600,
- "price": 147.951,
- "ticker": "AAPL",
- "timeframe": "REAL-TIME"
+ {
+ "error": "NOT_ENTITLED",
+ "message": "Not entitled to this ticker.",
+ "ticker": "APy"
}
- },
+ ],
"status": "OK"
},
"schema": {
@@ -27445,360 +27684,109 @@
"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"
+ "items": {
+ "properties": {
+ "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"
}
},
- "required": [
- "last_updated",
- "open",
- "high",
- "low",
- "close",
- "previous_close",
- "volume",
- "vwap",
- "change_percent",
- "change"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Day"
- }
- },
- "details": {
- "properties": {
- "contract_type": {
- "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".",
- "enum": [
- "put",
- "call",
- "other"
- ],
- "type": "string"
- },
- "exercise_style": {
- "description": "The exercise style of this contract. See this link for more details on exercise styles.",
- "enum": [
- "american",
- "european",
- "bermudan"
- ],
- "type": "string"
- },
- "expiration_date": {
- "description": "The contract's expiration date in YYYY-MM-DD format.",
- "format": "date",
- "type": "string",
- "x-polygon-go-type": {
- "name": "IDaysPolygonDateString",
- "path": "github.com/polygon-io/ptime"
+ "market_status": {
+ "description": "The market status for the market that trades this ticker.",
+ "type": "string"
+ },
+ "message": {
+ "description": "The error message while looking for this ticker.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of Index.",
+ "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"
}
},
- "shares_per_contract": {
- "description": "The number of shares per contract for this contract.",
- "type": "number"
- },
- "strike_price": {
- "description": "The strike price of the option contract.",
- "format": "double",
- "type": "number"
- },
- "ticker": {
- "description": "The ticker for the option contract.",
- "type": "string"
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "IndicesSession"
}
},
- "required": [
- "ticker",
- "contract_type",
- "exercise_style",
- "expiration_date",
- "shares_per_contract",
- "strike_price"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "Details"
+ "ticker": {
+ "description": "Ticker of asset queried.",
+ "type": "string"
+ },
+ "timeframe": {
+ "description": "The time relevance of the data.",
+ "enum": [
+ "DELAYED",
+ "REAL-TIME"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "description": "The indices market.",
+ "enum": [
+ "indices"
+ ],
+ "type": "string"
+ },
+ "value": {
+ "description": "Value of Index.",
+ "type": "number"
}
},
- "greeks": {
- "description": "The greeks for this contract. This is only returned if your current plan includes greeks.",
- "properties": {
- "delta": {
- "description": "The change in the option's price per $0.01 increment in the price of the underlying asset.",
- "format": "double",
- "type": "number"
- },
- "gamma": {
- "description": "The change in delta per $0.01 change in the price of the underlying asset.",
- "format": "double",
- "type": "number"
- },
- "theta": {
- "description": "The change in the option's price per day.",
- "format": "double",
- "type": "number"
- },
- "vega": {
- "description": "The change in the option's price per 1% increment in volatility.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "Greeks"
- }
- },
- "implied_volatility": {
- "description": "The market's forecast for the volatility of the underlying asset, based on this option's current price.",
- "format": "double",
- "type": "number"
- },
- "last_quote": {
- "description": "The most recent quote for this contract. This is only returned if your current plan includes quotes.",
- "properties": {
- "ask": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "ask_size": {
- "description": "The ask size.",
- "format": "double",
- "type": "number"
- },
- "bid": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "bid_size": {
- "description": "The bid size.",
- "format": "double",
- "type": "number"
- },
- "last_updated": {
- "description": "The nanosecond timestamp of when this information was updated.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "midpoint": {
- "description": "The average of the bid and ask price.",
- "format": "double",
- "type": "number"
- },
- "timeframe": {
- "description": "The time relevance of the data.",
- "enum": [
- "DELAYED",
- "REAL-TIME"
- ],
- "type": "string"
- }
- },
- "required": [
- "last_updated",
- "timeframe",
- "ask",
- "ask_size",
- "bid_size",
- "bid",
- "midpoint"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "LastQuote"
- }
- },
- "last_trade": {
- "description": "The most recent trade for this contract. This is only returned if your current plan includes trades.",
- "properties": {
- "conditions": {
- "description": "A list of condition codes.",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/options/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
- "format": "int32",
- "type": "integer"
- },
- "type": "array"
- },
- "exchange": {
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- "price": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
- "format": "double",
- "type": "number"
- },
- "sip_timestamp": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this trade from the exchange which produced it.",
- "format": "int64",
- "type": "integer"
- },
- "size": {
- "description": "The size of a trade (also known as volume).",
- "format": "int32",
- "type": "integer"
- },
- "timeframe": {
- "description": "The time relevance of the data.",
- "enum": [
- "DELAYED",
- "REAL-TIME"
- ],
- "type": "string"
- }
- },
- "required": [
- "timeframe",
- "exchange",
- "price",
- "sip_timestamp",
- "size"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "OptionsLastTrade"
- }
- },
- "open_interest": {
- "description": "The quantity of this contract held at the end of the last trading day.",
- "format": "double",
- "type": "number"
- },
- "underlying_asset": {
- "description": "Information on the underlying stock for this options contract. The market data returned depends on your current stocks plan.",
- "properties": {
- "change_to_break_even": {
- "description": "The change in price for the contract to break even.",
- "format": "double",
- "type": "number"
- },
- "last_updated": {
- "description": "The nanosecond timestamp of when this information was updated.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "price": {
- "description": "The price of the trade. This is the actual dollar value per whole share of this trade. A trade of 100 shares with a price of $2.00 would be worth a total dollar value of $200.00.",
- "format": "double",
- "type": "number"
- },
- "ticker": {
- "description": "The ticker symbol for the contract's underlying asset.",
- "type": "string"
- },
- "timeframe": {
- "description": "The time relevance of the data.",
- "enum": [
- "DELAYED",
- "REAL-TIME"
- ],
- "type": "string"
- },
- "value": {
- "description": "The value of the underlying index.",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "last_updated",
- "timeframe",
- "ticker",
- "change_to_break_even"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "UnderlyingAsset"
- }
+ "required": [
+ "ticker"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "IndicesResult"
}
},
- "required": [
- "day",
- "last_quote",
- "underlying_asset",
- "details",
- "break_even_price",
- "implied_volatility",
- "open_interest"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "OptionSnapshotResult"
- }
+ "type": "array"
},
"status": {
"description": "The status of this request's response.",
@@ -27811,22 +27799,16 @@
],
"type": "object"
}
- },
- "text/csv": {
- "schema": {
- "example": "break_even_price,day_close,day_high,day_last_updated,day_low,day_open,day_previous_close,day_volume,day_vwap,day_change,day_change_percent,details_contract_type,details_exercise_style,details_expiration_date,details_shares_per_contract,details_strike_price,details_ticker,greeks_delta,greeks_gamma,greeks_theta,greeks_vega,implied_volatility,last_quote_ask,last_quote_ask_size,last_quote_bid,last_quote_bid_size,last_quote_last_updated,last_quote_midpoint,last_quote_timeframe,open_interest,underlying_asset_change_to_break_even,underlying_asset_last_updated,underlying_asset_price,underlying_asset_ticker,underlying_asset_timeframe\n0,171.075,21.4,22.49,1636520400000000000,21.35,22.49,22.45,37,21.6741,-1.05,-4.67,call,american,2023-06-16,100,150,O:AAPL230616C00150000,0.5520187372272933,0.00706756515659829,-0.018532772783847958,0.7274811132998142,0.3048997097864957,21.25,110,20.9,172,1636573458756383500,21.075,REAL-TIME,8921,23.123999999999995,1636573459862384600,147.951,AAPL,REAL-TIME\n",
- "type": "string"
- }
}
},
- "description": "Snapshot of the option contract."
+ "description": "Snapshots for indices data of the underlying ticker"
}
},
- "summary": "Option Contract",
+ "summary": "Indices Snapshot",
"tags": [
- "options:snapshot"
+ "indices:snapshot"
],
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"description": "Real Time Data",
"name": "realtime"
@@ -27836,307 +27818,138 @@
"name": "delayed"
}
],
- "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": "Indices data",
+ "name": "indices"
+ },
+ "x-massive-paginate": {
+ "limit": {
+ "default": 10,
+ "max": 250
+ },
+ "sort": {
+ "default": "ticker",
+ "enum": [
+ "ticker"
+ ]
+ }
}
}
},
- "/v3/trades/{cryptoTicker}": {
+ "/v3/snapshot/options/{underlyingAsset}": {
"get": {
- "description": "Get trades for a crypto ticker symbol in a given time range.",
- "operationId": "TradesCrypto",
+ "description": "Get the snapshot of all options contracts for an underlying ticker.",
+ "operationId": "OptionsChain",
"parameters": [
{
- "description": "The ticker symbol to get trades for.",
- "example": "X:BTC-USD",
+ "description": "The underlying ticker symbol of the option contract.",
+ "example": "EVRI",
"in": "path",
- "name": "cryptoTicker",
+ "name": "underlyingAsset",
"required": true,
"schema": {
"type": "string"
}
},
{
- "description": "Query by trade timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
+ "description": "Query by strike price of a contract.",
"in": "query",
- "name": "timestamp",
+ "name": "strike_price",
"schema": {
- "type": "string"
+ "type": "number"
},
- "x-polygon-filter-field": {
- "range": true
+ "x-massive-filter-field": {
+ "range": true,
+ "type": "number"
}
},
{
- "description": "Search by timestamp.",
+ "description": "Query by contract expiration with date format YYYY-MM-DD.",
"in": "query",
- "name": "timestamp.gte",
+ "name": "expiration_date",
"schema": {
"type": "string"
+ },
+ "x-massive-filter-field": {
+ "range": true
}
},
{
- "description": "Search by timestamp.",
+ "description": "Query by the type of contract.",
"in": "query",
- "name": "timestamp.gt",
+ "name": "contract_type",
"schema": {
+ "enum": [
+ "call",
+ "put"
+ ],
"type": "string"
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by strike_price.",
"in": "query",
- "name": "timestamp.lte",
+ "name": "strike_price.gte",
"schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by timestamp.",
- "in": "query",
- "name": "timestamp.lt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Order results based on the `sort` field.",
- "in": "query",
- "name": "order",
- "schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
- "type": "string"
+ "type": "number"
}
},
{
- "description": "Limit the number of results returned, default is 10 and max is 50000.",
+ "description": "Range by strike_price.",
"in": "query",
- "name": "limit",
+ "name": "strike_price.gt",
"schema": {
- "default": 10,
- "example": 10,
- "maximum": 50000,
- "minimum": 1,
- "type": "integer"
+ "type": "number"
}
},
{
- "description": "Sort field used for ordering.",
+ "description": "Range by strike_price.",
"in": "query",
- "name": "sort",
+ "name": "strike_price.lte",
"schema": {
- "default": "timestamp",
- "enum": [
- "timestamp"
- ],
- "example": "timestamp",
- "type": "string"
+ "type": "number"
}
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v3/trades/X:BTC-USD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": [
- {
- "conditions": [
- 1
- ],
- "exchange": 1,
- "id": "191450340",
- "participant_timestamp": 1625097600103000000,
- "price": 35060,
- "size": 1.0434526
- },
- {
- "conditions": [
- 2
- ],
- "exchange": 1,
- "id": "191450341",
- "participant_timestamp": 1625097600368000000,
- "price": 35059.99,
- "size": 0.0058883
- }
- ],
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
- },
- "results": {
- "items": {
- "properties": {
- "conditions": {
- "description": "A list of condition codes.",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
- "format": "int32",
- "type": "integer"
- },
- "type": "array",
- "x-polygon-go-type": {
- "name": "Int32Array"
- }
- },
- "exchange": {
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- "id": {
- "description": "The Trade ID which uniquely identifies a trade on the exchange that the trade happened on.",
- "type": "string"
- },
- "participant_timestamp": {
- "description": "The nanosecond Exchange Unix Timestamp. This is the timestamp of when the trade was generated at the exchange.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "price": {
- "description": "The price of the trade in the base currency of the crypto pair.",
- "format": "double",
- "type": "number"
- },
- "size": {
- "description": "The size of a trade (also known as volume).",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
- },
- "type": "array"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "conditions,exchange,id,participant_timestamp,price,size\n1,1,191450340,1625097600103000000,35060,1.0434526\n2,1,191450341,1625097600368000000,35059.99,0.0058883\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "A list of trades."
- }
- },
- "summary": "Trades",
- "tags": [
- "crypto:trades"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Trade data",
- "name": "trades"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Crypto data",
- "name": "crypto"
- },
- "x-polygon-paginate": {
- "limit": {
- "max": 50000
- },
- "order": {
- "default": "desc"
- },
- "sort": {
- "default": "timestamp",
- "enum": [
- "timestamp"
- ]
- }
- },
- "x-polygon-replaces": {
- "date": 1654056060000,
- "replaces": {
- "name": "Historic Crypto Trades",
- "path": "get_v1_historic_crypto__from___to___date"
- }
- }
- },
- "x-polygon-ignore": true
- },
- "/v3/trades/{optionsTicker}": {
- "get": {
- "description": "Get trades for an options ticker symbol in a given time range.",
- "operationId": "TradesOptions",
- "parameters": [
- {
- "description": "The options ticker symbol to get trades for.",
- "example": "O:TSLA210903C00700000",
- "in": "path",
- "name": "optionsTicker",
- "required": true,
- "schema": {
- "type": "string"
- },
- "x-polygon-go-id": "Ticker"
},
{
- "description": "Query by trade timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
+ "description": "Range by strike_price.",
"in": "query",
- "name": "timestamp",
+ "name": "strike_price.lt",
"schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
+ "type": "number"
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by expiration_date.",
"in": "query",
- "name": "timestamp.gte",
+ "name": "expiration_date.gte",
"schema": {
"type": "string"
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by expiration_date.",
"in": "query",
- "name": "timestamp.gt",
+ "name": "expiration_date.gt",
"schema": {
"type": "string"
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by expiration_date.",
"in": "query",
- "name": "timestamp.lte",
+ "name": "expiration_date.lte",
"schema": {
"type": "string"
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by expiration_date.",
"in": "query",
- "name": "timestamp.lt",
+ "name": "expiration_date.lt",
"schema": {
"type": "string"
}
@@ -28146,7 +27959,6 @@
"in": "query",
"name": "order",
"schema": {
- "default": "desc",
"enum": [
"asc",
"desc"
@@ -28156,13 +27968,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 250.",
"in": "query",
"name": "limit",
"schema": {
"default": 10,
"example": 10,
- "maximum": 50000,
+ "maximum": 250,
"minimum": 1,
"type": "integer"
}
@@ -28172,11 +27984,13 @@
"in": "query",
"name": "sort",
"schema": {
- "default": "timestamp",
+ "default": "ticker",
"enum": [
- "timestamp"
+ "ticker",
+ "expiration_date",
+ "strike_price"
],
- "example": "timestamp",
+ "example": "ticker",
"type": "string"
}
}
@@ -28186,65 +28000,1696 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v3/trades/O:AZO140621P00530000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "request_id": "6a7e466379af0a71039d60cc78e72282",
"results": [
{
- "exchange": 46,
- "participant_timestamp": 1401715883806000000,
- "price": 6.91,
- "sip_timestamp": 1401715883806000000,
- "size": 1
- },
- {
- "conditions": [
- 209
- ],
- "exchange": 67,
- "participant_timestamp": 1401716547786000000,
- "price": 7.2,
- "sip_timestamp": 1401716547786000000,
- "size": 1
- }
- ],
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
- },
- "results": {
- "items": {
- "properties": {
- "conditions": {
- "description": "A list of condition codes.",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
- "format": "int32",
- "type": "integer"
- },
- "type": "array",
- "x-polygon-go-type": {
- "name": "Int32Array"
- }
- },
- "correction": {
- "description": "The trade correction indicator.",
- "type": "integer"
- },
- "exchange": {
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
+ "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": {
+ "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": {
+ "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": {
+ "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"
+ },
+ "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"
+ },
+ "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 ticker symbol for the contract's underlying asset.",
+ "type": "string"
+ },
+ "timeframe": {
+ "description": "The time relevance of the data.",
+ "enum": [
+ "DELAYED",
+ "REAL-TIME"
+ ],
+ "type": "string"
+ },
+ "value": {
+ "description": "The value of the underlying index.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "ticker",
+ "change_to_break_even"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "UnderlyingAsset"
+ }
+ }
+ },
+ "required": [
+ "day",
+ "last_quote",
+ "underlying_asset",
+ "details",
+ "break_even_price",
+ "open_interest"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "OptionSnapshotResult"
+ }
+ },
+ "type": "array"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ }
+ },
+ "description": "Snapshots for options contracts of the underlying ticker"
+ }
+ },
+ "summary": "Options Chain",
+ "tags": [
+ "options: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": "Options data",
+ "name": "options"
+ },
+ "x-massive-paginate": {
+ "limit": {
+ "default": 10,
+ "max": 250
+ },
+ "sort": {
+ "default": "ticker",
+ "enum": [
+ "ticker",
+ "expiration_date",
+ "strike_price"
+ ]
+ }
+ }
+ }
+ },
+ "/v3/snapshot/options/{underlyingAsset}/{optionContract}": {
+ "get": {
+ "description": "Get the snapshot of an option contract for a stock equity.",
+ "operationId": "OptionContract",
+ "parameters": [
+ {
+ "description": "The underlying ticker symbol of the option contract.",
+ "example": "EVRI",
+ "in": "path",
+ "name": "underlyingAsset",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The option contract identifier.",
+ "example": "O:EVRI240920P00012500",
+ "in": "path",
+ "name": "optionContract",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "request_id": "d9ff18dac69f55c218f69e4753706acd",
+ "results": {
+ "break_even_price": 171.075,
+ "day": {
+ "change": -1.05,
+ "change_percent": -4.67,
+ "close": 21.4,
+ "high": 22.49,
+ "last_updated": 1636520400000000000,
+ "low": 21.35,
+ "open": 22.49,
+ "previous_close": 22.45,
+ "volume": 37,
+ "vwap": 21.6741
+ },
+ "details": {
+ "contract_type": "call",
+ "exercise_style": "american",
+ "expiration_date": "2023-06-16",
+ "shares_per_contract": 100,
+ "strike_price": 150,
+ "ticker": "O:AAPL230616C00150000"
+ },
+ "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": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "break_even_price": {
+ "description": "The price 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": {
+ "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"
+ },
+ "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"
+ },
+ "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 ticker symbol for the contract's underlying asset.",
+ "type": "string"
+ },
+ "timeframe": {
+ "description": "The time relevance of the data.",
+ "enum": [
+ "DELAYED",
+ "REAL-TIME"
+ ],
+ "type": "string"
+ },
+ "value": {
+ "description": "The value of the underlying index.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "ticker",
+ "change_to_break_even"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "UnderlyingAsset"
+ }
+ }
+ },
+ "required": [
+ "day",
+ "last_quote",
+ "underlying_asset",
+ "details",
+ "break_even_price",
+ "open_interest"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "OptionSnapshotResult"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "schema": {
+ "example": "break_even_price,day_close,day_high,day_last_updated,day_low,day_open,day_previous_close,day_volume,day_vwap,day_change,day_change_percent,details_contract_type,details_exercise_style,details_expiration_date,details_shares_per_contract,details_strike_price,details_ticker,greeks_delta,greeks_gamma,greeks_theta,greeks_vega,implied_volatility,last_quote_ask,last_quote_ask_size,last_quote_bid,last_quote_bid_size,last_quote_last_updated,last_quote_midpoint,last_quote_timeframe,open_interest,underlying_asset_change_to_break_even,underlying_asset_last_updated,underlying_asset_price,underlying_asset_ticker,underlying_asset_timeframe\n0,171.075,21.4,22.49,1636520400000000000,21.35,22.49,22.45,37,21.6741,-1.05,-4.67,call,american,2023-06-16,100,150,O:AAPL230616C00150000,0.5520187372272933,0.00706756515659829,-0.018532772783847958,0.7274811132998142,0.3048997097864957,21.25,110,20.9,172,1636573458756383500,21.075,REAL-TIME,8921,23.123999999999995,1636573459862384600,147.951,AAPL,REAL-TIME\n",
+ "type": "string"
+ }
+ }
+ },
+ "description": "Snapshot of the option contract."
+ }
+ },
+ "summary": "Option Contract",
+ "tags": [
+ "options:snapshot"
+ ],
+ "x-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"
+ }
+ }
+ },
+ "/v3/trades/{cryptoTicker}": {
+ "get": {
+ "description": "Get trades for a crypto ticker symbol in a given time range.",
+ "operationId": "TradesCrypto",
+ "parameters": [
+ {
+ "description": "The ticker symbol to get trades for.",
+ "example": "X:BTC-USD",
+ "in": "path",
+ "name": "cryptoTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Query by trade timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
+ },
+ "x-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/trades/X:BTC-USD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": [
+ {
+ "conditions": [
+ 1
+ ],
+ "exchange": 1,
+ "id": "191450340",
+ "participant_timestamp": 1625097600103000000,
+ "price": 35060,
+ "size": 1.0434526
+ },
+ {
+ "conditions": [
+ 2
+ ],
+ "exchange": 1,
+ "id": "191450341",
+ "participant_timestamp": 1625097600368000000,
+ "price": 35059.99,
+ "size": 0.0058883
+ }
+ ],
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "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": "array",
+ "x-massive-go-type": {
+ "name": "Int32Array"
+ }
+ },
+ "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 on the exchange that the trade happened on.",
+ "type": "string"
+ },
+ "participant_timestamp": {
+ "description": "The nanosecond Exchange Unix Timestamp. This is the timestamp of when the trade was generated at the exchange.",
+ "format": "int64",
+ "type": "integer",
+ "x-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"
+ },
+ "size": {
+ "description": "The size of a trade (also known as volume).",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "exchange",
+ "price",
+ "size",
+ "id"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "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": "A list of trades."
+ }
+ },
+ "summary": "Trades",
+ "tags": [
+ "crypto:trades"
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Trade data",
+ "name": "trades"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
+ },
+ "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 Crypto Trades",
+ "path": "get_v1_historic_crypto__from___to___date"
+ }
+ }
+ },
+ "x-massive-ignore": true
+ },
+ "/v3/trades/{optionsTicker}": {
+ "get": {
+ "description": "Get trades for an options ticker symbol in a given time range.",
+ "operationId": "TradesOptions",
+ "parameters": [
+ {
+ "description": "The options ticker symbol to get trades for.",
+ "example": "O:TSLA210903C00700000",
+ "in": "path",
+ "name": "optionsTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-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": "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/trades/O:AZO140621P00530000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": [
+ {
+ "exchange": 46,
+ "participant_timestamp": 1401715883806000000,
+ "price": 6.91,
+ "sip_timestamp": 1401715883806000000,
+ "size": 1
+ },
+ {
+ "conditions": [
+ 209
+ ],
+ "exchange": 67,
+ "participant_timestamp": 1401716547786000000,
+ "price": 7.2,
+ "sip_timestamp": 1401716547786000000,
+ "size": 1
+ }
+ ],
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "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": "array",
+ "x-massive-go-type": {
+ "name": "Int32Array"
+ }
+ },
+ "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"
+ }
+ },
+ "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": "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": "A list of trades."
+ }
+ },
+ "summary": "Trades",
+ "tags": [
+ "options:trades"
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Trade data",
+ "name": "trades"
+ },
+ "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/{stockTicker}": {
+ "get": {
+ "description": "Get trades for a ticker symbol in a given time range.",
+ "operationId": "Trades",
+ "parameters": [
+ {
+ "description": "The ticker symbol to get trades for.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "stockTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-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": "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/trades/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": [
+ {
+ "conditions": [
+ 12,
+ 41
+ ],
+ "exchange": 11,
+ "id": "1",
+ "participant_timestamp": 1517562000015577000,
+ "price": 171.55,
+ "sequence_number": 1063,
+ "sip_timestamp": 1517562000016036600,
+ "size": 100,
+ "tape": 3
+ },
+ {
+ "conditions": [
+ 12,
+ 41
+ ],
+ "exchange": 11,
+ "id": "2",
+ "participant_timestamp": 1517562000015577600,
+ "price": 171.55,
+ "sequence_number": 1064,
+ "sip_timestamp": 1517562000016038100,
+ "size": 100,
+ "tape": 3
+ }
+ ],
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "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": "array",
+ "x-massive-go-type": {
+ "name": "Int32Array"
+ }
+ },
+ "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"
+ },
+ "id": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.",
+ "type": "string"
},
"participant_timestamp": {
"description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the trade was actually generated at the exchange.",
"format": "int64",
"type": "integer",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
},
"price": {
@@ -28252,22 +29697,57 @@
"format": "double",
"type": "number"
},
+ "sequence_number": {
+ "description": "The sequence number represents the sequence in which trade events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11). Values reset after each trading session/day.",
+ "format": "int64",
+ "type": "integer"
+ },
"sip_timestamp": {
"description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this trade from the exchange which produced it.",
"format": "int64",
"type": "integer",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
+ "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"
},
@@ -28276,11 +29756,14 @@
"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",
+ "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"
}
@@ -28291,18 +29774,20 @@
},
"summary": "Trades",
"tags": [
- "options:trades"
+ "stocks:trades"
],
- "x-polygon-entitlement-data-type": {
+ "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": "Stocks data",
+ "name": "stocks"
},
- "x-polygon-paginate": {
+ "x-massive-paginate": {
"limit": {
+ "default": 1000,
+ "example": 10,
"max": 50000
},
"order": {
@@ -28314,66 +29799,179 @@
"timestamp"
]
}
+ },
+ "x-massive-replaces": {
+ "date": 1654056060000,
+ "replaces": {
+ "name": "Trades",
+ "path": "get_v2_ticks_stocks_trades__ticker___date"
+ }
}
- },
- "x-polygon-ignore": true
+ }
},
- "/v3/trades/{stockTicker}": {
+ "/vX/reference/financials": {
"get": {
- "description": "Get trades for a ticker symbol in a given time range.",
- "operationId": "Trades",
+ "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 ticker symbol to get trades for.",
- "example": "AAPL",
- "in": "path",
- "name": "stockTicker",
- "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": "Search by timestamp.",
+ "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": "timestamp.gt",
+ "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.lte",
+ "name": "filing_date.gte",
"schema": {
+ "format": "date",
"type": "string"
}
},
{
- "description": "Search by timestamp.",
+ "description": "Search by filing_date.",
"in": "query",
- "name": "timestamp.lt",
+ "name": "filing_date.gt",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by filing_date.",
+ "in": "query",
+ "name": "filing_date.lte",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by filing_date.",
+ "in": "query",
+ "name": "filing_date.lt",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by period_of_report_date.",
+ "in": "query",
+ "name": "period_of_report_date.gte",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by period_of_report_date.",
+ "in": "query",
+ "name": "period_of_report_date.gt",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by period_of_report_date.",
+ "in": "query",
+ "name": "period_of_report_date.lte",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by period_of_report_date.",
+ "in": "query",
+ "name": "period_of_report_date.lt",
"schema": {
+ "format": "date",
"type": "string"
}
},
@@ -28382,7 +29980,6 @@
"in": "query",
"name": "order",
"schema": {
- "default": "desc",
"enum": [
"asc",
"desc"
@@ -28392,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"
}
@@ -28408,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"
}
}
@@ -28422,126 +30020,438 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v3/trades/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "count": 1,
+ "next_url": "https://api.massive.com/vX/reference/financials?",
+ "request_id": "55eb92ed43b25568ab0cce159830ea34",
"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
+ "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"
- },
- "type": "array",
- "x-polygon-go-type": {
- "name": "Int32Array"
- }
+ "acceptance_datetime": {
+ "description": "The datetime (EST timezone) the filing was accepted by EDGAR in YYYYMMDDHHMMSS format."
},
- "correction": {
- "description": "The trade correction indicator.",
- "type": "integer"
+ "cik": {
+ "description": "The CIK number for the company.",
+ "type": "string"
},
- "exchange": {
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
+ "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": "object"
},
- "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.",
+ "fiscal_period": {
+ "description": "Fiscal period of the report according to the company (Q1, Q2, Q3, Q4, or FY).",
"type": "string"
},
- "participant_timestamp": {
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the trade was actually generated at the exchange.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "price": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
- "format": "double",
- "type": "number"
- },
- "sequence_number": {
- "description": "The sequence number represents the sequence in which trade events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11). Values reset after each trading session/day.",
- "format": "int64",
- "type": "integer"
+ "fiscal_year": {
+ "description": "Fiscal year of the report according to the company.",
+ "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"
- }
+ "source_filing_file_url": {
+ "description": "The URL of the specific XBRL instance document within the SEC filing that these financials were derived from."
},
- "size": {
- "description": "The size of a trade (also known as volume).",
- "format": "double",
- "type": "number"
+ "source_filing_url": {
+ "description": "The URL of the SEC filing that these financials were derived from.",
+ "type": "string"
},
- "tape": {
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ",
- "format": "int32",
- "type": "integer"
+ "start_date": {
+ "description": "The start date of the period that these financials cover in YYYYMMDD format.",
+ "type": "string"
},
- "trf_id": {
- "description": "The ID for the Trade Reporting Facility where the trade took place.",
- "type": "integer"
+ "tickers": {
+ "description": "The list of ticker symbols for the company.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
},
- "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"
- }
+ "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"
},
@@ -28550,741 +30460,612 @@
"type": "string"
}
},
- "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."
- }
- },
- "summary": "Trades",
- "tags": [
- "stocks:trades"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Trade data",
- "name": "trades"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
- },
- "x-polygon-paginate": {
- "limit": {
- "max": 50000
- },
- "order": {
- "default": "desc"
- },
- "sort": {
- "default": "timestamp",
- "enum": [
- "timestamp"
- ]
- }
- },
- "x-polygon-replaces": {
- "date": 1654056060000,
- "replaces": {
- "name": "Trades",
- "path": "get_v2_ticks_stocks_trades__ticker___date"
- }
- }
- }
- },
- "/vX/reference/financials": {
- "get": {
- "description": "Get historical financial data for a stock ticker.\nThe financials data is extracted from XBRL from company SEC filings using the methodology outlined here.",
- "operationId": "ListFinancials",
- "parameters": [
- {
- "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-polygon-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-filter-field": {
- "range": true
- }
- },
- {
- "description": "The period of report for the filing with financials data in YYYY-MM-DD format.",
- "in": "query",
- "name": "period_of_report_date",
- "schema": {
- "format": "date",
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "Query by timeframe. Annual financials originate from 10-K filings, and quarterly financials originate from 10-Q filings. Note: Most companies do not file quarterly reports for Q4 and instead include those financials in their annual report, so some companies my not return quarterly financials for Q4",
- "in": "query",
- "name": "timeframe",
- "schema": {
- "enum": [
- "annual",
- "quarterly",
- "ttm"
- ],
- "type": "string"
- }
- },
- {
- "description": "Whether or not to include the `xpath` and `formula` attributes for each financial data point.\nSee the `xpath` and `formula` response attributes for more info. False by default.",
- "in": "query",
- "name": "include_sources",
- "schema": {
- "default": false,
- "type": "boolean"
- }
- },
- {
- "description": "Search by company_name.",
- "in": "query",
- "name": "company_name.search",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by filing_date.",
- "in": "query",
- "name": "filing_date.gte",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by filing_date.",
- "in": "query",
- "name": "filing_date.gt",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by filing_date.",
- "in": "query",
- "name": "filing_date.lte",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by filing_date.",
- "in": "query",
- "name": "filing_date.lt",
- "schema": {
- "format": "date",
- "type": "string"
- }
+ "required": [
+ "status",
+ "request_id",
+ "count",
+ "results"
+ ],
+ "type": "object"
+ }
+ }
+ },
+ "description": "FIXME"
+ }
+ },
+ "summary": "Stock Financials vX",
+ "tags": [
+ "reference:stocks"
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ },
+ "x-massive-experimental": {},
+ "x-massive-paginate": {
+ "limit": {
+ "default": 10,
+ "max": 100
},
+ "sort": {
+ "default": "period_of_report_date",
+ "enum": [
+ "filing_date",
+ "period_of_report_date"
+ ]
+ }
+ }
+ }
+ },
+ "/vX/reference/ipos": {
+ "get": {
+ "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": "Search by period_of_report_date.",
+ "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.",
"in": "query",
- "name": "period_of_report_date.gte",
+ "name": "ticker",
"schema": {
- "format": "date",
"type": "string"
}
},
{
- "description": "Search by period_of_report_date.",
+ "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": "period_of_report_date.gt",
+ "name": "us_code",
"schema": {
- "format": "date",
"type": "string"
}
},
{
- "description": "Search by period_of_report_date.",
+ "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": "period_of_report_date.lte",
+ "name": "isin",
"schema": {
- "format": "date",
"type": "string"
}
},
{
- "description": "Search by period_of_report_date.",
+ "description": "Specify a listing date. This is the first trading date for the newly listed entity.",
"in": "query",
- "name": "period_of_report_date.lt",
+ "name": "listing_date",
"schema": {
"format": "date",
"type": "string"
- }
- },
- {
- "description": "Order results based on the `sort` field.",
- "in": "query",
- "name": "order",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 100.",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "example": 10,
- "maximum": 100,
- "minimum": 1,
- "type": "integer"
- }
- },
- {
- "description": "Sort field used for ordering.",
- "in": "query",
- "name": "sort",
- "schema": {
- "default": "period_of_report_date",
- "enum": [
- "filing_date",
- "period_of_report_date"
- ],
- "example": "filing_date",
+ },
+ "x-massive-filter-field": {
+ "range": true,
"type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "count": 1,
- "next_url": "https://api.polygon.io/vX/reference/financials?",
- "request_id": "55eb92ed43b25568ab0cce159830ea34",
- "results": [
- {
- "cik": "0001650729",
- "company_name": "SiteOne Landscape Supply, Inc.",
- "end_date": "2022-04-03",
- "filing_date": "2022-05-04",
- "financials": {
- "balance_sheet": {
- "assets": {
- "label": "Assets",
- "order": 100,
- "unit": "USD",
- "value": 2407400000
- },
- "current_assets": {
- "label": "Current Assets",
- "order": 200,
- "unit": "USD",
- "value": 1385900000
- },
- "current_liabilities": {
- "label": "Current Liabilities",
- "order": 700,
- "unit": "USD",
- "value": 597500000
- },
- "equity": {
- "label": "Equity",
- "order": 1400,
- "unit": "USD",
- "value": 1099200000
- },
- "equity_attributable_to_noncontrolling_interest": {
- "label": "Equity Attributable To Noncontrolling Interest",
- "order": 1500,
- "unit": "USD",
- "value": 0
- },
- "equity_attributable_to_parent": {
- "label": "Equity Attributable To Parent",
- "order": 1600,
- "unit": "USD",
- "value": 1099200000
- },
- "liabilities": {
- "label": "Liabilities",
- "order": 600,
- "unit": "USD",
- "value": 1308200000
- },
- "liabilities_and_equity": {
- "label": "Liabilities And Equity",
- "order": 1900,
- "unit": "USD",
- "value": 2407400000
- },
- "noncurrent_assets": {
- "label": "Noncurrent Assets",
- "order": 300,
- "unit": "USD",
- "value": 1021500000
- },
- "noncurrent_liabilities": {
- "label": "Noncurrent Liabilities",
- "order": 800,
- "unit": "USD",
- "value": 710700000
- }
- },
- "cash_flow_statement": {
- "exchange_gains_losses": {
- "label": "Exchange Gains/Losses",
- "order": 1000,
- "unit": "USD",
- "value": 100000
- },
- "net_cash_flow": {
- "label": "Net Cash Flow",
- "order": 1100,
- "unit": "USD",
- "value": -8600000
- },
- "net_cash_flow_continuing": {
- "label": "Net Cash Flow, Continuing",
- "order": 1200,
- "unit": "USD",
- "value": -8700000
- },
- "net_cash_flow_from_financing_activities": {
- "label": "Net Cash Flow From Financing Activities",
- "order": 700,
- "unit": "USD",
- "value": 150600000
- },
- "net_cash_flow_from_financing_activities_continuing": {
- "label": "Net Cash Flow From Financing Activities, Continuing",
- "order": 800,
- "unit": "USD",
- "value": 150600000
- },
- "net_cash_flow_from_investing_activities": {
- "label": "Net Cash Flow From Investing Activities",
- "order": 400,
- "unit": "USD",
- "value": -41000000
- },
- "net_cash_flow_from_investing_activities_continuing": {
- "label": "Net Cash Flow From Investing Activities, Continuing",
- "order": 500,
- "unit": "USD",
- "value": -41000000
- },
- "net_cash_flow_from_operating_activities": {
- "label": "Net Cash Flow From Operating Activities",
- "order": 100,
- "unit": "USD",
- "value": -118300000
- },
- "net_cash_flow_from_operating_activities_continuing": {
- "label": "Net Cash Flow From Operating Activities, Continuing",
- "order": 200,
- "unit": "USD",
- "value": -118300000
- }
- },
- "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
+ }
+ },
+ {
+ "description": "Specify an IPO status.",
+ "in": "query",
+ "name": "ipo_status",
+ "schema": {
+ "enum": [
+ "direct_listing_process",
+ "history",
+ "new",
+ "pending",
+ "postponed",
+ "rumor",
+ "withdrawn"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by listing_date.",
+ "in": "query",
+ "name": "listing_date.gte",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by listing_date.",
+ "in": "query",
+ "name": "listing_date.gt",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by listing_date.",
+ "in": "query",
+ "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"
+ }
+ },
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 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": "listing_date",
+ "enum": [
+ "listing_date",
+ "ticker",
+ "last_updated",
+ "security_type",
+ "issuer_name",
+ "currency_code",
+ "isin",
+ "us_code",
+ "final_issue_price",
+ "min_shares_offered",
+ "max_shares_offered",
+ "lowest_offer_price",
+ "highest_offer_price",
+ "total_offer_size",
+ "shares_outstanding",
+ "primary_exchange",
+ "lot_size",
+ "security_description",
+ "ipo_status"
+ ],
+ "example": "listing_date",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.massive.com/vX/reference/ipos?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "6a7e466379af0a71039d60cc78e72282",
+ "results": [
+ {
+ "currency_code": "USD",
+ "final_issue_price": 17,
+ "highest_offer_price": 17,
+ "ipo_status": "history",
+ "isin": "US75383L1026",
+ "issue_end_date": "2024-06-06",
+ "issue_start_date": "2024-06-01",
+ "issuer_name": "Rapport Therapeutics Inc.",
+ "last_updated": "2024-06-27",
+ "listing_date": "2024-06-07",
+ "lot_size": 100,
+ "lowest_offer_price": 17,
+ "max_shares_offered": 8000000,
+ "min_shares_offered": 1000000,
+ "primary_exchange": "XNAS",
+ "security_description": "Ordinary Shares",
+ "security_type": "CS",
+ "shares_outstanding": 35376457,
+ "ticker": "RAPP",
+ "total_offer_size": 136000000,
+ "us_code": "75383L102"
+ }
+ ],
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "description": "An array of results containing the requested data.",
+ "items": {
+ "properties": {
+ "currency_code": {
+ "description": "Underlying currency of the security.",
+ "example": "USD",
+ "type": "string"
},
- "benefits_costs_expenses": {
- "label": "Benefits Costs and Expenses",
- "order": 200,
- "unit": "USD",
- "value": 768400000
+ "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"
},
- "cost_of_revenue": {
- "label": "Cost Of Revenue",
- "order": 300,
- "unit": "USD",
- "value": 536100000
+ "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"
},
- "costs_and_expenses": {
- "label": "Costs And Expenses",
- "order": 600,
- "unit": "USD",
- "value": 768400000
+ "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"
},
- "diluted_earnings_per_share": {
- "label": "Diluted Earnings Per Share",
- "order": 4300,
- "unit": "USD / shares",
- "value": 0.7
+ "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"
},
- "gross_profit": {
- "label": "Gross Profit",
- "order": 800,
- "unit": "USD",
- "value": 269200000
+ "issuer_name": {
+ "description": "Name of issuer.",
+ "example": "Apple Inc.",
+ "type": "string"
},
- "income_loss_from_continuing_operations_after_tax": {
- "label": "Income/Loss From Continuing Operations After Tax",
- "order": 1400,
- "unit": "USD",
- "value": 32300000
+ "last_updated": {
+ "description": "The date when the IPO event was last modified.",
+ "example": "2023-01-02",
+ "format": "date",
+ "type": "string"
},
- "income_loss_from_continuing_operations_before_tax": {
- "label": "Income/Loss From Continuing Operations Before Tax",
- "order": 1500,
- "unit": "USD",
- "value": 36900000
+ "listing_date": {
+ "description": "First trading date for the newly listed entity.",
+ "example": "2023-02-01",
+ "format": "date",
+ "type": "string"
},
- "income_tax_expense_benefit": {
- "label": "Income Tax Expense/Benefit",
- "order": 2200,
- "unit": "USD",
- "value": 4600000
+ "lot_size": {
+ "description": "The minimum number of shares that can be bought or sold in a single transaction.",
+ "example": 100,
+ "type": "number"
},
- "interest_expense_operating": {
- "label": "Interest Expense, Operating",
- "order": 2700,
- "unit": "USD",
- "value": 4300000
+ "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"
},
- "net_income_loss": {
- "label": "Net Income/Loss",
- "order": 3200,
- "unit": "USD",
- "value": 32300000
+ "max_shares_offered": {
+ "description": "The upper limit of the shares that the company is offering to investors.",
+ "example": 1000,
+ "type": "number"
},
- "net_income_loss_attributable_to_noncontrolling_interest": {
- "label": "Net Income/Loss Attributable To Noncontrolling Interest",
- "order": 3300,
- "unit": "USD",
- "value": 0
+ "min_shares_offered": {
+ "description": "The lower limit of shares that the company is willing to sell in the IPO.",
+ "example": 1000,
+ "type": "number"
},
- "net_income_loss_attributable_to_parent": {
- "label": "Net Income/Loss Attributable To Parent",
- "order": 3500,
- "unit": "USD",
- "value": 32300000
+ "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"
},
- "net_income_loss_available_to_common_stockholders_basic": {
- "label": "Net Income/Loss Available To Common Stockholders, Basic",
- "order": 3700,
- "unit": "USD",
- "value": 32300000
+ "security_description": {
+ "description": "Description of the security.",
+ "example": "Ordinary Shares - Class A",
+ "type": "string"
},
- "operating_expenses": {
- "label": "Operating Expenses",
- "order": 1000,
- "unit": "USD",
- "value": 228000000
+ "security_type": {
+ "description": "The classification of the stock. For example, \"CS\" stands for Common Stock.",
+ "example": "CS",
+ "type": "string"
},
- "operating_income_loss": {
- "label": "Operating Income/Loss",
- "order": 1100,
- "unit": "USD",
- "value": 41200000
+ "shares_outstanding": {
+ "description": "The total number of shares that the company has issued and are held by investors.",
+ "example": 1000000,
+ "type": "number"
},
- "participating_securities_distributed_and_undistributed_earnings_loss_basic": {
- "label": "Participating Securities, Distributed And Undistributed Earnings/Loss, Basic",
- "order": 3800,
- "unit": "USD",
- "value": 0
+ "ticker": {
+ "description": "The ticker symbol of the IPO event.",
+ "example": "AAPL",
+ "type": "string"
},
- "preferred_stock_dividends_and_other_adjustments": {
- "label": "Preferred Stock Dividends And Other Adjustments",
- "order": 3900,
- "unit": "USD",
- "value": 0
+ "total_offer_size": {
+ "description": "The total amount raised by the company for IPO.",
+ "example": 1000000,
+ "format": "float",
+ "type": "number"
},
- "revenues": {
- "label": "Revenues",
- "order": 100,
- "unit": "USD",
- "value": 805300000
+ "us_code": {
+ "description": "This is a unique nine-character alphanumeric code that identifies a North American financial security for the purposes of facilitating clearing and settlement of trades.",
+ "example": 37833100,
+ "type": "string"
}
+ },
+ "required": [
+ "name",
+ "last_updated",
+ "primary_exchange",
+ "security_type",
+ "security_description",
+ "ipo_status"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "IPOsResult"
}
},
- "fiscal_period": "Q1",
- "fiscal_year": "2022",
- "source_filing_file_url": "https://api.polygon.io/v1/reference/sec/filings/0001650729-22-000010/files/site-20220403_htm.xml",
- "source_filing_url": "https://api.polygon.io/v1/reference/sec/filings/0001650729-22-000010",
- "start_date": "2022-01-03"
+ "type": "array"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "A list of IPO events."
+ }
+ },
+ "summary": "IPOs",
+ "tags": [
+ "reference:stocks:ipos"
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ },
+ "x-massive-paginate": {
+ "limit": {
+ "default": 10,
+ "max": 1000
+ },
+ "order": {
+ "default": "desc"
+ },
+ "sort": {
+ "default": "listing_date",
+ "enum": [
+ "listing_date",
+ "ticker",
+ "last_updated",
+ "security_type",
+ "issuer_name",
+ "currency_code",
+ "isin",
+ "us_code",
+ "final_issue_price",
+ "min_shares_offered",
+ "max_shares_offered",
+ "lowest_offer_price",
+ "highest_offer_price",
+ "total_offer_size",
+ "shares_outstanding",
+ "primary_exchange",
+ "lot_size",
+ "security_description",
+ "ipo_status"
+ ]
+ }
+ }
+ }
+ },
+ "/vX/reference/tickers/taxonomies": {
+ "get": {
+ "description": "Many investors place a high value on sector data. It is used to measure economic activity, identify peers and competitors, build ETF products, quantify market share, and compare company performance. However, there are some limitations to industry standard sectors:\n* They have difficulty identifying the primary area of activity for large, complex businesses.\n* Studies confirm significant disagreement between classification schemes when attempting to categorize the same companies.\n* The systems' hierarchical nature is inflexible and struggles to convey business nuances.\n \n \nAs a result, we've developed a new taxonomy to supplement existing sector classifications. The taxonomy is created by reviewing related 10K filings to create a set of structured categories and tags.\n \n \nThe categories are based on company operating models and are industry agnostic. Our current version only supports one category, Revenue Streams, with future plans to support more.\n \n \nThe tags define a specific type within the category. Within the Revenue Streams category, for example, tags for \"product sales\" and \"advertising\" may be found. A company may have many tags in a given category. The complete Revenue Streams taxonomy is shown below.\n \n \nOur taxonomy is powered by AI and is currently in early beta testing. You should expect some inaccuracies in the responses.\n \n \n## **Revenue Streams**\n *Latest Revision (7/7/2023)*\n \n \n- **Physical Product Sales:**\n Revenue generated from the sale of tangible goods or physical products to customers, either in-store or online.\n - Consumer Goods\n - Industrial Goods\n - Electronics\n - Vehicles\n - Healthcare Products\n \n \n- **Digital Product Sales:**\n Revenue earned from the sale of digital goods or products, such as software licenses, e-books, music downloads, or digital media content. It also includes revenue obtained by selling aggregated, anonymized, or processed data to third parties for market research, analytics, or other purposes.\n - Software\n - E-books and Digital Media\n - Mobile Applications\n - Games\n - Online Courses\n - Market Research Data\n - Customer Behavior Data\n \n \n- **Professional Services:**\n Revenue obtained by providing specialized services, expertise, or consulting to clients in exchange for fees. This includes services offered by professionals such as lawyers, accountants, or consultants.\n - Consulting\n - Legal Services\n - Financial Services\n - Marketing Services\n - Construction Services\n - Education & Tutoring\n \n \n- **Consumer Services:**\n Revenue earned from providing services directly to consumers, including services like healthcare, personal grooming, fitness, or hospitality.\n - Dining & Hospitality\n - Personal Care\n - Entertainment & Recreation\n - Fitness & Wellness\n - Travel & Tourism\n - Transportation\n - Home Services\n - Child & Family Care\n - Automotive\n \n \n- **Subscription-based Revenue:**\n Revenue obtained from recurring fees charged to customers for accessing a product or service over a defined period. This includes revenue from subscription-based models, membership programs, or software-as-a-service (SaaS) offerings.\n - Software as a Service (SaaS)\n - Streaming Services\n - Physical Media\n - Memberships\n \n \n- **Licensing and Royalties:**\n Revenue generated from the licensing of intellectual property rights to third parties, including franchise rights, patent licensing, brand licensing, and the receipt of royalties for authorized use of intellectual property like music royalties, book royalties, or patent royalties.\n - Franchise Fees\n - Patent Licensing\n - Brand Licensing\n - Media Royalties\n \n \n- **Advertising:**\n Revenue generated by displaying ads or promotional content to customers, whether through traditional or digital advertising channels, including revenue from display ads, sponsored content, or affiliate marketing.\n - Print Advertising\n - Online Display Advertising\n - Social Media Advertising\n - Influencer Marketing\n \n \n- **Commission-Based Revenue:**\n Revenue earned by acting as an intermediary and receiving a percentage or commission on sales made on behalf of another party. This includes revenue from affiliate programs, referral fees, or any other commission-based revenue models.\n - Real Estate Commissions\n - Affiliate Marketing Commissions\n - Online Marketplace Commissions\n \n \n- **Rentals or Leasing:**\n Revenue earned by leasing or renting out assets, properties, or equipment to customers, including rental income from real estate properties, equipment leasing, or vehicle rentals.\n - Property Rentals\n - Equipment Leasing\n - Vehicle Rentals",
+ "operationId": "ListTickerTaxonomyClassifications",
+ "parameters": [
+ {
+ "in": "query",
+ "name": "ticker",
+ "schema": {
+ "type": "string"
+ },
+ "x-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": "Filter by taxonomy category. The current version of this API supports the following category: revenue_streams",
+ "in": "query",
+ "name": "category",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Filter by taxonomy tag. Each category has a set of associated tags.",
+ "in": "query",
+ "name": "tag",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Order results ascending or descending based on the ticker.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned. The default is 10 and the max is 250.",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "maximum": 250,
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Range by ticker.",
+ "in": "query",
+ "name": "ticker.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by ticker.",
+ "in": "query",
+ "name": "ticker.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by ticker.",
+ "in": "query",
+ "name": "ticker.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by ticker.",
+ "in": "query",
+ "name": "ticker.lt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Comma separated list of tickers, up to a maximum of 250.\n\nWarning: The maximum number of characters allowed in a URL are subject to your own technology stack.\n",
+ "example": "AAPL,AMD,MSFT",
+ "in": "query",
+ "name": "ticker.any_of",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "request_id": "a4f9947955398c28905337f003bfee7c",
+ "results": [
+ {
+ "category": "revenue_streams",
+ "reason": "The text mentions revenue earned from the sale of digital goods or products, such as software licenses, e-books, music downloads, or digital media content.",
+ "tag": "digital_product_sales",
+ "ticker": "AAPL"
+ },
+ {
+ "category": "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": {
- "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": {
- "acceptance_datetime": {
- "description": "The datetime (EST timezone) the filing was accepted by EDGAR in YYYYMMDDHHMMSS format."
- },
- "cik": {
- "description": "The CIK number for the company.",
- "type": "string"
- },
- "company_name": {
- "description": "The company name.",
- "type": "string"
- },
- "end_date": {
- "description": "The end date of the period that these financials cover in YYYYMMDD format.",
- "type": "string"
- },
- "filing_date": {
- "description": "The date that the SEC filing which these financials were derived from was made available. Note that this is not necessarily the date when this information became public, as some companies may publish a press release before filing with the SEC."
- },
- "financials": {
- "properties": {
- "balance_sheet": {
- "description": "Balance sheet.\nNote that the keys in this object can be any of the balance sheet concepts defined in this table of fundamental accounting concepts but converted to `snake_case`.",
- "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.\nNote that the keys in this object can be any of the cash flow statement concepts defined in this table of fundamental accounting concepts 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 this table of fundamental accounting concepts 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 this table of fundamental accounting concepts but converted to `snake_case`.\nSee the attributes of the objects within `balance_sheet` for more details.",
- "type": "object"
- }
- },
- "type": "object"
- },
- "fiscal_period": {
- "description": "Fiscal period of the report according to the company (Q1, Q2, Q3, Q4, or FY).",
- "type": "string"
- },
- "fiscal_year": {
- "description": "Fiscal year of the report according to the company.",
+ "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"
},
- "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.",
+ "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"
},
- "start_date": {
- "description": "The start date of the period that these financials cover in YYYYMMDD format.",
+ "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"
},
- "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).",
+ "ticker": {
+ "description": "The identifying ticker symbol for the asset.",
"type": "string"
}
},
- "required": [
- "cik",
- "company_name",
- "financials",
- "timeframe",
- "fiscal_period"
- ],
"type": "object",
- "x-polygon-go-type": {
- "name": "FinancialReport"
+ "x-massive-go-type": {
+ "name": "TaxonomyClassificationResult"
}
},
"type": "array"
},
"status": {
- "description": "The status of this request's response.",
"type": "string"
}
},
"required": [
"status",
- "request_id",
- "count",
- "results"
+ "request_id"
],
"type": "object"
}
}
},
- "description": "FIXME"
+ "description": "Taxonomy classification data."
}
},
- "summary": "Stock Financials vX",
+ "summary": "Ticker Taxonomies",
"tags": [
- "reference:stocks"
+ "Internal",
+ "Public"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Reference data",
"name": "reference"
},
- "x-polygon-experimental": {},
- "x-polygon-paginate": {
- "limit": {
- "default": 10,
- "max": 100
- },
- "sort": {
- "default": "period_of_report_date",
- "enum": [
- "filing_date",
- "period_of_report_date"
- ]
- }
- }
- }
+ "x-massive-experimental": {}
+ },
+ "x-massive-draft": true
},
"/vX/reference/tickers/{id}/events": {
"get": {
@@ -29292,7 +31073,7 @@
"operationId": "GetEvents",
"parameters": [
{
- "description": "Identifier of an asset. This can currently be a Ticker, CUSIP, or Composite FIGI.\nWhen given a ticker, we return events for the entity currently represented by that ticker.\nTo find events for entities previously associated with a ticker, find the relevant identifier using the \n[Ticker Details Endpoint](https://polygon.io/docs/stocks/get_v3_reference_tickers__ticker)",
+ "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",
@@ -29383,7 +31164,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "EventsResults"
}
},
@@ -29406,11 +31187,11 @@
"tags": [
"reference:tickers:get"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Reference data",
"name": "reference"
},
- "x-polygon-experimental": {}
+ "x-massive-experimental": {}
}
}
},
@@ -29421,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",
@@ -29455,7 +31236,7 @@
{
"description": "Stocks API",
"name": "stocks",
- "x-polygon-sub-tags": [
+ "x-massive-sub-tags": [
"trades",
"quotes",
"last:trade",
@@ -29468,7 +31249,7 @@
{
"description": "Options API",
"name": "options",
- "x-polygon-sub-tags": [
+ "x-massive-sub-tags": [
"trades",
"quotes",
"last:trade",
@@ -29481,7 +31262,7 @@
{
"description": "Forex API",
"name": "fx",
- "x-polygon-sub-tags": [
+ "x-massive-sub-tags": [
"trades",
"quotes",
"conversion",
@@ -29494,7 +31275,7 @@
{
"description": "Crypto API",
"name": "crypto",
- "x-polygon-sub-tags": [
+ "x-massive-sub-tags": [
"trades",
"last:trade",
"open-close",
@@ -29505,7 +31286,7 @@
{
"description": "Indices API",
"name": "indices",
- "x-polygon-sub-tags": [
+ "x-massive-sub-tags": [
"trades",
"last:trade",
"open-close",
@@ -29514,7 +31295,7 @@
]
}
],
- "x-polygon-order": {
+ "x-massive-order": {
"crypto": {
"market": [
{
@@ -29565,7 +31346,8 @@
"/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"
]
},
{
@@ -29655,7 +31437,8 @@
"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"
]
},
{
@@ -29726,7 +31509,8 @@
{
"group": "Snapshots",
"paths": [
- "/v3/snapshot/indices"
+ "/v3/snapshot/indices",
+ "/v3/snapshot"
]
}
],
@@ -29796,7 +31580,8 @@
"group": "Snapshots",
"paths": [
"/v3/snapshot/options/{underlyingAsset}/{optionContract}",
- "/v3/snapshot/options/{underlyingAsset}"
+ "/v3/snapshot/options/{underlyingAsset}",
+ "/v3/snapshot"
]
},
{
@@ -29931,7 +31716,8 @@
"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"
]
},
{
@@ -29975,6 +31761,11 @@
"/v3/reference/tickers/types"
]
},
+ {
+ "paths": [
+ "/vX/reference/tickers/taxonomies"
+ ]
+ },
{
"paths": [
"/v1/marketstatus/upcoming"
@@ -30018,6 +31809,21 @@
"paths": [
"/v3/reference/exchanges"
]
+ },
+ {
+ "paths": [
+ "/v1/related-companies/{ticker}"
+ ]
+ },
+ {
+ "paths": [
+ "/vX/reference/ipos"
+ ]
+ },
+ {
+ "paths": [
+ "/vX/reference/short-interest/{identifier_type}/{identifier}"
+ ]
}
]
}
diff --git a/.polygon/rest.py b/.massive/rest.py
similarity index 52%
rename from .polygon/rest.py
rename to .massive/rest.py
index e4ae124c..4bfcd940 100644
--- a/.polygon/rest.py
+++ b/.massive/rest.py
@@ -1,8 +1,8 @@
import urllib.request
import json
-contents = urllib.request.urlopen("https://api.polygon.io/openapi").read()
+contents = urllib.request.urlopen("https://api.massive.com/openapi").read()
parsed = json.loads(contents)
formatted = json.dumps(parsed, indent=2)
-with open(".polygon/rest.json", "w") as f:
+with open(".massive/rest.json", "w") as f:
f.write(formatted)
diff --git a/.polygon/websocket.json b/.massive/websocket.json
similarity index 61%
rename from .polygon/websocket.json
rename to .massive/websocket.json
index 970ecc82..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,23 @@
"paths": [
"/crypto/XL2"
]
+ },
+ {
+ "paths": [
+ "/business/crypto/FMV"
+ ]
+ },
+ {
+ "paths": [
+ "/launchpad/crypto/AM"
+ ],
+ "launchpad": "exclusive"
+ },
+ {
+ "paths": [
+ "/launchpad/crypto/LV"
+ ],
+ "launchpad": "exclusive"
}
]
},
@@ -119,6 +197,11 @@
"/indices/AM"
]
},
+ {
+ "paths": [
+ "/indices/A"
+ ]
+ },
{
"paths": [
"/indices/V"
@@ -136,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",
@@ -165,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",
@@ -186,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."
@@ -194,7 +277,7 @@
},
"t": {
"type": "integer",
- "description": "The Timestamp in Unix MS."
+ "description": "The SIP timestamp in Unix MS."
},
"q": {
"type": "integer",
@@ -229,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"
@@ -257,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",
@@ -316,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"
@@ -324,7 +407,7 @@
},
"t": {
"type": "integer",
- "description": "The Timestamp in Unix MS."
+ "description": "The SIP timestamp in Unix MS."
},
"q": {
"type": "integer",
@@ -357,15 +440,15 @@
}
}
},
- "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"
@@ -381,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",
@@ -456,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",
@@ -500,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"
@@ -528,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",
@@ -603,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",
@@ -647,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"
@@ -675,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",
@@ -749,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"
@@ -773,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",
@@ -818,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",
@@ -851,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"
@@ -867,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"
@@ -969,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"
@@ -1072,138 +1152,170 @@
]
}
},
- "/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": "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": [
+ "LV"
+ ],
+ "description": "The event type."
},
- {
- "properties": {
- "ev": {
- "enum": [
- "A"
- ],
- "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": "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": "T",
+ "sym": "O:AMC210827C00037000",
+ "x": 65,
+ "p": 1.54,
+ "s": 1,
+ "c": [
+ 233
+ ],
+ "t": 1629820676333,
+ "q": 651921857
}
}
}
}
},
- "x-polygon-entitlement-data-type": {
- "name": "aggregates",
- "description": "Aggregate data"
+ "x-massive-entitlement-data-type": {
+ "name": "trades",
+ "description": "Trade data"
},
- "x-polygon-entitlement-market-type": {
+ "x-massive-entitlement-market-type": {
"name": "options",
"description": "Options data"
},
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"name": "delayed",
"description": "15 minute delayed data"
@@ -1215,15 +1327,118 @@
]
}
},
- "/options/AM": {
+ "/options/Q": {
"get": {
- "summary": "Aggregates (Per Minute)",
- "description": "Stream real-time minute aggregates for a given option contract.\n",
+ "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://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",
@@ -1234,7 +1449,7 @@
],
"responses": {
"200": {
- "description": "The WebSocket message for a minute aggregate event.",
+ "description": "The WebSocket message for a second aggregate event.",
"content": {
"application/json": {
"schema": {
@@ -1298,11 +1513,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."
}
}
},
@@ -1310,7 +1525,7 @@
"properties": {
"ev": {
"enum": [
- "AM"
+ "A"
],
"description": "The event type."
}
@@ -1338,15 +1553,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": "options",
"description": "Options data"
},
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"name": "delayed",
"description": "15 minute delayed data"
@@ -1358,26 +1573,26 @@
]
}
},
- "/forex/C": {
+ "/options/AM": {
"get": {
- "summary": "Quotes",
- "description": "Stream real-time forex quotes for a given forex pair.\n",
+ "summary": "Aggregates (Per Minute)",
+ "description": "Stream real-time minute aggregates for a given option contract.\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 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-Z]{3})\\/?([A-Z]{3}))$/"
+ "pattern": "/^(([a-zA-Z]+|[0-9])+)$/"
},
"example": "*"
}
],
"responses": {
"200": {
- "description": "The WebSocket message for a forex quote event.",
+ "description": "The WebSocket message for a minute aggregate event.",
"content": {
"application/json": {
"schema": {
@@ -1386,30 +1601,66 @@
"type": "object",
"properties": {
"ev": {
- "type": "string",
"description": "The event type."
},
- "p": {
+ "sym": {
"type": "string",
- "description": "The current pair."
+ "description": "The ticker symbol for the given option contract."
},
- "x": {
+ "v": {
"type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
+ "description": "The tick volume."
},
- "a": {
+ "av": {
+ "type": "integer",
+ "description": "Today's accumulated volume."
+ },
+ "op": {
"type": "number",
"format": "double",
- "description": "The ask price."
+ "description": "Today's official opening price."
},
- "b": {
+ "vw": {
+ "type": "number",
+ "format": "float",
+ "description": "The tick's volume weighted average price."
+ },
+ "o": {
"type": "number",
"format": "double",
- "description": "The bid price."
+ "description": "The opening tick price for this aggregate window."
},
- "t": {
+ "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 Timestamp in Unix MS."
+ "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."
}
}
},
@@ -1417,7 +1668,7 @@
"properties": {
"ev": {
"enum": [
- "C"
+ "AM"
],
"description": "The event type."
}
@@ -1426,26 +1677,38 @@
]
},
"example": {
- "ev": "C",
- "p": "USD/CNH",
- "x": "44",
- "a": 6.83366,
- "b": 6.83363,
- "t": 1536036818784
+ "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-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": "fx",
- "description": "Forex data"
+ "x-massive-entitlement-market-type": {
+ "name": "options",
+ "description": "Options data"
},
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
{
"name": "realtime",
"description": "Real Time Data"
@@ -1453,26 +1716,26 @@
]
}
},
- "/forex/CA": {
+ "/business/options/FMV": {
"get": {
- "summary": "Aggregates (Per Minute)",
- "description": "Stream real-time per-minute forex aggregates for a given forex pair.\n",
+ "summary": "Fair Market Value",
+ "description": "Real-time fair market value for a given options 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 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-Z]{3})\\/?([A-Z]{3}))$/"
+ "pattern": "/^(([a-zA-Z]+|[0-9])+)$/"
},
- "example": "*"
+ "example": "O:SPY241220P00720000"
}
],
"responses": {
"200": {
- "description": "The WebSocket message for a forex per-minute aggregate event.",
+ "description": "The WebSocket message for a fair market value event.",
"content": {
"application/json": {
"schema": {
@@ -1481,71 +1744,173 @@
"ev": {
"type": "string",
"enum": [
- "CA"
+ "FMV"
],
"description": "The event type."
},
- "pair": {
+ "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 currency pair."
+ "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": "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-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": "options",
+ "description": "Options data"
},
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
{
"name": "realtime",
"description": "Real Time Data"
@@ -1553,26 +1918,26 @@
]
}
},
- "/crypto/XT": {
+ "/launchpad/options/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 options 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 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-Z]*)-(?[A-Z]{3}))$/"
+ "pattern": "/^(([a-zA-Z]+|[0-9])+)$/"
},
- "example": "*"
+ "example": "O:SPY241220P00720000"
}
],
"responses": {
"200": {
- "description": "The WebSocket message for a crypto trade event.",
+ "description": "The WebSocket message for a value event.",
"content": {
"application/json": {
"schema": {
@@ -1581,76 +1946,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": 7.2,
+ "sym": "O:TSLA210903C00700000",
+ "t": 1401715883806000000
}
}
}
}
},
- "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": "crypto",
- "description": "Crypto data"
+ "x-massive-entitlement-market-type": {
+ "name": "options",
+ "description": "Options data"
},
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
{
"name": "realtime",
"description": "Real Time Data"
@@ -1658,100 +1991,94 @@
]
}
},
- "/crypto/XQ": {
+ "/forex/C": {
"get": {
"summary": "Quotes",
- "description": "Stream real-time crypto quotes for a given crypto pair.\n",
+ "description": "Stream real-time forex quotes for a given forex 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://polygon.io/docs/crypto/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",
- "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/"
+ "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/"
},
"example": "*"
}
],
"responses": {
"200": {
- "description": "The WebSocket message for a crypto quote event.",
+ "description": "The WebSocket message for a forex 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"
+ "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 ask price."
+ },
+ "b": {
+ "type": "number",
+ "format": "double",
+ "description": "The bid price."
+ },
+ "t": {
+ "type": "integer",
+ "description": "The Timestamp in Unix MS."
+ }
+ }
},
- "r": {
- "type": "integer",
- "description": "The timestamp that the tick was received by Polygon."
+ {
+ "properties": {
+ "ev": {
+ "enum": [
+ "C"
+ ],
+ "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": "C",
+ "p": "USD/CNH",
+ "x": "44",
+ "a": 6.83366,
+ "b": 6.83363,
+ "t": 1536036818784
}
}
}
}
},
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"name": "nbbo",
"description": "NBBO data"
},
- "x-polygon-entitlement-market-type": {
- "name": "crypto",
- "description": "Crypto data"
+ "x-massive-entitlement-market-type": {
+ "name": "fx",
+ "description": "Forex data"
},
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"name": "realtime",
"description": "Real Time Data"
@@ -1759,26 +2086,26 @@
]
}
},
- "/crypto/XL2": {
+ "/forex/CA": {
"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 per-minute forex aggregates for a given forex 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://polygon.io/docs/crypto/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",
- "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/"
+ "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/"
},
"example": "*"
}
],
"responses": {
"200": {
- "description": "The WebSocket message for a crypto level 2 book event.",
+ "description": "The WebSocket message for a forex per-minute aggregate event.",
"content": {
"application/json": {
"schema": {
@@ -1787,92 +2114,71 @@
"ev": {
"type": "string",
"enum": [
- "XL2"
+ "CA"
],
"description": "The event type."
},
"pair": {
"type": "string",
- "description": "The crypto pair."
+ "description": "The currency 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": {
- "type": "number",
- "format": "double"
- }
- }
+ "o": {
+ "type": "number",
+ "format": "double",
+ "description": "The open price for this aggregate window."
},
- "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"
- }
- }
+ "c": {
+ "type": "number",
+ "format": "double",
+ "description": "The close price for this aggregate window."
},
- "t": {
+ "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 Timestamp in Unix MS."
+ "description": "The volume of trades during this aggregate window."
},
- "x": {
+ "s": {
"type": "integer",
- "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n"
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
},
- "r": {
+ "e": {
"type": "integer",
- "description": "The timestamp that the tick was received by Polygon."
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
}
}
},
"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": "CA",
+ "pair": "USD/EUR",
+ "o": 0.8687,
+ "c": 0.86889,
+ "h": 0.86889,
+ "l": 0.8686,
+ "v": 20,
+ "s": 1539145740000
}
}
}
}
},
- "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": "fx",
+ "description": "Forex data"
},
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"name": "realtime",
"description": "Real Time Data"
@@ -1880,26 +2186,26 @@
]
}
},
- "/crypto/XA": {
+ "/forex/CAS": {
"get": {
- "summary": "Aggregates (Per Minute)",
- "description": "Stream real-time per-minute crypto aggregates for a given crypto pair.\n",
+ "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 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 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]*)-(?[A-Z]{3}))$/"
+ "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/"
},
"example": "*"
}
],
"responses": {
"200": {
- "description": "The WebSocket message for a crypto per-minute aggregate event.",
+ "description": "The WebSocket message for a forex per-second aggregate event.",
"content": {
"application/json": {
"schema": {
@@ -1908,13 +2214,13 @@
"ev": {
"type": "string",
"enum": [
- "XA"
+ "CAS"
],
"description": "The event type."
},
"pair": {
"type": "string",
- "description": "The crypto pair."
+ "description": "The currency pair."
},
"o": {
"type": "number",
@@ -1942,33 +2248,1048 @@
},
"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."
- },
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
- },
- "z": {
- "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": "double"
+ }
+ }
+ },
+ "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": "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-massive-entitlement-data-type": {
+ "name": "aggregates",
+ "description": "Aggregate data"
+ },
+ "x-massive-entitlement-market-type": {
+ "name": "crypto",
+ "description": "Crypto data"
+ },
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
+ },
+ "/crypto/XAS": {
+ "get": {
+ "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 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-second aggregate event.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "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 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": "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-massive-entitlement-data-type": {
+ "name": "aggregates",
+ "description": "Aggregate data"
+ },
+ "x-massive-entitlement-market-type": {
+ "name": "crypto",
+ "description": "Crypto data"
+ },
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
+ },
+ "/business/crypto/FMV": {
+ "get": {
+ "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 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 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": 33021.9,
+ "sym": "X:BTC-USD",
+ "t": 1610462007425
+ }
+ }
+ }
+ }
+ },
+ "x-massive-entitlement-data-type": {
+ "name": "indicative-price",
+ "description": "Indicative Price"
+ },
+ "x-massive-entitlement-market-type": {
+ "name": "crypto",
+ "description": "Crypto data"
+ },
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
+ },
+ "/launchpad/crypto/AM": {
+ "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 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": "XA",
- "pair": "BCD-USD",
+ "ev": "AM",
+ "sym": "X:BTC-USD",
"v": 951.6112,
- "vw": 0.7756,
- "z": 73,
- "o": 0.772,
- "c": 0.784,
- "h": 0.784,
- "l": 0.771,
+ "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
}
@@ -1976,15 +3297,208 @@
}
}
},
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
+ "name": "aggregates",
+ "description": "Aggregate data"
+ },
+ "x-massive-entitlement-market-type": {
+ "name": "crypto",
+ "description": "Crypto data"
+ },
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
+ },
+ "/launchpad/crypto/LV": {
+ "get": {
+ "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://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 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": 33021.9,
+ "sym": "X:BTC-USD",
+ "t": 1610462007425
+ }
+ }
+ }
+ }
+ },
+ "x-massive-entitlement-data-type": {
+ "name": "indicative-price",
+ "description": "Indicative Price"
+ },
+ "x-massive-entitlement-market-type": {
+ "name": "crypto",
+ "description": "Crypto data"
+ },
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
+ },
+ "/indices/A": {
+ "get": {
+ "summary": "Aggregates (Per Second)",
+ "description": "Stream real-time second aggregates for a given index ticker symbol.\n",
+ "parameters": [
+ {
+ "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": "*"
+ }
+ ],
+ "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 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."
+ }
+ }
+ }
+ ]
+ },
+ "example": {
+ "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-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"
@@ -2000,7 +3514,7 @@
{
"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://polygon.io/docs/indices/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",
@@ -2053,11 +3567,11 @@
},
"s": {
"type": "integer",
- "description": "The timestamp of the starting index 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 index for this aggregate window in Unix Milliseconds."
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
}
}
},
@@ -2088,15 +3602,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": "indices",
"description": "Indices data"
},
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"name": "delayed",
"description": "15 minute delayed data"
@@ -2116,7 +3630,7 @@
{
"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://polygon.io/docs/indices/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",
@@ -2161,15 +3675,15 @@
}
}
},
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"name": "value",
- "description": "Index value data"
+ "description": "Value data"
},
- "x-polygon-entitlement-market-type": {
+ "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"
@@ -2408,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",
@@ -2429,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",
@@ -2450,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."
@@ -2458,7 +3972,7 @@
},
"t": {
"type": "integer",
- "description": "The Timestamp in Unix MS."
+ "description": "The SIP timestamp in Unix MS."
},
"q": {
"type": "integer",
@@ -2519,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"
@@ -2527,7 +4041,7 @@
},
"t": {
"type": "integer",
- "description": "The Timestamp in Unix MS."
+ "description": "The SIP timestamp in Unix MS."
},
"q": {
"type": "integer",
@@ -2598,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",
@@ -2671,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",
@@ -2756,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",
@@ -2855,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",
@@ -2882,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",
@@ -2899,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",
@@ -2943,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",
@@ -3036,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."
}
}
},
@@ -3105,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."
}
}
},
@@ -3186,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."
}
}
},
@@ -3223,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",
@@ -3256,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",
@@ -3286,7 +4800,7 @@
}
]
},
- "ForexAggregateEvent": {
+ "ForexMinuteAggregateEvent": {
"type": "object",
"properties": {
"ev": {
@@ -3326,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."
}
}
},
@@ -3374,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."
}
}
},
@@ -3424,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": {
@@ -3472,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",
@@ -3505,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.",
@@ -3517,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.",
@@ -3533,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."
}
}
},
@@ -3547,11 +5166,11 @@
},
"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",
@@ -3590,11 +5209,11 @@
},
"s": {
"type": "integer",
- "description": "The timestamp of the starting index 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 index for this aggregate window in Unix Milliseconds."
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
}
}
},
@@ -3637,11 +5256,11 @@
},
"s": {
"type": "integer",
- "description": "The timestamp of the starting index 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 index for this aggregate window in Unix Milliseconds."
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
}
}
},
@@ -3657,6 +5276,65 @@
}
]
},
+ "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": {
@@ -3677,13 +5355,122 @@
"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",
@@ -3694,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",
@@ -3705,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",
@@ -3716,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",
@@ -3727,7 +5514,7 @@
"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",
@@ -3738,7 +5525,7 @@
"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://polygon.io/docs/indices/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",
@@ -3749,7 +5536,7 @@
"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://polygon.io/docs/indices/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",
diff --git a/Makefile b/Makefile
index 03f609ba..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:
- poetry run python .polygon/rest.py
+ 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 ba8c754b..565532e6 100644
--- a/README.md
+++ b/README.md
@@ -1,27 +1,34 @@
-[](https://badge.fury.io/py/polygon-api-client)
-[](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.
-Welcome to the official Python client library for the [Polygon](https://polygon.io/) REST and WebSocket API. To get started, please see the [Getting Started](https://polygon.io/docs/stocks/getting-started) section in our documentation, view the [examples](./examples/) directory for code snippets, or the [blog post](https://polygon.io/blog/polygon-io-with-python-for-stock-market-data/) with video tutorials to learn more.
+**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.
+
+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
+
+Before installing the Massive Python client, ensure your environment has Python 3.9 or higher.
## Install
+Please use pip to install or update to the latest stable version.
```
-pip install polygon-api-client
+pip install -U massive
```
-Requires Python >= 3.8.
## Getting started
-To get started, please see the [Getting Started](https://polygon-api-client.readthedocs.io/en/latest/Getting-Started.html) section in our docs, view the [examples](./examples) directory for code snippets, or view the [blog post with videos](https://polygon.io/blog/polygon-io-with-python-for-stock-market-data/) to learn more.
+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 polygon import RESTClient
+from massive import RESTClient
```
-Create a new client with your [API key](https://polygon.io/dashboard/api-keys)
+Create a new client with your [API key](https://massive.com/dashboard/api-keys)
```python
client = RESTClient(api_key="")
```
@@ -55,94 +62,134 @@ quotes = client.list_quotes(ticker=ticker, timestamp="2022-01-04")
for quote in quotes:
print(quote)
```
-Note: For parameter argument examples check out our docs. All required arguments are annotated with red asterisks " * " and argument examples are set.
-Check out an example for Aggregates(client.get_aggs) [here](https://polygon.io/docs/stocks/get_v2_aggs_ticker__stocksticker__range__multiplier___timespan___from___to)
-## WebSocket Client
+### 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:
-Import classes
```python
-from polygon import WebSocketClient
-from polygon.websocket.models import WebSocketMessage
-from typing import List
+client = RESTClient(api_key="")
+trades = [t for t in client.list_trades(ticker="TSLA", limit=100)]
```
-### Using the client
-Create a new client with your [API key](https://polygon.io/dashboard/api-keys) and subscription options.
+
+This fetches all TSLA trades, 100 per page.
+
+#### Disabling Pagination
+
+To return a fixed number of results and stop, disable pagination:
+
```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"])
+client = RESTClient(api_key="", pagination=False)
+trades = [t for t in client.list_trades(ticker="TSLA", limit=100)]
```
-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/polygon-io/client-python/tree/master/examples/websocket).
+This returns at most 100 total trades, no additional pages.
-## Launchpad REST API Client
-Users of the Launchpad product will need to pass in certain headers in order to make API requests using the RequestOptionBuilder.
-Example can be found [here](./examples/launchpad).
+### 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).
-Import classes
```python
-from polygon import RESTClient
-from polygon.rest.models.request import RequestOptionBuilder
+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))
```
-### Using the client
-Create client and set options
+
+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
-# 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
-)
+client = RESTClient(trace=True, verbose=True)
```
-Request data using client methods.
-```python
-# get response
-res = c.get_aggs("AAPL", 1, "day", "2022-04-04", "2022-04-04", options=options)
-# do something with response
+### 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'}
```
-Checkout Launchpad readme for more details on RequestOptionBuilder [here](./examples/launchpad)
+This can be an invaluable tool for debugging issues or understanding how the client interacts with the API.
-## Launchpad WebSocket Client
+## WebSocket Client
+Import classes
```python
-from polygon import WebSocketClient
-from polygon.websocket.models import WebSocketMessage
-from polygon.websocket.models.common import Feed, Market
+from massive import WebSocketClient
+from massive.websocket.models import WebSocketMessage
from typing import List
-
-ws = WebSocketClient(api_key="API_KEY",feed=Feed.Launchpad,market=Market.Stocks, subscriptions=["AM.AAPL"])
-
+```
+### 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
diff --git a/docs/source/Aggs.rst b/docs/source/Aggs.rst
index 921166e9..b8e3fcc8 100644
--- a/docs/source/Aggs.rst
+++ b/docs/source/Aggs.rst
@@ -12,7 +12,7 @@ List aggs
- `Forex aggs`_
- `Crypto aggs`_
-.. automethod:: polygon.RESTClient.list_aggs
+.. automethod:: massive.RESTClient.list_aggs
===========
Get aggs
@@ -23,7 +23,7 @@ Get aggs
- `Forex aggs`_
- `Crypto aggs`_
-.. automethod:: polygon.RESTClient.get_aggs
+.. automethod:: massive.RESTClient.get_aggs
============================
Get grouped daily aggs
@@ -33,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
@@ -43,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
@@ -54,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 a723f93f..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)
@@ -60,7 +60,7 @@ To provide your own JSON processing library (exposing loads/dumps functions) pas
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:
diff --git a/docs/source/Models.rst b/docs/source/Models.rst
index f0eed1c7..393c8d74 100644
--- a/docs/source/Models.rst
+++ b/docs/source/Models.rst
@@ -6,214 +6,214 @@ Models
==============================================================
Universal Snapshot
==============================================================
-.. autoclass:: polygon.rest.models.UniversalSnapshot
+.. autoclass:: massive.rest.models.UniversalSnapshot
==============================================================
Universal Snapshot Session
==============================================================
-.. autoclass:: polygon.rest.models.UniversalSnapshotSession
+.. autoclass:: massive.rest.models.UniversalSnapshotSession
==============================================================
Universal Snapshot Last Quote
==============================================================
-.. autoclass:: polygon.rest.models.UniversalSnapshotLastQuote
+.. autoclass:: massive.rest.models.UniversalSnapshotLastQuote
==============================================================
Universal Snapshot Last Trade
==============================================================
-.. autoclass:: polygon.rest.models.UniversalSnapshotLastTrade
+.. autoclass:: massive.rest.models.UniversalSnapshotLastTrade
==============================================================
Universal Snapshot Details
==============================================================
-.. autoclass:: polygon.rest.models.UniversalSnapshotDetails
+.. autoclass:: massive.rest.models.UniversalSnapshotDetails
==============================================================
Universal Snapshot Underlying Asset
==============================================================
-.. autoclass:: polygon.rest.models.UniversalSnapshotUnderlyingAsset
+.. 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 7744ba1c..7268e209 100644
--- a/docs/source/Snapshot.rst
+++ b/docs/source/Snapshot.rst
@@ -12,7 +12,7 @@ Get snapshots for all asset types
- `Forex snapshot all tickers`_
- `Crypto snapshot all tickers`_
-.. automethod:: polygon.RESTClient.list_universal_snapshots
+.. automethod:: massive.RESTClient.list_universal_snapshots
=================================
Get all snapshots
@@ -22,7 +22,7 @@ Get all snapshots
- `Forex snapshot all tickers (deprecated)`_
- `Crypto snapshot all tickers (deprecated)`_
-.. automethod:: polygon.RESTClient.get_snapshot_all
+.. automethod:: massive.RESTClient.get_snapshot_all
=================================
Get gainers/losers snapshot
@@ -32,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
@@ -42,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
@@ -50,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
@@ -58,21 +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_v3_snapshot
-.. _Options snapshot all tickers: https://polygon.io/docs/options/get_v3_snapshot
-.. _Forex snapshot all tickers: https://polygon.io/docs/forex/get_v3_snapshot
-.. _Crypto snapshot all tickers:: https://polygon.io/docs/crypto/get_v3_snapshot
-.. _Stocks snapshot all tickers (deprecated): https://polygon.io/docs/stocks/get_v2_snapshot_locale_us_markets_stocks_tickers
-.. _Options snapshot all tickers (deprecated): https://polygon.io/docs/options/get_v2_snapshot_locale_us_markets_stocks_tickers
-.. _Forex snapshot all tickers (deprecated): https://polygon.io/docs/forex/get_v2_snapshot_locale_global_markets_forex_tickers
-.. _Crypto snapshot all tickers (deprecated):: 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
index 53301593..5a0c3bd3 100644
--- a/examples/launchpad/README.md
+++ b/examples/launchpad/README.md
@@ -5,8 +5,8 @@ Users of the Launchpad product will need to pass in certain headers in order to
```python
# import RESTClient
-from polygon import RESTClient
-from polygon.rest.models.request import RequestOptionBuilder
+from massive import RESTClient
+from massive.rest.models.request import RequestOptionBuilder
# create client
c = RESTClient(api_key="API_KEY")
@@ -27,8 +27,8 @@ Launchpad users can also provide the optional User Agent value describing their
```python
# import RESTClient
-from polygon import RESTClient
-from polygon.rest.models.request import RequestOptionBuilder
+from massive import RESTClient
+from massive.rest.models.request import RequestOptionBuilder
# create client
c = RESTClient(api_key="API_KEY")
diff --git a/examples/launchpad/launchpad.py b/examples/launchpad/launchpad.py
index 6c6fbe35..6bd2306c 100644
--- a/examples/launchpad/launchpad.py
+++ b/examples/launchpad/launchpad.py
@@ -1,5 +1,5 @@
-from polygon import RESTClient
-from polygon.rest.models.request import RequestOptionBuilder
+from massive import RESTClient
+from massive.rest.models.request import RequestOptionBuilder
def get_list_trades_launchpad():
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
index a3831aeb..443ce21d 100644
--- a/examples/rest/crypto-aggregates_bars.py
+++ b/examples/rest/crypto-aggregates_bars.py
@@ -1,20 +1,20 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/crypto/get_v2_aggs_ticker__cryptoticker__range__multiplier___timespan___from___to
-# https://polygon-api-client.readthedocs.io/en/latest/Aggs.html#polygon.RESTClient.list_aggs
+# 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 "POLYGON_API_KEY".
+# to use the environment variable "MASSIVE_API_KEY".
#
-# setx POLYGON_API_KEY "" <- windows
-# export POLYGON_API_KEY="" <- mac/linux
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
aggs = []
for a in client.list_aggs(
diff --git a/examples/rest/crypto-conditions.py b/examples/rest/crypto-conditions.py
index 93e3feda..339d53f0 100644
--- a/examples/rest/crypto-conditions.py
+++ b/examples/rest/crypto-conditions.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/crypto/get_v3_reference_conditions
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#list-conditions
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
conditions = []
for c in client.list_conditions("crypto", limit=1000):
diff --git a/examples/rest/crypto-daily_open_close.py b/examples/rest/crypto-daily_open_close.py
index 8ff3ad41..5c29db0c 100644
--- a/examples/rest/crypto-daily_open_close.py
+++ b/examples/rest/crypto-daily_open_close.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/crypto/get_v1_open-close_crypto__from___to___date
-# https://polygon-api-client.readthedocs.io/en/latest/Aggs.html#get-daily-open-close-agg
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
# make request
request = client.get_daily_open_close_agg(
diff --git a/examples/rest/crypto-exchanges.py b/examples/rest/crypto-exchanges.py
index c5c2cf79..8a592d55 100644
--- a/examples/rest/crypto-exchanges.py
+++ b/examples/rest/crypto-exchanges.py
@@ -1,24 +1,22 @@
-from polygon import RESTClient
-from polygon.rest.models import (
+from massive import RESTClient
+from massive.rest.models import (
Exchange,
)
# docs
-# https://polygon.io/docs/crypto/get_v3_reference_exchanges
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#get-exchanges
+# 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() # POLYGON_API_KEY environment variable 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(
diff --git a/examples/rest/crypto-grouped_daily_bars.py b/examples/rest/crypto-grouped_daily_bars.py
index ec1bdb81..4ebd3d36 100644
--- a/examples/rest/crypto-grouped_daily_bars.py
+++ b/examples/rest/crypto-grouped_daily_bars.py
@@ -1,12 +1,12 @@
-from polygon import RESTClient
+from massive import RESTClient
import pprint
# docs
-# https://polygon.io/docs/crypto/get_v2_aggs_grouped_locale_global_market_crypto__date
-# https://polygon-api-client.readthedocs.io/en/latest/Aggs.html#get-grouped-daily-aggs
+# 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() # POLYGON_API_KEY environment variable 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"
diff --git a/examples/rest/crypto-last_trade_for_a_crypto_pair.py b/examples/rest/crypto-last_trade_for_a_crypto_pair.py
index 850bd98a..ef75efaa 100644
--- a/examples/rest/crypto-last_trade_for_a_crypto_pair.py
+++ b/examples/rest/crypto-last_trade_for_a_crypto_pair.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/crypto/get_v1_last_crypto__from___to
-# https://polygon-api-client.readthedocs.io/en/latest/Trades.html#get-last-crypto-trade
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
trade = client.get_last_crypto_trade("BTC", "USD")
diff --git a/examples/rest/crypto-market_holidays.py b/examples/rest/crypto-market_holidays.py
index 13113917..740bbc71 100644
--- a/examples/rest/crypto-market_holidays.py
+++ b/examples/rest/crypto-market_holidays.py
@@ -1,22 +1,20 @@
-from polygon import RESTClient
-from polygon.rest.models import (
+from massive import RESTClient
+from massive.rest.models import (
MarketHoliday,
)
# docs
-# https://polygon.io/docs/crypto/get_v1_marketstatus_upcoming
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#get-market-holidays
+# 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() # POLYGON_API_KEY environment variable 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
index 4265997c..d58d6180 100644
--- a/examples/rest/crypto-market_status.py
+++ b/examples/rest/crypto-market_status.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/crypto/get_v1_marketstatus_now
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#get-market-status
+# 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() # POLYGON_API_KEY environment variable 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
index bf309fed..b4fd4cea 100644
--- a/examples/rest/crypto-previous_close.py
+++ b/examples/rest/crypto-previous_close.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/crypto/get_v2_aggs_ticker__cryptoticker__prev
-# https://polygon-api-client.readthedocs.io/en/latest/Aggs.html#get-previous-close-agg
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
aggs = client.get_previous_close_agg(
"X:BTCUSD",
diff --git a/examples/rest/crypto-snapshots_all_tickers.py b/examples/rest/crypto-snapshots_all_tickers.py
index 91441aae..5c5c8e70 100644
--- a/examples/rest/crypto-snapshots_all_tickers.py
+++ b/examples/rest/crypto-snapshots_all_tickers.py
@@ -1,15 +1,15 @@
-from polygon import RESTClient
-from polygon.rest.models import (
+from massive import RESTClient
+from massive.rest.models import (
TickerSnapshot,
Agg,
)
# docs
-# https://polygon.io/docs/crypto/get_v2_snapshot_locale_global_markets_crypto_tickers
-# https://polygon-api-client.readthedocs.io/en/latest/Snapshot.html#get-all-snapshots
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
snapshot = client.get_snapshot_all("crypto") # all tickers
@@ -18,18 +18,14 @@
# 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
diff --git a/examples/rest/crypto-snapshots_gainers_losers.py b/examples/rest/crypto-snapshots_gainers_losers.py
index 61a51fa1..5ced0e6d 100644
--- a/examples/rest/crypto-snapshots_gainers_losers.py
+++ b/examples/rest/crypto-snapshots_gainers_losers.py
@@ -1,14 +1,14 @@
-from polygon import RESTClient
-from polygon.rest.models import (
+from massive import RESTClient
+from massive.rest.models import (
TickerSnapshot,
)
# docs
-# https://polygon.io/docs/crypto/get_v2_snapshot_locale_global_markets_crypto__direction
-# https://polygon-api-client.readthedocs.io/en/latest/Snapshot.html#get-gainers-losers-snapshot
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
# get gainers
gainers = client.get_snapshot_direction("crypto", "gainers")
@@ -16,13 +16,10 @@
# 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()
@@ -33,11 +30,8 @@
# 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
index 31a48ebd..36e639d2 100644
--- a/examples/rest/crypto-snapshots_ticker.py
+++ b/examples/rest/crypto-snapshots_ticker.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/crypto/get_v2_snapshot_locale_global_markets_crypto_tickers__ticker
-# https://polygon-api-client.readthedocs.io/en/latest/Snapshot.html#get-ticker-snapshot
+# 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() # POLYGON_API_KEY environment variable 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
index 38d239cf..b8b9157c 100644
--- a/examples/rest/crypto-snapshots_ticker_full_book_l2.py
+++ b/examples/rest/crypto-snapshots_ticker_full_book_l2.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/crypto/get_v2_snapshot_locale_global_markets_crypto_tickers__ticker__book
-# https://polygon-api-client.readthedocs.io/en/latest/Snapshot.html#get-crypto-l2-book-snapshot
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
snapshot = client.get_snapshot_crypto_book("X:BTCUSD")
diff --git a/examples/rest/crypto-technical_indicators_ema.py b/examples/rest/crypto-technical_indicators_ema.py
index edd45dee..1eb50c20 100644
--- a/examples/rest/crypto-technical_indicators_ema.py
+++ b/examples/rest/crypto-technical_indicators_ema.py
@@ -1,11 +1,17 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/crypto/get_v1_indicators_ema__cryptoticker
-# https://github.com/polygon-io/client-python/blob/master/polygon/rest/indicators.py
+# 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() # POLYGON_API_KEY environment variable 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",
+)
-ema = client.get_ema("X:BTCUSD")
print(ema)
diff --git a/examples/rest/crypto-technical_indicators_macd.py b/examples/rest/crypto-technical_indicators_macd.py
index d1f60337..17c25bb7 100644
--- a/examples/rest/crypto-technical_indicators_macd.py
+++ b/examples/rest/crypto-technical_indicators_macd.py
@@ -1,11 +1,19 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/crypto/get_v1_indicators_macd__cryptoticker
-# https://github.com/polygon-io/client-python/blob/master/polygon/rest/indicators.py
+# 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() # POLYGON_API_KEY environment variable 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",
+)
-macd = client.get_macd("X:BTCUSD")
print(macd)
diff --git a/examples/rest/crypto-technical_indicators_rsi.py b/examples/rest/crypto-technical_indicators_rsi.py
index 38423590..d490d879 100644
--- a/examples/rest/crypto-technical_indicators_rsi.py
+++ b/examples/rest/crypto-technical_indicators_rsi.py
@@ -1,11 +1,17 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/crypto/get_v1_indicators_rsi__cryptoticker
-# https://github.com/polygon-io/client-python/blob/master/polygon/rest/indicators.py
+# 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() # POLYGON_API_KEY environment variable 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",
+)
-rsi = client.get_rsi("X:BTCUSD")
print(rsi)
diff --git a/examples/rest/crypto-technical_indicators_sma.py b/examples/rest/crypto-technical_indicators_sma.py
index f343ff7b..255291c0 100644
--- a/examples/rest/crypto-technical_indicators_sma.py
+++ b/examples/rest/crypto-technical_indicators_sma.py
@@ -1,11 +1,17 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/crypto/get_v1_indicators_sma__cryptoticker
-# https://github.com/polygon-io/client-python/blob/master/polygon/rest/indicators.py
+# 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() # POLYGON_API_KEY environment variable 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",
+)
-sma = client.get_sma("X:BTCUSD")
print(sma)
diff --git a/examples/rest/crypto-tickers.py b/examples/rest/crypto-tickers.py
index 8eb07170..9052e487 100644
--- a/examples/rest/crypto-tickers.py
+++ b/examples/rest/crypto-tickers.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/crypto/get_v3_reference_tickers
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#list-tickers
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
tickers = []
for t in client.list_tickers(market="crypto", limit=1000):
diff --git a/examples/rest/crypto-trades.py b/examples/rest/crypto-trades.py
index 7cafd989..d76182af 100644
--- a/examples/rest/crypto-trades.py
+++ b/examples/rest/crypto-trades.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/crypto/get_v3_trades__cryptoticker
-# https://polygon-api-client.readthedocs.io/en/latest/Trades.html#polygon.RESTClient.list_trades
+# 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() # POLYGON_API_KEY environment variable 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):
diff --git a/examples/rest/custom-json-get.py b/examples/rest/custom-json-get.py
index c10d0a03..5ea5c400 100644
--- a/examples/rest/custom-json-get.py
+++ b/examples/rest/custom-json-get.py
@@ -1,4 +1,4 @@
-from polygon import RESTClient
+from massive import RESTClient
# type: ignore
import orjson
diff --git a/examples/rest/demo_correlation_matrix.py b/examples/rest/demo_correlation_matrix.py
index f056ab6d..f3ae4298 100644
--- a/examples/rest/demo_correlation_matrix.py
+++ b/examples/rest/demo_correlation_matrix.py
@@ -1,11 +1,11 @@
"""
This script computes and visualizes the correlation matrix of a selected set of
-stocks using Polygon's API. This script is for educational purposes only and is
+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://polygon.io/blog/finding-correlation-between-stocks/
+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:
@@ -16,17 +16,17 @@
- numpy
- seaborn
- matplotlib.pyplot
- - polygon's python-client library
+ - massive's python-client library
You can likely run:
- pip install pandas numpy seaborn matplotlib polygon-api-client
+ pip install pandas numpy seaborn matplotlib massive-api-client
-2) API Key: You will need a Polygon API key to fetch the stock data. This can
+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
- 'POLYGON_API_KEY'.
+ 'MASSIVE_API_KEY'.
- setx POLYGON_API_KEY "" <- windows
- export POLYGON_API_KEY="" <- mac/linux
+ 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.
@@ -40,11 +40,12 @@
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 polygon import RESTClient
+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.
@@ -68,7 +69,7 @@ def fetch_stock_data(symbols, start_date, end_date):
stocks = []
# client = RESTClient("XXXXXX") # hardcoded api_key is used
- client = RESTClient() # POLYGON_API_KEY environment variable is used
+ client = RESTClient() # MASSIVE_API_KEY environment variable is used
try:
for symbol in symbols:
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
index b7ab233d..7e9c770f 100644
--- a/examples/rest/forex-aggregates_bars.py
+++ b/examples/rest/forex-aggregates_bars.py
@@ -1,20 +1,20 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/forex/get_v2_aggs_ticker__forexticker__range__multiplier___timespan___from___to
-# https://polygon-api-client.readthedocs.io/en/latest/Aggs.html#polygon.RESTClient.list_aggs
+# 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 "POLYGON_API_KEY".
+# to use the environment variable "MASSIVE_API_KEY".
#
-# setx POLYGON_API_KEY "" <- windows
-# export POLYGON_API_KEY="" <- mac/linux
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
aggs = []
for a in client.list_aggs(
diff --git a/examples/rest/forex-conditions.py b/examples/rest/forex-conditions.py
index fca1e887..9fed0838 100644
--- a/examples/rest/forex-conditions.py
+++ b/examples/rest/forex-conditions.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/forex/get_v3_reference_conditions
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#list-conditions
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
conditions = []
for c in client.list_conditions("fx", limit=1000):
diff --git a/examples/rest/forex-exchanges.py b/examples/rest/forex-exchanges.py
index a573a19b..a816a053 100644
--- a/examples/rest/forex-exchanges.py
+++ b/examples/rest/forex-exchanges.py
@@ -1,24 +1,22 @@
-from polygon import RESTClient
-from polygon.rest.models import (
+from massive import RESTClient
+from massive.rest.models import (
Exchange,
)
# docs
-# https://polygon.io/docs/options/get_v3_reference_exchanges
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#get-exchanges
+# 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() # POLYGON_API_KEY environment variable 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(
diff --git a/examples/rest/forex-grouped_daily_bars.py b/examples/rest/forex-grouped_daily_bars.py
index f8130877..452faa4b 100644
--- a/examples/rest/forex-grouped_daily_bars.py
+++ b/examples/rest/forex-grouped_daily_bars.py
@@ -1,12 +1,12 @@
-from polygon import RESTClient
+from massive import RESTClient
import pprint
# docs
-# https://polygon.io/docs/forex/get_v2_aggs_grouped_locale_global_market_fx__date
-# https://polygon-api-client.readthedocs.io/en/latest/Aggs.html#get-grouped-daily-aggs
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
grouped = client.get_grouped_daily_aggs(
"2023-03-27",
diff --git a/examples/rest/forex-last_quote_for_a_currency_pair.py b/examples/rest/forex-last_quote_for_a_currency_pair.py
index 8b3c78b1..bf349732 100644
--- a/examples/rest/forex-last_quote_for_a_currency_pair.py
+++ b/examples/rest/forex-last_quote_for_a_currency_pair.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/forex/get_v1_last_quote_currencies__from___to
-# https://polygon-api-client.readthedocs.io/en/latest/Quotes.html#get-last-forex-quote
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
quote = client.get_last_forex_quote(
"AUD",
diff --git a/examples/rest/forex-market_holidays.py b/examples/rest/forex-market_holidays.py
index 85489844..df3b8bb4 100644
--- a/examples/rest/forex-market_holidays.py
+++ b/examples/rest/forex-market_holidays.py
@@ -1,22 +1,20 @@
-from polygon import RESTClient
-from polygon.rest.models import (
+from massive import RESTClient
+from massive.rest.models import (
MarketHoliday,
)
# docs
-# https://polygon.io/docs/forex/get_v1_marketstatus_upcoming
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#get-market-holidays
+# 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() # POLYGON_API_KEY environment variable 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
index 06f544cc..f5d6a451 100644
--- a/examples/rest/forex-market_status.py
+++ b/examples/rest/forex-market_status.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/forex/get_v1_marketstatus_now
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#get-market-status
+# 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() # POLYGON_API_KEY environment variable 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
index 0de11709..e6896afe 100644
--- a/examples/rest/forex-previous_close.py
+++ b/examples/rest/forex-previous_close.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/forex/get_v2_aggs_ticker__forexticker__prev
-# https://polygon-api-client.readthedocs.io/en/latest/Aggs.html#get-previous-close-agg
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
aggs = client.get_previous_close_agg(
"C:EURUSD",
diff --git a/examples/rest/forex-quotes.py b/examples/rest/forex-quotes.py
index 880ebca8..36e8a7de 100644
--- a/examples/rest/forex-quotes.py
+++ b/examples/rest/forex-quotes.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/forex/get_v3_quotes__fxticker
-# https://polygon-api-client.readthedocs.io/en/latest/Quotes.html#list-quotes
+# 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() # POLYGON_API_KEY environment variable 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):
diff --git a/examples/rest/forex-real-time_currency_conversion.py b/examples/rest/forex-real-time_currency_conversion.py
index b50099c9..77590dac 100644
--- a/examples/rest/forex-real-time_currency_conversion.py
+++ b/examples/rest/forex-real-time_currency_conversion.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/forex/get_v1_conversion__from___to
-# https://polygon-api-client.readthedocs.io/en/latest/Quotes.html#get-real-time-currency-conversion
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
rate = client.get_real_time_currency_conversion(
"AUD",
diff --git a/examples/rest/forex-snapshots_all_tickers.py b/examples/rest/forex-snapshots_all_tickers.py
index 0650bbc6..b61f5eda 100644
--- a/examples/rest/forex-snapshots_all_tickers.py
+++ b/examples/rest/forex-snapshots_all_tickers.py
@@ -1,15 +1,15 @@
-from polygon import RESTClient
-from polygon.rest.models import (
+from massive import RESTClient
+from massive.rest.models import (
TickerSnapshot,
Agg,
)
# docs
-# https://polygon.io/docs/forex/get_v2_snapshot_locale_global_markets_forex_tickers
-# https://polygon-api-client.readthedocs.io/en/latest/Snapshot.html#get-all-snapshots
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
snapshot = client.get_snapshot_all("forex") # all tickers
@@ -18,18 +18,14 @@
# 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
diff --git a/examples/rest/forex-snapshots_gainers_losers.py b/examples/rest/forex-snapshots_gainers_losers.py
index 16a59149..9fc7e36a 100644
--- a/examples/rest/forex-snapshots_gainers_losers.py
+++ b/examples/rest/forex-snapshots_gainers_losers.py
@@ -1,14 +1,14 @@
-from polygon import RESTClient
-from polygon.rest.models import (
+from massive import RESTClient
+from massive.rest.models import (
TickerSnapshot,
)
# docs
-# https://polygon.io/docs/forex/get_v2_snapshot_locale_global_markets_forex__direction
-# https://polygon-api-client.readthedocs.io/en/latest/Snapshot.html#get-gainers-losers-snapshot
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
# get gainers
gainers = client.get_snapshot_direction("forex", "gainers")
@@ -16,13 +16,10 @@
# 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()
@@ -33,11 +30,8 @@
# 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
index 9dbfc0ff..f8cb5562 100644
--- a/examples/rest/forex-snapshots_ticker.py
+++ b/examples/rest/forex-snapshots_ticker.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/forex/get_v2_snapshot_locale_global_markets_forex_tickers__ticker
-# https://polygon-api-client.readthedocs.io/en/latest/Snapshot.html#get-ticker-snapshot
+# 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() # POLYGON_API_KEY environment variable 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
index ab927dcb..2521e36d 100644
--- a/examples/rest/forex-technical_indicators_ema.py
+++ b/examples/rest/forex-technical_indicators_ema.py
@@ -1,11 +1,17 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/forex/get_v1_indicators_ema__fxticker
-# https://github.com/polygon-io/client-python/blob/master/polygon/rest/indicators.py
+# 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() # POLYGON_API_KEY environment variable 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",
+)
-ema = client.get_ema("C:EURUSD")
print(ema)
diff --git a/examples/rest/forex-technical_indicators_macd.py b/examples/rest/forex-technical_indicators_macd.py
index 2613f61a..8c07521c 100644
--- a/examples/rest/forex-technical_indicators_macd.py
+++ b/examples/rest/forex-technical_indicators_macd.py
@@ -1,11 +1,19 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/forex/get_v1_indicators_macd__fxticker
-# https://github.com/polygon-io/client-python/blob/master/polygon/rest/indicators.py
+# 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() # POLYGON_API_KEY environment variable 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",
+)
-macd = client.get_macd("C:EURUSD")
print(macd)
diff --git a/examples/rest/forex-technical_indicators_rsi.py b/examples/rest/forex-technical_indicators_rsi.py
index 0b3001ac..5ec4d6f2 100644
--- a/examples/rest/forex-technical_indicators_rsi.py
+++ b/examples/rest/forex-technical_indicators_rsi.py
@@ -1,11 +1,17 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/forex/get_v1_indicators_rsi__fxticker
-# https://github.com/polygon-io/client-python/blob/master/polygon/rest/indicators.py
+# 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() # POLYGON_API_KEY environment variable 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",
+)
-rsi = client.get_rsi("C:EURUSD")
print(rsi)
diff --git a/examples/rest/forex-technical_indicators_sma.py b/examples/rest/forex-technical_indicators_sma.py
index 22389b63..51ede4d2 100644
--- a/examples/rest/forex-technical_indicators_sma.py
+++ b/examples/rest/forex-technical_indicators_sma.py
@@ -1,11 +1,17 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/forex/get_v1_indicators_sma__fxticker
-# https://github.com/polygon-io/client-python/blob/master/polygon/rest/indicators.py
+# 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() # POLYGON_API_KEY environment variable 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",
+)
-sma = client.get_sma("C:EURUSD")
print(sma)
diff --git a/examples/rest/forex-tickers.py b/examples/rest/forex-tickers.py
index c1736721..10c49b6f 100644
--- a/examples/rest/forex-tickers.py
+++ b/examples/rest/forex-tickers.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/forex/get_v3_reference_tickers
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#list-tickers
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
tickers = []
for t in client.list_tickers(market="fx", limit=1000):
diff --git a/examples/rest/indices-aggregates_bars.py b/examples/rest/indices-aggregates_bars.py
index b2b561ad..ddb9f9cd 100644
--- a/examples/rest/indices-aggregates_bars.py
+++ b/examples/rest/indices-aggregates_bars.py
@@ -1,20 +1,20 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/indices/get_v2_aggs_ticker__indicesticker__range__multiplier___timespan___from___to
-# https://polygon-api-client.readthedocs.io/en/latest/Aggs.html#polygon.RESTClient.list_aggs
+# 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 "POLYGON_API_KEY".
+# to use the environment variable "MASSIVE_API_KEY".
#
-# setx POLYGON_API_KEY "" <- windows
-# export POLYGON_API_KEY="" <- mac/linux
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
aggs = []
for a in client.list_aggs(
diff --git a/examples/rest/indices-daily_open_close.py b/examples/rest/indices-daily_open_close.py
index f84a51ab..85c0d405 100644
--- a/examples/rest/indices-daily_open_close.py
+++ b/examples/rest/indices-daily_open_close.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/indices/get_v1_open-close__indicesticker___date
-# https://polygon-api-client.readthedocs.io/en/latest/Aggs.html#get-daily-open-close-agg
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
# make request
request = client.get_daily_open_close_agg(
diff --git a/examples/rest/indices-market_holidays.py b/examples/rest/indices-market_holidays.py
index c1e94932..49fe6fd2 100644
--- a/examples/rest/indices-market_holidays.py
+++ b/examples/rest/indices-market_holidays.py
@@ -1,22 +1,20 @@
-from polygon import RESTClient
-from polygon.rest.models import (
+from massive import RESTClient
+from massive.rest.models import (
MarketHoliday,
)
# docs
-# https://polygon.io/docs/indices/get_v1_marketstatus_upcoming
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#get-market-holidays
+# 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() # POLYGON_API_KEY environment variable 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
index 6c74dee3..10296a94 100644
--- a/examples/rest/indices-market_status.py
+++ b/examples/rest/indices-market_status.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/indices/get_v1_marketstatus_now
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#get-market-status
+# 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() # POLYGON_API_KEY environment variable 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
index 8774bd6e..18d7ceb5 100644
--- a/examples/rest/indices-previous_close.py
+++ b/examples/rest/indices-previous_close.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/indices/get_v2_aggs_ticker__indicesticker__prev
-# https://polygon-api-client.readthedocs.io/en/latest/Aggs.html#get-previous-close-agg
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
aggs = client.get_previous_close_agg(
"I:SPX",
diff --git a/examples/rest/indices-snapshots.py b/examples/rest/indices-snapshots.py
index 407d2de1..5e85343f 100644
--- a/examples/rest/indices-snapshots.py
+++ b/examples/rest/indices-snapshots.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/indices/get_v3_snapshot_indices
-# https://github.com/polygon-io/client-python/blob/master/polygon/rest/snapshot.py#
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
tickers = ["I:SPX", "I:DJI", "I:VIX"]
snapshot = client.get_snapshot_indices(tickers)
diff --git a/examples/rest/indices-technical_indicators_ema.py b/examples/rest/indices-technical_indicators_ema.py
index bbf9bc39..35bc82ce 100644
--- a/examples/rest/indices-technical_indicators_ema.py
+++ b/examples/rest/indices-technical_indicators_ema.py
@@ -1,11 +1,17 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/indices/get_v1_indicators_ema__indicesticker
-# https://github.com/polygon-io/client-python/blob/master/polygon/rest/indicators.py
+# 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() # POLYGON_API_KEY environment variable 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",
+)
-ema = client.get_ema("I:SPX")
print(ema)
diff --git a/examples/rest/indices-technical_indicators_macd.py b/examples/rest/indices-technical_indicators_macd.py
index 751258aa..c64524b7 100644
--- a/examples/rest/indices-technical_indicators_macd.py
+++ b/examples/rest/indices-technical_indicators_macd.py
@@ -1,11 +1,19 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/indices/get_v1_indicators_macd__indicesticker
-# https://github.com/polygon-io/client-python/blob/master/polygon/rest/indicators.py
+# 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() # POLYGON_API_KEY environment variable 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",
+)
-macd = client.get_macd("I:SPX")
print(macd)
diff --git a/examples/rest/indices-technical_indicators_rsi.py b/examples/rest/indices-technical_indicators_rsi.py
index 93f1a16b..c8e3bce1 100644
--- a/examples/rest/indices-technical_indicators_rsi.py
+++ b/examples/rest/indices-technical_indicators_rsi.py
@@ -1,11 +1,17 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/indices/get_v1_indicators_rsi__indicesticker
-# https://github.com/polygon-io/client-python/blob/master/polygon/rest/indicators.py
+# 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() # POLYGON_API_KEY environment variable 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",
+)
-rsi = client.get_rsi("I:SPX")
print(rsi)
diff --git a/examples/rest/indices-technical_indicators_sma.py b/examples/rest/indices-technical_indicators_sma.py
index 5343e54d..709ec54b 100644
--- a/examples/rest/indices-technical_indicators_sma.py
+++ b/examples/rest/indices-technical_indicators_sma.py
@@ -1,11 +1,17 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/indices/get_v1_indicators_sma__indicesticker
-# https://github.com/polygon-io/client-python/blob/master/polygon/rest/indicators.py
+# 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() # POLYGON_API_KEY environment variable 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",
+)
-sma = client.get_sma("I:SPX")
print(sma)
diff --git a/examples/rest/indices-ticker_types.py b/examples/rest/indices-ticker_types.py
index ec3277e9..dfe62a1b 100644
--- a/examples/rest/indices-ticker_types.py
+++ b/examples/rest/indices-ticker_types.py
@@ -1,16 +1,16 @@
from typing import Optional, Union, List
from urllib3 import HTTPResponse
-from polygon import RESTClient
-from polygon.rest.models import (
+from massive import RESTClient
+from massive.rest.models import (
TickerTypes,
)
# docs
-# https://polygon.io/docs/indices/get_v3_reference_tickers_types
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#get-ticker-types
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
types: Optional[Union[List[TickerTypes], HTTPResponse]] = None
diff --git a/examples/rest/indices-tickers.py b/examples/rest/indices-tickers.py
index a0786f19..0270a9be 100644
--- a/examples/rest/indices-tickers.py
+++ b/examples/rest/indices-tickers.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/indices/get_v3_reference_tickers
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#list-tickers
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
tickers = []
for t in client.list_tickers(market="indices", limit=1000):
diff --git a/examples/rest/options-aggregates_bars.py b/examples/rest/options-aggregates_bars.py
index 62e3297b..71c5343f 100644
--- a/examples/rest/options-aggregates_bars.py
+++ b/examples/rest/options-aggregates_bars.py
@@ -1,20 +1,20 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/options/get_v2_aggs_ticker__optionsticker__range__multiplier___timespan___from___to
-# https://polygon-api-client.readthedocs.io/en/latest/Aggs.html#polygon.RESTClient.list_aggs
+# 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 "POLYGON_API_KEY".
+# to use the environment variable "MASSIVE_API_KEY".
#
-# setx POLYGON_API_KEY "" <- windows
-# export POLYGON_API_KEY="" <- mac/linux
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
aggs = []
for a in client.list_aggs(
diff --git a/examples/rest/options-conditions.py b/examples/rest/options-conditions.py
index 3d72e3e7..30e40905 100644
--- a/examples/rest/options-conditions.py
+++ b/examples/rest/options-conditions.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/options/get_v3_reference_conditions
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#list-conditions
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
conditions = []
for c in client.list_conditions("options", limit=1000):
diff --git a/examples/rest/options-contract.py b/examples/rest/options-contract.py
index f87c161e..84093aa1 100644
--- a/examples/rest/options-contract.py
+++ b/examples/rest/options-contract.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/options/get_v3_reference_options_contracts__options_ticker
-# https://polygon-api-client.readthedocs.io/en/latest/Contracts.html
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
contract = client.get_options_contract("O:EVRI240119C00002500")
diff --git a/examples/rest/options-contracts.py b/examples/rest/options-contracts.py
index 34d7327b..08995c10 100644
--- a/examples/rest/options-contracts.py
+++ b/examples/rest/options-contracts.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/options/get_v3_reference_options_contracts
-# https://polygon-api-client.readthedocs.io/en/latest/Contracts.html#list-options-contracts
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
contracts = []
for c in client.list_options_contracts("HCP"):
diff --git a/examples/rest/options-daily_open_close.py b/examples/rest/options-daily_open_close.py
index 54a700ce..7a756613 100644
--- a/examples/rest/options-daily_open_close.py
+++ b/examples/rest/options-daily_open_close.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/options/get_v1_open-close__optionsticker___date
-# https://polygon-api-client.readthedocs.io/en/latest/Aggs.html#get-daily-open-close-agg
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
# make request
request = client.get_daily_open_close_agg(
diff --git a/examples/rest/options-exchanges.py b/examples/rest/options-exchanges.py
index a1affada..9678e19a 100644
--- a/examples/rest/options-exchanges.py
+++ b/examples/rest/options-exchanges.py
@@ -1,24 +1,22 @@
-from polygon import RESTClient
-from polygon.rest.models import (
+from massive import RESTClient
+from massive.rest.models import (
Exchange,
)
# docs
-# https://polygon.io/docs/options/get_v3_reference_exchanges
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#get-exchanges
+# 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() # POLYGON_API_KEY environment variable 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(
diff --git a/examples/rest/options-last_trade.py b/examples/rest/options-last_trade.py
index bf3e7662..d24cc79d 100644
--- a/examples/rest/options-last_trade.py
+++ b/examples/rest/options-last_trade.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/options/get_v2_last_trade__optionsticker
-# https://polygon-api-client.readthedocs.io/en/latest/Trades.html#get-last-trade
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
trade = client.get_last_trade(
"O:TSLA210903C00700000",
diff --git a/examples/rest/options-market_holidays.py b/examples/rest/options-market_holidays.py
index d54b8758..134aff86 100644
--- a/examples/rest/options-market_holidays.py
+++ b/examples/rest/options-market_holidays.py
@@ -1,22 +1,20 @@
-from polygon import RESTClient
-from polygon.rest.models import (
+from massive import RESTClient
+from massive.rest.models import (
MarketHoliday,
)
# docs
-# https://polygon.io/docs/options/get_v1_marketstatus_upcoming
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#get-market-holidays
+# 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() # POLYGON_API_KEY environment variable 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
index fb8e5ccd..8a8e7bfc 100644
--- a/examples/rest/options-market_status.py
+++ b/examples/rest/options-market_status.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/options/get_v1_marketstatus_now
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#get-market-status
+# 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() # POLYGON_API_KEY environment variable 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
index f7b9d06b..720dc9d0 100644
--- a/examples/rest/options-previous_close.py
+++ b/examples/rest/options-previous_close.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/options/get_v2_aggs_ticker__optionsticker__prev
-# https://polygon-api-client.readthedocs.io/en/latest/Aggs.html#get-previous-close-agg
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
aggs = client.get_previous_close_agg(
"O:SPY251219C00650000",
diff --git a/examples/rest/options-quotes.py b/examples/rest/options-quotes.py
index 71d2577a..1cdf9b8a 100644
--- a/examples/rest/options-quotes.py
+++ b/examples/rest/options-quotes.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/options/get_v3_quotes__optionsticker
-# https://polygon-api-client.readthedocs.io/en/latest/Quotes.html#list-quotes
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
quotes = []
for t in client.list_quotes("O:SPY241220P00720000", limit=50000):
diff --git a/examples/rest/options-snapshots_option_contract.py b/examples/rest/options-snapshots_option_contract.py
index 280e3315..bffc9ff4 100644
--- a/examples/rest/options-snapshots_option_contract.py
+++ b/examples/rest/options-snapshots_option_contract.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/options/get_v3_snapshot_options__underlyingasset___optioncontract
-# https://polygon-api-client.readthedocs.io/en/latest/Snapshot.html
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
snapshot = client.get_snapshot_option("AAPL", "O:AAPL230616C00150000")
diff --git a/examples/rest/options-snapshots_options_chain.py b/examples/rest/options-snapshots_options_chain.py
index 9ebdd93a..8b0c5f02 100644
--- a/examples/rest/options-snapshots_options_chain.py
+++ b/examples/rest/options-snapshots_options_chain.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/options/get_v3_snapshot_options__underlyingasset
-# ttps://polygon-api-client.readthedocs.io/en/latest/Snapshot.html#get-all-snapshots
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
options_chain = []
for o in client.list_snapshot_options_chain(
diff --git a/examples/rest/options-technical_indicators_ema.py b/examples/rest/options-technical_indicators_ema.py
index ff04ff76..82dd99d7 100644
--- a/examples/rest/options-technical_indicators_ema.py
+++ b/examples/rest/options-technical_indicators_ema.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/options/get_v1_indicators_ema__optionsticker
-# https://github.com/polygon-io/client-python/blob/master/polygon/rest/indicators.py
+# 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() # POLYGON_API_KEY environment variable 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"
diff --git a/examples/rest/options-technical_indicators_macd.py b/examples/rest/options-technical_indicators_macd.py
index e7961c8f..a49f78a1 100644
--- a/examples/rest/options-technical_indicators_macd.py
+++ b/examples/rest/options-technical_indicators_macd.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/options/get_v1_indicators_macd__optionsticker
-# https://github.com/polygon-io/client-python/blob/master/polygon/rest/indicators.py
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
macd = client.get_macd(
ticker="O:SPY241220P00720000",
diff --git a/examples/rest/options-technical_indicators_rsi.py b/examples/rest/options-technical_indicators_rsi.py
index 4bf9ebde..0a92caec 100644
--- a/examples/rest/options-technical_indicators_rsi.py
+++ b/examples/rest/options-technical_indicators_rsi.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/options/get_v1_indicators_rsi__optionsticker
-# https://github.com/polygon-io/client-python/blob/master/polygon/rest/indicators.py
+# 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() # POLYGON_API_KEY environment variable 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"
diff --git a/examples/rest/options-technical_indicators_sma.py b/examples/rest/options-technical_indicators_sma.py
index ce6f3d0c..a6f0870e 100644
--- a/examples/rest/options-technical_indicators_sma.py
+++ b/examples/rest/options-technical_indicators_sma.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/options/get_v1_indicators_sma__optionsticker
-# https://github.com/polygon-io/client-python/blob/master/polygon/rest/indicators.py
+# 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() # POLYGON_API_KEY environment variable 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"
diff --git a/examples/rest/options-ticker_details.py b/examples/rest/options-ticker_details.py
index 43d59156..fe742286 100644
--- a/examples/rest/options-ticker_details.py
+++ b/examples/rest/options-ticker_details.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/options/get_v3_reference_tickers__ticker
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#get-ticker-details
+# 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() # POLYGON_API_KEY environment variable 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
index 099ee264..76b36c03 100644
--- a/examples/rest/options-ticker_news.py
+++ b/examples/rest/options-ticker_news.py
@@ -1,14 +1,14 @@
-from polygon import RESTClient
-from polygon.rest.models import (
+from massive import RESTClient
+from massive.rest.models import (
TickerNews,
)
# docs
-# https://polygon.io/docs/options/get_v2_reference_news
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#list-ticker-news
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
news = []
for n in client.list_ticker_news("AAPL", order="desc", limit=1000):
@@ -16,10 +16,8 @@
# 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:
diff --git a/examples/rest/options-tickers.py b/examples/rest/options-tickers.py
index d77ef641..4a5e1104 100644
--- a/examples/rest/options-tickers.py
+++ b/examples/rest/options-tickers.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/options/get_v3_reference_tickers
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#list-tickers
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
tickers = []
for t in client.list_tickers(limit=1000):
diff --git a/examples/rest/options-trades.py b/examples/rest/options-trades.py
index 210362d5..8ff559ec 100644
--- a/examples/rest/options-trades.py
+++ b/examples/rest/options-trades.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/options/get_v3_trades__optionsticker
-# https://polygon-api-client.readthedocs.io/en/latest/Trades.html#polygon.RESTClient.list_trades
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
trades = []
for t in client.list_trades("O:TSLA210903C00700000", limit=50000):
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 8a9586ad..377943cc 100644
--- a/examples/rest/simple-get.py
+++ b/examples/rest/simple-get.py
@@ -1,5 +1,5 @@
-from polygon import RESTClient
-from polygon.rest import models
+from massive import RESTClient
+from massive.rest import models
client = RESTClient()
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
index c553b00e..3f2d0e59 100644
--- a/examples/rest/stocks-aggregates_bars.py
+++ b/examples/rest/stocks-aggregates_bars.py
@@ -1,20 +1,20 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/stocks/get_v2_aggs_ticker__stocksticker__range__multiplier___timespan___from___to
-# https://polygon-api-client.readthedocs.io/en/latest/Aggs.html#polygon.RESTClient.list_aggs
+# 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 "POLYGON_API_KEY".
+# to use the environment variable "MASSIVE_API_KEY".
#
-# setx POLYGON_API_KEY "" <- windows
-# export POLYGON_API_KEY="" <- mac/linux
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
aggs = []
for a in client.list_aggs(
diff --git a/examples/rest/stocks-aggregates_bars_extra.py b/examples/rest/stocks-aggregates_bars_extra.py
index 98515456..feeb3218 100644
--- a/examples/rest/stocks-aggregates_bars_extra.py
+++ b/examples/rest/stocks-aggregates_bars_extra.py
@@ -1,13 +1,13 @@
# This code retrieves stock market data for a specific stock using the
-# Polygon REST API and writes it to a CSV file. It uses the "polygon"
+# 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 polygon import RESTClient
-from polygon.rest.models import (
+from massive import RESTClient
+from massive.rest.models import (
Agg,
)
import csv
@@ -15,11 +15,11 @@
import io
# docs
-# https://polygon.io/docs/stocks/get_v2_aggs_ticker__stocksticker__range__multiplier___timespan___from___to
-# https://polygon-api-client.readthedocs.io/en/latest/Aggs.html#polygon.RESTClient.list_aggs
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
aggs = []
for a in client.list_aggs(
@@ -56,13 +56,10 @@
# 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),
diff --git a/examples/rest/stocks-aggregates_bars_highcharts.py b/examples/rest/stocks-aggregates_bars_highcharts.py
index 38b06120..4695ed9d 100644
--- a/examples/rest/stocks-aggregates_bars_highcharts.py
+++ b/examples/rest/stocks-aggregates_bars_highcharts.py
@@ -1,5 +1,5 @@
-from polygon import RESTClient
-from polygon.rest.models import (
+from massive import RESTClient
+from massive.rest.models import (
Agg,
)
import datetime
@@ -8,13 +8,13 @@
import traceback
import json
-# This program retrieves stock price data for the AAPL stock from the Polygon
+# 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 Polygon API every time the HTML page is loaded or refreshed. The
+# 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.
#
@@ -68,7 +68,7 @@
"""
-client = RESTClient() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
aggs = []
for a in client.list_aggs(
@@ -87,13 +87,10 @@
# 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,
diff --git a/examples/rest/stocks-conditions.py b/examples/rest/stocks-conditions.py
index 1be9b483..99740665 100644
--- a/examples/rest/stocks-conditions.py
+++ b/examples/rest/stocks-conditions.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/stocks/get_v3_reference_conditions
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#list-conditions
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
conditions = []
for c in client.list_conditions(limit=1000):
diff --git a/examples/rest/stocks-daily_open_close.py b/examples/rest/stocks-daily_open_close.py
index 65c96265..0e811597 100644
--- a/examples/rest/stocks-daily_open_close.py
+++ b/examples/rest/stocks-daily_open_close.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/stocks/get_v1_open-close__stocksticker___date
-# https://polygon-api-client.readthedocs.io/en/latest/Aggs.html#get-daily-open-close-agg
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
# make request
request = client.get_daily_open_close_agg(
diff --git a/examples/rest/stocks-dividends.py b/examples/rest/stocks-dividends.py
index 75cd795c..0c312195 100644
--- a/examples/rest/stocks-dividends.py
+++ b/examples/rest/stocks-dividends.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/stocks/get_v3_reference_dividends
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#list-dividends
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
dividends = []
for d in client.list_dividends("MSFT", limit=1000):
diff --git a/examples/rest/stocks-exchanges.py b/examples/rest/stocks-exchanges.py
index b65938e2..a8208163 100644
--- a/examples/rest/stocks-exchanges.py
+++ b/examples/rest/stocks-exchanges.py
@@ -1,24 +1,22 @@
-from polygon import RESTClient
-from polygon.rest.models import (
+from massive import RESTClient
+from massive.rest.models import (
Exchange,
)
# docs
-# https://polygon.io/docs/stocks/get_v3_reference_exchanges
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#get-exchanges
+# 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() # POLYGON_API_KEY environment variable 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(
diff --git a/examples/rest/stocks-grouped_daily_bars.py b/examples/rest/stocks-grouped_daily_bars.py
index ea0ff1cd..e5e75722 100644
--- a/examples/rest/stocks-grouped_daily_bars.py
+++ b/examples/rest/stocks-grouped_daily_bars.py
@@ -1,12 +1,12 @@
-from polygon import RESTClient
+from massive import RESTClient
import pprint
# docs
-# https://polygon.io/docs/stocks/get_v2_aggs_grouped_locale_us_market_stocks__date
-# https://polygon-api-client.readthedocs.io/en/latest/Aggs.html#get-grouped-daily-aggs
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
grouped = client.get_grouped_daily_aggs(
"2023-02-16",
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
index 15b83e55..78da1600 100644
--- a/examples/rest/stocks-last_quote.py
+++ b/examples/rest/stocks-last_quote.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/stocks/get_v2_last_nbbo__stocksticker
-# https://polygon-api-client.readthedocs.io/en/latest/Quotes.html#get-last-quote
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
quote = client.get_last_quote(
"AAPL",
diff --git a/examples/rest/stocks-last_trade.py b/examples/rest/stocks-last_trade.py
index 42278ba0..77f19451 100644
--- a/examples/rest/stocks-last_trade.py
+++ b/examples/rest/stocks-last_trade.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/stocks/get_v2_last_trade__stocksticker
-# https://polygon-api-client.readthedocs.io/en/latest/Trades.html#get-last-trade
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
trade = client.get_last_trade(
"AAPL",
diff --git a/examples/rest/stocks-market_holidays.py b/examples/rest/stocks-market_holidays.py
index bd39bd67..8e55248d 100644
--- a/examples/rest/stocks-market_holidays.py
+++ b/examples/rest/stocks-market_holidays.py
@@ -1,22 +1,20 @@
-from polygon import RESTClient
-from polygon.rest.models import (
+from massive import RESTClient
+from massive.rest.models import (
MarketHoliday,
)
# docs
-# https://polygon.io/docs/stocks/get_v1_marketstatus_upcoming
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#get-market-holidays
+# 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() # POLYGON_API_KEY environment variable 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
index bd4362b3..dc143f57 100644
--- a/examples/rest/stocks-market_status.py
+++ b/examples/rest/stocks-market_status.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/stocks/get_v1_marketstatus_now
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#get-market-status
+# 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() # POLYGON_API_KEY environment variable 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
index 9785ab2e..a1d0fab0 100644
--- a/examples/rest/stocks-previous_close.py
+++ b/examples/rest/stocks-previous_close.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/stocks/get_v2_aggs_ticker__stocksticker__prev
-# https://polygon-api-client.readthedocs.io/en/latest/Aggs.html#get-previous-close-agg
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
aggs = client.get_previous_close_agg(
"AAPL",
diff --git a/examples/rest/stocks-quotes.py b/examples/rest/stocks-quotes.py
index 4d615dab..80f61c2b 100644
--- a/examples/rest/stocks-quotes.py
+++ b/examples/rest/stocks-quotes.py
@@ -1,8 +1,8 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/stocks/get_v3_quotes__stockticker
-# https://polygon-api-client.readthedocs.io/en/latest/Quotes.html#list-quotes
+# 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
@@ -13,7 +13,7 @@
# investment decisions and execute trades at the best available price.
# client = RESTClient("XXXXXX") # hardcoded api_key is used
-client = RESTClient() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
quotes = []
for t in client.list_quotes("IBIO", "2023-02-01", limit=50000):
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
index 4f6e0157..f351f918 100644
--- a/examples/rest/stocks-snapshots_all.py
+++ b/examples/rest/stocks-snapshots_all.py
@@ -1,15 +1,15 @@
-from polygon import RESTClient
-from polygon.rest.models import (
+from massive import RESTClient
+from massive.rest.models import (
TickerSnapshot,
Agg,
)
# docs
-# https://polygon.io/docs/stocks/get_v2_snapshot_locale_us_markets_stocks_tickers
-# https://polygon-api-client.readthedocs.io/en/latest/Snapshot.html#get-all-snapshots
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
# tickers we are interested in
tickers = ["TSLA", "AAPL", "MSFT", "META"]
@@ -22,18 +22,14 @@
# 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
diff --git a/examples/rest/stocks-snapshots_gainers_losers.py b/examples/rest/stocks-snapshots_gainers_losers.py
index b0194bfa..80fadc14 100644
--- a/examples/rest/stocks-snapshots_gainers_losers.py
+++ b/examples/rest/stocks-snapshots_gainers_losers.py
@@ -1,14 +1,14 @@
-from polygon import RESTClient
-from polygon.rest.models import (
+from massive import RESTClient
+from massive.rest.models import (
TickerSnapshot,
)
# docs
-# https://polygon.io/docs/stocks/get_v2_snapshot_locale_us_markets_stocks__direction
-# https://polygon-api-client.readthedocs.io/en/latest/Snapshot.html#get-gainers-losers-snapshot
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
# get gainers
gainers = client.get_snapshot_direction("stocks", "gainers")
@@ -16,13 +16,10 @@
# 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()
@@ -33,11 +30,8 @@
# 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
index 2b264338..f12107ec 100644
--- a/examples/rest/stocks-snapshots_ticker.py
+++ b/examples/rest/stocks-snapshots_ticker.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/stocks/get_v2_snapshot_locale_us_markets_stocks_tickers__stocksticker
-# https://polygon-api-client.readthedocs.io/en/latest/Snapshot.html#get-ticker-snapshot
+# 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() # POLYGON_API_KEY environment variable 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
index dc356494..2eb0c957 100644
--- a/examples/rest/stocks-stock_financials.py
+++ b/examples/rest/stocks-stock_financials.py
@@ -1,13 +1,20 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/stocks/get_vx_reference_financials
-# https://polygon-api-client.readthedocs.io/en/latest/vX.html#list-stock-financials
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
financials = []
-for f in client.vx.list_stock_financials("AAPL"):
+for f in client.vx.list_stock_financials("AAPL", filing_date="2024-11-01"):
financials.append(f)
+
+ # get diluted_earnings_per_share
+ # print(f.financials.income_statement.diluted_earnings_per_share)
+
+ # get net_income_loss
+ # print(f.financials.income_statement.net_income_loss)
+
print(financials)
diff --git a/examples/rest/stocks-stock_splits.py b/examples/rest/stocks-stock_splits.py
index 55980973..4a43cad2 100644
--- a/examples/rest/stocks-stock_splits.py
+++ b/examples/rest/stocks-stock_splits.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/stocks/get_v3_reference_splits
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#list-splits
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
splits = []
for s in client.list_splits("TSLA", limit=1000):
diff --git a/examples/rest/stocks-technical_indicators_ema.py b/examples/rest/stocks-technical_indicators_ema.py
index 0b87d48d..b71abe46 100644
--- a/examples/rest/stocks-technical_indicators_ema.py
+++ b/examples/rest/stocks-technical_indicators_ema.py
@@ -1,11 +1,17 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/stocks/get_v1_indicators_ema__stockticker
-# https://github.com/polygon-io/client-python/blob/master/polygon/rest/indicators.py
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+ema = client.get_ema(
+ ticker="AAPL",
+ timespan="day",
+ window=50,
+ series_type="close",
+)
-ema = client.get_ema("AAPL")
print(ema)
diff --git a/examples/rest/stocks-technical_indicators_macd.py b/examples/rest/stocks-technical_indicators_macd.py
index 45221926..4b9bd323 100644
--- a/examples/rest/stocks-technical_indicators_macd.py
+++ b/examples/rest/stocks-technical_indicators_macd.py
@@ -1,11 +1,19 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/stocks/get_v1_indicators_macd__stockticker
-# https://github.com/polygon-io/client-python/blob/master/polygon/rest/indicators.py
+# 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() # POLYGON_API_KEY environment variable 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",
+)
-macd = client.get_macd("AAPL")
print(macd)
diff --git a/examples/rest/stocks-technical_indicators_rsi.py b/examples/rest/stocks-technical_indicators_rsi.py
index 4fd62d29..20ac8758 100644
--- a/examples/rest/stocks-technical_indicators_rsi.py
+++ b/examples/rest/stocks-technical_indicators_rsi.py
@@ -1,11 +1,17 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/stocks/get_v1_indicators_rsi__stockticker
-# https://github.com/polygon-io/client-python/blob/master/polygon/rest/indicators.py
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+rsi = client.get_rsi(
+ ticker="AAPL",
+ timespan="day",
+ window=14,
+ series_type="close",
+)
-rsi = client.get_rsi("AAPL")
print(rsi)
diff --git a/examples/rest/stocks-technical_indicators_sma.py b/examples/rest/stocks-technical_indicators_sma.py
index bfc0796f..a08fec13 100644
--- a/examples/rest/stocks-technical_indicators_sma.py
+++ b/examples/rest/stocks-technical_indicators_sma.py
@@ -1,11 +1,17 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/stocks/get_v1_indicators_sma__stockticker
-# https://github.com/polygon-io/client-python/blob/master/polygon/rest/indicators.py
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+sma = client.get_sma(
+ ticker="AAPL",
+ timespan="day",
+ window=50,
+ series_type="close",
+)
-sma = client.get_sma("AAPL")
print(sma)
diff --git a/examples/rest/stocks-ticker_details.py b/examples/rest/stocks-ticker_details.py
index 5f81b4bc..ac3b6b1e 100644
--- a/examples/rest/stocks-ticker_details.py
+++ b/examples/rest/stocks-ticker_details.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/stocks/get_v3_reference_tickers__ticker
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#get-ticker-details
+# 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() # POLYGON_API_KEY environment variable 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
index 09b13432..b8337f43 100644
--- a/examples/rest/stocks-ticker_events.py
+++ b/examples/rest/stocks-ticker_events.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/stocks/get_vx_reference_tickers__id__events
-# https://github.com/polygon-io/client-python/blob/master/polygon/rest/reference.py
+# 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() # POLYGON_API_KEY environment variable 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
index 41e08653..cea11857 100644
--- a/examples/rest/stocks-ticker_news.py
+++ b/examples/rest/stocks-ticker_news.py
@@ -1,14 +1,14 @@
-from polygon import RESTClient
-from polygon.rest.models import (
+from massive import RESTClient
+from massive.rest.models import (
TickerNews,
)
# docs
-# https://polygon.io/docs/stocks/get_v2_reference_news
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#list-ticker-news
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
news = []
for n in client.list_ticker_news("BBBY", order="desc", limit=1000):
@@ -18,10 +18,8 @@
# 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:
diff --git a/examples/rest/stocks-ticker_types.py b/examples/rest/stocks-ticker_types.py
index fa09338d..7748868c 100644
--- a/examples/rest/stocks-ticker_types.py
+++ b/examples/rest/stocks-ticker_types.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/stocks/get_v3_reference_tickers_types
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#get-ticker-types
+# 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() # POLYGON_API_KEY environment variable 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
index 7fc09230..c441fab2 100644
--- a/examples/rest/stocks-tickers.py
+++ b/examples/rest/stocks-tickers.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/stocks/get_v3_reference_tickers
-# https://polygon-api-client.readthedocs.io/en/latest/Reference.html#list-tickers
+# 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() # POLYGON_API_KEY environment variable 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):
diff --git a/examples/rest/stocks-trades.py b/examples/rest/stocks-trades.py
index 8f2f147b..9d1de07c 100644
--- a/examples/rest/stocks-trades.py
+++ b/examples/rest/stocks-trades.py
@@ -1,8 +1,8 @@
-from polygon import RESTClient
+from massive import RESTClient
# docs
-# https://polygon.io/docs/stocks/get_v3_trades__stockticker
-# https://polygon-api-client.readthedocs.io/en/latest/Trades.html#polygon.RESTClient.list_trades
+# 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
@@ -11,7 +11,7 @@
# market behavior and inform their investment decisions.
# client = RESTClient("XXXXXX") # hardcoded api_key is used
-client = RESTClient() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
trades = []
for t in client.list_trades("IBIO", "2023-02-01", limit=50000):
diff --git a/examples/rest/stocks-trades_extra.py b/examples/rest/stocks-trades_extra.py
index 61bc6b7d..0aa27142 100644
--- a/examples/rest/stocks-trades_extra.py
+++ b/examples/rest/stocks-trades_extra.py
@@ -1,28 +1,25 @@
# This code retrieves trade records and counts the amount of money that changes hands.
-from polygon import RESTClient
-from polygon.rest.models import (
+from massive import RESTClient
+from massive.rest.models import (
Trade,
)
# docs
-# https://polygon.io/docs/stocks/get_v3_trades__stockticker
-# https://polygon-api-client.readthedocs.io/en/latest/Trades.html#polygon.RESTClient.list_trades
+# 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() # POLYGON_API_KEY environment variable 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
diff --git a/examples/rest/universal-snapshot.py b/examples/rest/universal-snapshot.py
index 8f4d9be6..ba37c62d 100644
--- a/examples/rest/universal-snapshot.py
+++ b/examples/rest/universal-snapshot.py
@@ -1,16 +1,14 @@
from typing import cast, Iterator, Union
-
from urllib3 import HTTPResponse
-
-from polygon import RESTClient
-from polygon.rest.models import UniversalSnapshot, SnapshotMarketType
+from massive import RESTClient
+from massive.rest.models import UniversalSnapshot, SnapshotMarketType
# docs
-# https://polygon.io/docs/stocks/get_v3_snapshot
-# https://polygon-api-client.readthedocs.io/en/latest/Snapshot.html
+# 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() # POLYGON_API_KEY environment variable is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
def print_snapshots(iterator: Union[Iterator[UniversalSnapshot], HTTPResponse]):
@@ -35,12 +33,15 @@ def print_snapshots(iterator: Union[Iterator[UniversalSnapshot], HTTPResponse]):
)
print_snapshots(it)
-it = client.list_universal_snapshots(
- market_type=SnapshotMarketType.STOCKS, ticker_gt="A", ticker_lt="AAPL"
-)
+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(
- market_type=SnapshotMarketType.STOCKS, ticker_gte="AAPL", ticker_lte="ABB"
+ 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.
+
+
+
+### **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.
+
+
+
+## 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 += '